plugins.mjs 112 KB

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