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