fontawesome.js 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113
  1. /*!
  2. * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
  3. * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  4. * Copyright 2022 Fonticons, Inc.
  5. */
  6. (function () {
  7. 'use strict';
  8. function ownKeys(object, enumerableOnly) {
  9. var keys = Object.keys(object);
  10. if (Object.getOwnPropertySymbols) {
  11. var symbols = Object.getOwnPropertySymbols(object);
  12. enumerableOnly && (symbols = symbols.filter(function (sym) {
  13. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  14. })), keys.push.apply(keys, symbols);
  15. }
  16. return keys;
  17. }
  18. function _objectSpread2(target) {
  19. for (var i = 1; i < arguments.length; i++) {
  20. var source = null != arguments[i] ? arguments[i] : {};
  21. i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
  22. _defineProperty(target, key, source[key]);
  23. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
  24. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  25. });
  26. }
  27. return target;
  28. }
  29. function _typeof(obj) {
  30. "@babel/helpers - typeof";
  31. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  32. return typeof obj;
  33. } : function (obj) {
  34. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  35. }, _typeof(obj);
  36. }
  37. function _wrapRegExp() {
  38. _wrapRegExp = function (re, groups) {
  39. return new BabelRegExp(re, void 0, groups);
  40. };
  41. var _super = RegExp.prototype,
  42. _groups = new WeakMap();
  43. function BabelRegExp(re, flags, groups) {
  44. var _this = new RegExp(re, flags);
  45. return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
  46. }
  47. function buildGroups(result, re) {
  48. var g = _groups.get(re);
  49. return Object.keys(g).reduce(function (groups, name) {
  50. return groups[name] = result[g[name]], groups;
  51. }, Object.create(null));
  52. }
  53. return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
  54. var result = _super.exec.call(this, str);
  55. return result && (result.groups = buildGroups(result, this)), result;
  56. }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
  57. if ("string" == typeof substitution) {
  58. var groups = _groups.get(this);
  59. return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
  60. return "$" + groups[name];
  61. }));
  62. }
  63. if ("function" == typeof substitution) {
  64. var _this = this;
  65. return _super[Symbol.replace].call(this, str, function () {
  66. var args = arguments;
  67. return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
  68. });
  69. }
  70. return _super[Symbol.replace].call(this, str, substitution);
  71. }, _wrapRegExp.apply(this, arguments);
  72. }
  73. function _classCallCheck(instance, Constructor) {
  74. if (!(instance instanceof Constructor)) {
  75. throw new TypeError("Cannot call a class as a function");
  76. }
  77. }
  78. function _defineProperties(target, props) {
  79. for (var i = 0; i < props.length; i++) {
  80. var descriptor = props[i];
  81. descriptor.enumerable = descriptor.enumerable || false;
  82. descriptor.configurable = true;
  83. if ("value" in descriptor) descriptor.writable = true;
  84. Object.defineProperty(target, descriptor.key, descriptor);
  85. }
  86. }
  87. function _createClass(Constructor, protoProps, staticProps) {
  88. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  89. if (staticProps) _defineProperties(Constructor, staticProps);
  90. Object.defineProperty(Constructor, "prototype", {
  91. writable: false
  92. });
  93. return Constructor;
  94. }
  95. function _defineProperty(obj, key, value) {
  96. if (key in obj) {
  97. Object.defineProperty(obj, key, {
  98. value: value,
  99. enumerable: true,
  100. configurable: true,
  101. writable: true
  102. });
  103. } else {
  104. obj[key] = value;
  105. }
  106. return obj;
  107. }
  108. function _inherits(subClass, superClass) {
  109. if (typeof superClass !== "function" && superClass !== null) {
  110. throw new TypeError("Super expression must either be null or a function");
  111. }
  112. subClass.prototype = Object.create(superClass && superClass.prototype, {
  113. constructor: {
  114. value: subClass,
  115. writable: true,
  116. configurable: true
  117. }
  118. });
  119. Object.defineProperty(subClass, "prototype", {
  120. writable: false
  121. });
  122. if (superClass) _setPrototypeOf(subClass, superClass);
  123. }
  124. function _setPrototypeOf(o, p) {
  125. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  126. o.__proto__ = p;
  127. return o;
  128. };
  129. return _setPrototypeOf(o, p);
  130. }
  131. function _slicedToArray(arr, i) {
  132. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  133. }
  134. function _toConsumableArray(arr) {
  135. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  136. }
  137. function _arrayWithoutHoles(arr) {
  138. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  139. }
  140. function _arrayWithHoles(arr) {
  141. if (Array.isArray(arr)) return arr;
  142. }
  143. function _iterableToArray(iter) {
  144. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  145. }
  146. function _iterableToArrayLimit(arr, i) {
  147. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  148. if (_i == null) return;
  149. var _arr = [];
  150. var _n = true;
  151. var _d = false;
  152. var _s, _e;
  153. try {
  154. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  155. _arr.push(_s.value);
  156. if (i && _arr.length === i) break;
  157. }
  158. } catch (err) {
  159. _d = true;
  160. _e = err;
  161. } finally {
  162. try {
  163. if (!_n && _i["return"] != null) _i["return"]();
  164. } finally {
  165. if (_d) throw _e;
  166. }
  167. }
  168. return _arr;
  169. }
  170. function _unsupportedIterableToArray(o, minLen) {
  171. if (!o) return;
  172. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  173. var n = Object.prototype.toString.call(o).slice(8, -1);
  174. if (n === "Object" && o.constructor) n = o.constructor.name;
  175. if (n === "Map" || n === "Set") return Array.from(o);
  176. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  177. }
  178. function _arrayLikeToArray(arr, len) {
  179. if (len == null || len > arr.length) len = arr.length;
  180. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  181. return arr2;
  182. }
  183. function _nonIterableSpread() {
  184. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  185. }
  186. function _nonIterableRest() {
  187. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  188. }
  189. var noop = function noop() {};
  190. var _WINDOW = {};
  191. var _DOCUMENT = {};
  192. var _MUTATION_OBSERVER = null;
  193. var _PERFORMANCE = {
  194. mark: noop,
  195. measure: noop
  196. };
  197. try {
  198. if (typeof window !== 'undefined') _WINDOW = window;
  199. if (typeof document !== 'undefined') _DOCUMENT = document;
  200. if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;
  201. if (typeof performance !== 'undefined') _PERFORMANCE = performance;
  202. } catch (e) {}
  203. var _ref = _WINDOW.navigator || {},
  204. _ref$userAgent = _ref.userAgent,
  205. userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
  206. var WINDOW = _WINDOW;
  207. var DOCUMENT = _DOCUMENT;
  208. var MUTATION_OBSERVER = _MUTATION_OBSERVER;
  209. var PERFORMANCE = _PERFORMANCE;
  210. var IS_BROWSER = !!WINDOW.document;
  211. var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
  212. var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
  213. var _familyProxy, _familyProxy2, _familyProxy3, _familyProxy4, _familyProxy5;
  214. var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
  215. var UNITS_IN_GRID = 16;
  216. var DEFAULT_CSS_PREFIX = 'fa';
  217. var DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';
  218. var DATA_FA_I2SVG = 'data-fa-i2svg';
  219. var DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';
  220. var DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';
  221. var DATA_PREFIX = 'data-prefix';
  222. var DATA_ICON = 'data-icon';
  223. var HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';
  224. var MUTATION_APPROACH_ASYNC = 'async';
  225. var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];
  226. var PRODUCTION = function () {
  227. try {
  228. return undefined === 'production';
  229. } catch (e) {
  230. return false;
  231. }
  232. }();
  233. var FAMILY_CLASSIC = 'classic';
  234. var FAMILY_SHARP = 'sharp';
  235. var FAMILIES = [FAMILY_CLASSIC, FAMILY_SHARP];
  236. function familyProxy(obj) {
  237. // Defaults to the classic family if family is not available
  238. return new Proxy(obj, {
  239. get: function get(target, prop) {
  240. return prop in target ? target[prop] : target[FAMILY_CLASSIC];
  241. }
  242. });
  243. }
  244. var PREFIX_TO_STYLE = familyProxy((_familyProxy = {}, _defineProperty(_familyProxy, FAMILY_CLASSIC, {
  245. 'fa': 'solid',
  246. 'fas': 'solid',
  247. 'fa-solid': 'solid',
  248. 'far': 'regular',
  249. 'fa-regular': 'regular',
  250. 'fal': 'light',
  251. 'fa-light': 'light',
  252. 'fat': 'thin',
  253. 'fa-thin': 'thin',
  254. 'fad': 'duotone',
  255. 'fa-duotone': 'duotone',
  256. 'fab': 'brands',
  257. 'fa-brands': 'brands',
  258. 'fak': 'kit',
  259. 'fa-kit': 'kit'
  260. }), _defineProperty(_familyProxy, FAMILY_SHARP, {
  261. 'fa': 'solid',
  262. 'fass': 'solid',
  263. 'fa-solid': 'solid'
  264. }), _familyProxy));
  265. var STYLE_TO_PREFIX = familyProxy((_familyProxy2 = {}, _defineProperty(_familyProxy2, FAMILY_CLASSIC, {
  266. 'solid': 'fas',
  267. 'regular': 'far',
  268. 'light': 'fal',
  269. 'thin': 'fat',
  270. 'duotone': 'fad',
  271. 'brands': 'fab',
  272. 'kit': 'fak'
  273. }), _defineProperty(_familyProxy2, FAMILY_SHARP, {
  274. 'solid': 'fass'
  275. }), _familyProxy2));
  276. var PREFIX_TO_LONG_STYLE = familyProxy((_familyProxy3 = {}, _defineProperty(_familyProxy3, FAMILY_CLASSIC, {
  277. 'fab': 'fa-brands',
  278. 'fad': 'fa-duotone',
  279. 'fak': 'fa-kit',
  280. 'fal': 'fa-light',
  281. 'far': 'fa-regular',
  282. 'fas': 'fa-solid',
  283. 'fat': 'fa-thin'
  284. }), _defineProperty(_familyProxy3, FAMILY_SHARP, {
  285. 'fass': 'fa-solid'
  286. }), _familyProxy3));
  287. var LONG_STYLE_TO_PREFIX = familyProxy((_familyProxy4 = {}, _defineProperty(_familyProxy4, FAMILY_CLASSIC, {
  288. 'fa-brands': 'fab',
  289. 'fa-duotone': 'fad',
  290. 'fa-kit': 'fak',
  291. 'fa-light': 'fal',
  292. 'fa-regular': 'far',
  293. 'fa-solid': 'fas',
  294. 'fa-thin': 'fat'
  295. }), _defineProperty(_familyProxy4, FAMILY_SHARP, {
  296. 'fa-solid': 'fass'
  297. }), _familyProxy4));
  298. var ICON_SELECTION_SYNTAX_PATTERN = /fa(s|r|l|t|d|b|k|ss)?[\-\ ]/; // eslint-disable-line no-useless-escape
  299. var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
  300. var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i; // TODO: this needs to support fass
  301. // TODO: do we need to handle font-weight for kit SVG pseudo-elements?
  302. var FONT_WEIGHT_TO_PREFIX = familyProxy((_familyProxy5 = {}, _defineProperty(_familyProxy5, FAMILY_CLASSIC, {
  303. '900': 'fas',
  304. '400': 'far',
  305. 'normal': 'far',
  306. '300': 'fal',
  307. '100': 'fat'
  308. }), _defineProperty(_familyProxy5, FAMILY_SHARP, {
  309. '900': 'fass'
  310. }), _familyProxy5));
  311. var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  312. var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
  313. var ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];
  314. var DUOTONE_CLASSES = {
  315. GROUP: 'duotone-group',
  316. SWAP_OPACITY: 'swap-opacity',
  317. PRIMARY: 'primary',
  318. SECONDARY: 'secondary'
  319. };
  320. var prefixes = new Set();
  321. Object.keys(STYLE_TO_PREFIX[FAMILY_CLASSIC]).map(prefixes.add.bind(prefixes));
  322. Object.keys(STYLE_TO_PREFIX[FAMILY_SHARP]).map(prefixes.add.bind(prefixes));
  323. var RESERVED_CLASSES = [].concat(FAMILIES, _toConsumableArray(prefixes), ['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', 'beat', 'border', 'fade', 'beat-fade', 'bounce', 'flip-both', 'flip-horizontal', 'flip-vertical', 'flip', 'fw', 'inverse', 'layers-counter', 'layers-text', 'layers', 'li', 'pull-left', 'pull-right', 'pulse', 'rotate-180', 'rotate-270', 'rotate-90', 'rotate-by', 'shake', 'spin-pulse', 'spin-reverse', 'spin', 'stack-1x', 'stack-2x', 'stack', 'ul', DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY]).concat(oneToTen.map(function (n) {
  324. return "".concat(n, "x");
  325. })).concat(oneToTwenty.map(function (n) {
  326. return "w-".concat(n);
  327. }));
  328. var initial = WINDOW.FontAwesomeConfig || {};
  329. function getAttrConfig(attr) {
  330. var element = DOCUMENT.querySelector('script[' + attr + ']');
  331. if (element) {
  332. return element.getAttribute(attr);
  333. }
  334. }
  335. function coerce(val) {
  336. // Getting an empty string will occur if the attribute is set on the HTML tag but without a value
  337. // We'll assume that this is an indication that it should be toggled to true
  338. if (val === '') return true;
  339. if (val === 'false') return false;
  340. if (val === 'true') return true;
  341. return val;
  342. }
  343. if (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {
  344. var attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];
  345. attrs.forEach(function (_ref) {
  346. var _ref2 = _slicedToArray(_ref, 2),
  347. attr = _ref2[0],
  348. key = _ref2[1];
  349. var val = coerce(getAttrConfig(attr));
  350. if (val !== undefined && val !== null) {
  351. initial[key] = val;
  352. }
  353. });
  354. }
  355. var _default = {
  356. styleDefault: 'solid',
  357. familyDefault: 'classic',
  358. cssPrefix: DEFAULT_CSS_PREFIX,
  359. replacementClass: DEFAULT_REPLACEMENT_CLASS,
  360. autoReplaceSvg: true,
  361. autoAddCss: true,
  362. autoA11y: true,
  363. searchPseudoElements: false,
  364. observeMutations: true,
  365. mutateApproach: 'async',
  366. keepOriginalSource: true,
  367. measurePerformance: false,
  368. showMissingIcons: true
  369. }; // familyPrefix is deprecated but we must still support it if present
  370. if (initial.familyPrefix) {
  371. initial.cssPrefix = initial.familyPrefix;
  372. }
  373. var _config = _objectSpread2(_objectSpread2({}, _default), initial);
  374. if (!_config.autoReplaceSvg) _config.observeMutations = false;
  375. var config = {};
  376. Object.keys(_default).forEach(function (key) {
  377. Object.defineProperty(config, key, {
  378. enumerable: true,
  379. set: function set(val) {
  380. _config[key] = val;
  381. _onChangeCb.forEach(function (cb) {
  382. return cb(config);
  383. });
  384. },
  385. get: function get() {
  386. return _config[key];
  387. }
  388. });
  389. }); // familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0
  390. Object.defineProperty(config, 'familyPrefix', {
  391. enumerable: true,
  392. set: function set(val) {
  393. _config.cssPrefix = val;
  394. _onChangeCb.forEach(function (cb) {
  395. return cb(config);
  396. });
  397. },
  398. get: function get() {
  399. return _config.cssPrefix;
  400. }
  401. });
  402. WINDOW.FontAwesomeConfig = config;
  403. var _onChangeCb = [];
  404. function onChange(cb) {
  405. _onChangeCb.push(cb);
  406. return function () {
  407. _onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
  408. };
  409. }
  410. var d = UNITS_IN_GRID;
  411. var meaninglessTransform = {
  412. size: 16,
  413. x: 0,
  414. y: 0,
  415. rotate: 0,
  416. flipX: false,
  417. flipY: false
  418. };
  419. function bunker(fn) {
  420. try {
  421. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  422. args[_key - 1] = arguments[_key];
  423. }
  424. fn.apply(void 0, args);
  425. } catch (e) {
  426. if (!PRODUCTION) {
  427. throw e;
  428. }
  429. }
  430. }
  431. function insertCss(css) {
  432. if (!css || !IS_DOM) {
  433. return;
  434. }
  435. var style = DOCUMENT.createElement('style');
  436. style.setAttribute('type', 'text/css');
  437. style.innerHTML = css;
  438. var headChildren = DOCUMENT.head.childNodes;
  439. var beforeChild = null;
  440. for (var i = headChildren.length - 1; i > -1; i--) {
  441. var child = headChildren[i];
  442. var tagName = (child.tagName || '').toUpperCase();
  443. if (['STYLE', 'LINK'].indexOf(tagName) > -1) {
  444. beforeChild = child;
  445. }
  446. }
  447. DOCUMENT.head.insertBefore(style, beforeChild);
  448. return css;
  449. }
  450. var idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  451. function nextUniqueId() {
  452. var size = 12;
  453. var id = '';
  454. while (size-- > 0) {
  455. id += idPool[Math.random() * 62 | 0];
  456. }
  457. return id;
  458. }
  459. function toArray(obj) {
  460. var array = [];
  461. for (var i = (obj || []).length >>> 0; i--;) {
  462. array[i] = obj[i];
  463. }
  464. return array;
  465. }
  466. function classArray(node) {
  467. if (node.classList) {
  468. return toArray(node.classList);
  469. } else {
  470. return (node.getAttribute('class') || '').split(' ').filter(function (i) {
  471. return i;
  472. });
  473. }
  474. }
  475. function htmlEscape(str) {
  476. return "".concat(str).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  477. }
  478. function joinAttributes(attributes) {
  479. return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
  480. return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" ");
  481. }, '').trim();
  482. }
  483. function joinStyles(styles) {
  484. return Object.keys(styles || {}).reduce(function (acc, styleName) {
  485. return acc + "".concat(styleName, ": ").concat(styles[styleName].trim(), ";");
  486. }, '');
  487. }
  488. function transformIsMeaningful(transform) {
  489. return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
  490. }
  491. function transformForSvg(_ref) {
  492. var transform = _ref.transform,
  493. containerWidth = _ref.containerWidth,
  494. iconWidth = _ref.iconWidth;
  495. var outer = {
  496. transform: "translate(".concat(containerWidth / 2, " 256)")
  497. };
  498. var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
  499. var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
  500. var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
  501. var inner = {
  502. transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
  503. };
  504. var path = {
  505. transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
  506. };
  507. return {
  508. outer: outer,
  509. inner: inner,
  510. path: path
  511. };
  512. }
  513. function transformForCss(_ref2) {
  514. var transform = _ref2.transform,
  515. _ref2$width = _ref2.width,
  516. width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,
  517. _ref2$height = _ref2.height,
  518. height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,
  519. _ref2$startCentered = _ref2.startCentered,
  520. startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
  521. var val = '';
  522. if (startCentered && IS_IE) {
  523. val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) ");
  524. } else if (startCentered) {
  525. val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) ");
  526. } else {
  527. val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) ");
  528. }
  529. val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") ");
  530. val += "rotate(".concat(transform.rotate, "deg) ");
  531. return val;
  532. }
  533. var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 \"Font Awesome 6 Solid\";\n --fa-font-regular: normal 400 1em/1 \"Font Awesome 6 Regular\";\n --fa-font-light: normal 300 1em/1 \"Font Awesome 6 Light\";\n --fa-font-thin: normal 100 1em/1 \"Font Awesome 6 Thin\";\n --fa-font-duotone: normal 900 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-sharp-solid: normal 900 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-brands: normal 400 1em/1 \"Font Awesome 6 Brands\";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}";
  534. function css() {
  535. var dcp = DEFAULT_CSS_PREFIX;
  536. var drc = DEFAULT_REPLACEMENT_CLASS;
  537. var fp = config.cssPrefix;
  538. var rc = config.replacementClass;
  539. var s = baseStyles;
  540. if (fp !== dcp || rc !== drc) {
  541. var dPatt = new RegExp("\\.".concat(dcp, "\\-"), 'g');
  542. var customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), 'g');
  543. var rPatt = new RegExp("\\.".concat(drc), 'g');
  544. s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
  545. }
  546. return s;
  547. }
  548. var _cssInserted = false;
  549. function ensureCss() {
  550. if (config.autoAddCss && !_cssInserted) {
  551. insertCss(css());
  552. _cssInserted = true;
  553. }
  554. }
  555. var InjectCSS = {
  556. mixout: function mixout() {
  557. return {
  558. dom: {
  559. css: css,
  560. insertCss: ensureCss
  561. }
  562. };
  563. },
  564. hooks: function hooks() {
  565. return {
  566. beforeDOMElementCreation: function beforeDOMElementCreation() {
  567. ensureCss();
  568. },
  569. beforeI2svg: function beforeI2svg() {
  570. ensureCss();
  571. }
  572. };
  573. }
  574. };
  575. var w = WINDOW || {};
  576. if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
  577. if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
  578. if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
  579. if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
  580. var namespace = w[NAMESPACE_IDENTIFIER];
  581. var functions = [];
  582. var listener = function listener() {
  583. DOCUMENT.removeEventListener('DOMContentLoaded', listener);
  584. loaded = 1;
  585. functions.map(function (fn) {
  586. return fn();
  587. });
  588. };
  589. var loaded = false;
  590. if (IS_DOM) {
  591. loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
  592. if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
  593. }
  594. function domready (fn) {
  595. if (!IS_DOM) return;
  596. loaded ? setTimeout(fn, 0) : functions.push(fn);
  597. }
  598. function toHtml(abstractNodes) {
  599. var tag = abstractNodes.tag,
  600. _abstractNodes$attrib = abstractNodes.attributes,
  601. attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,
  602. _abstractNodes$childr = abstractNodes.children,
  603. children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
  604. if (typeof abstractNodes === 'string') {
  605. return htmlEscape(abstractNodes);
  606. } else {
  607. return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(''), "</").concat(tag, ">");
  608. }
  609. }
  610. function iconFromMapping(mapping, prefix, iconName) {
  611. if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
  612. return {
  613. prefix: prefix,
  614. iconName: iconName,
  615. icon: mapping[prefix][iconName]
  616. };
  617. }
  618. }
  619. /**
  620. * Internal helper to bind a function known to have 4 arguments
  621. * to a given context.
  622. */
  623. var bindInternal4 = function bindInternal4(func, thisContext) {
  624. return function (a, b, c, d) {
  625. return func.call(thisContext, a, b, c, d);
  626. };
  627. };
  628. /**
  629. * # Reduce
  630. *
  631. * A fast object `.reduce()` implementation.
  632. *
  633. * @param {Object} subject The object to reduce over.
  634. * @param {Function} fn The reducer function.
  635. * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
  636. * @param {Object} thisContext The context for the reducer.
  637. * @return {mixed} The final result.
  638. */
  639. var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
  640. var keys = Object.keys(subject),
  641. length = keys.length,
  642. iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
  643. i,
  644. key,
  645. result;
  646. if (initialValue === undefined) {
  647. i = 1;
  648. result = subject[keys[0]];
  649. } else {
  650. i = 0;
  651. result = initialValue;
  652. }
  653. for (; i < length; i++) {
  654. key = keys[i];
  655. result = iterator(result, subject[key], key, subject);
  656. }
  657. return result;
  658. };
  659. /**
  660. * ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT
  661. *
  662. * Copyright Mathias Bynens <https://mathiasbynens.be/>
  663. * Permission is hereby granted, free of charge, to any person obtaining
  664. * a copy of this software and associated documentation files (the
  665. * "Software"), to deal in the Software without restriction, including
  666. * without limitation the rights to use, copy, modify, merge, publish,
  667. * distribute, sublicense, and/or sell copies of the Software, and to
  668. * permit persons to whom the Software is furnished to do so, subject to
  669. * the following conditions:
  670. * The above copyright notice and this permission notice shall be
  671. * included in all copies or substantial portions of the Software.
  672. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  673. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  674. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  675. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  676. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  677. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  678. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  679. */
  680. function ucs2decode(string) {
  681. var output = [];
  682. var counter = 0;
  683. var length = string.length;
  684. while (counter < length) {
  685. var value = string.charCodeAt(counter++);
  686. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  687. var extra = string.charCodeAt(counter++);
  688. if ((extra & 0xFC00) == 0xDC00) {
  689. // eslint-disable-line eqeqeq
  690. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  691. } else {
  692. output.push(value);
  693. counter--;
  694. }
  695. } else {
  696. output.push(value);
  697. }
  698. }
  699. return output;
  700. }
  701. function toHex(unicode) {
  702. var decoded = ucs2decode(unicode);
  703. return decoded.length === 1 ? decoded[0].toString(16) : null;
  704. }
  705. function codePointAt(string, index) {
  706. var size = string.length;
  707. var first = string.charCodeAt(index);
  708. var second;
  709. if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {
  710. second = string.charCodeAt(index + 1);
  711. if (second >= 0xDC00 && second <= 0xDFFF) {
  712. return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  713. }
  714. }
  715. return first;
  716. }
  717. function normalizeIcons(icons) {
  718. return Object.keys(icons).reduce(function (acc, iconName) {
  719. var icon = icons[iconName];
  720. var expanded = !!icon.icon;
  721. if (expanded) {
  722. acc[icon.iconName] = icon.icon;
  723. } else {
  724. acc[iconName] = icon;
  725. }
  726. return acc;
  727. }, {});
  728. }
  729. function defineIcons(prefix, icons) {
  730. var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  731. var _params$skipHooks = params.skipHooks,
  732. skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
  733. var normalized = normalizeIcons(icons);
  734. if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {
  735. namespace.hooks.addPack(prefix, normalizeIcons(icons));
  736. } else {
  737. namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
  738. }
  739. /**
  740. * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
  741. * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
  742. * for `fas` so we'll ease the upgrade process for our users by automatically defining
  743. * this as well.
  744. */
  745. if (prefix === 'fas') {
  746. defineIcons('fa', icons);
  747. }
  748. }
  749. var duotonePathRe = [/*#__PURE__*/_wrapRegExp(/path d="((?:(?!")[\s\S])+)".*path d="((?:(?!")[\s\S])+)"/, {
  750. d1: 1,
  751. d2: 2
  752. }), /*#__PURE__*/_wrapRegExp(/path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)".*path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)"/, {
  753. cls1: 1,
  754. d1: 2,
  755. cls2: 3,
  756. d2: 4
  757. }), /*#__PURE__*/_wrapRegExp(/path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)"/, {
  758. cls1: 1,
  759. d1: 2
  760. })];
  761. var _LONG_STYLE, _PREFIXES, _PREFIXES_FOR_FAMILY;
  762. var styles = namespace.styles,
  763. shims = namespace.shims;
  764. var LONG_STYLE = (_LONG_STYLE = {}, _defineProperty(_LONG_STYLE, FAMILY_CLASSIC, Object.values(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])), _defineProperty(_LONG_STYLE, FAMILY_SHARP, Object.values(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])), _LONG_STYLE);
  765. var _defaultUsablePrefix = null;
  766. var _byUnicode = {};
  767. var _byLigature = {};
  768. var _byOldName = {};
  769. var _byOldUnicode = {};
  770. var _byAlias = {};
  771. var PREFIXES = (_PREFIXES = {}, _defineProperty(_PREFIXES, FAMILY_CLASSIC, Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC])), _defineProperty(_PREFIXES, FAMILY_SHARP, Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP])), _PREFIXES);
  772. function isReserved(name) {
  773. return ~RESERVED_CLASSES.indexOf(name);
  774. }
  775. function getIconName(cssPrefix, cls) {
  776. var parts = cls.split('-');
  777. var prefix = parts[0];
  778. var iconName = parts.slice(1).join('-');
  779. if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {
  780. return iconName;
  781. } else {
  782. return null;
  783. }
  784. }
  785. var build = function build() {
  786. var lookup = function lookup(reducer) {
  787. return reduce(styles, function (o, style, prefix) {
  788. o[prefix] = reduce(style, reducer, {});
  789. return o;
  790. }, {});
  791. };
  792. _byUnicode = lookup(function (acc, icon, iconName) {
  793. if (icon[3]) {
  794. acc[icon[3]] = iconName;
  795. }
  796. if (icon[2]) {
  797. var aliases = icon[2].filter(function (a) {
  798. return typeof a === 'number';
  799. });
  800. aliases.forEach(function (alias) {
  801. acc[alias.toString(16)] = iconName;
  802. });
  803. }
  804. return acc;
  805. });
  806. _byLigature = lookup(function (acc, icon, iconName) {
  807. acc[iconName] = iconName;
  808. if (icon[2]) {
  809. var aliases = icon[2].filter(function (a) {
  810. return typeof a === 'string';
  811. });
  812. aliases.forEach(function (alias) {
  813. acc[alias] = iconName;
  814. });
  815. }
  816. return acc;
  817. });
  818. _byAlias = lookup(function (acc, icon, iconName) {
  819. var aliases = icon[2];
  820. acc[iconName] = iconName;
  821. aliases.forEach(function (alias) {
  822. acc[alias] = iconName;
  823. });
  824. return acc;
  825. }); // If we have a Kit, we can't determine if regular is available since we
  826. // could be auto-fetching it. We'll have to assume that it is available.
  827. var hasRegular = 'far' in styles || config.autoFetchSvg;
  828. var shimLookups = reduce(shims, function (acc, shim) {
  829. var maybeNameMaybeUnicode = shim[0];
  830. var prefix = shim[1];
  831. var iconName = shim[2];
  832. if (prefix === 'far' && !hasRegular) {
  833. prefix = 'fas';
  834. }
  835. if (typeof maybeNameMaybeUnicode === 'string') {
  836. acc.names[maybeNameMaybeUnicode] = {
  837. prefix: prefix,
  838. iconName: iconName
  839. };
  840. }
  841. if (typeof maybeNameMaybeUnicode === 'number') {
  842. acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
  843. prefix: prefix,
  844. iconName: iconName
  845. };
  846. }
  847. return acc;
  848. }, {
  849. names: {},
  850. unicodes: {}
  851. });
  852. _byOldName = shimLookups.names;
  853. _byOldUnicode = shimLookups.unicodes;
  854. _defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {
  855. family: config.familyDefault
  856. });
  857. };
  858. onChange(function (c) {
  859. _defaultUsablePrefix = getCanonicalPrefix(c.styleDefault, {
  860. family: config.familyDefault
  861. });
  862. });
  863. build();
  864. function byUnicode(prefix, unicode) {
  865. return (_byUnicode[prefix] || {})[unicode];
  866. }
  867. function byLigature(prefix, ligature) {
  868. return (_byLigature[prefix] || {})[ligature];
  869. }
  870. function byAlias(prefix, alias) {
  871. return (_byAlias[prefix] || {})[alias];
  872. }
  873. function byOldName(name) {
  874. return _byOldName[name] || {
  875. prefix: null,
  876. iconName: null
  877. };
  878. }
  879. function byOldUnicode(unicode) {
  880. var oldUnicode = _byOldUnicode[unicode];
  881. var newUnicode = byUnicode('fas', unicode);
  882. return oldUnicode || (newUnicode ? {
  883. prefix: 'fas',
  884. iconName: newUnicode
  885. } : null) || {
  886. prefix: null,
  887. iconName: null
  888. };
  889. }
  890. function getDefaultUsablePrefix() {
  891. return _defaultUsablePrefix;
  892. }
  893. var emptyCanonicalIcon = function emptyCanonicalIcon() {
  894. return {
  895. prefix: null,
  896. iconName: null,
  897. rest: []
  898. };
  899. };
  900. function getCanonicalPrefix(styleOrPrefix) {
  901. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  902. var _params$family = params.family,
  903. family = _params$family === void 0 ? FAMILY_CLASSIC : _params$family;
  904. var style = PREFIX_TO_STYLE[family][styleOrPrefix];
  905. var prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
  906. var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
  907. return prefix || defined || null;
  908. }
  909. var PREFIXES_FOR_FAMILY = (_PREFIXES_FOR_FAMILY = {}, _defineProperty(_PREFIXES_FOR_FAMILY, FAMILY_CLASSIC, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])), _defineProperty(_PREFIXES_FOR_FAMILY, FAMILY_SHARP, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])), _PREFIXES_FOR_FAMILY);
  910. function getCanonicalIcon(values) {
  911. var _famProps;
  912. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  913. var _params$skipLookups = params.skipLookups,
  914. skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
  915. var famProps = (_famProps = {}, _defineProperty(_famProps, FAMILY_CLASSIC, "".concat(config.cssPrefix, "-").concat(FAMILY_CLASSIC)), _defineProperty(_famProps, FAMILY_SHARP, "".concat(config.cssPrefix, "-").concat(FAMILY_SHARP)), _famProps);
  916. var givenPrefix = null;
  917. var family = FAMILY_CLASSIC;
  918. if (values.includes(famProps[FAMILY_CLASSIC]) || values.some(function (v) {
  919. return PREFIXES_FOR_FAMILY[FAMILY_CLASSIC].includes(v);
  920. })) {
  921. family = FAMILY_CLASSIC;
  922. }
  923. if (values.includes(famProps[FAMILY_SHARP]) || values.some(function (v) {
  924. return PREFIXES_FOR_FAMILY[FAMILY_SHARP].includes(v);
  925. })) {
  926. family = FAMILY_SHARP;
  927. }
  928. var canonical = values.reduce(function (acc, cls) {
  929. var iconName = getIconName(config.cssPrefix, cls);
  930. if (styles[cls]) {
  931. cls = LONG_STYLE[family].includes(cls) ? LONG_STYLE_TO_PREFIX[family][cls] : cls;
  932. givenPrefix = cls;
  933. acc.prefix = cls;
  934. } else if (PREFIXES[family].indexOf(cls) > -1) {
  935. givenPrefix = cls;
  936. acc.prefix = getCanonicalPrefix(cls, {
  937. family: family
  938. });
  939. } else if (iconName) {
  940. acc.iconName = iconName;
  941. } else if (cls !== config.replacementClass && cls !== famProps[FAMILY_CLASSIC] && cls !== famProps[FAMILY_SHARP]) {
  942. acc.rest.push(cls);
  943. }
  944. if (!skipLookups && acc.prefix && acc.iconName) {
  945. var shim = givenPrefix === 'fa' ? byOldName(acc.iconName) : {};
  946. var aliasIconName = byAlias(acc.prefix, acc.iconName);
  947. if (shim.prefix) {
  948. givenPrefix = null;
  949. }
  950. acc.iconName = shim.iconName || aliasIconName || acc.iconName;
  951. acc.prefix = shim.prefix || acc.prefix;
  952. if (acc.prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {
  953. // Allow a fallback from the regular style to solid if regular is not available
  954. // but only if we aren't auto-fetching SVGs
  955. acc.prefix = 'fas';
  956. }
  957. }
  958. return acc;
  959. }, emptyCanonicalIcon());
  960. if (values.includes('fa-brands') || values.includes('fab')) {
  961. canonical.prefix = 'fab';
  962. }
  963. if (values.includes('fa-duotone') || values.includes('fad')) {
  964. canonical.prefix = 'fad';
  965. }
  966. if (!canonical.prefix && family === FAMILY_SHARP && (styles['fass'] || config.autoFetchSvg)) {
  967. canonical.prefix = 'fass';
  968. canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
  969. }
  970. if (canonical.prefix === 'fa' || givenPrefix === 'fa') {
  971. // The fa prefix is not canonical. So if it has made it through until this point
  972. // we will shift it to the correct prefix.
  973. canonical.prefix = getDefaultUsablePrefix() || 'fas';
  974. }
  975. return canonical;
  976. }
  977. var Library = /*#__PURE__*/function () {
  978. function Library() {
  979. _classCallCheck(this, Library);
  980. this.definitions = {};
  981. }
  982. _createClass(Library, [{
  983. key: "add",
  984. value: function add() {
  985. var _this = this;
  986. for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
  987. definitions[_key] = arguments[_key];
  988. }
  989. var additions = definitions.reduce(this._pullDefinitions, {});
  990. Object.keys(additions).forEach(function (key) {
  991. _this.definitions[key] = _objectSpread2(_objectSpread2({}, _this.definitions[key] || {}), additions[key]);
  992. defineIcons(key, additions[key]); // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change
  993. var longPrefix = PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC][key];
  994. if (longPrefix) defineIcons(longPrefix, additions[key]);
  995. build();
  996. });
  997. }
  998. }, {
  999. key: "reset",
  1000. value: function reset() {
  1001. this.definitions = {};
  1002. }
  1003. }, {
  1004. key: "_pullDefinitions",
  1005. value: function _pullDefinitions(additions, definition) {
  1006. var normalized = definition.prefix && definition.iconName && definition.icon ? {
  1007. 0: definition
  1008. } : definition;
  1009. Object.keys(normalized).map(function (key) {
  1010. var _normalized$key = normalized[key],
  1011. prefix = _normalized$key.prefix,
  1012. iconName = _normalized$key.iconName,
  1013. icon = _normalized$key.icon;
  1014. var aliases = icon[2];
  1015. if (!additions[prefix]) additions[prefix] = {};
  1016. if (aliases.length > 0) {
  1017. aliases.forEach(function (alias) {
  1018. if (typeof alias === 'string') {
  1019. additions[prefix][alias] = icon;
  1020. }
  1021. });
  1022. }
  1023. additions[prefix][iconName] = icon;
  1024. });
  1025. return additions;
  1026. }
  1027. }]);
  1028. return Library;
  1029. }();
  1030. var _plugins = [];
  1031. var _hooks = {};
  1032. var providers = {};
  1033. var defaultProviderKeys = Object.keys(providers);
  1034. function registerPlugins(nextPlugins, _ref) {
  1035. var obj = _ref.mixoutsTo;
  1036. _plugins = nextPlugins;
  1037. _hooks = {};
  1038. Object.keys(providers).forEach(function (k) {
  1039. if (defaultProviderKeys.indexOf(k) === -1) {
  1040. delete providers[k];
  1041. }
  1042. });
  1043. _plugins.forEach(function (plugin) {
  1044. var mixout = plugin.mixout ? plugin.mixout() : {};
  1045. Object.keys(mixout).forEach(function (tk) {
  1046. if (typeof mixout[tk] === 'function') {
  1047. obj[tk] = mixout[tk];
  1048. }
  1049. if (_typeof(mixout[tk]) === 'object') {
  1050. Object.keys(mixout[tk]).forEach(function (sk) {
  1051. if (!obj[tk]) {
  1052. obj[tk] = {};
  1053. }
  1054. obj[tk][sk] = mixout[tk][sk];
  1055. });
  1056. }
  1057. });
  1058. if (plugin.hooks) {
  1059. var hooks = plugin.hooks();
  1060. Object.keys(hooks).forEach(function (hook) {
  1061. if (!_hooks[hook]) {
  1062. _hooks[hook] = [];
  1063. }
  1064. _hooks[hook].push(hooks[hook]);
  1065. });
  1066. }
  1067. if (plugin.provides) {
  1068. plugin.provides(providers);
  1069. }
  1070. });
  1071. return obj;
  1072. }
  1073. function chainHooks(hook, accumulator) {
  1074. for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  1075. args[_key - 2] = arguments[_key];
  1076. }
  1077. var hookFns = _hooks[hook] || [];
  1078. hookFns.forEach(function (hookFn) {
  1079. accumulator = hookFn.apply(null, [accumulator].concat(args)); // eslint-disable-line no-useless-call
  1080. });
  1081. return accumulator;
  1082. }
  1083. function callHooks(hook) {
  1084. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1085. args[_key2 - 1] = arguments[_key2];
  1086. }
  1087. var hookFns = _hooks[hook] || [];
  1088. hookFns.forEach(function (hookFn) {
  1089. hookFn.apply(null, args);
  1090. });
  1091. return undefined;
  1092. }
  1093. function callProvided() {
  1094. var hook = arguments[0];
  1095. var args = Array.prototype.slice.call(arguments, 1);
  1096. return providers[hook] ? providers[hook].apply(null, args) : undefined;
  1097. }
  1098. function findIconDefinition(iconLookup) {
  1099. if (iconLookup.prefix === 'fa') {
  1100. iconLookup.prefix = 'fas';
  1101. }
  1102. var iconName = iconLookup.iconName;
  1103. var prefix = iconLookup.prefix || getDefaultUsablePrefix();
  1104. if (!iconName) return;
  1105. iconName = byAlias(prefix, iconName) || iconName;
  1106. return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
  1107. }
  1108. var library = new Library();
  1109. var noAuto = function noAuto() {
  1110. config.autoReplaceSvg = false;
  1111. config.observeMutations = false;
  1112. callHooks('noAuto');
  1113. };
  1114. var dom = {
  1115. i2svg: function i2svg() {
  1116. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1117. if (IS_DOM) {
  1118. callHooks('beforeI2svg', params);
  1119. callProvided('pseudoElements2svg', params);
  1120. return callProvided('i2svg', params);
  1121. } else {
  1122. return Promise.reject('Operation requires a DOM of some kind.');
  1123. }
  1124. },
  1125. watch: function watch() {
  1126. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1127. var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
  1128. if (config.autoReplaceSvg === false) {
  1129. config.autoReplaceSvg = true;
  1130. }
  1131. config.observeMutations = true;
  1132. domready(function () {
  1133. autoReplace({
  1134. autoReplaceSvgRoot: autoReplaceSvgRoot
  1135. });
  1136. callHooks('watch', params);
  1137. });
  1138. }
  1139. };
  1140. var parse = {
  1141. icon: function icon(_icon) {
  1142. if (_icon === null) {
  1143. return null;
  1144. }
  1145. if (_typeof(_icon) === 'object' && _icon.prefix && _icon.iconName) {
  1146. return {
  1147. prefix: _icon.prefix,
  1148. iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
  1149. };
  1150. }
  1151. if (Array.isArray(_icon) && _icon.length === 2) {
  1152. var iconName = _icon[1].indexOf('fa-') === 0 ? _icon[1].slice(3) : _icon[1];
  1153. var prefix = getCanonicalPrefix(_icon[0]);
  1154. return {
  1155. prefix: prefix,
  1156. iconName: byAlias(prefix, iconName) || iconName
  1157. };
  1158. }
  1159. if (typeof _icon === 'string' && (_icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
  1160. var canonicalIcon = getCanonicalIcon(_icon.split(' '), {
  1161. skipLookups: true
  1162. });
  1163. return {
  1164. prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
  1165. iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
  1166. };
  1167. }
  1168. if (typeof _icon === 'string') {
  1169. var _prefix = getDefaultUsablePrefix();
  1170. return {
  1171. prefix: _prefix,
  1172. iconName: byAlias(_prefix, _icon) || _icon
  1173. };
  1174. }
  1175. }
  1176. };
  1177. var api = {
  1178. noAuto: noAuto,
  1179. config: config,
  1180. dom: dom,
  1181. parse: parse,
  1182. library: library,
  1183. findIconDefinition: findIconDefinition,
  1184. toHtml: toHtml
  1185. };
  1186. var autoReplace = function autoReplace() {
  1187. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1188. var _params$autoReplaceSv = params.autoReplaceSvgRoot,
  1189. autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
  1190. if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({
  1191. node: autoReplaceSvgRoot
  1192. });
  1193. };
  1194. function bootstrap(plugins) {
  1195. if (IS_BROWSER) {
  1196. if (!WINDOW.FontAwesome) {
  1197. WINDOW.FontAwesome = api;
  1198. }
  1199. domready(function () {
  1200. autoReplace();
  1201. callHooks('bootstrap');
  1202. });
  1203. }
  1204. namespace.hooks = _objectSpread2(_objectSpread2({}, namespace.hooks), {}, {
  1205. addPack: function addPack(prefix, icons) {
  1206. namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), icons);
  1207. build();
  1208. autoReplace();
  1209. },
  1210. addPacks: function addPacks(packs) {
  1211. packs.forEach(function (_ref) {
  1212. var _ref2 = _slicedToArray(_ref, 2),
  1213. prefix = _ref2[0],
  1214. icons = _ref2[1];
  1215. namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), icons);
  1216. });
  1217. build();
  1218. autoReplace();
  1219. },
  1220. addShims: function addShims(shims) {
  1221. var _namespace$shims;
  1222. (_namespace$shims = namespace.shims).push.apply(_namespace$shims, _toConsumableArray(shims));
  1223. build();
  1224. autoReplace();
  1225. }
  1226. });
  1227. }
  1228. function domVariants(val, abstractCreator) {
  1229. Object.defineProperty(val, 'abstract', {
  1230. get: abstractCreator
  1231. });
  1232. Object.defineProperty(val, 'html', {
  1233. get: function get() {
  1234. return val.abstract.map(function (a) {
  1235. return toHtml(a);
  1236. });
  1237. }
  1238. });
  1239. Object.defineProperty(val, 'node', {
  1240. get: function get() {
  1241. if (!IS_DOM) return;
  1242. var container = DOCUMENT.createElement('div');
  1243. container.innerHTML = val.html;
  1244. return container.children;
  1245. }
  1246. });
  1247. return val;
  1248. }
  1249. function asIcon (_ref) {
  1250. var children = _ref.children,
  1251. main = _ref.main,
  1252. mask = _ref.mask,
  1253. attributes = _ref.attributes,
  1254. styles = _ref.styles,
  1255. transform = _ref.transform;
  1256. if (transformIsMeaningful(transform) && main.found && !mask.found) {
  1257. var width = main.width,
  1258. height = main.height;
  1259. var offset = {
  1260. x: width / height / 2,
  1261. y: 0.5
  1262. };
  1263. attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, {
  1264. 'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
  1265. }));
  1266. }
  1267. return [{
  1268. tag: 'svg',
  1269. attributes: attributes,
  1270. children: children
  1271. }];
  1272. }
  1273. function asSymbol (_ref) {
  1274. var prefix = _ref.prefix,
  1275. iconName = _ref.iconName,
  1276. children = _ref.children,
  1277. attributes = _ref.attributes,
  1278. symbol = _ref.symbol;
  1279. var id = symbol === true ? "".concat(prefix, "-").concat(config.cssPrefix, "-").concat(iconName) : symbol;
  1280. return [{
  1281. tag: 'svg',
  1282. attributes: {
  1283. style: 'display: none;'
  1284. },
  1285. children: [{
  1286. tag: 'symbol',
  1287. attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
  1288. id: id
  1289. }),
  1290. children: children
  1291. }]
  1292. }];
  1293. }
  1294. function makeInlineSvgAbstract(params) {
  1295. var _params$icons = params.icons,
  1296. main = _params$icons.main,
  1297. mask = _params$icons.mask,
  1298. prefix = params.prefix,
  1299. iconName = params.iconName,
  1300. transform = params.transform,
  1301. symbol = params.symbol,
  1302. title = params.title,
  1303. maskId = params.maskId,
  1304. titleId = params.titleId,
  1305. extra = params.extra,
  1306. _params$watchable = params.watchable,
  1307. watchable = _params$watchable === void 0 ? false : _params$watchable;
  1308. var _ref = mask.found ? mask : main,
  1309. width = _ref.width,
  1310. height = _ref.height;
  1311. var isUploadedIcon = prefix === 'fak';
  1312. var attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(function (c) {
  1313. return extra.classes.indexOf(c) === -1;
  1314. }).filter(function (c) {
  1315. return c !== '' || !!c;
  1316. }).concat(extra.classes).join(' ');
  1317. var content = {
  1318. children: [],
  1319. attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
  1320. 'data-prefix': prefix,
  1321. 'data-icon': iconName,
  1322. 'class': attrClass,
  1323. 'role': extra.attributes.role || 'img',
  1324. 'xmlns': 'http://www.w3.org/2000/svg',
  1325. 'viewBox': "0 0 ".concat(width, " ").concat(height)
  1326. })
  1327. };
  1328. var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {
  1329. width: "".concat(width / height * 16 * 0.0625, "em")
  1330. } : {};
  1331. if (watchable) {
  1332. content.attributes[DATA_FA_I2SVG] = '';
  1333. }
  1334. if (title) {
  1335. content.children.push({
  1336. tag: 'title',
  1337. attributes: {
  1338. id: content.attributes['aria-labelledby'] || "title-".concat(titleId || nextUniqueId())
  1339. },
  1340. children: [title]
  1341. });
  1342. delete content.attributes.title;
  1343. }
  1344. var args = _objectSpread2(_objectSpread2({}, content), {}, {
  1345. prefix: prefix,
  1346. iconName: iconName,
  1347. main: main,
  1348. mask: mask,
  1349. maskId: maskId,
  1350. transform: transform,
  1351. symbol: symbol,
  1352. styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
  1353. });
  1354. var _ref2 = mask.found && main.found ? callProvided('generateAbstractMask', args) || {
  1355. children: [],
  1356. attributes: {}
  1357. } : callProvided('generateAbstractIcon', args) || {
  1358. children: [],
  1359. attributes: {}
  1360. },
  1361. children = _ref2.children,
  1362. attributes = _ref2.attributes;
  1363. args.children = children;
  1364. args.attributes = attributes;
  1365. if (symbol) {
  1366. return asSymbol(args);
  1367. } else {
  1368. return asIcon(args);
  1369. }
  1370. }
  1371. function makeLayersTextAbstract(params) {
  1372. var content = params.content,
  1373. width = params.width,
  1374. height = params.height,
  1375. transform = params.transform,
  1376. title = params.title,
  1377. extra = params.extra,
  1378. _params$watchable2 = params.watchable,
  1379. watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
  1380. var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
  1381. 'title': title
  1382. } : {}), {}, {
  1383. 'class': extra.classes.join(' ')
  1384. });
  1385. if (watchable) {
  1386. attributes[DATA_FA_I2SVG] = '';
  1387. }
  1388. var styles = _objectSpread2({}, extra.styles);
  1389. if (transformIsMeaningful(transform)) {
  1390. styles['transform'] = transformForCss({
  1391. transform: transform,
  1392. startCentered: true,
  1393. width: width,
  1394. height: height
  1395. });
  1396. styles['-webkit-transform'] = styles['transform'];
  1397. }
  1398. var styleString = joinStyles(styles);
  1399. if (styleString.length > 0) {
  1400. attributes['style'] = styleString;
  1401. }
  1402. var val = [];
  1403. val.push({
  1404. tag: 'span',
  1405. attributes: attributes,
  1406. children: [content]
  1407. });
  1408. if (title) {
  1409. val.push({
  1410. tag: 'span',
  1411. attributes: {
  1412. class: 'sr-only'
  1413. },
  1414. children: [title]
  1415. });
  1416. }
  1417. return val;
  1418. }
  1419. function makeLayersCounterAbstract(params) {
  1420. var content = params.content,
  1421. title = params.title,
  1422. extra = params.extra;
  1423. var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
  1424. 'title': title
  1425. } : {}), {}, {
  1426. 'class': extra.classes.join(' ')
  1427. });
  1428. var styleString = joinStyles(extra.styles);
  1429. if (styleString.length > 0) {
  1430. attributes['style'] = styleString;
  1431. }
  1432. var val = [];
  1433. val.push({
  1434. tag: 'span',
  1435. attributes: attributes,
  1436. children: [content]
  1437. });
  1438. if (title) {
  1439. val.push({
  1440. tag: 'span',
  1441. attributes: {
  1442. class: 'sr-only'
  1443. },
  1444. children: [title]
  1445. });
  1446. }
  1447. return val;
  1448. }
  1449. var styles$1 = namespace.styles;
  1450. function asFoundIcon(icon) {
  1451. var width = icon[0];
  1452. var height = icon[1];
  1453. var _icon$slice = icon.slice(4),
  1454. _icon$slice2 = _slicedToArray(_icon$slice, 1),
  1455. vectorData = _icon$slice2[0];
  1456. var element = null;
  1457. if (Array.isArray(vectorData)) {
  1458. element = {
  1459. tag: 'g',
  1460. attributes: {
  1461. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
  1462. },
  1463. children: [{
  1464. tag: 'path',
  1465. attributes: {
  1466. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
  1467. fill: 'currentColor',
  1468. d: vectorData[0]
  1469. }
  1470. }, {
  1471. tag: 'path',
  1472. attributes: {
  1473. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
  1474. fill: 'currentColor',
  1475. d: vectorData[1]
  1476. }
  1477. }]
  1478. };
  1479. } else {
  1480. element = {
  1481. tag: 'path',
  1482. attributes: {
  1483. fill: 'currentColor',
  1484. d: vectorData
  1485. }
  1486. };
  1487. }
  1488. return {
  1489. found: true,
  1490. width: width,
  1491. height: height,
  1492. icon: element
  1493. };
  1494. }
  1495. var missingIconResolutionMixin = {
  1496. found: false,
  1497. width: 512,
  1498. height: 512
  1499. };
  1500. function maybeNotifyMissing(iconName, prefix) {
  1501. if (!PRODUCTION && !config.showMissingIcons && iconName) {
  1502. console.error("Icon with name \"".concat(iconName, "\" and prefix \"").concat(prefix, "\" is missing."));
  1503. }
  1504. }
  1505. function findIcon(iconName, prefix) {
  1506. var givenPrefix = prefix;
  1507. if (prefix === 'fa' && config.styleDefault !== null) {
  1508. prefix = getDefaultUsablePrefix();
  1509. }
  1510. return new Promise(function (resolve, reject) {
  1511. var val = {
  1512. found: false,
  1513. width: 512,
  1514. height: 512,
  1515. icon: callProvided('missingIconAbstract') || {}
  1516. };
  1517. if (givenPrefix === 'fa') {
  1518. var shim = byOldName(iconName) || {};
  1519. iconName = shim.iconName || iconName;
  1520. prefix = shim.prefix || prefix;
  1521. }
  1522. if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
  1523. var icon = styles$1[prefix][iconName];
  1524. return resolve(asFoundIcon(icon));
  1525. }
  1526. maybeNotifyMissing(iconName, prefix);
  1527. resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
  1528. icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}
  1529. }));
  1530. });
  1531. }
  1532. var noop$1 = function noop() {};
  1533. var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
  1534. mark: noop$1,
  1535. measure: noop$1
  1536. };
  1537. var preamble = "FA \"6.2.0\"";
  1538. var begin = function begin(name) {
  1539. p.mark("".concat(preamble, " ").concat(name, " begins"));
  1540. return function () {
  1541. return end(name);
  1542. };
  1543. };
  1544. var end = function end(name) {
  1545. p.mark("".concat(preamble, " ").concat(name, " ends"));
  1546. p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
  1547. };
  1548. var perf = {
  1549. begin: begin,
  1550. end: end
  1551. };
  1552. var noop$2 = function noop() {};
  1553. function isWatched(node) {
  1554. var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
  1555. return typeof i2svg === 'string';
  1556. }
  1557. function hasPrefixAndIcon(node) {
  1558. var prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
  1559. var icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
  1560. return prefix && icon;
  1561. }
  1562. function hasBeenReplaced(node) {
  1563. return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
  1564. }
  1565. function getMutator() {
  1566. if (config.autoReplaceSvg === true) {
  1567. return mutators.replace;
  1568. }
  1569. var mutator = mutators[config.autoReplaceSvg];
  1570. return mutator || mutators.replace;
  1571. }
  1572. function createElementNS(tag) {
  1573. return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);
  1574. }
  1575. function createElement(tag) {
  1576. return DOCUMENT.createElement(tag);
  1577. }
  1578. function convertSVG(abstractObj) {
  1579. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1580. var _params$ceFn = params.ceFn,
  1581. ceFn = _params$ceFn === void 0 ? abstractObj.tag === 'svg' ? createElementNS : createElement : _params$ceFn;
  1582. if (typeof abstractObj === 'string') {
  1583. return DOCUMENT.createTextNode(abstractObj);
  1584. }
  1585. var tag = ceFn(abstractObj.tag);
  1586. Object.keys(abstractObj.attributes || []).forEach(function (key) {
  1587. tag.setAttribute(key, abstractObj.attributes[key]);
  1588. });
  1589. var children = abstractObj.children || [];
  1590. children.forEach(function (child) {
  1591. tag.appendChild(convertSVG(child, {
  1592. ceFn: ceFn
  1593. }));
  1594. });
  1595. return tag;
  1596. }
  1597. function nodeAsComment(node) {
  1598. var comment = " ".concat(node.outerHTML, " ");
  1599. /* BEGIN.ATTRIBUTION */
  1600. comment = "".concat(comment, "Font Awesome fontawesome.com ");
  1601. /* END.ATTRIBUTION */
  1602. return comment;
  1603. }
  1604. var mutators = {
  1605. replace: function replace(mutation) {
  1606. var node = mutation[0];
  1607. if (node.parentNode) {
  1608. mutation[1].forEach(function (abstract) {
  1609. node.parentNode.insertBefore(convertSVG(abstract), node);
  1610. });
  1611. if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
  1612. var comment = DOCUMENT.createComment(nodeAsComment(node));
  1613. node.parentNode.replaceChild(comment, node);
  1614. } else {
  1615. node.remove();
  1616. }
  1617. }
  1618. },
  1619. nest: function nest(mutation) {
  1620. var node = mutation[0];
  1621. var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.
  1622. // Short-circuit to the standard replacement
  1623. if (~classArray(node).indexOf(config.replacementClass)) {
  1624. return mutators.replace(mutation);
  1625. }
  1626. var forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
  1627. delete abstract[0].attributes.id;
  1628. if (abstract[0].attributes.class) {
  1629. var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {
  1630. if (cls === config.replacementClass || cls.match(forSvg)) {
  1631. acc.toSvg.push(cls);
  1632. } else {
  1633. acc.toNode.push(cls);
  1634. }
  1635. return acc;
  1636. }, {
  1637. toNode: [],
  1638. toSvg: []
  1639. });
  1640. abstract[0].attributes.class = splitClasses.toSvg.join(' ');
  1641. if (splitClasses.toNode.length === 0) {
  1642. node.removeAttribute('class');
  1643. } else {
  1644. node.setAttribute('class', splitClasses.toNode.join(' '));
  1645. }
  1646. }
  1647. var newInnerHTML = abstract.map(function (a) {
  1648. return toHtml(a);
  1649. }).join('\n');
  1650. node.setAttribute(DATA_FA_I2SVG, '');
  1651. node.innerHTML = newInnerHTML;
  1652. }
  1653. };
  1654. function performOperationSync(op) {
  1655. op();
  1656. }
  1657. function perform(mutations, callback) {
  1658. var callbackFunction = typeof callback === 'function' ? callback : noop$2;
  1659. if (mutations.length === 0) {
  1660. callbackFunction();
  1661. } else {
  1662. var frame = performOperationSync;
  1663. if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
  1664. frame = WINDOW.requestAnimationFrame || performOperationSync;
  1665. }
  1666. frame(function () {
  1667. var mutator = getMutator();
  1668. var mark = perf.begin('mutate');
  1669. mutations.map(mutator);
  1670. mark();
  1671. callbackFunction();
  1672. });
  1673. }
  1674. }
  1675. var disabled = false;
  1676. function disableObservation() {
  1677. disabled = true;
  1678. }
  1679. function enableObservation() {
  1680. disabled = false;
  1681. }
  1682. var mo = null;
  1683. function observe(options) {
  1684. if (!MUTATION_OBSERVER) {
  1685. return;
  1686. }
  1687. if (!config.observeMutations) {
  1688. return;
  1689. }
  1690. var _options$treeCallback = options.treeCallback,
  1691. treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback,
  1692. _options$nodeCallback = options.nodeCallback,
  1693. nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback,
  1694. _options$pseudoElemen = options.pseudoElementsCallback,
  1695. pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen,
  1696. _options$observeMutat = options.observeMutationsRoot,
  1697. observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
  1698. mo = new MUTATION_OBSERVER(function (objects) {
  1699. if (disabled) return;
  1700. var defaultPrefix = getDefaultUsablePrefix();
  1701. toArray(objects).forEach(function (mutationRecord) {
  1702. if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
  1703. if (config.searchPseudoElements) {
  1704. pseudoElementsCallback(mutationRecord.target);
  1705. }
  1706. treeCallback(mutationRecord.target);
  1707. }
  1708. if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {
  1709. pseudoElementsCallback(mutationRecord.target.parentNode);
  1710. }
  1711. if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
  1712. if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {
  1713. var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),
  1714. prefix = _getCanonicalIcon.prefix,
  1715. iconName = _getCanonicalIcon.iconName;
  1716. mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
  1717. if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);
  1718. } else if (hasBeenReplaced(mutationRecord.target)) {
  1719. nodeCallback(mutationRecord.target);
  1720. }
  1721. }
  1722. });
  1723. });
  1724. if (!IS_DOM) return;
  1725. mo.observe(observeMutationsRoot, {
  1726. childList: true,
  1727. attributes: true,
  1728. characterData: true,
  1729. subtree: true
  1730. });
  1731. }
  1732. function disconnect() {
  1733. if (!mo) return;
  1734. mo.disconnect();
  1735. }
  1736. function styleParser (node) {
  1737. var style = node.getAttribute('style');
  1738. var val = [];
  1739. if (style) {
  1740. val = style.split(';').reduce(function (acc, style) {
  1741. var styles = style.split(':');
  1742. var prop = styles[0];
  1743. var value = styles.slice(1);
  1744. if (prop && value.length > 0) {
  1745. acc[prop] = value.join(':').trim();
  1746. }
  1747. return acc;
  1748. }, {});
  1749. }
  1750. return val;
  1751. }
  1752. function classParser (node) {
  1753. var existingPrefix = node.getAttribute('data-prefix');
  1754. var existingIconName = node.getAttribute('data-icon');
  1755. var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
  1756. var val = getCanonicalIcon(classArray(node));
  1757. if (!val.prefix) {
  1758. val.prefix = getDefaultUsablePrefix();
  1759. }
  1760. if (existingPrefix && existingIconName) {
  1761. val.prefix = existingPrefix;
  1762. val.iconName = existingIconName;
  1763. }
  1764. if (val.iconName && val.prefix) {
  1765. return val;
  1766. }
  1767. if (val.prefix && innerText.length > 0) {
  1768. val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
  1769. }
  1770. if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {
  1771. val.iconName = node.firstChild.data;
  1772. }
  1773. return val;
  1774. }
  1775. function attributesParser (node) {
  1776. var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {
  1777. if (acc.name !== 'class' && acc.name !== 'style') {
  1778. acc[attr.name] = attr.value;
  1779. }
  1780. return acc;
  1781. }, {});
  1782. var title = node.getAttribute('title');
  1783. var titleId = node.getAttribute('data-fa-title-id');
  1784. if (config.autoA11y) {
  1785. if (title) {
  1786. extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
  1787. } else {
  1788. extraAttributes['aria-hidden'] = 'true';
  1789. extraAttributes['focusable'] = 'false';
  1790. }
  1791. }
  1792. return extraAttributes;
  1793. }
  1794. function blankMeta() {
  1795. return {
  1796. iconName: null,
  1797. title: null,
  1798. titleId: null,
  1799. prefix: null,
  1800. transform: meaninglessTransform,
  1801. symbol: false,
  1802. mask: {
  1803. iconName: null,
  1804. prefix: null,
  1805. rest: []
  1806. },
  1807. maskId: null,
  1808. extra: {
  1809. classes: [],
  1810. styles: {},
  1811. attributes: {}
  1812. }
  1813. };
  1814. }
  1815. function parseMeta(node) {
  1816. var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  1817. styleParser: true
  1818. };
  1819. var _classParser = classParser(node),
  1820. iconName = _classParser.iconName,
  1821. prefix = _classParser.prefix,
  1822. extraClasses = _classParser.rest;
  1823. var extraAttributes = attributesParser(node);
  1824. var pluginMeta = chainHooks('parseNodeAttributes', {}, node);
  1825. var extraStyles = parser.styleParser ? styleParser(node) : [];
  1826. return _objectSpread2({
  1827. iconName: iconName,
  1828. title: node.getAttribute('title'),
  1829. titleId: node.getAttribute('data-fa-title-id'),
  1830. prefix: prefix,
  1831. transform: meaninglessTransform,
  1832. mask: {
  1833. iconName: null,
  1834. prefix: null,
  1835. rest: []
  1836. },
  1837. maskId: null,
  1838. symbol: false,
  1839. extra: {
  1840. classes: extraClasses,
  1841. styles: extraStyles,
  1842. attributes: extraAttributes
  1843. }
  1844. }, pluginMeta);
  1845. }
  1846. var styles$2 = namespace.styles;
  1847. function generateMutation(node) {
  1848. var nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, {
  1849. styleParser: false
  1850. }) : parseMeta(node);
  1851. if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
  1852. return callProvided('generateLayersText', node, nodeMeta);
  1853. } else {
  1854. return callProvided('generateSvgReplacementMutation', node, nodeMeta);
  1855. }
  1856. }
  1857. var knownPrefixes = new Set();
  1858. FAMILIES.map(function (family) {
  1859. knownPrefixes.add("fa-".concat(family));
  1860. });
  1861. Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC]).map(knownPrefixes.add.bind(knownPrefixes));
  1862. Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP]).map(knownPrefixes.add.bind(knownPrefixes));
  1863. knownPrefixes = _toConsumableArray(knownPrefixes);
  1864. function onTree(root) {
  1865. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  1866. if (!IS_DOM) return Promise.resolve();
  1867. var htmlClassList = DOCUMENT.documentElement.classList;
  1868. var hclAdd = function hclAdd(suffix) {
  1869. return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
  1870. };
  1871. var hclRemove = function hclRemove(suffix) {
  1872. return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
  1873. };
  1874. var prefixes = config.autoFetchSvg ? knownPrefixes : FAMILIES.map(function (f) {
  1875. return "fa-".concat(f);
  1876. }).concat(Object.keys(styles$2));
  1877. if (!prefixes.includes('fa')) {
  1878. prefixes.push('fa');
  1879. }
  1880. var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function (p) {
  1881. return ".".concat(p, ":not([").concat(DATA_FA_I2SVG, "])");
  1882. })).join(', ');
  1883. if (prefixesDomQuery.length === 0) {
  1884. return Promise.resolve();
  1885. }
  1886. var candidates = [];
  1887. try {
  1888. candidates = toArray(root.querySelectorAll(prefixesDomQuery));
  1889. } catch (e) {// noop
  1890. }
  1891. if (candidates.length > 0) {
  1892. hclAdd('pending');
  1893. hclRemove('complete');
  1894. } else {
  1895. return Promise.resolve();
  1896. }
  1897. var mark = perf.begin('onTree');
  1898. var mutations = candidates.reduce(function (acc, node) {
  1899. try {
  1900. var mutation = generateMutation(node);
  1901. if (mutation) {
  1902. acc.push(mutation);
  1903. }
  1904. } catch (e) {
  1905. if (!PRODUCTION) {
  1906. if (e.name === 'MissingIcon') {
  1907. console.error(e);
  1908. }
  1909. }
  1910. }
  1911. return acc;
  1912. }, []);
  1913. return new Promise(function (resolve, reject) {
  1914. Promise.all(mutations).then(function (resolvedMutations) {
  1915. perform(resolvedMutations, function () {
  1916. hclAdd('active');
  1917. hclAdd('complete');
  1918. hclRemove('pending');
  1919. if (typeof callback === 'function') callback();
  1920. mark();
  1921. resolve();
  1922. });
  1923. }).catch(function (e) {
  1924. mark();
  1925. reject(e);
  1926. });
  1927. });
  1928. }
  1929. function onNode(node) {
  1930. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  1931. generateMutation(node).then(function (mutation) {
  1932. if (mutation) {
  1933. perform([mutation], callback);
  1934. }
  1935. });
  1936. }
  1937. function resolveIcons(next) {
  1938. return function (maybeIconDefinition) {
  1939. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1940. var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
  1941. var mask = params.mask;
  1942. if (mask) {
  1943. mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
  1944. }
  1945. return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
  1946. mask: mask
  1947. }));
  1948. };
  1949. }
  1950. var render = function render(iconDefinition) {
  1951. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1952. var _params$transform = params.transform,
  1953. transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
  1954. _params$symbol = params.symbol,
  1955. symbol = _params$symbol === void 0 ? false : _params$symbol,
  1956. _params$mask = params.mask,
  1957. mask = _params$mask === void 0 ? null : _params$mask,
  1958. _params$maskId = params.maskId,
  1959. maskId = _params$maskId === void 0 ? null : _params$maskId,
  1960. _params$title = params.title,
  1961. title = _params$title === void 0 ? null : _params$title,
  1962. _params$titleId = params.titleId,
  1963. titleId = _params$titleId === void 0 ? null : _params$titleId,
  1964. _params$classes = params.classes,
  1965. classes = _params$classes === void 0 ? [] : _params$classes,
  1966. _params$attributes = params.attributes,
  1967. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  1968. _params$styles = params.styles,
  1969. styles = _params$styles === void 0 ? {} : _params$styles;
  1970. if (!iconDefinition) return;
  1971. var prefix = iconDefinition.prefix,
  1972. iconName = iconDefinition.iconName,
  1973. icon = iconDefinition.icon;
  1974. return domVariants(_objectSpread2({
  1975. type: 'icon'
  1976. }, iconDefinition), function () {
  1977. callHooks('beforeDOMElementCreation', {
  1978. iconDefinition: iconDefinition,
  1979. params: params
  1980. });
  1981. if (config.autoA11y) {
  1982. if (title) {
  1983. attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
  1984. } else {
  1985. attributes['aria-hidden'] = 'true';
  1986. attributes['focusable'] = 'false';
  1987. }
  1988. }
  1989. return makeInlineSvgAbstract({
  1990. icons: {
  1991. main: asFoundIcon(icon),
  1992. mask: mask ? asFoundIcon(mask.icon) : {
  1993. found: false,
  1994. width: null,
  1995. height: null,
  1996. icon: {}
  1997. }
  1998. },
  1999. prefix: prefix,
  2000. iconName: iconName,
  2001. transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
  2002. symbol: symbol,
  2003. title: title,
  2004. maskId: maskId,
  2005. titleId: titleId,
  2006. extra: {
  2007. attributes: attributes,
  2008. styles: styles,
  2009. classes: classes
  2010. }
  2011. });
  2012. });
  2013. };
  2014. var ReplaceElements = {
  2015. mixout: function mixout() {
  2016. return {
  2017. icon: resolveIcons(render)
  2018. };
  2019. },
  2020. hooks: function hooks() {
  2021. return {
  2022. mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
  2023. accumulator.treeCallback = onTree;
  2024. accumulator.nodeCallback = onNode;
  2025. return accumulator;
  2026. }
  2027. };
  2028. },
  2029. provides: function provides(providers$$1) {
  2030. providers$$1.i2svg = function (params) {
  2031. var _params$node = params.node,
  2032. node = _params$node === void 0 ? DOCUMENT : _params$node,
  2033. _params$callback = params.callback,
  2034. callback = _params$callback === void 0 ? function () {} : _params$callback;
  2035. return onTree(node, callback);
  2036. };
  2037. providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {
  2038. var iconName = nodeMeta.iconName,
  2039. title = nodeMeta.title,
  2040. titleId = nodeMeta.titleId,
  2041. prefix = nodeMeta.prefix,
  2042. transform = nodeMeta.transform,
  2043. symbol = nodeMeta.symbol,
  2044. mask = nodeMeta.mask,
  2045. maskId = nodeMeta.maskId,
  2046. extra = nodeMeta.extra;
  2047. return new Promise(function (resolve, reject) {
  2048. Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
  2049. found: false,
  2050. width: 512,
  2051. height: 512,
  2052. icon: {}
  2053. })]).then(function (_ref) {
  2054. var _ref2 = _slicedToArray(_ref, 2),
  2055. main = _ref2[0],
  2056. mask = _ref2[1];
  2057. resolve([node, makeInlineSvgAbstract({
  2058. icons: {
  2059. main: main,
  2060. mask: mask
  2061. },
  2062. prefix: prefix,
  2063. iconName: iconName,
  2064. transform: transform,
  2065. symbol: symbol,
  2066. maskId: maskId,
  2067. title: title,
  2068. titleId: titleId,
  2069. extra: extra,
  2070. watchable: true
  2071. })]);
  2072. }).catch(reject);
  2073. });
  2074. };
  2075. providers$$1.generateAbstractIcon = function (_ref3) {
  2076. var children = _ref3.children,
  2077. attributes = _ref3.attributes,
  2078. main = _ref3.main,
  2079. transform = _ref3.transform,
  2080. styles = _ref3.styles;
  2081. var styleString = joinStyles(styles);
  2082. if (styleString.length > 0) {
  2083. attributes['style'] = styleString;
  2084. }
  2085. var nextChild;
  2086. if (transformIsMeaningful(transform)) {
  2087. nextChild = callProvided('generateAbstractTransformGrouping', {
  2088. main: main,
  2089. transform: transform,
  2090. containerWidth: main.width,
  2091. iconWidth: main.width
  2092. });
  2093. }
  2094. children.push(nextChild || main.icon);
  2095. return {
  2096. children: children,
  2097. attributes: attributes
  2098. };
  2099. };
  2100. }
  2101. };
  2102. var Layers = {
  2103. mixout: function mixout() {
  2104. return {
  2105. layer: function layer(assembler) {
  2106. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2107. var _params$classes = params.classes,
  2108. classes = _params$classes === void 0 ? [] : _params$classes;
  2109. return domVariants({
  2110. type: 'layer'
  2111. }, function () {
  2112. callHooks('beforeDOMElementCreation', {
  2113. assembler: assembler,
  2114. params: params
  2115. });
  2116. var children = [];
  2117. assembler(function (args) {
  2118. Array.isArray(args) ? args.map(function (a) {
  2119. children = children.concat(a.abstract);
  2120. }) : children = children.concat(args.abstract);
  2121. });
  2122. return [{
  2123. tag: 'span',
  2124. attributes: {
  2125. class: ["".concat(config.cssPrefix, "-layers")].concat(_toConsumableArray(classes)).join(' ')
  2126. },
  2127. children: children
  2128. }];
  2129. });
  2130. }
  2131. };
  2132. }
  2133. };
  2134. var LayersCounter = {
  2135. mixout: function mixout() {
  2136. return {
  2137. counter: function counter(content) {
  2138. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2139. var _params$title = params.title,
  2140. title = _params$title === void 0 ? null : _params$title,
  2141. _params$classes = params.classes,
  2142. classes = _params$classes === void 0 ? [] : _params$classes,
  2143. _params$attributes = params.attributes,
  2144. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  2145. _params$styles = params.styles,
  2146. styles = _params$styles === void 0 ? {} : _params$styles;
  2147. return domVariants({
  2148. type: 'counter',
  2149. content: content
  2150. }, function () {
  2151. callHooks('beforeDOMElementCreation', {
  2152. content: content,
  2153. params: params
  2154. });
  2155. return makeLayersCounterAbstract({
  2156. content: content.toString(),
  2157. title: title,
  2158. extra: {
  2159. attributes: attributes,
  2160. styles: styles,
  2161. classes: ["".concat(config.cssPrefix, "-layers-counter")].concat(_toConsumableArray(classes))
  2162. }
  2163. });
  2164. });
  2165. }
  2166. };
  2167. }
  2168. };
  2169. var LayersText = {
  2170. mixout: function mixout() {
  2171. return {
  2172. text: function text(content) {
  2173. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2174. var _params$transform = params.transform,
  2175. transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
  2176. _params$title = params.title,
  2177. title = _params$title === void 0 ? null : _params$title,
  2178. _params$classes = params.classes,
  2179. classes = _params$classes === void 0 ? [] : _params$classes,
  2180. _params$attributes = params.attributes,
  2181. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  2182. _params$styles = params.styles,
  2183. styles = _params$styles === void 0 ? {} : _params$styles;
  2184. return domVariants({
  2185. type: 'text',
  2186. content: content
  2187. }, function () {
  2188. callHooks('beforeDOMElementCreation', {
  2189. content: content,
  2190. params: params
  2191. });
  2192. return makeLayersTextAbstract({
  2193. content: content,
  2194. transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
  2195. title: title,
  2196. extra: {
  2197. attributes: attributes,
  2198. styles: styles,
  2199. classes: ["".concat(config.cssPrefix, "-layers-text")].concat(_toConsumableArray(classes))
  2200. }
  2201. });
  2202. });
  2203. }
  2204. };
  2205. },
  2206. provides: function provides(providers$$1) {
  2207. providers$$1.generateLayersText = function (node, nodeMeta) {
  2208. var title = nodeMeta.title,
  2209. transform = nodeMeta.transform,
  2210. extra = nodeMeta.extra;
  2211. var width = null;
  2212. var height = null;
  2213. if (IS_IE) {
  2214. var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
  2215. var boundingClientRect = node.getBoundingClientRect();
  2216. width = boundingClientRect.width / computedFontSize;
  2217. height = boundingClientRect.height / computedFontSize;
  2218. }
  2219. if (config.autoA11y && !title) {
  2220. extra.attributes['aria-hidden'] = 'true';
  2221. }
  2222. return Promise.resolve([node, makeLayersTextAbstract({
  2223. content: node.innerHTML,
  2224. width: width,
  2225. height: height,
  2226. transform: transform,
  2227. title: title,
  2228. extra: extra,
  2229. watchable: true
  2230. })]);
  2231. };
  2232. }
  2233. };
  2234. var CLEAN_CONTENT_PATTERN = new RegExp("\"", 'ug');
  2235. var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
  2236. function hexValueFromContent(content) {
  2237. var cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');
  2238. var codePoint = codePointAt(cleaned, 0);
  2239. var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
  2240. var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
  2241. return {
  2242. value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
  2243. isSecondary: isPrependTen || isDoubled
  2244. };
  2245. }
  2246. function replaceForPosition(node, position) {
  2247. var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));
  2248. return new Promise(function (resolve, reject) {
  2249. if (node.getAttribute(pendingAttribute) !== null) {
  2250. // This node is already being processed
  2251. return resolve();
  2252. }
  2253. var children = toArray(node.children);
  2254. var alreadyProcessedPseudoElement = children.filter(function (c) {
  2255. return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
  2256. })[0];
  2257. var styles = WINDOW.getComputedStyle(node, position);
  2258. var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);
  2259. var fontWeight = styles.getPropertyValue('font-weight');
  2260. var content = styles.getPropertyValue('content');
  2261. if (alreadyProcessedPseudoElement && !fontFamily) {
  2262. // If we've already processed it but the current computed style does not result in a font-family,
  2263. // that probably means that a class name that was previously present to make the icon has been
  2264. // removed. So we now should delete the icon.
  2265. node.removeChild(alreadyProcessedPseudoElement);
  2266. return resolve();
  2267. } else if (fontFamily && content !== 'none' && content !== '') {
  2268. var _content = styles.getPropertyValue('content');
  2269. var family = ~['Sharp'].indexOf(fontFamily[2]) ? FAMILY_SHARP : FAMILY_CLASSIC;
  2270. var prefix = ~['Solid', 'Regular', 'Light', 'Thin', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[family][fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[family][fontWeight];
  2271. var _hexValueFromContent = hexValueFromContent(_content),
  2272. hexValue = _hexValueFromContent.value,
  2273. isSecondary = _hexValueFromContent.isSecondary;
  2274. var isV4 = fontFamily[0].startsWith('FontAwesome');
  2275. var iconName = byUnicode(prefix, hexValue);
  2276. var iconIdentifier = iconName;
  2277. if (isV4) {
  2278. var iconName4 = byOldUnicode(hexValue);
  2279. if (iconName4.iconName && iconName4.prefix) {
  2280. iconName = iconName4.iconName;
  2281. prefix = iconName4.prefix;
  2282. }
  2283. } // Only convert the pseudo element in this ::before/::after position into an icon if we haven't
  2284. // already done so with the same prefix and iconName
  2285. if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
  2286. node.setAttribute(pendingAttribute, iconIdentifier);
  2287. if (alreadyProcessedPseudoElement) {
  2288. // Delete the old one, since we're replacing it with a new one
  2289. node.removeChild(alreadyProcessedPseudoElement);
  2290. }
  2291. var meta = blankMeta();
  2292. var extra = meta.extra;
  2293. extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
  2294. findIcon(iconName, prefix).then(function (main) {
  2295. var abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
  2296. icons: {
  2297. main: main,
  2298. mask: emptyCanonicalIcon()
  2299. },
  2300. prefix: prefix,
  2301. iconName: iconIdentifier,
  2302. extra: extra,
  2303. watchable: true
  2304. }));
  2305. var element = DOCUMENT.createElement('svg');
  2306. if (position === '::before') {
  2307. node.insertBefore(element, node.firstChild);
  2308. } else {
  2309. node.appendChild(element);
  2310. }
  2311. element.outerHTML = abstract.map(function (a) {
  2312. return toHtml(a);
  2313. }).join('\n');
  2314. node.removeAttribute(pendingAttribute);
  2315. resolve();
  2316. }).catch(reject);
  2317. } else {
  2318. resolve();
  2319. }
  2320. } else {
  2321. resolve();
  2322. }
  2323. });
  2324. }
  2325. function replace(node) {
  2326. return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);
  2327. }
  2328. function processable(node) {
  2329. return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');
  2330. }
  2331. function searchPseudoElements(root) {
  2332. if (!IS_DOM) return;
  2333. return new Promise(function (resolve, reject) {
  2334. var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);
  2335. var end = perf.begin('searchPseudoElements');
  2336. disableObservation();
  2337. Promise.all(operations).then(function () {
  2338. end();
  2339. enableObservation();
  2340. resolve();
  2341. }).catch(function () {
  2342. end();
  2343. enableObservation();
  2344. reject();
  2345. });
  2346. });
  2347. }
  2348. var PseudoElements = {
  2349. hooks: function hooks() {
  2350. return {
  2351. mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
  2352. accumulator.pseudoElementsCallback = searchPseudoElements;
  2353. return accumulator;
  2354. }
  2355. };
  2356. },
  2357. provides: function provides(providers$$1) {
  2358. providers$$1.pseudoElements2svg = function (params) {
  2359. var _params$node = params.node,
  2360. node = _params$node === void 0 ? DOCUMENT : _params$node;
  2361. if (config.searchPseudoElements) {
  2362. searchPseudoElements(node);
  2363. }
  2364. };
  2365. }
  2366. };
  2367. var _unwatched = false;
  2368. var MutationObserver$1 = {
  2369. mixout: function mixout() {
  2370. return {
  2371. dom: {
  2372. unwatch: function unwatch() {
  2373. disableObservation();
  2374. _unwatched = true;
  2375. }
  2376. }
  2377. };
  2378. },
  2379. hooks: function hooks() {
  2380. return {
  2381. bootstrap: function bootstrap() {
  2382. observe(chainHooks('mutationObserverCallbacks', {}));
  2383. },
  2384. noAuto: function noAuto() {
  2385. disconnect();
  2386. },
  2387. watch: function watch(params) {
  2388. var observeMutationsRoot = params.observeMutationsRoot;
  2389. if (_unwatched) {
  2390. enableObservation();
  2391. } else {
  2392. observe(chainHooks('mutationObserverCallbacks', {
  2393. observeMutationsRoot: observeMutationsRoot
  2394. }));
  2395. }
  2396. }
  2397. };
  2398. }
  2399. };
  2400. var parseTransformString = function parseTransformString(transformString) {
  2401. var transform = {
  2402. size: 16,
  2403. x: 0,
  2404. y: 0,
  2405. flipX: false,
  2406. flipY: false,
  2407. rotate: 0
  2408. };
  2409. return transformString.toLowerCase().split(' ').reduce(function (acc, n) {
  2410. var parts = n.toLowerCase().split('-');
  2411. var first = parts[0];
  2412. var rest = parts.slice(1).join('-');
  2413. if (first && rest === 'h') {
  2414. acc.flipX = true;
  2415. return acc;
  2416. }
  2417. if (first && rest === 'v') {
  2418. acc.flipY = true;
  2419. return acc;
  2420. }
  2421. rest = parseFloat(rest);
  2422. if (isNaN(rest)) {
  2423. return acc;
  2424. }
  2425. switch (first) {
  2426. case 'grow':
  2427. acc.size = acc.size + rest;
  2428. break;
  2429. case 'shrink':
  2430. acc.size = acc.size - rest;
  2431. break;
  2432. case 'left':
  2433. acc.x = acc.x - rest;
  2434. break;
  2435. case 'right':
  2436. acc.x = acc.x + rest;
  2437. break;
  2438. case 'up':
  2439. acc.y = acc.y - rest;
  2440. break;
  2441. case 'down':
  2442. acc.y = acc.y + rest;
  2443. break;
  2444. case 'rotate':
  2445. acc.rotate = acc.rotate + rest;
  2446. break;
  2447. }
  2448. return acc;
  2449. }, transform);
  2450. };
  2451. var PowerTransforms = {
  2452. mixout: function mixout() {
  2453. return {
  2454. parse: {
  2455. transform: function transform(transformString) {
  2456. return parseTransformString(transformString);
  2457. }
  2458. }
  2459. };
  2460. },
  2461. hooks: function hooks() {
  2462. return {
  2463. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2464. var transformString = node.getAttribute('data-fa-transform');
  2465. if (transformString) {
  2466. accumulator.transform = parseTransformString(transformString);
  2467. }
  2468. return accumulator;
  2469. }
  2470. };
  2471. },
  2472. provides: function provides(providers) {
  2473. providers.generateAbstractTransformGrouping = function (_ref) {
  2474. var main = _ref.main,
  2475. transform = _ref.transform,
  2476. containerWidth = _ref.containerWidth,
  2477. iconWidth = _ref.iconWidth;
  2478. var outer = {
  2479. transform: "translate(".concat(containerWidth / 2, " 256)")
  2480. };
  2481. var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
  2482. var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
  2483. var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
  2484. var inner = {
  2485. transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
  2486. };
  2487. var path = {
  2488. transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
  2489. };
  2490. var operations = {
  2491. outer: outer,
  2492. inner: inner,
  2493. path: path
  2494. };
  2495. return {
  2496. tag: 'g',
  2497. attributes: _objectSpread2({}, operations.outer),
  2498. children: [{
  2499. tag: 'g',
  2500. attributes: _objectSpread2({}, operations.inner),
  2501. children: [{
  2502. tag: main.icon.tag,
  2503. children: main.icon.children,
  2504. attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
  2505. }]
  2506. }]
  2507. };
  2508. };
  2509. }
  2510. };
  2511. var ALL_SPACE = {
  2512. x: 0,
  2513. y: 0,
  2514. width: '100%',
  2515. height: '100%'
  2516. };
  2517. function fillBlack(abstract) {
  2518. var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  2519. if (abstract.attributes && (abstract.attributes.fill || force)) {
  2520. abstract.attributes.fill = 'black';
  2521. }
  2522. return abstract;
  2523. }
  2524. function deGroup(abstract) {
  2525. if (abstract.tag === 'g') {
  2526. return abstract.children;
  2527. } else {
  2528. return [abstract];
  2529. }
  2530. }
  2531. var Masks = {
  2532. hooks: function hooks() {
  2533. return {
  2534. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2535. var maskData = node.getAttribute('data-fa-mask');
  2536. var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(function (i) {
  2537. return i.trim();
  2538. }));
  2539. if (!mask.prefix) {
  2540. mask.prefix = getDefaultUsablePrefix();
  2541. }
  2542. accumulator.mask = mask;
  2543. accumulator.maskId = node.getAttribute('data-fa-mask-id');
  2544. return accumulator;
  2545. }
  2546. };
  2547. },
  2548. provides: function provides(providers) {
  2549. providers.generateAbstractMask = function (_ref) {
  2550. var children = _ref.children,
  2551. attributes = _ref.attributes,
  2552. main = _ref.main,
  2553. mask = _ref.mask,
  2554. explicitMaskId = _ref.maskId,
  2555. transform = _ref.transform;
  2556. var mainWidth = main.width,
  2557. mainPath = main.icon;
  2558. var maskWidth = mask.width,
  2559. maskPath = mask.icon;
  2560. var trans = transformForSvg({
  2561. transform: transform,
  2562. containerWidth: maskWidth,
  2563. iconWidth: mainWidth
  2564. });
  2565. var maskRect = {
  2566. tag: 'rect',
  2567. attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
  2568. fill: 'white'
  2569. })
  2570. };
  2571. var maskInnerGroupChildrenMixin = mainPath.children ? {
  2572. children: mainPath.children.map(fillBlack)
  2573. } : {};
  2574. var maskInnerGroup = {
  2575. tag: 'g',
  2576. attributes: _objectSpread2({}, trans.inner),
  2577. children: [fillBlack(_objectSpread2({
  2578. tag: mainPath.tag,
  2579. attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
  2580. }, maskInnerGroupChildrenMixin))]
  2581. };
  2582. var maskOuterGroup = {
  2583. tag: 'g',
  2584. attributes: _objectSpread2({}, trans.outer),
  2585. children: [maskInnerGroup]
  2586. };
  2587. var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
  2588. var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
  2589. var maskTag = {
  2590. tag: 'mask',
  2591. attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
  2592. id: maskId,
  2593. maskUnits: 'userSpaceOnUse',
  2594. maskContentUnits: 'userSpaceOnUse'
  2595. }),
  2596. children: [maskRect, maskOuterGroup]
  2597. };
  2598. var defs = {
  2599. tag: 'defs',
  2600. children: [{
  2601. tag: 'clipPath',
  2602. attributes: {
  2603. id: clipId
  2604. },
  2605. children: deGroup(maskPath)
  2606. }, maskTag]
  2607. };
  2608. children.push(defs, {
  2609. tag: 'rect',
  2610. attributes: _objectSpread2({
  2611. fill: 'currentColor',
  2612. 'clip-path': "url(#".concat(clipId, ")"),
  2613. mask: "url(#".concat(maskId, ")")
  2614. }, ALL_SPACE)
  2615. });
  2616. return {
  2617. children: children,
  2618. attributes: attributes
  2619. };
  2620. };
  2621. }
  2622. };
  2623. var MissingIconIndicator = {
  2624. provides: function provides(providers) {
  2625. var reduceMotion = false;
  2626. if (WINDOW.matchMedia) {
  2627. reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;
  2628. }
  2629. providers.missingIconAbstract = function () {
  2630. var gChildren = [];
  2631. var FILL = {
  2632. fill: 'currentColor'
  2633. };
  2634. var ANIMATION_BASE = {
  2635. attributeType: 'XML',
  2636. repeatCount: 'indefinite',
  2637. dur: '2s'
  2638. }; // Ring
  2639. gChildren.push({
  2640. tag: 'path',
  2641. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2642. d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'
  2643. })
  2644. });
  2645. var OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
  2646. attributeName: 'opacity'
  2647. });
  2648. var dot = {
  2649. tag: 'circle',
  2650. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2651. cx: '256',
  2652. cy: '364',
  2653. r: '28'
  2654. }),
  2655. children: []
  2656. };
  2657. if (!reduceMotion) {
  2658. dot.children.push({
  2659. tag: 'animate',
  2660. attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
  2661. attributeName: 'r',
  2662. values: '28;14;28;28;14;28;'
  2663. })
  2664. }, {
  2665. tag: 'animate',
  2666. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2667. values: '1;0;1;1;0;1;'
  2668. })
  2669. });
  2670. }
  2671. gChildren.push(dot);
  2672. gChildren.push({
  2673. tag: 'path',
  2674. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2675. opacity: '1',
  2676. d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'
  2677. }),
  2678. children: reduceMotion ? [] : [{
  2679. tag: 'animate',
  2680. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2681. values: '1;0;0;0;0;1;'
  2682. })
  2683. }]
  2684. });
  2685. if (!reduceMotion) {
  2686. // Exclamation
  2687. gChildren.push({
  2688. tag: 'path',
  2689. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2690. opacity: '0',
  2691. d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'
  2692. }),
  2693. children: [{
  2694. tag: 'animate',
  2695. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2696. values: '0;0;1;1;0;0;'
  2697. })
  2698. }]
  2699. });
  2700. }
  2701. return {
  2702. tag: 'g',
  2703. attributes: {
  2704. 'class': 'missing'
  2705. },
  2706. children: gChildren
  2707. };
  2708. };
  2709. }
  2710. };
  2711. var SvgSymbols = {
  2712. hooks: function hooks() {
  2713. return {
  2714. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2715. var symbolData = node.getAttribute('data-fa-symbol');
  2716. var symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;
  2717. accumulator['symbol'] = symbol;
  2718. return accumulator;
  2719. }
  2720. };
  2721. }
  2722. };
  2723. var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
  2724. registerPlugins(plugins, {
  2725. mixoutsTo: api
  2726. });
  2727. bunker(bootstrap);
  2728. }());