conflict-detection.js 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435
  1. /*!
  2. * Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com
  3. * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  4. * Copyright 2025 Fonticons, Inc.
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  8. typeof define === 'function' && define.amd ? define(factory) :
  9. (factory());
  10. }(this, (function () { 'use strict';
  11. function _arrayLikeToArray(r, a) {
  12. (null == a || a > r.length) && (a = r.length);
  13. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  14. return n;
  15. }
  16. function _arrayWithoutHoles(r) {
  17. if (Array.isArray(r)) return _arrayLikeToArray(r);
  18. }
  19. function _defineProperty(e, r, t) {
  20. return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
  21. value: t,
  22. enumerable: !0,
  23. configurable: !0,
  24. writable: !0
  25. }) : e[r] = t, e;
  26. }
  27. function _iterableToArray(r) {
  28. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  29. }
  30. function _nonIterableSpread() {
  31. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  32. }
  33. function ownKeys(e, r) {
  34. var t = Object.keys(e);
  35. if (Object.getOwnPropertySymbols) {
  36. var o = Object.getOwnPropertySymbols(e);
  37. r && (o = o.filter(function (r) {
  38. return Object.getOwnPropertyDescriptor(e, r).enumerable;
  39. })), t.push.apply(t, o);
  40. }
  41. return t;
  42. }
  43. function _objectSpread2(e) {
  44. for (var r = 1; r < arguments.length; r++) {
  45. var t = null != arguments[r] ? arguments[r] : {};
  46. r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
  47. _defineProperty(e, r, t[r]);
  48. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
  49. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
  50. });
  51. }
  52. return e;
  53. }
  54. function _toConsumableArray(r) {
  55. return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
  56. }
  57. function _toPrimitive(t, r) {
  58. if ("object" != typeof t || !t) return t;
  59. var e = t[Symbol.toPrimitive];
  60. if (void 0 !== e) {
  61. var i = e.call(t, r || "default");
  62. if ("object" != typeof i) return i;
  63. throw new TypeError("@@toPrimitive must return a primitive value.");
  64. }
  65. return ("string" === r ? String : Number)(t);
  66. }
  67. function _toPropertyKey(t) {
  68. var i = _toPrimitive(t, "string");
  69. return "symbol" == typeof i ? i : i + "";
  70. }
  71. function _typeof(o) {
  72. "@babel/helpers - typeof";
  73. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  74. return typeof o;
  75. } : function (o) {
  76. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  77. }, _typeof(o);
  78. }
  79. function _unsupportedIterableToArray(r, a) {
  80. if (r) {
  81. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  82. var t = {}.toString.call(r).slice(8, -1);
  83. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  84. }
  85. }
  86. var _WINDOW = {};
  87. var _DOCUMENT = {};
  88. try {
  89. if (typeof window !== 'undefined') _WINDOW = window;
  90. if (typeof document !== 'undefined') _DOCUMENT = document;
  91. } catch (e) {} // eslint-disable-line no-empty
  92. var _ref = _WINDOW.navigator || {},
  93. _ref$userAgent = _ref.userAgent,
  94. userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
  95. var WINDOW = _WINDOW;
  96. var DOCUMENT = _DOCUMENT;
  97. var IS_BROWSER = !!WINDOW.document;
  98. var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
  99. var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
  100. var functions = [];
  101. var _listener = function listener() {
  102. DOCUMENT.removeEventListener('DOMContentLoaded', _listener);
  103. loaded = 1;
  104. functions.map(function (fn) {
  105. return fn();
  106. });
  107. };
  108. var loaded = false;
  109. if (IS_DOM) {
  110. loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
  111. if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', _listener);
  112. }
  113. function domready (fn) {
  114. if (!IS_DOM) return;
  115. loaded ? setTimeout(fn, 0) : functions.push(fn);
  116. }
  117. function report (_ref) {
  118. var nodesTested = _ref.nodesTested,
  119. nodesFound = _ref.nodesFound;
  120. var timedOutTests = {};
  121. for (var key in nodesFound) {
  122. if (!(nodesTested.conflict[key] || nodesTested.noConflict[key])) {
  123. timedOutTests[key] = nodesFound[key];
  124. }
  125. }
  126. var conflictsCount = Object.keys(nodesTested.conflict).length;
  127. if (conflictsCount > 0) {
  128. console.info("%cConflict".concat(conflictsCount > 1 ? 's' : '', " found:"), 'color: darkred; font-size: large');
  129. var data = {};
  130. for (var _key in nodesTested.conflict) {
  131. var item = nodesTested.conflict[_key];
  132. data[_key] = {
  133. 'tagName': item.tagName,
  134. 'src/href': item.src || item.href || 'n/a',
  135. 'innerText excerpt': item.innerText && item.innerText !== '' ? item.innerText.slice(0, 200) + '...' : '(empty)'
  136. };
  137. }
  138. console.table(data);
  139. }
  140. var noConflictsCount = Object.keys(nodesTested.noConflict).length;
  141. if (noConflictsCount > 0) {
  142. console.info("%cNo conflict".concat(noConflictsCount > 1 ? 's' : '', " found with ").concat(noConflictsCount === 1 ? 'this' : 'these', ":"), 'color: green; font-size: large');
  143. var _data = {};
  144. for (var _key2 in nodesTested.noConflict) {
  145. var _item = nodesTested.noConflict[_key2];
  146. _data[_key2] = {
  147. 'tagName': _item.tagName,
  148. 'src/href': _item.src || _item.href || 'n/a',
  149. 'innerText excerpt': _item.innerText && _item.innerText !== '' ? _item.innerText.slice(0, 200) + '...' : '(empty)'
  150. };
  151. }
  152. console.table(_data);
  153. }
  154. var timeOutCount = Object.keys(timedOutTests).length;
  155. if (timeOutCount > 0) {
  156. console.info("%cLeftovers--we timed out before collecting test results for ".concat(timeOutCount === 1 ? 'this' : 'these', ":"), 'color: blue; font-size: large');
  157. var _data2 = {};
  158. for (var _key3 in timedOutTests) {
  159. var _item2 = timedOutTests[_key3];
  160. _data2[_key3] = {
  161. 'tagName': _item2.tagName,
  162. 'src/href': _item2.src || _item2.href || 'n/a',
  163. 'innerText excerpt': _item2.innerText && _item2.innerText !== '' ? _item2.innerText.slice(0, 200) + '...' : '(empty)'
  164. };
  165. }
  166. console.table(_data2);
  167. }
  168. }
  169. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  170. function createCommonjsModule(fn, module) {
  171. return module = { exports: {} }, fn(module, module.exports), module.exports;
  172. }
  173. var md5 = createCommonjsModule(function (module) {
  174. (function ($) {
  175. /**
  176. * Add integers, wrapping at 2^32.
  177. * This uses 16-bit operations internally to work around bugs in interpreters.
  178. *
  179. * @param {number} x First integer
  180. * @param {number} y Second integer
  181. * @returns {number} Sum
  182. */
  183. function safeAdd(x, y) {
  184. var lsw = (x & 0xffff) + (y & 0xffff);
  185. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  186. return msw << 16 | lsw & 0xffff;
  187. }
  188. /**
  189. * Bitwise rotate a 32-bit number to the left.
  190. *
  191. * @param {number} num 32-bit number
  192. * @param {number} cnt Rotation count
  193. * @returns {number} Rotated number
  194. */
  195. function bitRotateLeft(num, cnt) {
  196. return num << cnt | num >>> 32 - cnt;
  197. }
  198. /**
  199. * Basic operation the algorithm uses.
  200. *
  201. * @param {number} q q
  202. * @param {number} a a
  203. * @param {number} b b
  204. * @param {number} x x
  205. * @param {number} s s
  206. * @param {number} t t
  207. * @returns {number} Result
  208. */
  209. function md5cmn(q, a, b, x, s, t) {
  210. return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
  211. }
  212. /**
  213. * Basic operation the algorithm uses.
  214. *
  215. * @param {number} a a
  216. * @param {number} b b
  217. * @param {number} c c
  218. * @param {number} d d
  219. * @param {number} x x
  220. * @param {number} s s
  221. * @param {number} t t
  222. * @returns {number} Result
  223. */
  224. function md5ff(a, b, c, d, x, s, t) {
  225. return md5cmn(b & c | ~b & d, a, b, x, s, t);
  226. }
  227. /**
  228. * Basic operation the algorithm uses.
  229. *
  230. * @param {number} a a
  231. * @param {number} b b
  232. * @param {number} c c
  233. * @param {number} d d
  234. * @param {number} x x
  235. * @param {number} s s
  236. * @param {number} t t
  237. * @returns {number} Result
  238. */
  239. function md5gg(a, b, c, d, x, s, t) {
  240. return md5cmn(b & d | c & ~d, a, b, x, s, t);
  241. }
  242. /**
  243. * Basic operation the algorithm uses.
  244. *
  245. * @param {number} a a
  246. * @param {number} b b
  247. * @param {number} c c
  248. * @param {number} d d
  249. * @param {number} x x
  250. * @param {number} s s
  251. * @param {number} t t
  252. * @returns {number} Result
  253. */
  254. function md5hh(a, b, c, d, x, s, t) {
  255. return md5cmn(b ^ c ^ d, a, b, x, s, t);
  256. }
  257. /**
  258. * Basic operation the algorithm uses.
  259. *
  260. * @param {number} a a
  261. * @param {number} b b
  262. * @param {number} c c
  263. * @param {number} d d
  264. * @param {number} x x
  265. * @param {number} s s
  266. * @param {number} t t
  267. * @returns {number} Result
  268. */
  269. function md5ii(a, b, c, d, x, s, t) {
  270. return md5cmn(c ^ (b | ~d), a, b, x, s, t);
  271. }
  272. /**
  273. * Calculate the MD5 of an array of little-endian words, and a bit length.
  274. *
  275. * @param {Array} x Array of little-endian words
  276. * @param {number} len Bit length
  277. * @returns {Array<number>} MD5 Array
  278. */
  279. function binlMD5(x, len) {
  280. /* append padding */
  281. x[len >> 5] |= 0x80 << len % 32;
  282. x[(len + 64 >>> 9 << 4) + 14] = len;
  283. var i;
  284. var olda;
  285. var oldb;
  286. var oldc;
  287. var oldd;
  288. var a = 1732584193;
  289. var b = -271733879;
  290. var c = -1732584194;
  291. var d = 271733878;
  292. for (i = 0; i < x.length; i += 16) {
  293. olda = a;
  294. oldb = b;
  295. oldc = c;
  296. oldd = d;
  297. a = md5ff(a, b, c, d, x[i], 7, -680876936);
  298. d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
  299. c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
  300. b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
  301. a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
  302. d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
  303. c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
  304. b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
  305. a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
  306. d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
  307. c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
  308. b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
  309. a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
  310. d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
  311. c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
  312. b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
  313. a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
  314. d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
  315. c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
  316. b = md5gg(b, c, d, a, x[i], 20, -373897302);
  317. a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
  318. d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
  319. c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
  320. b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
  321. a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
  322. d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
  323. c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
  324. b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
  325. a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
  326. d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
  327. c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
  328. b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
  329. a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
  330. d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
  331. c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
  332. b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
  333. a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
  334. d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
  335. c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
  336. b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
  337. a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
  338. d = md5hh(d, a, b, c, x[i], 11, -358537222);
  339. c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
  340. b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
  341. a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
  342. d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
  343. c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
  344. b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
  345. a = md5ii(a, b, c, d, x[i], 6, -198630844);
  346. d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
  347. c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
  348. b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
  349. a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
  350. d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
  351. c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
  352. b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
  353. a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
  354. d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
  355. c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
  356. b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
  357. a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
  358. d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
  359. c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
  360. b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
  361. a = safeAdd(a, olda);
  362. b = safeAdd(b, oldb);
  363. c = safeAdd(c, oldc);
  364. d = safeAdd(d, oldd);
  365. }
  366. return [a, b, c, d];
  367. }
  368. /**
  369. * Convert an array of little-endian words to a string
  370. *
  371. * @param {Array<number>} input MD5 Array
  372. * @returns {string} MD5 string
  373. */
  374. function binl2rstr(input) {
  375. var i;
  376. var output = '';
  377. var length32 = input.length * 32;
  378. for (i = 0; i < length32; i += 8) {
  379. output += String.fromCharCode(input[i >> 5] >>> i % 32 & 0xff);
  380. }
  381. return output;
  382. }
  383. /**
  384. * Convert a raw string to an array of little-endian words
  385. * Characters >255 have their high-byte silently ignored.
  386. *
  387. * @param {string} input Raw input string
  388. * @returns {Array<number>} Array of little-endian words
  389. */
  390. function rstr2binl(input) {
  391. var i;
  392. var output = [];
  393. output[(input.length >> 2) - 1] = undefined;
  394. for (i = 0; i < output.length; i += 1) {
  395. output[i] = 0;
  396. }
  397. var length8 = input.length * 8;
  398. for (i = 0; i < length8; i += 8) {
  399. output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32;
  400. }
  401. return output;
  402. }
  403. /**
  404. * Calculate the MD5 of a raw string
  405. *
  406. * @param {string} s Input string
  407. * @returns {string} Raw MD5 string
  408. */
  409. function rstrMD5(s) {
  410. return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
  411. }
  412. /**
  413. * Calculates the HMAC-MD5 of a key and some data (raw strings)
  414. *
  415. * @param {string} key HMAC key
  416. * @param {string} data Raw input string
  417. * @returns {string} Raw MD5 string
  418. */
  419. function rstrHMACMD5(key, data) {
  420. var i;
  421. var bkey = rstr2binl(key);
  422. var ipad = [];
  423. var opad = [];
  424. var hash;
  425. ipad[15] = opad[15] = undefined;
  426. if (bkey.length > 16) {
  427. bkey = binlMD5(bkey, key.length * 8);
  428. }
  429. for (i = 0; i < 16; i += 1) {
  430. ipad[i] = bkey[i] ^ 0x36363636;
  431. opad[i] = bkey[i] ^ 0x5c5c5c5c;
  432. }
  433. hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
  434. return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
  435. }
  436. /**
  437. * Convert a raw string to a hex string
  438. *
  439. * @param {string} input Raw input string
  440. * @returns {string} Hex encoded string
  441. */
  442. function rstr2hex(input) {
  443. var hexTab = '0123456789abcdef';
  444. var output = '';
  445. var x;
  446. var i;
  447. for (i = 0; i < input.length; i += 1) {
  448. x = input.charCodeAt(i);
  449. output += hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f);
  450. }
  451. return output;
  452. }
  453. /**
  454. * Encode a string as UTF-8
  455. *
  456. * @param {string} input Input string
  457. * @returns {string} UTF8 string
  458. */
  459. function str2rstrUTF8(input) {
  460. return unescape(encodeURIComponent(input));
  461. }
  462. /**
  463. * Encodes input string as raw MD5 string
  464. *
  465. * @param {string} s Input string
  466. * @returns {string} Raw MD5 string
  467. */
  468. function rawMD5(s) {
  469. return rstrMD5(str2rstrUTF8(s));
  470. }
  471. /**
  472. * Encodes input string as Hex encoded string
  473. *
  474. * @param {string} s Input string
  475. * @returns {string} Hex encoded string
  476. */
  477. function hexMD5(s) {
  478. return rstr2hex(rawMD5(s));
  479. }
  480. /**
  481. * Calculates the raw HMAC-MD5 for the given key and data
  482. *
  483. * @param {string} k HMAC key
  484. * @param {string} d Input string
  485. * @returns {string} Raw MD5 string
  486. */
  487. function rawHMACMD5(k, d) {
  488. return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
  489. }
  490. /**
  491. * Calculates the Hex encoded HMAC-MD5 for the given key and data
  492. *
  493. * @param {string} k HMAC key
  494. * @param {string} d Input string
  495. * @returns {string} Raw MD5 string
  496. */
  497. function hexHMACMD5(k, d) {
  498. return rstr2hex(rawHMACMD5(k, d));
  499. }
  500. /**
  501. * Calculates MD5 value for a given string.
  502. * If a key is provided, calculates the HMAC-MD5 value.
  503. * Returns a Hex encoded string unless the raw argument is given.
  504. *
  505. * @param {string} string Input string
  506. * @param {string} [key] HMAC key
  507. * @param {boolean} [raw] Raw output switch
  508. * @returns {string} MD5 output
  509. */
  510. function md5(string, key, raw) {
  511. if (!key) {
  512. if (!raw) {
  513. return hexMD5(string);
  514. }
  515. return rawMD5(string);
  516. }
  517. if (!raw) {
  518. return hexHMACMD5(key, string);
  519. }
  520. return rawHMACMD5(key, string);
  521. }
  522. if (module.exports) {
  523. module.exports = md5;
  524. } else {
  525. $.md5 = md5;
  526. }
  527. })(commonjsGlobal);
  528. });
  529. function md5ForNode(node) {
  530. if (null === node || 'object' !== _typeof(node)) return undefined;
  531. if (node.src) {
  532. return md5(node.src);
  533. } else if (node.href) {
  534. return md5(node.href);
  535. } else if (node.innerText && '' !== node.innerText) {
  536. return md5(node.innerText);
  537. } else {
  538. return undefined;
  539. }
  540. }
  541. var diagScriptId = 'fa-kits-diag';
  542. var nodeUnderTestId = 'fa-kits-node-under-test';
  543. var md5Attr = 'data-md5';
  544. var detectionIgnoreAttr = 'data-fa-detection-ignore';
  545. var timeoutAttr = 'data-fa-detection-timeout';
  546. var resultsCollectionMaxWaitAttr = 'data-fa-detection-results-collection-max-wait';
  547. var silenceErrors = function silenceErrors(e) {
  548. e.preventDefault();
  549. e.stopPropagation();
  550. };
  551. function pollUntil(_ref) {
  552. var _ref$fn = _ref.fn,
  553. fn = _ref$fn === void 0 ? function () {
  554. return true;
  555. } : _ref$fn,
  556. _ref$initialDuration = _ref.initialDuration,
  557. initialDuration = _ref$initialDuration === void 0 ? 1 : _ref$initialDuration,
  558. _ref$maxDuration = _ref.maxDuration,
  559. maxDuration = _ref$maxDuration === void 0 ? WINDOW.FontAwesomeDetection.timeout : _ref$maxDuration,
  560. _ref$showProgress = _ref.showProgress,
  561. showProgress = _ref$showProgress === void 0 ? false : _ref$showProgress,
  562. progressIndicator = _ref.progressIndicator;
  563. return new Promise(function (resolve, reject) {
  564. function poll(duration, cumulativeDuration) {
  565. setTimeout(function () {
  566. var result = fn();
  567. if (showProgress) {
  568. console.info(progressIndicator);
  569. }
  570. if (result) {
  571. resolve(result);
  572. } else {
  573. var nextDuration = 250;
  574. var nextCumulativeDuration = nextDuration + cumulativeDuration;
  575. if (nextCumulativeDuration <= maxDuration) {
  576. poll(nextDuration, nextCumulativeDuration);
  577. } else {
  578. reject('timeout'); // eslint-disable-line prefer-promise-reject-errors
  579. }
  580. }
  581. }, duration);
  582. }
  583. poll(initialDuration, 0);
  584. });
  585. }
  586. function detectWebfontConflicts() {
  587. var linkTags = Array.from(DOCUMENT.getElementsByTagName('link')).filter(function (t) {
  588. return !t.hasAttribute(detectionIgnoreAttr);
  589. });
  590. var styleTags = Array.from(DOCUMENT.getElementsByTagName('style')).filter(function (t) {
  591. if (t.hasAttribute(detectionIgnoreAttr)) {
  592. return false;
  593. }
  594. // If the browser has loaded the FA5 CSS, let's not test that <style> element.
  595. // Its enough that we'll be testing for traces of the corresponding JS being loaded, and testing
  596. // this <style> would only produce a false negative anyway.
  597. if (WINDOW.FontAwesomeConfig && t.innerText.match(new RegExp("svg:not\\(:root\\)\\.".concat(WINDOW.FontAwesomeConfig.replacementClass)))) {
  598. return false;
  599. }
  600. return true;
  601. });
  602. function runDiag(scriptOrLinkTag, md5) {
  603. var diagFrame = DOCUMENT.createElement('iframe');
  604. // Using "visibility: hidden; position: absolute" instead of "display: none;" because
  605. // Firefox will not return the expected results for getComputedStyle if our iframe has display: none.
  606. diagFrame.setAttribute('style', 'visibility: hidden; position: absolute; height: 0; width: 0;');
  607. var testIconId = 'fa-test-icon-' + md5;
  608. var iTag = DOCUMENT.createElement('i');
  609. iTag.setAttribute('class', 'fa fa-coffee');
  610. iTag.setAttribute('id', testIconId);
  611. var diagScript = DOCUMENT.createElement('script');
  612. diagScript.setAttribute('id', diagScriptId);
  613. // WARNING: this function will be toString()'d and assigned to innerText of the diag script
  614. // element that we'll be putting into a diagnostic iframe.
  615. // That means that this code won't compile until after the outer script has run and injected
  616. // this code into the iframe. There are some compile time errors that might occur there.
  617. // For example, using single line (double-slash) comments like this one inside that function
  618. // will probably cause it to choke. Chrome will show an error like this:
  619. // Uncaught SyntaxError: Unexpected end of input
  620. var diagScriptFun = function diagScriptFun(nodeUnderTestId, testIconId, md5, parentOrigin) {
  621. parent.FontAwesomeDetection.__pollUntil({
  622. fn: function fn() {
  623. var iEl = document.getElementById(testIconId);
  624. var computedStyle = window.getComputedStyle(iEl);
  625. var fontFamily = computedStyle.getPropertyValue('font-family');
  626. if (!!fontFamily.match(/FontAwesome/) || !!fontFamily.match(/Font Awesome [56]/)) {
  627. return true;
  628. } else {
  629. return false;
  630. }
  631. }
  632. }).then(function () {
  633. var node = document.getElementById(nodeUnderTestId);
  634. parent.postMessage({
  635. type: 'fontawesome-conflict',
  636. technology: 'webfont',
  637. href: node.href,
  638. innerText: node.innerText,
  639. tagName: node.tagName,
  640. md5: md5
  641. }, parentOrigin);
  642. }).catch(function (e) {
  643. var node = document.getElementById(nodeUnderTestId);
  644. if (e === 'timeout') {
  645. parent.postMessage({
  646. type: 'no-conflict',
  647. technology: 'webfont',
  648. href: node.src,
  649. innerText: node.innerText,
  650. tagName: node.tagName,
  651. md5: md5
  652. }, parentOrigin);
  653. } else {
  654. console.error(e);
  655. }
  656. });
  657. };
  658. var parentOrigin = WINDOW.location.origin === 'file://' ? '*' : WINDOW.location.origin;
  659. diagScript.innerText = "(".concat(diagScriptFun.toString(), ")('").concat(nodeUnderTestId, "', '").concat(testIconId || 'foo', "', '").concat(md5, "', '").concat(parentOrigin, "');");
  660. diagFrame.onload = function () {
  661. diagFrame.contentWindow.addEventListener('error', silenceErrors, true);
  662. diagFrame.contentDocument.head.appendChild(diagScript);
  663. diagFrame.contentDocument.head.appendChild(scriptOrLinkTag);
  664. diagFrame.contentDocument.body.appendChild(iTag);
  665. };
  666. domready(function () {
  667. return DOCUMENT.body.appendChild(diagFrame);
  668. });
  669. }
  670. var cssByMD5 = {};
  671. for (var i = 0; i < linkTags.length; i++) {
  672. var linkUnderTest = DOCUMENT.createElement('link');
  673. linkUnderTest.setAttribute('id', nodeUnderTestId);
  674. linkUnderTest.setAttribute('href', linkTags[i].href);
  675. linkUnderTest.setAttribute('rel', linkTags[i].rel);
  676. var md5ForLink = md5ForNode(linkTags[i]);
  677. linkUnderTest.setAttribute(md5Attr, md5ForLink);
  678. cssByMD5[md5ForLink] = linkTags[i];
  679. runDiag(linkUnderTest, md5ForLink);
  680. }
  681. for (var _i = 0; _i < styleTags.length; _i++) {
  682. var styleUnderTest = DOCUMENT.createElement('style');
  683. styleUnderTest.setAttribute('id', nodeUnderTestId);
  684. var md5ForStyle = md5ForNode(styleTags[_i]);
  685. styleUnderTest.setAttribute(md5Attr, md5ForStyle);
  686. styleUnderTest.innerText = styleTags[_i].innerText;
  687. cssByMD5[md5ForStyle] = styleTags[_i];
  688. runDiag(styleUnderTest, md5ForStyle);
  689. }
  690. return cssByMD5;
  691. }
  692. function detectSvgConflicts(currentScript) {
  693. var scripts = Array.from(DOCUMENT.scripts).filter(function (t) {
  694. return !t.hasAttribute(detectionIgnoreAttr) && t !== currentScript;
  695. });
  696. var scriptsByMD5 = {};
  697. var _loop = function _loop() {
  698. var diagFrame = DOCUMENT.createElement('iframe');
  699. diagFrame.setAttribute('style', 'display:none;');
  700. var scriptUnderTest = DOCUMENT.createElement('script');
  701. scriptUnderTest.setAttribute('id', nodeUnderTestId);
  702. var md5ForScript = md5ForNode(scripts[scriptIdx]);
  703. scriptUnderTest.setAttribute(md5Attr, md5ForScript);
  704. scriptsByMD5[md5ForScript] = scripts[scriptIdx];
  705. if (scripts[scriptIdx].src !== '') {
  706. scriptUnderTest.src = scripts[scriptIdx].src;
  707. }
  708. if (scripts[scriptIdx].innerText !== '') {
  709. scriptUnderTest.innerText = scripts[scriptIdx].innerText;
  710. }
  711. scriptUnderTest.async = true;
  712. var diagScript = DOCUMENT.createElement('script');
  713. diagScript.setAttribute('id', diagScriptId);
  714. var parentOrigin = WINDOW.location.origin === 'file://' ? '*' : WINDOW.location.origin;
  715. var diagScriptFun = function diagScriptFun(nodeUnderTestId, md5, parentOrigin) {
  716. parent.FontAwesomeDetection.__pollUntil({
  717. fn: function fn() {
  718. return !!window.FontAwesomeConfig || !!window.FontAwesomeKitConfig;
  719. }
  720. }).then(function () {
  721. var scriptNode = document.getElementById(nodeUnderTestId);
  722. parent.postMessage({
  723. type: 'fontawesome-conflict',
  724. technology: 'js',
  725. src: scriptNode.src,
  726. innerText: scriptNode.innerText,
  727. tagName: scriptNode.tagName,
  728. md5: md5
  729. }, parentOrigin);
  730. }).catch(function (e) {
  731. var scriptNode = document.getElementById(nodeUnderTestId);
  732. if (e === 'timeout') {
  733. parent.postMessage({
  734. type: 'no-conflict',
  735. src: scriptNode.src,
  736. innerText: scriptNode.innerText,
  737. tagName: scriptNode.tagName,
  738. md5: md5
  739. }, parentOrigin);
  740. } else {
  741. console.error(e);
  742. }
  743. });
  744. };
  745. diagScript.innerText = "(".concat(diagScriptFun.toString(), ")('").concat(nodeUnderTestId, "', '").concat(md5ForScript, "', '").concat(parentOrigin, "');");
  746. diagFrame.onload = function () {
  747. diagFrame.contentWindow.addEventListener('error', silenceErrors, true);
  748. diagFrame.contentDocument.head.appendChild(diagScript);
  749. diagFrame.contentDocument.head.appendChild(scriptUnderTest);
  750. };
  751. domready(function () {
  752. return DOCUMENT.body.appendChild(diagFrame);
  753. });
  754. };
  755. for (var scriptIdx = 0; scriptIdx < scripts.length; scriptIdx++) {
  756. _loop();
  757. }
  758. return scriptsByMD5;
  759. }
  760. function setDoneResults(_ref2) {
  761. var nodesTested = _ref2.nodesTested,
  762. nodesFound = _ref2.nodesFound;
  763. WINDOW.FontAwesomeDetection = WINDOW.FontAwesomeDetection || {};
  764. WINDOW.FontAwesomeDetection.nodesTested = nodesTested;
  765. WINDOW.FontAwesomeDetection.nodesFound = nodesFound;
  766. WINDOW.FontAwesomeDetection.detectionDone = true;
  767. }
  768. function conflictDetection() {
  769. var report$$1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
  770. var nodesTested = {
  771. conflict: {},
  772. noConflict: {}
  773. };
  774. WINDOW.onmessage = function (e) {
  775. if (WINDOW.location.origin === 'file://' || e.origin === WINDOW.location.origin) {
  776. if (e && e.data) {
  777. if (e.data.type === 'fontawesome-conflict') {
  778. nodesTested.conflict[e.data.md5] = e.data;
  779. } else if (e.data.type === 'no-conflict') {
  780. nodesTested.noConflict[e.data.md5] = e.data;
  781. }
  782. }
  783. }
  784. };
  785. var scriptsToTest = detectSvgConflicts(DOCUMENT.currentScript);
  786. var cssToTest = detectWebfontConflicts();
  787. var nodesFound = _objectSpread2(_objectSpread2({}, scriptsToTest), cssToTest);
  788. var testCount = Object.keys(scriptsToTest).length + Object.keys(cssToTest).length;
  789. // The resultsCollectionMaxWait allows for the time between when the tests running under
  790. // child iframes call postMessage with their results, and when the parent window
  791. // receives and handles those events with window.onmessage.
  792. // Making it configurable allows us to test the scenario where this timeout is exceeded.
  793. // Naming it something very different from "timeout" is to help avoid the potential ambiguity between
  794. // these two timeout-related settings.
  795. var masterTimeout = WINDOW.FontAwesomeDetection.timeout + WINDOW.FontAwesomeDetection.resultsCollectionMaxWait;
  796. console.group('Font Awesome Detector');
  797. if (testCount === 0) {
  798. console.info('%cAll Good!', 'color: green; font-size: large');
  799. console.info("We didn't find anything that needs testing for conflicts. Ergo, no conflicts.");
  800. } else {
  801. console.info("Testing ".concat(testCount, " possible conflicts."));
  802. console.info("We'll wait about ".concat(Math.round(WINDOW.FontAwesomeDetection.timeout / 10) / 100, " seconds while testing these and\n") + "then up to another ".concat(Math.round(WINDOW.FontAwesomeDetection.resultsCollectionMaxWait / 10) / 100, " to allow the browser time\n") + "to accumulate the results. But we'll probably be outta here way before then.\n\n");
  803. console.info("You can adjust those durations by assigning values to these attributes on the <script> element that loads this detection:");
  804. console.info("\t%c".concat(timeoutAttr, "%c: milliseconds to wait for each test before deciding whether it's a conflict."), 'font-weight: bold;', 'font-size: normal;');
  805. console.info("\t%c".concat(resultsCollectionMaxWaitAttr, "%c: milliseconds to wait for the browser to accumulate test results before giving up."), 'font-weight: bold;', 'font-size: normal;');
  806. pollUntil({
  807. // Give this overall timer a little extra cushion
  808. maxDuration: masterTimeout,
  809. showProgress: true,
  810. progressIndicator: 'waiting...',
  811. fn: function fn() {
  812. return Object.keys(nodesTested.conflict).length + Object.keys(nodesTested.noConflict).length >= testCount;
  813. }
  814. }).then(function () {
  815. console.info('DONE!');
  816. setDoneResults({
  817. nodesTested: nodesTested,
  818. nodesFound: nodesFound
  819. });
  820. report$$1({
  821. nodesTested: nodesTested,
  822. nodesFound: nodesFound
  823. });
  824. console.groupEnd();
  825. }).catch(function (e) {
  826. if (e === 'timeout') {
  827. console.info("TIME OUT! We waited until we got tired. Here's what we found:");
  828. setDoneResults({
  829. nodesTested: nodesTested,
  830. nodesFound: nodesFound
  831. });
  832. report$$1({
  833. nodesTested: nodesTested,
  834. nodesFound: nodesFound
  835. });
  836. } else {
  837. console.info('Whoops! We hit an error:', e);
  838. console.info("Here's what we'd found up until that error:");
  839. setDoneResults({
  840. nodesTested: nodesTested,
  841. nodesFound: nodesFound
  842. });
  843. report$$1({
  844. nodesTested: nodesTested,
  845. nodesFound: nodesFound
  846. });
  847. }
  848. console.groupEnd();
  849. });
  850. }
  851. }
  852. // Allow clients to access, and in some cases, override some properties
  853. var initialConfig = WINDOW.FontAwesomeDetection || {};
  854. // These can be overridden
  855. var _default = {
  856. report: report,
  857. timeout: +(DOCUMENT.currentScript.getAttribute(timeoutAttr) || '2000'),
  858. resultsCollectionMaxWait: +(DOCUMENT.currentScript.getAttribute(resultsCollectionMaxWaitAttr) || '5000')
  859. };
  860. var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, _default), initialConfig), {}, {
  861. // These cannot be overridden
  862. __pollUntil: pollUntil,
  863. md5ForNode: md5ForNode,
  864. detectionDone: false,
  865. nodesTested: null,
  866. nodesFound: null
  867. });
  868. WINDOW.FontAwesomeDetection = _config;
  869. var _so;
  870. var z = {
  871. classic: {
  872. fa: "solid",
  873. fas: "solid",
  874. "fa-solid": "solid",
  875. far: "regular",
  876. "fa-regular": "regular",
  877. fal: "light",
  878. "fa-light": "light",
  879. fat: "thin",
  880. "fa-thin": "thin",
  881. fab: "brands",
  882. "fa-brands": "brands"
  883. },
  884. duotone: {
  885. fa: "solid",
  886. fad: "solid",
  887. "fa-solid": "solid",
  888. "fa-duotone": "solid",
  889. fadr: "regular",
  890. "fa-regular": "regular",
  891. fadl: "light",
  892. "fa-light": "light",
  893. fadt: "thin",
  894. "fa-thin": "thin"
  895. },
  896. sharp: {
  897. fa: "solid",
  898. fass: "solid",
  899. "fa-solid": "solid",
  900. fasr: "regular",
  901. "fa-regular": "regular",
  902. fasl: "light",
  903. "fa-light": "light",
  904. fast: "thin",
  905. "fa-thin": "thin"
  906. },
  907. "sharp-duotone": {
  908. fa: "solid",
  909. fasds: "solid",
  910. "fa-solid": "solid",
  911. fasdr: "regular",
  912. "fa-regular": "regular",
  913. fasdl: "light",
  914. "fa-light": "light",
  915. fasdt: "thin",
  916. "fa-thin": "thin"
  917. },
  918. slab: {
  919. "fa-regular": "regular",
  920. faslr: "regular"
  921. },
  922. "slab-press": {
  923. "fa-regular": "regular",
  924. faslpr: "regular"
  925. },
  926. thumbprint: {
  927. "fa-light": "light",
  928. fatl: "light"
  929. },
  930. whiteboard: {
  931. "fa-semibold": "semibold",
  932. fawsb: "semibold"
  933. },
  934. notdog: {
  935. "fa-solid": "solid",
  936. fans: "solid"
  937. },
  938. "notdog-duo": {
  939. "fa-solid": "solid",
  940. fands: "solid"
  941. },
  942. etch: {
  943. "fa-solid": "solid",
  944. faes: "solid"
  945. },
  946. jelly: {
  947. "fa-regular": "regular",
  948. fajr: "regular"
  949. },
  950. "jelly-fill": {
  951. "fa-regular": "regular",
  952. fajfr: "regular"
  953. },
  954. "jelly-duo": {
  955. "fa-regular": "regular",
  956. fajdr: "regular"
  957. },
  958. chisel: {
  959. "fa-regular": "regular",
  960. facr: "regular"
  961. }
  962. };
  963. var a = "classic",
  964. o = "duotone",
  965. d = "sharp",
  966. t = "sharp-duotone",
  967. i = "chisel",
  968. n = "etch",
  969. h = "jelly",
  970. s = "jelly-duo",
  971. f = "jelly-fill",
  972. g = "notdog",
  973. l = "notdog-duo",
  974. u = "slab",
  975. p = "slab-press",
  976. e = "thumbprint",
  977. w = "whiteboard",
  978. m = "Classic",
  979. y = "Duotone",
  980. x = "Sharp",
  981. c = "Sharp Duotone",
  982. I = "Chisel",
  983. b = "Etch",
  984. F = "Jelly",
  985. v = "Jelly Duo",
  986. S = "Jelly Fill",
  987. A = "Notdog",
  988. P = "Notdog Duo",
  989. j = "Slab",
  990. B = "Slab Press",
  991. N = "Thumbprint",
  992. k = "Whiteboard",
  993. so = (_so = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_so, a, m), o, y), d, x), t, c), i, I), n, b), h, F), s, v), f, S), g, A), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_so, l, P), u, j), p, B), e, N), w, k));
  994. var io = {
  995. classic: {
  996. 900: "fas",
  997. 400: "far",
  998. normal: "far",
  999. 300: "fal",
  1000. 100: "fat"
  1001. },
  1002. duotone: {
  1003. 900: "fad",
  1004. 400: "fadr",
  1005. 300: "fadl",
  1006. 100: "fadt"
  1007. },
  1008. sharp: {
  1009. 900: "fass",
  1010. 400: "fasr",
  1011. 300: "fasl",
  1012. 100: "fast"
  1013. },
  1014. "sharp-duotone": {
  1015. 900: "fasds",
  1016. 400: "fasdr",
  1017. 300: "fasdl",
  1018. 100: "fasdt"
  1019. },
  1020. slab: {
  1021. 400: "faslr"
  1022. },
  1023. "slab-press": {
  1024. 400: "faslpr"
  1025. },
  1026. whiteboard: {
  1027. 600: "fawsb"
  1028. },
  1029. thumbprint: {
  1030. 300: "fatl"
  1031. },
  1032. notdog: {
  1033. 900: "fans"
  1034. },
  1035. "notdog-duo": {
  1036. 900: "fands"
  1037. },
  1038. etch: {
  1039. 900: "faes"
  1040. },
  1041. chisel: {
  1042. 400: "facr"
  1043. },
  1044. jelly: {
  1045. 400: "fajr"
  1046. },
  1047. "jelly-fill": {
  1048. 400: "fajfr"
  1049. },
  1050. "jelly-duo": {
  1051. 400: "fajdr"
  1052. }
  1053. };
  1054. var Ro = {
  1055. chisel: {
  1056. regular: "facr"
  1057. },
  1058. classic: {
  1059. brands: "fab",
  1060. light: "fal",
  1061. regular: "far",
  1062. solid: "fas",
  1063. thin: "fat"
  1064. },
  1065. duotone: {
  1066. light: "fadl",
  1067. regular: "fadr",
  1068. solid: "fad",
  1069. thin: "fadt"
  1070. },
  1071. etch: {
  1072. solid: "faes"
  1073. },
  1074. jelly: {
  1075. regular: "fajr"
  1076. },
  1077. "jelly-duo": {
  1078. regular: "fajdr"
  1079. },
  1080. "jelly-fill": {
  1081. regular: "fajfr"
  1082. },
  1083. notdog: {
  1084. solid: "fans"
  1085. },
  1086. "notdog-duo": {
  1087. solid: "fands"
  1088. },
  1089. sharp: {
  1090. light: "fasl",
  1091. regular: "fasr",
  1092. solid: "fass",
  1093. thin: "fast"
  1094. },
  1095. "sharp-duotone": {
  1096. light: "fasdl",
  1097. regular: "fasdr",
  1098. solid: "fasds",
  1099. thin: "fasdt"
  1100. },
  1101. slab: {
  1102. regular: "faslr"
  1103. },
  1104. "slab-press": {
  1105. regular: "faslpr"
  1106. },
  1107. thumbprint: {
  1108. light: "fatl"
  1109. },
  1110. whiteboard: {
  1111. semibold: "fawsb"
  1112. }
  1113. };
  1114. var Oo = {
  1115. kit: {
  1116. fak: "kit",
  1117. "fa-kit": "kit"
  1118. },
  1119. "kit-duotone": {
  1120. fakd: "kit-duotone",
  1121. "fa-kit-duotone": "kit-duotone"
  1122. }
  1123. },
  1124. Go = ["kit"];
  1125. var D = "kit",
  1126. r = "kit-duotone",
  1127. T = "Kit",
  1128. C = "Kit Duotone",
  1129. qo = _defineProperty(_defineProperty({}, D, T), r, C);
  1130. var Xo = {
  1131. kit: {
  1132. "fa-kit": "fak"
  1133. },
  1134. "kit-duotone": {
  1135. "fa-kit-duotone": "fakd"
  1136. }
  1137. };
  1138. var et = {
  1139. kit: {
  1140. fak: "fa-kit"
  1141. },
  1142. "kit-duotone": {
  1143. fakd: "fa-kit-duotone"
  1144. }
  1145. };
  1146. var dt = {
  1147. kit: {
  1148. kit: "fak"
  1149. },
  1150. "kit-duotone": {
  1151. "kit-duotone": "fakd"
  1152. }
  1153. };
  1154. var _fl;
  1155. var l$1 = {
  1156. GROUP: "duotone-group",
  1157. SWAP_OPACITY: "swap-opacity",
  1158. PRIMARY: "primary",
  1159. SECONDARY: "secondary"
  1160. };
  1161. var f$1 = "classic",
  1162. a$1 = "duotone",
  1163. n$1 = "sharp",
  1164. t$1 = "sharp-duotone",
  1165. h$1 = "chisel",
  1166. g$1 = "etch",
  1167. u$1 = "jelly",
  1168. s$1 = "jelly-duo",
  1169. p$1 = "jelly-fill",
  1170. y$1 = "notdog",
  1171. e$1 = "notdog-duo",
  1172. m$1 = "slab",
  1173. c$1 = "slab-press",
  1174. r$1 = "thumbprint",
  1175. w$1 = "whiteboard",
  1176. x$1 = "Classic",
  1177. I$1 = "Duotone",
  1178. b$1 = "Sharp",
  1179. F$1 = "Sharp Duotone",
  1180. v$1 = "Chisel",
  1181. S$1 = "Etch",
  1182. A$1 = "Jelly",
  1183. j$1 = "Jelly Duo",
  1184. P$1 = "Jelly Fill",
  1185. B$1 = "Notdog",
  1186. k$1 = "Notdog Duo",
  1187. N$1 = "Slab",
  1188. D$1 = "Slab Press",
  1189. C$1 = "Thumbprint",
  1190. T$1 = "Whiteboard",
  1191. fl = (_fl = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_fl, f$1, x$1), a$1, I$1), n$1, b$1), t$1, F$1), h$1, v$1), g$1, S$1), u$1, A$1), s$1, j$1), p$1, P$1), y$1, B$1), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_fl, e$1, k$1), m$1, N$1), c$1, D$1), r$1, C$1), w$1, T$1));
  1192. var L = "kit",
  1193. d$1 = "kit-duotone",
  1194. R$1 = "Kit",
  1195. W$1 = "Kit Duotone",
  1196. lo$1 = _defineProperty(_defineProperty({}, L, R$1), d$1, W$1);
  1197. var zo$1 = {
  1198. classic: {
  1199. "fa-brands": "fab",
  1200. "fa-duotone": "fad",
  1201. "fa-light": "fal",
  1202. "fa-regular": "far",
  1203. "fa-solid": "fas",
  1204. "fa-thin": "fat"
  1205. },
  1206. duotone: {
  1207. "fa-regular": "fadr",
  1208. "fa-light": "fadl",
  1209. "fa-thin": "fadt"
  1210. },
  1211. sharp: {
  1212. "fa-solid": "fass",
  1213. "fa-regular": "fasr",
  1214. "fa-light": "fasl",
  1215. "fa-thin": "fast"
  1216. },
  1217. "sharp-duotone": {
  1218. "fa-solid": "fasds",
  1219. "fa-regular": "fasdr",
  1220. "fa-light": "fasdl",
  1221. "fa-thin": "fasdt"
  1222. },
  1223. slab: {
  1224. "fa-regular": "faslr"
  1225. },
  1226. "slab-press": {
  1227. "fa-regular": "faslpr"
  1228. },
  1229. whiteboard: {
  1230. "fa-semibold": "fawsb"
  1231. },
  1232. thumbprint: {
  1233. "fa-light": "fatl"
  1234. },
  1235. notdog: {
  1236. "fa-solid": "fans"
  1237. },
  1238. "notdog-duo": {
  1239. "fa-solid": "fands"
  1240. },
  1241. etch: {
  1242. "fa-solid": "faes"
  1243. },
  1244. jelly: {
  1245. "fa-regular": "fajr"
  1246. },
  1247. "jelly-fill": {
  1248. "fa-regular": "fajfr"
  1249. },
  1250. "jelly-duo": {
  1251. "fa-regular": "fajdr"
  1252. },
  1253. chisel: {
  1254. "fa-regular": "facr"
  1255. }
  1256. },
  1257. J$1 = {
  1258. classic: ["fas", "far", "fal", "fat", "fad"],
  1259. duotone: ["fadr", "fadl", "fadt"],
  1260. sharp: ["fass", "fasr", "fasl", "fast"],
  1261. "sharp-duotone": ["fasds", "fasdr", "fasdl", "fasdt"],
  1262. slab: ["faslr"],
  1263. "slab-press": ["faslpr"],
  1264. whiteboard: ["fawsb"],
  1265. thumbprint: ["fatl"],
  1266. notdog: ["fans"],
  1267. "notdog-duo": ["fands"],
  1268. etch: ["faes"],
  1269. jelly: ["fajr"],
  1270. "jelly-fill": ["fajfr"],
  1271. "jelly-duo": ["fajdr"],
  1272. chisel: ["facr"]
  1273. },
  1274. Go$1 = {
  1275. classic: {
  1276. fab: "fa-brands",
  1277. fad: "fa-duotone",
  1278. fal: "fa-light",
  1279. far: "fa-regular",
  1280. fas: "fa-solid",
  1281. fat: "fa-thin"
  1282. },
  1283. duotone: {
  1284. fadr: "fa-regular",
  1285. fadl: "fa-light",
  1286. fadt: "fa-thin"
  1287. },
  1288. sharp: {
  1289. fass: "fa-solid",
  1290. fasr: "fa-regular",
  1291. fasl: "fa-light",
  1292. fast: "fa-thin"
  1293. },
  1294. "sharp-duotone": {
  1295. fasds: "fa-solid",
  1296. fasdr: "fa-regular",
  1297. fasdl: "fa-light",
  1298. fasdt: "fa-thin"
  1299. },
  1300. slab: {
  1301. faslr: "fa-regular"
  1302. },
  1303. "slab-press": {
  1304. faslpr: "fa-regular"
  1305. },
  1306. whiteboard: {
  1307. fawsb: "fa-semibold"
  1308. },
  1309. thumbprint: {
  1310. fatl: "fa-light"
  1311. },
  1312. notdog: {
  1313. fans: "fa-solid"
  1314. },
  1315. "notdog-duo": {
  1316. fands: "fa-solid"
  1317. },
  1318. etch: {
  1319. faes: "fa-solid"
  1320. },
  1321. jelly: {
  1322. fajr: "fa-regular"
  1323. },
  1324. "jelly-fill": {
  1325. fajfr: "fa-regular"
  1326. },
  1327. "jelly-duo": {
  1328. fajdr: "fa-regular"
  1329. },
  1330. chisel: {
  1331. facr: "fa-regular"
  1332. }
  1333. },
  1334. _$1 = ["solid", "regular", "light", "thin", "duotone", "brands", "semibold"],
  1335. K$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  1336. M$1 = K$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),
  1337. O$1 = ["aw", "fw", "pull-left", "pull-right"],
  1338. Ho$1 = [].concat(_toConsumableArray(Object.keys(J$1)), _$1, O$1, ["2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "inverse", "layers", "layers-bottom-left", "layers-bottom-right", "layers-counter", "layers-text", "layers-top-left", "layers-top-right", "li", "pull-end", "pull-start", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", "width-auto", "width-fixed", l$1.GROUP, l$1.SWAP_OPACITY, l$1.PRIMARY, l$1.SECONDARY]).concat(K$1.map(function (o) {
  1339. return "".concat(o, "x");
  1340. })).concat(M$1.map(function (o) {
  1341. return "w-".concat(o);
  1342. }));
  1343. var PRODUCTION = function () {
  1344. try {
  1345. return process.env.NODE_ENV === 'production';
  1346. } catch (e$$1) {
  1347. return false;
  1348. }
  1349. }();
  1350. function familyProxy(obj) {
  1351. // Defaults to the classic family if family is not available
  1352. return new Proxy(obj, {
  1353. get: function get(target, prop) {
  1354. return prop in target ? target[prop] : target[a];
  1355. }
  1356. });
  1357. }
  1358. var _PREFIX_TO_STYLE = _objectSpread2({}, z);
  1359. // We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, "classic" family does not have any
  1360. // duotone styles. But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding
  1361. // {'fa-duotone': 'duotone'}
  1362. _PREFIX_TO_STYLE[a] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
  1363. 'fa-duotone': 'duotone'
  1364. }), z[a]), Oo['kit']), Oo['kit-duotone']);
  1365. var PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);
  1366. var _STYLE_TO_PREFIX = _objectSpread2({}, Ro);
  1367. // We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, "classic" family does not have any
  1368. // duotone styles. But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'}
  1369. _STYLE_TO_PREFIX[a] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {
  1370. duotone: 'fad'
  1371. }), _STYLE_TO_PREFIX[a]), dt['kit']), dt['kit-duotone']);
  1372. var STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);
  1373. var _PREFIX_TO_LONG_STYLE = _objectSpread2({}, Go$1);
  1374. _PREFIX_TO_LONG_STYLE[a] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[a]), et['kit']);
  1375. var PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);
  1376. var _LONG_STYLE_TO_PREFIX = _objectSpread2({}, zo$1);
  1377. _LONG_STYLE_TO_PREFIX[a] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[a]), Xo['kit']);
  1378. var LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX);
  1379. var _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, io);
  1380. var FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX);
  1381. var RESERVED_CLASSES = [].concat(_toConsumableArray(Go), _toConsumableArray(Ho$1));
  1382. function bunker(fn) {
  1383. try {
  1384. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1385. args[_key - 1] = arguments[_key];
  1386. }
  1387. fn.apply(void 0, args);
  1388. } catch (e) {
  1389. if (!PRODUCTION) {
  1390. throw e;
  1391. }
  1392. }
  1393. }
  1394. bunker(function () {
  1395. if (IS_BROWSER && IS_DOM) {
  1396. conflictDetection(window.FontAwesomeDetection.report);
  1397. }
  1398. });
  1399. })));