@gospore/checkbox 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkbox.es.js +2245 -760
- package/dist/checkbox.umd.js +491 -185
- package/dist/style.css +1 -1
- package/package.json +9 -9
package/dist/checkbox.es.js
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
|
+
import { defineComponent, computed, watch, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withDirectives, vModelCheckbox, toDisplayString } from "vue";
|
|
1
2
|
/*!
|
|
2
|
-
* Font Awesome Free
|
|
3
|
+
* Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com
|
|
3
4
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
5
|
+
* Copyright 2022 Fonticons, Inc.
|
|
4
6
|
*/
|
|
7
|
+
function ownKeys(object, enumerableOnly) {
|
|
8
|
+
var keys = Object.keys(object);
|
|
9
|
+
if (Object.getOwnPropertySymbols) {
|
|
10
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
12
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13
|
+
})), keys.push.apply(keys, symbols);
|
|
14
|
+
}
|
|
15
|
+
return keys;
|
|
16
|
+
}
|
|
17
|
+
function _objectSpread2(target) {
|
|
18
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
19
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
20
|
+
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
21
|
+
_defineProperty(target, key, source[key]);
|
|
22
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
23
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return target;
|
|
27
|
+
}
|
|
28
|
+
function _typeof$1(obj) {
|
|
29
|
+
"@babel/helpers - typeof";
|
|
30
|
+
return _typeof$1 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
|
|
31
|
+
return typeof obj2;
|
|
32
|
+
} : function(obj2) {
|
|
33
|
+
return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
34
|
+
}, _typeof$1(obj);
|
|
35
|
+
}
|
|
5
36
|
function _classCallCheck(instance, Constructor) {
|
|
6
37
|
if (!(instance instanceof Constructor)) {
|
|
7
38
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -22,6 +53,9 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
22
53
|
_defineProperties(Constructor.prototype, protoProps);
|
|
23
54
|
if (staticProps)
|
|
24
55
|
_defineProperties(Constructor, staticProps);
|
|
56
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
57
|
+
writable: false
|
|
58
|
+
});
|
|
25
59
|
return Constructor;
|
|
26
60
|
}
|
|
27
61
|
function _defineProperty(obj, key, value) {
|
|
@@ -37,35 +71,34 @@ function _defineProperty(obj, key, value) {
|
|
|
37
71
|
}
|
|
38
72
|
return obj;
|
|
39
73
|
}
|
|
40
|
-
function _objectSpread(target) {
|
|
41
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
43
|
-
var ownKeys = Object.keys(source);
|
|
44
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
45
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
ownKeys.forEach(function(key) {
|
|
50
|
-
_defineProperty(target, key, source[key]);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return target;
|
|
54
|
-
}
|
|
55
74
|
function _slicedToArray(arr, i) {
|
|
56
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
75
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
76
|
+
}
|
|
77
|
+
function _toConsumableArray(arr) {
|
|
78
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
79
|
+
}
|
|
80
|
+
function _arrayWithoutHoles(arr) {
|
|
81
|
+
if (Array.isArray(arr))
|
|
82
|
+
return _arrayLikeToArray(arr);
|
|
57
83
|
}
|
|
58
84
|
function _arrayWithHoles(arr) {
|
|
59
85
|
if (Array.isArray(arr))
|
|
60
86
|
return arr;
|
|
61
87
|
}
|
|
88
|
+
function _iterableToArray(iter) {
|
|
89
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
90
|
+
return Array.from(iter);
|
|
91
|
+
}
|
|
62
92
|
function _iterableToArrayLimit(arr, i) {
|
|
93
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
94
|
+
if (_i == null)
|
|
95
|
+
return;
|
|
63
96
|
var _arr = [];
|
|
64
97
|
var _n = true;
|
|
65
98
|
var _d = false;
|
|
66
|
-
var _e
|
|
99
|
+
var _s, _e;
|
|
67
100
|
try {
|
|
68
|
-
for (
|
|
101
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
69
102
|
_arr.push(_s.value);
|
|
70
103
|
if (i && _arr.length === i)
|
|
71
104
|
break;
|
|
@@ -84,8 +117,31 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
84
117
|
}
|
|
85
118
|
return _arr;
|
|
86
119
|
}
|
|
120
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
121
|
+
if (!o)
|
|
122
|
+
return;
|
|
123
|
+
if (typeof o === "string")
|
|
124
|
+
return _arrayLikeToArray(o, minLen);
|
|
125
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
126
|
+
if (n === "Object" && o.constructor)
|
|
127
|
+
n = o.constructor.name;
|
|
128
|
+
if (n === "Map" || n === "Set")
|
|
129
|
+
return Array.from(o);
|
|
130
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
131
|
+
return _arrayLikeToArray(o, minLen);
|
|
132
|
+
}
|
|
133
|
+
function _arrayLikeToArray(arr, len) {
|
|
134
|
+
if (len == null || len > arr.length)
|
|
135
|
+
len = arr.length;
|
|
136
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
137
|
+
arr2[i] = arr[i];
|
|
138
|
+
return arr2;
|
|
139
|
+
}
|
|
140
|
+
function _nonIterableSpread() {
|
|
141
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
142
|
+
}
|
|
87
143
|
function _nonIterableRest() {
|
|
88
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
144
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
89
145
|
}
|
|
90
146
|
var noop = function noop2() {
|
|
91
147
|
};
|
|
@@ -110,27 +166,98 @@ try {
|
|
|
110
166
|
var _ref = _WINDOW.navigator || {}, _ref$userAgent = _ref.userAgent, userAgent = _ref$userAgent === void 0 ? "" : _ref$userAgent;
|
|
111
167
|
var WINDOW = _WINDOW;
|
|
112
168
|
var DOCUMENT = _DOCUMENT;
|
|
169
|
+
var MUTATION_OBSERVER = _MUTATION_OBSERVER;
|
|
113
170
|
var PERFORMANCE = _PERFORMANCE;
|
|
114
171
|
!!WINDOW.document;
|
|
115
172
|
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === "function" && typeof DOCUMENT.createElement === "function";
|
|
116
|
-
~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
|
|
173
|
+
var IS_IE = ~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
|
|
117
174
|
var NAMESPACE_IDENTIFIER = "___FONT_AWESOME___";
|
|
175
|
+
var UNITS_IN_GRID = 16;
|
|
118
176
|
var DEFAULT_FAMILY_PREFIX = "fa";
|
|
119
177
|
var DEFAULT_REPLACEMENT_CLASS = "svg-inline--fa";
|
|
120
178
|
var DATA_FA_I2SVG = "data-fa-i2svg";
|
|
121
|
-
|
|
179
|
+
var DATA_FA_PSEUDO_ELEMENT = "data-fa-pseudo-element";
|
|
180
|
+
var DATA_FA_PSEUDO_ELEMENT_PENDING = "data-fa-pseudo-element-pending";
|
|
181
|
+
var DATA_PREFIX = "data-prefix";
|
|
182
|
+
var DATA_ICON = "data-icon";
|
|
183
|
+
var HTML_CLASS_I2SVG_BASE_CLASS = "fontawesome-i2svg";
|
|
184
|
+
var MUTATION_APPROACH_ASYNC = "async";
|
|
185
|
+
var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ["HTML", "HEAD", "STYLE", "SCRIPT"];
|
|
186
|
+
var PRODUCTION$1 = function() {
|
|
122
187
|
try {
|
|
123
188
|
return true;
|
|
124
189
|
} catch (e) {
|
|
125
190
|
return false;
|
|
126
191
|
}
|
|
127
|
-
}
|
|
192
|
+
}();
|
|
193
|
+
var PREFIX_TO_STYLE = {
|
|
194
|
+
"fas": "solid",
|
|
195
|
+
"fa-solid": "solid",
|
|
196
|
+
"far": "regular",
|
|
197
|
+
"fa-regular": "regular",
|
|
198
|
+
"fal": "light",
|
|
199
|
+
"fa-light": "light",
|
|
200
|
+
"fat": "thin",
|
|
201
|
+
"fa-thin": "thin",
|
|
202
|
+
"fad": "duotone",
|
|
203
|
+
"fa-duotone": "duotone",
|
|
204
|
+
"fab": "brands",
|
|
205
|
+
"fa-brands": "brands",
|
|
206
|
+
"fak": "kit",
|
|
207
|
+
"fa-kit": "kit",
|
|
208
|
+
"fa": "solid"
|
|
209
|
+
};
|
|
210
|
+
var STYLE_TO_PREFIX = {
|
|
211
|
+
"solid": "fas",
|
|
212
|
+
"regular": "far",
|
|
213
|
+
"light": "fal",
|
|
214
|
+
"thin": "fat",
|
|
215
|
+
"duotone": "fad",
|
|
216
|
+
"brands": "fab",
|
|
217
|
+
"kit": "fak"
|
|
218
|
+
};
|
|
219
|
+
var PREFIX_TO_LONG_STYLE = {
|
|
220
|
+
"fab": "fa-brands",
|
|
221
|
+
"fad": "fa-duotone",
|
|
222
|
+
"fak": "fa-kit",
|
|
223
|
+
"fal": "fa-light",
|
|
224
|
+
"far": "fa-regular",
|
|
225
|
+
"fas": "fa-solid",
|
|
226
|
+
"fat": "fa-thin"
|
|
227
|
+
};
|
|
228
|
+
var LONG_STYLE_TO_PREFIX = {
|
|
229
|
+
"fa-brands": "fab",
|
|
230
|
+
"fa-duotone": "fad",
|
|
231
|
+
"fa-kit": "fak",
|
|
232
|
+
"fa-light": "fal",
|
|
233
|
+
"fa-regular": "far",
|
|
234
|
+
"fa-solid": "fas",
|
|
235
|
+
"fa-thin": "fat"
|
|
236
|
+
};
|
|
237
|
+
var ICON_SELECTION_SYNTAX_PATTERN = /fa[srltdbk\-\ ]/;
|
|
238
|
+
var LAYERS_TEXT_CLASSNAME = "fa-layers-text";
|
|
239
|
+
var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i;
|
|
240
|
+
var FONT_WEIGHT_TO_PREFIX = {
|
|
241
|
+
"900": "fas",
|
|
242
|
+
"400": "far",
|
|
243
|
+
"normal": "far",
|
|
244
|
+
"300": "fal",
|
|
245
|
+
"100": "fat"
|
|
246
|
+
};
|
|
247
|
+
var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
248
|
+
var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
|
|
249
|
+
var ATTRIBUTES_WATCHED_FOR_MUTATION = ["class", "data-prefix", "data-icon", "data-fa-transform", "data-fa-mask"];
|
|
128
250
|
var DUOTONE_CLASSES = {
|
|
129
|
-
GROUP: "group",
|
|
251
|
+
GROUP: "duotone-group",
|
|
130
252
|
SWAP_OPACITY: "swap-opacity",
|
|
131
253
|
PRIMARY: "primary",
|
|
132
254
|
SECONDARY: "secondary"
|
|
133
255
|
};
|
|
256
|
+
var RESERVED_CLASSES = [].concat(_toConsumableArray(Object.keys(STYLE_TO_PREFIX)), ["2xs", "xs", "sm", "lg", "xl", "2xl", "beat", "border", "fade", "beat-fade", "bounce", "flip-both", "flip-horizontal", "flip-vertical", "flip", "fw", "inverse", "layers-counter", "layers-text", "layers", "li", "pull-left", "pull-right", "pulse", "rotate-180", "rotate-270", "rotate-90", "rotate-by", "shake", "spin-pulse", "spin-reverse", "spin", "stack-1x", "stack-2x", "stack", "ul", DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY]).concat(oneToTen.map(function(n) {
|
|
257
|
+
return "".concat(n, "x");
|
|
258
|
+
})).concat(oneToTwenty.map(function(n) {
|
|
259
|
+
return "w-".concat(n);
|
|
260
|
+
}));
|
|
134
261
|
var initial = WINDOW.FontAwesomeConfig || {};
|
|
135
262
|
function getAttrConfig(attr) {
|
|
136
263
|
var element = DOCUMENT.querySelector("script[" + attr + "]");
|
|
@@ -148,7 +275,7 @@ function coerce(val) {
|
|
|
148
275
|
return val;
|
|
149
276
|
}
|
|
150
277
|
if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
|
|
151
|
-
var attrs = [["data-family-prefix", "familyPrefix"], ["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"]];
|
|
278
|
+
var attrs = [["data-family-prefix", "familyPrefix"], ["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"]];
|
|
152
279
|
attrs.forEach(function(_ref2) {
|
|
153
280
|
var _ref22 = _slicedToArray(_ref2, 2), attr = _ref22[0], key = _ref22[1];
|
|
154
281
|
var val = coerce(getAttrConfig(attr));
|
|
@@ -159,6 +286,7 @@ if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
|
|
|
159
286
|
}
|
|
160
287
|
var _default = {
|
|
161
288
|
familyPrefix: DEFAULT_FAMILY_PREFIX,
|
|
289
|
+
styleDefault: "solid",
|
|
162
290
|
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
163
291
|
autoReplaceSvg: true,
|
|
164
292
|
autoAddCss: true,
|
|
@@ -170,37 +298,33 @@ var _default = {
|
|
|
170
298
|
measurePerformance: false,
|
|
171
299
|
showMissingIcons: true
|
|
172
300
|
};
|
|
173
|
-
var _config =
|
|
301
|
+
var _config = _objectSpread2(_objectSpread2({}, _default), initial);
|
|
174
302
|
if (!_config.autoReplaceSvg)
|
|
175
303
|
_config.observeMutations = false;
|
|
176
|
-
var config =
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var listener = function listener2() {
|
|
190
|
-
DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
|
|
191
|
-
loaded = 1;
|
|
192
|
-
functions.map(function(fn) {
|
|
193
|
-
return fn();
|
|
304
|
+
var config = {};
|
|
305
|
+
Object.keys(_config).forEach(function(key) {
|
|
306
|
+
Object.defineProperty(config, key, {
|
|
307
|
+
enumerable: true,
|
|
308
|
+
set: function set(val) {
|
|
309
|
+
_config[key] = val;
|
|
310
|
+
_onChangeCb.forEach(function(cb) {
|
|
311
|
+
return cb(config);
|
|
312
|
+
});
|
|
313
|
+
},
|
|
314
|
+
get: function get() {
|
|
315
|
+
return _config[key];
|
|
316
|
+
}
|
|
194
317
|
});
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
318
|
+
});
|
|
319
|
+
WINDOW.FontAwesomeConfig = config;
|
|
320
|
+
var _onChangeCb = [];
|
|
321
|
+
function onChange(cb) {
|
|
322
|
+
_onChangeCb.push(cb);
|
|
323
|
+
return function() {
|
|
324
|
+
_onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
|
|
325
|
+
};
|
|
201
326
|
}
|
|
202
|
-
|
|
203
|
-
typeof setImmediate === "undefined" ? setTimeout : setImmediate;
|
|
327
|
+
var d = UNITS_IN_GRID;
|
|
204
328
|
var meaninglessTransform = {
|
|
205
329
|
size: 16,
|
|
206
330
|
x: 0,
|
|
@@ -237,6 +361,22 @@ function nextUniqueId() {
|
|
|
237
361
|
}
|
|
238
362
|
return id;
|
|
239
363
|
}
|
|
364
|
+
function toArray(obj) {
|
|
365
|
+
var array = [];
|
|
366
|
+
for (var i = (obj || []).length >>> 0; i--; ) {
|
|
367
|
+
array[i] = obj[i];
|
|
368
|
+
}
|
|
369
|
+
return array;
|
|
370
|
+
}
|
|
371
|
+
function classArray(node) {
|
|
372
|
+
if (node.classList) {
|
|
373
|
+
return toArray(node.classList);
|
|
374
|
+
} else {
|
|
375
|
+
return (node.getAttribute("class") || "").split(" ").filter(function(i) {
|
|
376
|
+
return i;
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
240
380
|
function htmlEscape(str) {
|
|
241
381
|
return "".concat(str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
242
382
|
}
|
|
@@ -247,20 +387,20 @@ function joinAttributes(attributes) {
|
|
|
247
387
|
}
|
|
248
388
|
function joinStyles(styles2) {
|
|
249
389
|
return Object.keys(styles2 || {}).reduce(function(acc, styleName) {
|
|
250
|
-
return acc + "".concat(styleName, ": ").concat(styles2[styleName], ";");
|
|
390
|
+
return acc + "".concat(styleName, ": ").concat(styles2[styleName].trim(), ";");
|
|
251
391
|
}, "");
|
|
252
392
|
}
|
|
253
|
-
function transformIsMeaningful(
|
|
254
|
-
return
|
|
393
|
+
function transformIsMeaningful(transform) {
|
|
394
|
+
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
|
|
255
395
|
}
|
|
256
396
|
function transformForSvg(_ref2) {
|
|
257
|
-
var
|
|
397
|
+
var transform = _ref2.transform, containerWidth = _ref2.containerWidth, iconWidth = _ref2.iconWidth;
|
|
258
398
|
var outer = {
|
|
259
399
|
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
260
400
|
};
|
|
261
|
-
var innerTranslate = "translate(".concat(
|
|
262
|
-
var innerScale = "scale(".concat(
|
|
263
|
-
var innerRotate = "rotate(".concat(
|
|
401
|
+
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
402
|
+
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
403
|
+
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
264
404
|
var inner = {
|
|
265
405
|
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
266
406
|
};
|
|
@@ -273,222 +413,111 @@ function transformForSvg(_ref2) {
|
|
|
273
413
|
path
|
|
274
414
|
};
|
|
275
415
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
284
|
-
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
285
|
-
abstract.attributes.fill = "black";
|
|
286
|
-
}
|
|
287
|
-
return abstract;
|
|
288
|
-
}
|
|
289
|
-
function deGroup(abstract) {
|
|
290
|
-
if (abstract.tag === "g") {
|
|
291
|
-
return abstract.children;
|
|
416
|
+
function transformForCss(_ref2) {
|
|
417
|
+
var transform = _ref2.transform, _ref2$width = _ref2.width, width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width, _ref2$height = _ref2.height, height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height, _ref2$startCentered = _ref2.startCentered, startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
|
|
418
|
+
var val = "";
|
|
419
|
+
if (startCentered && IS_IE) {
|
|
420
|
+
val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) ");
|
|
421
|
+
} else if (startCentered) {
|
|
422
|
+
val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) ");
|
|
292
423
|
} else {
|
|
293
|
-
|
|
424
|
+
val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) ");
|
|
294
425
|
}
|
|
426
|
+
val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") ");
|
|
427
|
+
val += "rotate(".concat(transform.rotate, "deg) ");
|
|
428
|
+
return val;
|
|
295
429
|
}
|
|
296
|
-
function makeIconMasking(_ref2) {
|
|
297
|
-
|
|
298
|
-
var
|
|
299
|
-
var
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
fill: "white"
|
|
309
|
-
})
|
|
310
|
-
};
|
|
311
|
-
var maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
312
|
-
children: mainPath.children.map(fillBlack)
|
|
313
|
-
} : {};
|
|
314
|
-
var maskInnerGroup = {
|
|
315
|
-
tag: "g",
|
|
316
|
-
attributes: _objectSpread({}, trans.inner),
|
|
317
|
-
children: [fillBlack(_objectSpread({
|
|
318
|
-
tag: mainPath.tag,
|
|
319
|
-
attributes: _objectSpread({}, mainPath.attributes, trans.path)
|
|
320
|
-
}, maskInnerGroupChildrenMixin))]
|
|
321
|
-
};
|
|
322
|
-
var maskOuterGroup = {
|
|
323
|
-
tag: "g",
|
|
324
|
-
attributes: _objectSpread({}, trans.outer),
|
|
325
|
-
children: [maskInnerGroup]
|
|
326
|
-
};
|
|
327
|
-
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
328
|
-
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
329
|
-
var maskTag = {
|
|
330
|
-
tag: "mask",
|
|
331
|
-
attributes: _objectSpread({}, ALL_SPACE, {
|
|
332
|
-
id: maskId,
|
|
333
|
-
maskUnits: "userSpaceOnUse",
|
|
334
|
-
maskContentUnits: "userSpaceOnUse"
|
|
335
|
-
}),
|
|
336
|
-
children: [maskRect, maskOuterGroup]
|
|
337
|
-
};
|
|
338
|
-
var defs = {
|
|
339
|
-
tag: "defs",
|
|
340
|
-
children: [{
|
|
341
|
-
tag: "clipPath",
|
|
342
|
-
attributes: {
|
|
343
|
-
id: clipId
|
|
344
|
-
},
|
|
345
|
-
children: deGroup(maskPath)
|
|
346
|
-
}, maskTag]
|
|
347
|
-
};
|
|
348
|
-
children.push(defs, {
|
|
349
|
-
tag: "rect",
|
|
350
|
-
attributes: _objectSpread({
|
|
351
|
-
fill: "currentColor",
|
|
352
|
-
"clip-path": "url(#".concat(clipId, ")"),
|
|
353
|
-
mask: "url(#".concat(maskId, ")")
|
|
354
|
-
}, ALL_SPACE)
|
|
355
|
-
});
|
|
356
|
-
return {
|
|
357
|
-
children,
|
|
358
|
-
attributes
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
function makeIconStandard(_ref2) {
|
|
362
|
-
var children = _ref2.children, attributes = _ref2.attributes, main = _ref2.main, transform2 = _ref2.transform, styles2 = _ref2.styles;
|
|
363
|
-
var styleString = joinStyles(styles2);
|
|
364
|
-
if (styleString.length > 0) {
|
|
365
|
-
attributes["style"] = styleString;
|
|
430
|
+
var baseStyles = ':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';
|
|
431
|
+
function css() {
|
|
432
|
+
var dfp = DEFAULT_FAMILY_PREFIX;
|
|
433
|
+
var drc = DEFAULT_REPLACEMENT_CLASS;
|
|
434
|
+
var fp = config.familyPrefix;
|
|
435
|
+
var rc = config.replacementClass;
|
|
436
|
+
var s = baseStyles;
|
|
437
|
+
if (fp !== dfp || rc !== drc) {
|
|
438
|
+
var dPatt = new RegExp("\\.".concat(dfp, "\\-"), "g");
|
|
439
|
+
var customPropPatt = new RegExp("\\--".concat(dfp, "\\-"), "g");
|
|
440
|
+
var rPatt = new RegExp("\\.".concat(drc), "g");
|
|
441
|
+
s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
366
442
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
tag: "g",
|
|
375
|
-
attributes: _objectSpread({}, trans.outer),
|
|
376
|
-
children: [{
|
|
377
|
-
tag: "g",
|
|
378
|
-
attributes: _objectSpread({}, trans.inner),
|
|
379
|
-
children: [{
|
|
380
|
-
tag: main.icon.tag,
|
|
381
|
-
children: main.icon.children,
|
|
382
|
-
attributes: _objectSpread({}, main.icon.attributes, trans.path)
|
|
383
|
-
}]
|
|
384
|
-
}]
|
|
385
|
-
});
|
|
386
|
-
} else {
|
|
387
|
-
children.push(main.icon);
|
|
443
|
+
return s;
|
|
444
|
+
}
|
|
445
|
+
var _cssInserted = false;
|
|
446
|
+
function ensureCss() {
|
|
447
|
+
if (config.autoAddCss && !_cssInserted) {
|
|
448
|
+
insertCss(css());
|
|
449
|
+
_cssInserted = true;
|
|
388
450
|
}
|
|
389
|
-
return {
|
|
390
|
-
children,
|
|
391
|
-
attributes
|
|
392
|
-
};
|
|
393
451
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
452
|
+
var InjectCSS = {
|
|
453
|
+
mixout: function mixout() {
|
|
454
|
+
return {
|
|
455
|
+
dom: {
|
|
456
|
+
css,
|
|
457
|
+
insertCss: ensureCss
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
hooks: function hooks() {
|
|
462
|
+
return {
|
|
463
|
+
beforeDOMElementCreation: function beforeDOMElementCreation() {
|
|
464
|
+
ensureCss();
|
|
465
|
+
},
|
|
466
|
+
beforeI2svg: function beforeI2svg() {
|
|
467
|
+
ensureCss();
|
|
468
|
+
}
|
|
401
469
|
};
|
|
402
|
-
attributes["style"] = joinStyles(_objectSpread({}, styles2, {
|
|
403
|
-
"transform-origin": "".concat(offset.x + transform2.x / 16, "em ").concat(offset.y + transform2.y / 16, "em")
|
|
404
|
-
}));
|
|
405
470
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
471
|
+
};
|
|
472
|
+
var w = WINDOW || {};
|
|
473
|
+
if (!w[NAMESPACE_IDENTIFIER])
|
|
474
|
+
w[NAMESPACE_IDENTIFIER] = {};
|
|
475
|
+
if (!w[NAMESPACE_IDENTIFIER].styles)
|
|
476
|
+
w[NAMESPACE_IDENTIFIER].styles = {};
|
|
477
|
+
if (!w[NAMESPACE_IDENTIFIER].hooks)
|
|
478
|
+
w[NAMESPACE_IDENTIFIER].hooks = {};
|
|
479
|
+
if (!w[NAMESPACE_IDENTIFIER].shims)
|
|
480
|
+
w[NAMESPACE_IDENTIFIER].shims = [];
|
|
481
|
+
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
482
|
+
var functions = [];
|
|
483
|
+
var listener = function listener2() {
|
|
484
|
+
DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
|
|
485
|
+
loaded = 1;
|
|
486
|
+
functions.map(function(fn) {
|
|
487
|
+
return fn();
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
var loaded = false;
|
|
491
|
+
if (IS_DOM) {
|
|
492
|
+
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
493
|
+
if (!loaded)
|
|
494
|
+
DOCUMENT.addEventListener("DOMContentLoaded", listener);
|
|
411
495
|
}
|
|
412
|
-
function
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
tag: "svg",
|
|
417
|
-
attributes: {
|
|
418
|
-
style: "display: none;"
|
|
419
|
-
},
|
|
420
|
-
children: [{
|
|
421
|
-
tag: "symbol",
|
|
422
|
-
attributes: _objectSpread({}, attributes, {
|
|
423
|
-
id
|
|
424
|
-
}),
|
|
425
|
-
children
|
|
426
|
-
}]
|
|
427
|
-
}];
|
|
496
|
+
function domready(fn) {
|
|
497
|
+
if (!IS_DOM)
|
|
498
|
+
return;
|
|
499
|
+
loaded ? setTimeout(fn, 0) : functions.push(fn);
|
|
428
500
|
}
|
|
429
|
-
function
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
var widthClass = isUploadedIcon ? "" : "fa-w-".concat(Math.ceil(width / height * 16));
|
|
434
|
-
var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : "", widthClass].filter(function(c) {
|
|
435
|
-
return extra.classes.indexOf(c) === -1;
|
|
436
|
-
}).filter(function(c) {
|
|
437
|
-
return c !== "" || !!c;
|
|
438
|
-
}).concat(extra.classes).join(" ");
|
|
439
|
-
var content = {
|
|
440
|
-
children: [],
|
|
441
|
-
attributes: _objectSpread({}, extra.attributes, {
|
|
442
|
-
"data-prefix": prefix,
|
|
443
|
-
"data-icon": iconName,
|
|
444
|
-
"class": attrClass,
|
|
445
|
-
"role": extra.attributes.role || "img",
|
|
446
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
447
|
-
"viewBox": "0 0 ".concat(width, " ").concat(height)
|
|
448
|
-
})
|
|
449
|
-
};
|
|
450
|
-
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf("fa-fw") ? {
|
|
451
|
-
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
452
|
-
} : {};
|
|
453
|
-
if (watchable) {
|
|
454
|
-
content.attributes[DATA_FA_I2SVG] = "";
|
|
455
|
-
}
|
|
456
|
-
if (title)
|
|
457
|
-
content.children.push({
|
|
458
|
-
tag: "title",
|
|
459
|
-
attributes: {
|
|
460
|
-
id: content.attributes["aria-labelledby"] || "title-".concat(titleId || nextUniqueId())
|
|
461
|
-
},
|
|
462
|
-
children: [title]
|
|
463
|
-
});
|
|
464
|
-
var args = _objectSpread({}, content, {
|
|
465
|
-
prefix,
|
|
466
|
-
iconName,
|
|
467
|
-
main,
|
|
468
|
-
mask,
|
|
469
|
-
maskId,
|
|
470
|
-
transform: transform2,
|
|
471
|
-
symbol,
|
|
472
|
-
styles: _objectSpread({}, uploadedIconWidthStyle, extra.styles)
|
|
473
|
-
});
|
|
474
|
-
var _ref22 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args), children = _ref22.children, attributes = _ref22.attributes;
|
|
475
|
-
args.children = children;
|
|
476
|
-
args.attributes = attributes;
|
|
477
|
-
if (symbol) {
|
|
478
|
-
return asSymbol(args);
|
|
501
|
+
function toHtml(abstractNodes) {
|
|
502
|
+
var tag = abstractNodes.tag, _abstractNodes$attrib = abstractNodes.attributes, attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, _abstractNodes$childr = abstractNodes.children, children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
|
|
503
|
+
if (typeof abstractNodes === "string") {
|
|
504
|
+
return htmlEscape(abstractNodes);
|
|
479
505
|
} else {
|
|
480
|
-
return
|
|
506
|
+
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
function iconFromMapping(mapping, prefix, iconName) {
|
|
510
|
+
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
511
|
+
return {
|
|
512
|
+
prefix,
|
|
513
|
+
iconName,
|
|
514
|
+
icon: mapping[prefix][iconName]
|
|
515
|
+
};
|
|
481
516
|
}
|
|
482
517
|
}
|
|
483
|
-
var noop$1 = function noop3() {
|
|
484
|
-
};
|
|
485
|
-
config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
486
|
-
mark: noop$1,
|
|
487
|
-
measure: noop$1
|
|
488
|
-
};
|
|
489
518
|
var bindInternal4 = function bindInternal42(func, thisContext) {
|
|
490
|
-
return function(a, b, c,
|
|
491
|
-
return func.call(thisContext, a, b, c,
|
|
519
|
+
return function(a, b, c, d2) {
|
|
520
|
+
return func.call(thisContext, a, b, c, d2);
|
|
492
521
|
};
|
|
493
522
|
};
|
|
494
523
|
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
@@ -506,29 +535,89 @@ var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
|
506
535
|
}
|
|
507
536
|
return result;
|
|
508
537
|
};
|
|
509
|
-
function
|
|
510
|
-
var
|
|
511
|
-
var
|
|
512
|
-
var
|
|
513
|
-
|
|
514
|
-
var
|
|
538
|
+
function ucs2decode(string) {
|
|
539
|
+
var output = [];
|
|
540
|
+
var counter = 0;
|
|
541
|
+
var length = string.length;
|
|
542
|
+
while (counter < length) {
|
|
543
|
+
var value = string.charCodeAt(counter++);
|
|
544
|
+
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
545
|
+
var extra = string.charCodeAt(counter++);
|
|
546
|
+
if ((extra & 64512) == 56320) {
|
|
547
|
+
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
548
|
+
} else {
|
|
549
|
+
output.push(value);
|
|
550
|
+
counter--;
|
|
551
|
+
}
|
|
552
|
+
} else {
|
|
553
|
+
output.push(value);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return output;
|
|
557
|
+
}
|
|
558
|
+
function toHex(unicode) {
|
|
559
|
+
var decoded = ucs2decode(unicode);
|
|
560
|
+
return decoded.length === 1 ? decoded[0].toString(16) : null;
|
|
561
|
+
}
|
|
562
|
+
function codePointAt(string, index) {
|
|
563
|
+
var size = string.length;
|
|
564
|
+
var first = string.charCodeAt(index);
|
|
565
|
+
var second;
|
|
566
|
+
if (first >= 55296 && first <= 56319 && size > index + 1) {
|
|
567
|
+
second = string.charCodeAt(index + 1);
|
|
568
|
+
if (second >= 56320 && second <= 57343) {
|
|
569
|
+
return (first - 55296) * 1024 + second - 56320 + 65536;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
return first;
|
|
573
|
+
}
|
|
574
|
+
function normalizeIcons(icons) {
|
|
575
|
+
return Object.keys(icons).reduce(function(acc, iconName) {
|
|
576
|
+
var icon3 = icons[iconName];
|
|
577
|
+
var expanded = !!icon3.icon;
|
|
515
578
|
if (expanded) {
|
|
516
|
-
acc[
|
|
579
|
+
acc[icon3.iconName] = icon3.icon;
|
|
517
580
|
} else {
|
|
518
|
-
acc[iconName] =
|
|
581
|
+
acc[iconName] = icon3;
|
|
519
582
|
}
|
|
520
583
|
return acc;
|
|
521
584
|
}, {});
|
|
585
|
+
}
|
|
586
|
+
function defineIcons(prefix, icons) {
|
|
587
|
+
var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
588
|
+
var _params$skipHooks = params.skipHooks, skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
|
|
589
|
+
var normalized = normalizeIcons(icons);
|
|
522
590
|
if (typeof namespace.hooks.addPack === "function" && !skipHooks) {
|
|
523
|
-
namespace.hooks.addPack(prefix,
|
|
591
|
+
namespace.hooks.addPack(prefix, normalizeIcons(icons));
|
|
524
592
|
} else {
|
|
525
|
-
namespace.styles[prefix] =
|
|
593
|
+
namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
|
|
526
594
|
}
|
|
527
595
|
if (prefix === "fas") {
|
|
528
596
|
defineIcons("fa", icons);
|
|
529
597
|
}
|
|
530
598
|
}
|
|
531
599
|
var styles = namespace.styles, shims = namespace.shims;
|
|
600
|
+
var LONG_STYLE = Object.values(PREFIX_TO_LONG_STYLE);
|
|
601
|
+
var _defaultUsablePrefix = null;
|
|
602
|
+
var _byUnicode = {};
|
|
603
|
+
var _byLigature = {};
|
|
604
|
+
var _byOldName = {};
|
|
605
|
+
var _byOldUnicode = {};
|
|
606
|
+
var _byAlias = {};
|
|
607
|
+
var PREFIXES = Object.keys(PREFIX_TO_STYLE);
|
|
608
|
+
function isReserved(name) {
|
|
609
|
+
return ~RESERVED_CLASSES.indexOf(name);
|
|
610
|
+
}
|
|
611
|
+
function getIconName(familyPrefix, cls) {
|
|
612
|
+
var parts = cls.split("-");
|
|
613
|
+
var prefix = parts[0];
|
|
614
|
+
var iconName = parts.slice(1).join("-");
|
|
615
|
+
if (prefix === familyPrefix && iconName !== "" && !isReserved(iconName)) {
|
|
616
|
+
return iconName;
|
|
617
|
+
} else {
|
|
618
|
+
return null;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
532
621
|
var build = function build2() {
|
|
533
622
|
var lookup = function lookup2(reducer) {
|
|
534
623
|
return reduce(styles, function(o, style, prefix) {
|
|
@@ -536,377 +625,1747 @@ var build = function build2() {
|
|
|
536
625
|
return o;
|
|
537
626
|
}, {});
|
|
538
627
|
};
|
|
539
|
-
lookup(function(acc,
|
|
540
|
-
if (
|
|
541
|
-
acc[
|
|
628
|
+
_byUnicode = lookup(function(acc, icon3, iconName) {
|
|
629
|
+
if (icon3[3]) {
|
|
630
|
+
acc[icon3[3]] = iconName;
|
|
631
|
+
}
|
|
632
|
+
if (icon3[2]) {
|
|
633
|
+
var aliases = icon3[2].filter(function(a) {
|
|
634
|
+
return typeof a === "number";
|
|
635
|
+
});
|
|
636
|
+
aliases.forEach(function(alias) {
|
|
637
|
+
acc[alias.toString(16)] = iconName;
|
|
638
|
+
});
|
|
542
639
|
}
|
|
543
640
|
return acc;
|
|
544
641
|
});
|
|
545
|
-
lookup(function(acc,
|
|
546
|
-
var ligatures = icon2[2];
|
|
642
|
+
_byLigature = lookup(function(acc, icon3, iconName) {
|
|
547
643
|
acc[iconName] = iconName;
|
|
548
|
-
|
|
549
|
-
|
|
644
|
+
if (icon3[2]) {
|
|
645
|
+
var aliases = icon3[2].filter(function(a) {
|
|
646
|
+
return typeof a === "string";
|
|
647
|
+
});
|
|
648
|
+
aliases.forEach(function(alias) {
|
|
649
|
+
acc[alias] = iconName;
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
return acc;
|
|
653
|
+
});
|
|
654
|
+
_byAlias = lookup(function(acc, icon3, iconName) {
|
|
655
|
+
var aliases = icon3[2];
|
|
656
|
+
acc[iconName] = iconName;
|
|
657
|
+
aliases.forEach(function(alias) {
|
|
658
|
+
acc[alias] = iconName;
|
|
550
659
|
});
|
|
551
660
|
return acc;
|
|
552
661
|
});
|
|
553
|
-
var hasRegular = "far" in styles;
|
|
554
|
-
reduce(shims, function(acc, shim) {
|
|
555
|
-
var
|
|
662
|
+
var hasRegular = "far" in styles || config.autoFetchSvg;
|
|
663
|
+
var shimLookups = reduce(shims, function(acc, shim) {
|
|
664
|
+
var maybeNameMaybeUnicode = shim[0];
|
|
556
665
|
var prefix = shim[1];
|
|
557
666
|
var iconName = shim[2];
|
|
558
667
|
if (prefix === "far" && !hasRegular) {
|
|
559
668
|
prefix = "fas";
|
|
560
669
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
670
|
+
if (typeof maybeNameMaybeUnicode === "string") {
|
|
671
|
+
acc.names[maybeNameMaybeUnicode] = {
|
|
672
|
+
prefix,
|
|
673
|
+
iconName
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
if (typeof maybeNameMaybeUnicode === "number") {
|
|
677
|
+
acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
|
|
678
|
+
prefix,
|
|
679
|
+
iconName
|
|
680
|
+
};
|
|
681
|
+
}
|
|
565
682
|
return acc;
|
|
566
|
-
}, {
|
|
683
|
+
}, {
|
|
684
|
+
names: {},
|
|
685
|
+
unicodes: {}
|
|
686
|
+
});
|
|
687
|
+
_byOldName = shimLookups.names;
|
|
688
|
+
_byOldUnicode = shimLookups.unicodes;
|
|
689
|
+
_defaultUsablePrefix = getCanonicalPrefix(config.styleDefault);
|
|
567
690
|
};
|
|
691
|
+
onChange(function(c) {
|
|
692
|
+
_defaultUsablePrefix = getCanonicalPrefix(c.styleDefault);
|
|
693
|
+
});
|
|
568
694
|
build();
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
572
|
-
return {
|
|
573
|
-
prefix,
|
|
574
|
-
iconName,
|
|
575
|
-
icon: mapping[prefix][iconName]
|
|
576
|
-
};
|
|
577
|
-
}
|
|
695
|
+
function byUnicode(prefix, unicode) {
|
|
696
|
+
return (_byUnicode[prefix] || {})[unicode];
|
|
578
697
|
}
|
|
579
|
-
function
|
|
580
|
-
|
|
581
|
-
if (typeof abstractNodes === "string") {
|
|
582
|
-
return htmlEscape(abstractNodes);
|
|
583
|
-
} else {
|
|
584
|
-
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
|
|
585
|
-
}
|
|
698
|
+
function byLigature(prefix, ligature) {
|
|
699
|
+
return (_byLigature[prefix] || {})[ligature];
|
|
586
700
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
rotate: 0
|
|
701
|
+
function byAlias(prefix, alias) {
|
|
702
|
+
return (_byAlias[prefix] || {})[alias];
|
|
703
|
+
}
|
|
704
|
+
function byOldName(name) {
|
|
705
|
+
return _byOldName[name] || {
|
|
706
|
+
prefix: null,
|
|
707
|
+
iconName: null
|
|
595
708
|
};
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
709
|
+
}
|
|
710
|
+
function byOldUnicode(unicode) {
|
|
711
|
+
var oldUnicode = _byOldUnicode[unicode];
|
|
712
|
+
var newUnicode = byUnicode("fas", unicode);
|
|
713
|
+
return oldUnicode || (newUnicode ? {
|
|
714
|
+
prefix: "fas",
|
|
715
|
+
iconName: newUnicode
|
|
716
|
+
} : null) || {
|
|
717
|
+
prefix: null,
|
|
718
|
+
iconName: null
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
function getDefaultUsablePrefix() {
|
|
722
|
+
return _defaultUsablePrefix;
|
|
723
|
+
}
|
|
724
|
+
var emptyCanonicalIcon = function emptyCanonicalIcon2() {
|
|
725
|
+
return {
|
|
726
|
+
prefix: null,
|
|
727
|
+
iconName: null,
|
|
728
|
+
rest: []
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
function getCanonicalPrefix(styleOrPrefix) {
|
|
732
|
+
var style = PREFIX_TO_STYLE[styleOrPrefix];
|
|
733
|
+
var prefix = STYLE_TO_PREFIX[styleOrPrefix] || STYLE_TO_PREFIX[style];
|
|
734
|
+
var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
|
|
735
|
+
return prefix || defined || null;
|
|
736
|
+
}
|
|
737
|
+
function getCanonicalIcon(values) {
|
|
738
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
739
|
+
var _params$skipLookups = params.skipLookups, skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
|
|
740
|
+
var givenPrefix = null;
|
|
741
|
+
var canonical = values.reduce(function(acc, cls) {
|
|
742
|
+
var iconName = getIconName(config.familyPrefix, cls);
|
|
743
|
+
if (styles[cls]) {
|
|
744
|
+
cls = LONG_STYLE.includes(cls) ? LONG_STYLE_TO_PREFIX[cls] : cls;
|
|
745
|
+
givenPrefix = cls;
|
|
746
|
+
acc.prefix = cls;
|
|
747
|
+
} else if (PREFIXES.indexOf(cls) > -1) {
|
|
748
|
+
givenPrefix = cls;
|
|
749
|
+
acc.prefix = getCanonicalPrefix(cls);
|
|
750
|
+
} else if (iconName) {
|
|
751
|
+
acc.iconName = iconName;
|
|
752
|
+
} else if (cls !== config.replacementClass) {
|
|
753
|
+
acc.rest.push(cls);
|
|
754
|
+
}
|
|
755
|
+
if (!skipLookups && acc.prefix && acc.iconName) {
|
|
756
|
+
var shim = givenPrefix === "fa" ? byOldName(acc.iconName) : {};
|
|
757
|
+
var aliasIconName = byAlias(acc.prefix, acc.iconName);
|
|
758
|
+
if (shim.prefix) {
|
|
759
|
+
givenPrefix = null;
|
|
606
760
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
761
|
+
acc.iconName = shim.iconName || aliasIconName || acc.iconName;
|
|
762
|
+
acc.prefix = shim.prefix || acc.prefix;
|
|
763
|
+
if (acc.prefix === "far" && !styles["far"] && styles["fas"] && !config.autoFetchSvg) {
|
|
764
|
+
acc.prefix = "fas";
|
|
610
765
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
766
|
+
}
|
|
767
|
+
return acc;
|
|
768
|
+
}, emptyCanonicalIcon());
|
|
769
|
+
if (canonical.prefix === "fa" || givenPrefix === "fa") {
|
|
770
|
+
canonical.prefix = getDefaultUsablePrefix() || "fas";
|
|
771
|
+
}
|
|
772
|
+
return canonical;
|
|
773
|
+
}
|
|
774
|
+
var Library = /* @__PURE__ */ function() {
|
|
775
|
+
function Library2() {
|
|
776
|
+
_classCallCheck(this, Library2);
|
|
777
|
+
this.definitions = {};
|
|
778
|
+
}
|
|
779
|
+
_createClass(Library2, [{
|
|
780
|
+
key: "add",
|
|
781
|
+
value: function add() {
|
|
782
|
+
var _this = this;
|
|
783
|
+
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
784
|
+
definitions[_key] = arguments[_key];
|
|
785
|
+
}
|
|
786
|
+
var additions = definitions.reduce(this._pullDefinitions, {});
|
|
787
|
+
Object.keys(additions).forEach(function(key) {
|
|
788
|
+
_this.definitions[key] = _objectSpread2(_objectSpread2({}, _this.definitions[key] || {}), additions[key]);
|
|
789
|
+
defineIcons(key, additions[key]);
|
|
790
|
+
var longPrefix = PREFIX_TO_LONG_STYLE[key];
|
|
791
|
+
if (longPrefix)
|
|
792
|
+
defineIcons(longPrefix, additions[key]);
|
|
793
|
+
build();
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
}, {
|
|
797
|
+
key: "reset",
|
|
798
|
+
value: function reset() {
|
|
799
|
+
this.definitions = {};
|
|
800
|
+
}
|
|
801
|
+
}, {
|
|
802
|
+
key: "_pullDefinitions",
|
|
803
|
+
value: function _pullDefinitions(additions, definition) {
|
|
804
|
+
var normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
805
|
+
0: definition
|
|
806
|
+
} : definition;
|
|
807
|
+
Object.keys(normalized).map(function(key) {
|
|
808
|
+
var _normalized$key = normalized[key], prefix = _normalized$key.prefix, iconName = _normalized$key.iconName, icon3 = _normalized$key.icon;
|
|
809
|
+
var aliases = icon3[2];
|
|
810
|
+
if (!additions[prefix])
|
|
811
|
+
additions[prefix] = {};
|
|
812
|
+
if (aliases.length > 0) {
|
|
813
|
+
aliases.forEach(function(alias) {
|
|
814
|
+
if (typeof alias === "string") {
|
|
815
|
+
additions[prefix][alias] = icon3;
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
additions[prefix][iconName] = icon3;
|
|
820
|
+
});
|
|
821
|
+
return additions;
|
|
822
|
+
}
|
|
823
|
+
}]);
|
|
824
|
+
return Library2;
|
|
825
|
+
}();
|
|
826
|
+
var _plugins = [];
|
|
827
|
+
var _hooks = {};
|
|
828
|
+
var providers = {};
|
|
829
|
+
var defaultProviderKeys = Object.keys(providers);
|
|
830
|
+
function registerPlugins(nextPlugins, _ref2) {
|
|
831
|
+
var obj = _ref2.mixoutsTo;
|
|
832
|
+
_plugins = nextPlugins;
|
|
833
|
+
_hooks = {};
|
|
834
|
+
Object.keys(providers).forEach(function(k) {
|
|
835
|
+
if (defaultProviderKeys.indexOf(k) === -1) {
|
|
836
|
+
delete providers[k];
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
_plugins.forEach(function(plugin) {
|
|
840
|
+
var mixout8 = plugin.mixout ? plugin.mixout() : {};
|
|
841
|
+
Object.keys(mixout8).forEach(function(tk) {
|
|
842
|
+
if (typeof mixout8[tk] === "function") {
|
|
843
|
+
obj[tk] = mixout8[tk];
|
|
614
844
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
case "left":
|
|
623
|
-
acc.x = acc.x - rest;
|
|
624
|
-
break;
|
|
625
|
-
case "right":
|
|
626
|
-
acc.x = acc.x + rest;
|
|
627
|
-
break;
|
|
628
|
-
case "up":
|
|
629
|
-
acc.y = acc.y - rest;
|
|
630
|
-
break;
|
|
631
|
-
case "down":
|
|
632
|
-
acc.y = acc.y + rest;
|
|
633
|
-
break;
|
|
634
|
-
case "rotate":
|
|
635
|
-
acc.rotate = acc.rotate + rest;
|
|
636
|
-
break;
|
|
845
|
+
if (_typeof$1(mixout8[tk]) === "object") {
|
|
846
|
+
Object.keys(mixout8[tk]).forEach(function(sk) {
|
|
847
|
+
if (!obj[tk]) {
|
|
848
|
+
obj[tk] = {};
|
|
849
|
+
}
|
|
850
|
+
obj[tk][sk] = mixout8[tk][sk];
|
|
851
|
+
});
|
|
637
852
|
}
|
|
638
|
-
|
|
639
|
-
|
|
853
|
+
});
|
|
854
|
+
if (plugin.hooks) {
|
|
855
|
+
var hooks8 = plugin.hooks();
|
|
856
|
+
Object.keys(hooks8).forEach(function(hook) {
|
|
857
|
+
if (!_hooks[hook]) {
|
|
858
|
+
_hooks[hook] = [];
|
|
859
|
+
}
|
|
860
|
+
_hooks[hook].push(hooks8[hook]);
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
if (plugin.provides) {
|
|
864
|
+
plugin.provides(providers);
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
return obj;
|
|
868
|
+
}
|
|
869
|
+
function chainHooks(hook, accumulator) {
|
|
870
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
871
|
+
args[_key - 2] = arguments[_key];
|
|
872
|
+
}
|
|
873
|
+
var hookFns = _hooks[hook] || [];
|
|
874
|
+
hookFns.forEach(function(hookFn) {
|
|
875
|
+
accumulator = hookFn.apply(null, [accumulator].concat(args));
|
|
876
|
+
});
|
|
877
|
+
return accumulator;
|
|
878
|
+
}
|
|
879
|
+
function callHooks(hook) {
|
|
880
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
881
|
+
args[_key2 - 1] = arguments[_key2];
|
|
882
|
+
}
|
|
883
|
+
var hookFns = _hooks[hook] || [];
|
|
884
|
+
hookFns.forEach(function(hookFn) {
|
|
885
|
+
hookFn.apply(null, args);
|
|
886
|
+
});
|
|
887
|
+
return void 0;
|
|
888
|
+
}
|
|
889
|
+
function callProvided() {
|
|
890
|
+
var hook = arguments[0];
|
|
891
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
892
|
+
return providers[hook] ? providers[hook].apply(null, args) : void 0;
|
|
893
|
+
}
|
|
894
|
+
function findIconDefinition(iconLookup) {
|
|
895
|
+
if (iconLookup.prefix === "fa") {
|
|
896
|
+
iconLookup.prefix = "fas";
|
|
640
897
|
}
|
|
898
|
+
var iconName = iconLookup.iconName;
|
|
899
|
+
var prefix = iconLookup.prefix || getDefaultUsablePrefix();
|
|
900
|
+
if (!iconName)
|
|
901
|
+
return;
|
|
902
|
+
iconName = byAlias(prefix, iconName) || iconName;
|
|
903
|
+
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
904
|
+
}
|
|
905
|
+
var library = new Library();
|
|
906
|
+
var noAuto = function noAuto2() {
|
|
907
|
+
config.autoReplaceSvg = false;
|
|
908
|
+
config.observeMutations = false;
|
|
909
|
+
callHooks("noAuto");
|
|
641
910
|
};
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
911
|
+
var dom = {
|
|
912
|
+
i2svg: function i2svg() {
|
|
913
|
+
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
914
|
+
if (IS_DOM) {
|
|
915
|
+
callHooks("beforeI2svg", params);
|
|
916
|
+
callProvided("pseudoElements2svg", params);
|
|
917
|
+
return callProvided("i2svg", params);
|
|
918
|
+
} else {
|
|
919
|
+
return Promise.reject("Operation requires a DOM of some kind.");
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
watch: function watch2() {
|
|
923
|
+
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
924
|
+
var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
|
|
925
|
+
if (config.autoReplaceSvg === false) {
|
|
926
|
+
config.autoReplaceSvg = true;
|
|
927
|
+
}
|
|
928
|
+
config.observeMutations = true;
|
|
929
|
+
domready(function() {
|
|
930
|
+
autoReplace({
|
|
931
|
+
autoReplaceSvgRoot
|
|
932
|
+
});
|
|
933
|
+
callHooks("watch", params);
|
|
934
|
+
});
|
|
935
|
+
}
|
|
651
936
|
};
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
937
|
+
var parse = {
|
|
938
|
+
icon: function icon(_icon) {
|
|
939
|
+
if (_icon === null) {
|
|
940
|
+
return null;
|
|
941
|
+
}
|
|
942
|
+
if (_typeof$1(_icon) === "object" && _icon.prefix && _icon.iconName) {
|
|
943
|
+
return {
|
|
944
|
+
prefix: _icon.prefix,
|
|
945
|
+
iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
if (Array.isArray(_icon) && _icon.length === 2) {
|
|
949
|
+
var iconName = _icon[1].indexOf("fa-") === 0 ? _icon[1].slice(3) : _icon[1];
|
|
950
|
+
var prefix = getCanonicalPrefix(_icon[0]);
|
|
951
|
+
return {
|
|
952
|
+
prefix,
|
|
953
|
+
iconName: byAlias(prefix, iconName) || iconName
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
if (typeof _icon === "string" && (_icon.indexOf("".concat(config.familyPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
|
|
957
|
+
var canonicalIcon = getCanonicalIcon(_icon.split(" "), {
|
|
958
|
+
skipLookups: true
|
|
959
|
+
});
|
|
960
|
+
return {
|
|
961
|
+
prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
|
|
962
|
+
iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
if (typeof _icon === "string") {
|
|
966
|
+
var _prefix = getDefaultUsablePrefix();
|
|
967
|
+
return {
|
|
968
|
+
prefix: _prefix,
|
|
969
|
+
iconName: byAlias(_prefix, _icon) || _icon
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
}
|
|
656
973
|
};
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
({
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
({
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
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"
|
|
704
|
-
}),
|
|
705
|
-
children: [{
|
|
706
|
-
tag: "animate",
|
|
707
|
-
attributes: _objectSpread({}, OPACITY_ANIMATE, {
|
|
708
|
-
values: "0;0;1;1;0;0;"
|
|
709
|
-
})
|
|
710
|
-
}]
|
|
711
|
-
});
|
|
712
|
-
namespace.styles;
|
|
713
|
-
function asFoundIcon(icon2) {
|
|
714
|
-
var width = icon2[0];
|
|
715
|
-
var height = icon2[1];
|
|
716
|
-
var _icon$slice = icon2.slice(4), _icon$slice2 = _slicedToArray(_icon$slice, 1), vectorData = _icon$slice2[0];
|
|
717
|
-
var element = null;
|
|
718
|
-
if (Array.isArray(vectorData)) {
|
|
719
|
-
element = {
|
|
720
|
-
tag: "g",
|
|
721
|
-
attributes: {
|
|
722
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
723
|
-
},
|
|
724
|
-
children: [{
|
|
725
|
-
tag: "path",
|
|
726
|
-
attributes: {
|
|
727
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
728
|
-
fill: "currentColor",
|
|
729
|
-
d: vectorData[0]
|
|
730
|
-
}
|
|
731
|
-
}, {
|
|
732
|
-
tag: "path",
|
|
733
|
-
attributes: {
|
|
734
|
-
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
735
|
-
fill: "currentColor",
|
|
736
|
-
d: vectorData[1]
|
|
737
|
-
}
|
|
738
|
-
}]
|
|
739
|
-
};
|
|
740
|
-
} else {
|
|
741
|
-
element = {
|
|
742
|
-
tag: "path",
|
|
743
|
-
attributes: {
|
|
744
|
-
fill: "currentColor",
|
|
745
|
-
d: vectorData
|
|
746
|
-
}
|
|
974
|
+
var api = {
|
|
975
|
+
noAuto,
|
|
976
|
+
config,
|
|
977
|
+
dom,
|
|
978
|
+
parse,
|
|
979
|
+
library,
|
|
980
|
+
findIconDefinition,
|
|
981
|
+
toHtml
|
|
982
|
+
};
|
|
983
|
+
var autoReplace = function autoReplace2() {
|
|
984
|
+
var params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
985
|
+
var _params$autoReplaceSv = params.autoReplaceSvgRoot, autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
|
|
986
|
+
if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg)
|
|
987
|
+
api.dom.i2svg({
|
|
988
|
+
node: autoReplaceSvgRoot
|
|
989
|
+
});
|
|
990
|
+
};
|
|
991
|
+
function domVariants(val, abstractCreator) {
|
|
992
|
+
Object.defineProperty(val, "abstract", {
|
|
993
|
+
get: abstractCreator
|
|
994
|
+
});
|
|
995
|
+
Object.defineProperty(val, "html", {
|
|
996
|
+
get: function get() {
|
|
997
|
+
return val.abstract.map(function(a) {
|
|
998
|
+
return toHtml(a);
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
Object.defineProperty(val, "node", {
|
|
1003
|
+
get: function get() {
|
|
1004
|
+
if (!IS_DOM)
|
|
1005
|
+
return;
|
|
1006
|
+
var container = DOCUMENT.createElement("div");
|
|
1007
|
+
container.innerHTML = val.html;
|
|
1008
|
+
return container.children;
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
return val;
|
|
1012
|
+
}
|
|
1013
|
+
function asIcon(_ref2) {
|
|
1014
|
+
var children = _ref2.children, main = _ref2.main, mask = _ref2.mask, attributes = _ref2.attributes, styles2 = _ref2.styles, transform = _ref2.transform;
|
|
1015
|
+
if (transformIsMeaningful(transform) && main.found && !mask.found) {
|
|
1016
|
+
var width = main.width, height = main.height;
|
|
1017
|
+
var offset = {
|
|
1018
|
+
x: width / height / 2,
|
|
1019
|
+
y: 0.5
|
|
747
1020
|
};
|
|
1021
|
+
attributes["style"] = joinStyles(_objectSpread2(_objectSpread2({}, styles2), {}, {
|
|
1022
|
+
"transform-origin": "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
|
|
1023
|
+
}));
|
|
748
1024
|
}
|
|
749
|
-
return {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
};
|
|
1025
|
+
return [{
|
|
1026
|
+
tag: "svg",
|
|
1027
|
+
attributes,
|
|
1028
|
+
children
|
|
1029
|
+
}];
|
|
755
1030
|
}
|
|
756
|
-
|
|
757
|
-
var
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
1031
|
+
function asSymbol(_ref2) {
|
|
1032
|
+
var prefix = _ref2.prefix, iconName = _ref2.iconName, children = _ref2.children, attributes = _ref2.attributes, symbol = _ref2.symbol;
|
|
1033
|
+
var id = symbol === true ? "".concat(prefix, "-").concat(config.familyPrefix, "-").concat(iconName) : symbol;
|
|
1034
|
+
return [{
|
|
1035
|
+
tag: "svg",
|
|
1036
|
+
attributes: {
|
|
1037
|
+
style: "display: none;"
|
|
1038
|
+
},
|
|
1039
|
+
children: [{
|
|
1040
|
+
tag: "symbol",
|
|
1041
|
+
attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
|
|
1042
|
+
id
|
|
1043
|
+
}),
|
|
1044
|
+
children
|
|
1045
|
+
}]
|
|
1046
|
+
}];
|
|
1047
|
+
}
|
|
1048
|
+
function makeInlineSvgAbstract(params) {
|
|
1049
|
+
var _params$icons = params.icons, main = _params$icons.main, mask = _params$icons.mask, prefix = params.prefix, iconName = params.iconName, transform = params.transform, symbol = params.symbol, title = params.title, maskId = params.maskId, titleId = params.titleId, extra = params.extra, _params$watchable = params.watchable, watchable = _params$watchable === void 0 ? false : _params$watchable;
|
|
1050
|
+
var _ref2 = mask.found ? mask : main, width = _ref2.width, height = _ref2.height;
|
|
1051
|
+
var isUploadedIcon = prefix === "fak";
|
|
1052
|
+
var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : ""].filter(function(c) {
|
|
1053
|
+
return extra.classes.indexOf(c) === -1;
|
|
1054
|
+
}).filter(function(c) {
|
|
1055
|
+
return c !== "" || !!c;
|
|
1056
|
+
}).concat(extra.classes).join(" ");
|
|
1057
|
+
var content = {
|
|
1058
|
+
children: [],
|
|
1059
|
+
attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
|
|
1060
|
+
"data-prefix": prefix,
|
|
1061
|
+
"data-icon": iconName,
|
|
1062
|
+
"class": attrClass,
|
|
1063
|
+
"role": extra.attributes.role || "img",
|
|
1064
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
1065
|
+
"viewBox": "0 0 ".concat(width, " ").concat(height)
|
|
1066
|
+
})
|
|
1067
|
+
};
|
|
1068
|
+
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf("fa-fw") ? {
|
|
1069
|
+
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
1070
|
+
} : {};
|
|
1071
|
+
if (watchable) {
|
|
1072
|
+
content.attributes[DATA_FA_I2SVG] = "";
|
|
1073
|
+
}
|
|
1074
|
+
if (title) {
|
|
1075
|
+
content.children.push({
|
|
1076
|
+
tag: "title",
|
|
1077
|
+
attributes: {
|
|
1078
|
+
id: content.attributes["aria-labelledby"] || "title-".concat(titleId || nextUniqueId())
|
|
1079
|
+
},
|
|
1080
|
+
children: [title]
|
|
1081
|
+
});
|
|
1082
|
+
delete content.attributes.title;
|
|
1083
|
+
}
|
|
1084
|
+
var args = _objectSpread2(_objectSpread2({}, content), {}, {
|
|
1085
|
+
prefix,
|
|
1086
|
+
iconName,
|
|
1087
|
+
main,
|
|
1088
|
+
mask,
|
|
1089
|
+
maskId,
|
|
1090
|
+
transform,
|
|
1091
|
+
symbol,
|
|
1092
|
+
styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
|
|
1093
|
+
});
|
|
1094
|
+
var _ref22 = mask.found && main.found ? callProvided("generateAbstractMask", args) || {
|
|
1095
|
+
children: [],
|
|
1096
|
+
attributes: {}
|
|
1097
|
+
} : callProvided("generateAbstractIcon", args) || {
|
|
1098
|
+
children: [],
|
|
1099
|
+
attributes: {}
|
|
1100
|
+
}, children = _ref22.children, attributes = _ref22.attributes;
|
|
1101
|
+
args.children = children;
|
|
1102
|
+
args.attributes = attributes;
|
|
1103
|
+
if (symbol) {
|
|
1104
|
+
return asSymbol(args);
|
|
1105
|
+
} else {
|
|
1106
|
+
return asIcon(args);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
function makeLayersTextAbstract(params) {
|
|
1110
|
+
var content = params.content, width = params.width, height = params.height, transform = params.transform, title = params.title, extra = params.extra, _params$watchable2 = params.watchable, watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
|
|
1111
|
+
var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1112
|
+
"title": title
|
|
1113
|
+
} : {}), {}, {
|
|
1114
|
+
"class": extra.classes.join(" ")
|
|
1115
|
+
});
|
|
1116
|
+
if (watchable) {
|
|
1117
|
+
attributes[DATA_FA_I2SVG] = "";
|
|
1118
|
+
}
|
|
1119
|
+
var styles2 = _objectSpread2({}, extra.styles);
|
|
1120
|
+
if (transformIsMeaningful(transform)) {
|
|
1121
|
+
styles2["transform"] = transformForCss({
|
|
1122
|
+
transform,
|
|
1123
|
+
startCentered: true,
|
|
1124
|
+
width,
|
|
1125
|
+
height
|
|
1126
|
+
});
|
|
1127
|
+
styles2["-webkit-transform"] = styles2["transform"];
|
|
1128
|
+
}
|
|
1129
|
+
var styleString = joinStyles(styles2);
|
|
1130
|
+
if (styleString.length > 0) {
|
|
1131
|
+
attributes["style"] = styleString;
|
|
1132
|
+
}
|
|
1133
|
+
var val = [];
|
|
1134
|
+
val.push({
|
|
1135
|
+
tag: "span",
|
|
1136
|
+
attributes,
|
|
1137
|
+
children: [content]
|
|
1138
|
+
});
|
|
1139
|
+
if (title) {
|
|
1140
|
+
val.push({
|
|
1141
|
+
tag: "span",
|
|
1142
|
+
attributes: {
|
|
1143
|
+
class: "sr-only"
|
|
1144
|
+
},
|
|
1145
|
+
children: [title]
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
return val;
|
|
1149
|
+
}
|
|
1150
|
+
function makeLayersCounterAbstract(params) {
|
|
1151
|
+
var content = params.content, title = params.title, extra = params.extra;
|
|
1152
|
+
var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
|
|
1153
|
+
"title": title
|
|
1154
|
+
} : {}), {}, {
|
|
1155
|
+
"class": extra.classes.join(" ")
|
|
1156
|
+
});
|
|
1157
|
+
var styleString = joinStyles(extra.styles);
|
|
1158
|
+
if (styleString.length > 0) {
|
|
1159
|
+
attributes["style"] = styleString;
|
|
1160
|
+
}
|
|
1161
|
+
var val = [];
|
|
1162
|
+
val.push({
|
|
1163
|
+
tag: "span",
|
|
1164
|
+
attributes,
|
|
1165
|
+
children: [content]
|
|
1166
|
+
});
|
|
1167
|
+
if (title) {
|
|
1168
|
+
val.push({
|
|
1169
|
+
tag: "span",
|
|
1170
|
+
attributes: {
|
|
1171
|
+
class: "sr-only"
|
|
1172
|
+
},
|
|
1173
|
+
children: [title]
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
return val;
|
|
1177
|
+
}
|
|
1178
|
+
var styles$1 = namespace.styles;
|
|
1179
|
+
function asFoundIcon(icon3) {
|
|
1180
|
+
var width = icon3[0];
|
|
1181
|
+
var height = icon3[1];
|
|
1182
|
+
var _icon$slice = icon3.slice(4), _icon$slice2 = _slicedToArray(_icon$slice, 1), vectorData = _icon$slice2[0];
|
|
1183
|
+
var element = null;
|
|
1184
|
+
if (Array.isArray(vectorData)) {
|
|
1185
|
+
element = {
|
|
1186
|
+
tag: "g",
|
|
1187
|
+
attributes: {
|
|
1188
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
1189
|
+
},
|
|
1190
|
+
children: [{
|
|
1191
|
+
tag: "path",
|
|
1192
|
+
attributes: {
|
|
1193
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
1194
|
+
fill: "currentColor",
|
|
1195
|
+
d: vectorData[0]
|
|
1196
|
+
}
|
|
1197
|
+
}, {
|
|
1198
|
+
tag: "path",
|
|
1199
|
+
attributes: {
|
|
1200
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
1201
|
+
fill: "currentColor",
|
|
1202
|
+
d: vectorData[1]
|
|
1203
|
+
}
|
|
1204
|
+
}]
|
|
1205
|
+
};
|
|
1206
|
+
} else {
|
|
1207
|
+
element = {
|
|
1208
|
+
tag: "path",
|
|
1209
|
+
attributes: {
|
|
1210
|
+
fill: "currentColor",
|
|
1211
|
+
d: vectorData
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
return {
|
|
1216
|
+
found: true,
|
|
1217
|
+
width,
|
|
1218
|
+
height,
|
|
1219
|
+
icon: element
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
var missingIconResolutionMixin = {
|
|
1223
|
+
found: false,
|
|
1224
|
+
width: 512,
|
|
1225
|
+
height: 512
|
|
1226
|
+
};
|
|
1227
|
+
function maybeNotifyMissing(iconName, prefix) {
|
|
1228
|
+
if (!PRODUCTION$1 && !config.showMissingIcons && iconName) {
|
|
1229
|
+
console.error('Icon with name "'.concat(iconName, '" and prefix "').concat(prefix, '" is missing.'));
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
function findIcon(iconName, prefix) {
|
|
1233
|
+
var givenPrefix = prefix;
|
|
1234
|
+
if (prefix === "fa" && config.styleDefault !== null) {
|
|
1235
|
+
prefix = getDefaultUsablePrefix();
|
|
1236
|
+
}
|
|
1237
|
+
return new Promise(function(resolve, reject) {
|
|
1238
|
+
({
|
|
1239
|
+
found: false,
|
|
1240
|
+
width: 512,
|
|
1241
|
+
height: 512,
|
|
1242
|
+
icon: callProvided("missingIconAbstract") || {}
|
|
1243
|
+
});
|
|
1244
|
+
if (givenPrefix === "fa") {
|
|
1245
|
+
var shim = byOldName(iconName) || {};
|
|
1246
|
+
iconName = shim.iconName || iconName;
|
|
1247
|
+
prefix = shim.prefix || prefix;
|
|
1248
|
+
}
|
|
1249
|
+
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
1250
|
+
var icon3 = styles$1[prefix][iconName];
|
|
1251
|
+
return resolve(asFoundIcon(icon3));
|
|
1252
|
+
}
|
|
1253
|
+
maybeNotifyMissing(iconName, prefix);
|
|
1254
|
+
resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
|
|
1255
|
+
icon: config.showMissingIcons && iconName ? callProvided("missingIconAbstract") || {} : {}
|
|
1256
|
+
}));
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
var noop$1 = function noop3() {
|
|
1260
|
+
};
|
|
1261
|
+
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
1262
|
+
mark: noop$1,
|
|
1263
|
+
measure: noop$1
|
|
1264
|
+
};
|
|
1265
|
+
var preamble = 'FA "6.0.0"';
|
|
1266
|
+
var begin = function begin2(name) {
|
|
1267
|
+
p.mark("".concat(preamble, " ").concat(name, " begins"));
|
|
1268
|
+
return function() {
|
|
1269
|
+
return end(name);
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
var end = function end2(name) {
|
|
1273
|
+
p.mark("".concat(preamble, " ").concat(name, " ends"));
|
|
1274
|
+
p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
|
|
1275
|
+
};
|
|
1276
|
+
var perf = {
|
|
1277
|
+
begin,
|
|
1278
|
+
end
|
|
1279
|
+
};
|
|
1280
|
+
var noop$2 = function noop4() {
|
|
1281
|
+
};
|
|
1282
|
+
function isWatched(node) {
|
|
1283
|
+
var i2svg2 = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
|
|
1284
|
+
return typeof i2svg2 === "string";
|
|
1285
|
+
}
|
|
1286
|
+
function hasPrefixAndIcon(node) {
|
|
1287
|
+
var prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
|
|
1288
|
+
var icon3 = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
|
|
1289
|
+
return prefix && icon3;
|
|
1290
|
+
}
|
|
1291
|
+
function hasBeenReplaced(node) {
|
|
1292
|
+
return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
|
|
1293
|
+
}
|
|
1294
|
+
function getMutator() {
|
|
1295
|
+
if (config.autoReplaceSvg === true) {
|
|
1296
|
+
return mutators.replace;
|
|
1297
|
+
}
|
|
1298
|
+
var mutator = mutators[config.autoReplaceSvg];
|
|
1299
|
+
return mutator || mutators.replace;
|
|
1300
|
+
}
|
|
1301
|
+
function createElementNS(tag) {
|
|
1302
|
+
return DOCUMENT.createElementNS("http://www.w3.org/2000/svg", tag);
|
|
1303
|
+
}
|
|
1304
|
+
function createElement(tag) {
|
|
1305
|
+
return DOCUMENT.createElement(tag);
|
|
1306
|
+
}
|
|
1307
|
+
function convertSVG(abstractObj) {
|
|
1308
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1309
|
+
var _params$ceFn = params.ceFn, ceFn = _params$ceFn === void 0 ? abstractObj.tag === "svg" ? createElementNS : createElement : _params$ceFn;
|
|
1310
|
+
if (typeof abstractObj === "string") {
|
|
1311
|
+
return DOCUMENT.createTextNode(abstractObj);
|
|
1312
|
+
}
|
|
1313
|
+
var tag = ceFn(abstractObj.tag);
|
|
1314
|
+
Object.keys(abstractObj.attributes || []).forEach(function(key) {
|
|
1315
|
+
tag.setAttribute(key, abstractObj.attributes[key]);
|
|
1316
|
+
});
|
|
1317
|
+
var children = abstractObj.children || [];
|
|
1318
|
+
children.forEach(function(child) {
|
|
1319
|
+
tag.appendChild(convertSVG(child, {
|
|
1320
|
+
ceFn
|
|
1321
|
+
}));
|
|
1322
|
+
});
|
|
1323
|
+
return tag;
|
|
1324
|
+
}
|
|
1325
|
+
function nodeAsComment(node) {
|
|
1326
|
+
var comment = " ".concat(node.outerHTML, " ");
|
|
1327
|
+
comment = "".concat(comment, "Font Awesome fontawesome.com ");
|
|
1328
|
+
return comment;
|
|
1329
|
+
}
|
|
1330
|
+
var mutators = {
|
|
1331
|
+
replace: function replace(mutation) {
|
|
1332
|
+
var node = mutation[0];
|
|
1333
|
+
if (node.parentNode) {
|
|
1334
|
+
mutation[1].forEach(function(abstract) {
|
|
1335
|
+
node.parentNode.insertBefore(convertSVG(abstract), node);
|
|
1336
|
+
});
|
|
1337
|
+
if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
|
|
1338
|
+
var comment = DOCUMENT.createComment(nodeAsComment(node));
|
|
1339
|
+
node.parentNode.replaceChild(comment, node);
|
|
1340
|
+
} else {
|
|
1341
|
+
node.remove();
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
nest: function nest(mutation) {
|
|
1346
|
+
var node = mutation[0];
|
|
1347
|
+
var abstract = mutation[1];
|
|
1348
|
+
if (~classArray(node).indexOf(config.replacementClass)) {
|
|
1349
|
+
return mutators.replace(mutation);
|
|
1350
|
+
}
|
|
1351
|
+
var forSvg = new RegExp("".concat(config.familyPrefix, "-.*"));
|
|
1352
|
+
delete abstract[0].attributes.id;
|
|
1353
|
+
if (abstract[0].attributes.class) {
|
|
1354
|
+
var splitClasses = abstract[0].attributes.class.split(" ").reduce(function(acc, cls) {
|
|
1355
|
+
if (cls === config.replacementClass || cls.match(forSvg)) {
|
|
1356
|
+
acc.toSvg.push(cls);
|
|
1357
|
+
} else {
|
|
1358
|
+
acc.toNode.push(cls);
|
|
1359
|
+
}
|
|
1360
|
+
return acc;
|
|
1361
|
+
}, {
|
|
1362
|
+
toNode: [],
|
|
1363
|
+
toSvg: []
|
|
1364
|
+
});
|
|
1365
|
+
abstract[0].attributes.class = splitClasses.toSvg.join(" ");
|
|
1366
|
+
if (splitClasses.toNode.length === 0) {
|
|
1367
|
+
node.removeAttribute("class");
|
|
1368
|
+
} else {
|
|
1369
|
+
node.setAttribute("class", splitClasses.toNode.join(" "));
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
var newInnerHTML = abstract.map(function(a) {
|
|
1373
|
+
return toHtml(a);
|
|
1374
|
+
}).join("\n");
|
|
1375
|
+
node.setAttribute(DATA_FA_I2SVG, "");
|
|
1376
|
+
node.innerHTML = newInnerHTML;
|
|
1377
|
+
}
|
|
1378
|
+
};
|
|
1379
|
+
function performOperationSync(op) {
|
|
1380
|
+
op();
|
|
1381
|
+
}
|
|
1382
|
+
function perform(mutations, callback) {
|
|
1383
|
+
var callbackFunction = typeof callback === "function" ? callback : noop$2;
|
|
1384
|
+
if (mutations.length === 0) {
|
|
1385
|
+
callbackFunction();
|
|
1386
|
+
} else {
|
|
1387
|
+
var frame = performOperationSync;
|
|
1388
|
+
if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
|
|
1389
|
+
frame = WINDOW.requestAnimationFrame || performOperationSync;
|
|
1390
|
+
}
|
|
1391
|
+
frame(function() {
|
|
1392
|
+
var mutator = getMutator();
|
|
1393
|
+
var mark = perf.begin("mutate");
|
|
1394
|
+
mutations.map(mutator);
|
|
1395
|
+
mark();
|
|
1396
|
+
callbackFunction();
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
var disabled = false;
|
|
1401
|
+
function disableObservation() {
|
|
1402
|
+
disabled = true;
|
|
1403
|
+
}
|
|
1404
|
+
function enableObservation() {
|
|
1405
|
+
disabled = false;
|
|
1406
|
+
}
|
|
1407
|
+
var mo = null;
|
|
1408
|
+
function observe(options) {
|
|
1409
|
+
if (!MUTATION_OBSERVER) {
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
if (!config.observeMutations) {
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
var _options$treeCallback = options.treeCallback, treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback, _options$nodeCallback = options.nodeCallback, nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback, _options$pseudoElemen = options.pseudoElementsCallback, pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen, _options$observeMutat = options.observeMutationsRoot, observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
|
|
1416
|
+
mo = new MUTATION_OBSERVER(function(objects) {
|
|
1417
|
+
if (disabled)
|
|
1418
|
+
return;
|
|
1419
|
+
var defaultPrefix = getDefaultUsablePrefix();
|
|
1420
|
+
toArray(objects).forEach(function(mutationRecord) {
|
|
1421
|
+
if (mutationRecord.type === "childList" && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
|
|
1422
|
+
if (config.searchPseudoElements) {
|
|
1423
|
+
pseudoElementsCallback(mutationRecord.target);
|
|
1424
|
+
}
|
|
1425
|
+
treeCallback(mutationRecord.target);
|
|
1426
|
+
}
|
|
1427
|
+
if (mutationRecord.type === "attributes" && mutationRecord.target.parentNode && config.searchPseudoElements) {
|
|
1428
|
+
pseudoElementsCallback(mutationRecord.target.parentNode);
|
|
1429
|
+
}
|
|
1430
|
+
if (mutationRecord.type === "attributes" && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
|
|
1431
|
+
if (mutationRecord.attributeName === "class" && hasPrefixAndIcon(mutationRecord.target)) {
|
|
1432
|
+
var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)), prefix = _getCanonicalIcon.prefix, iconName = _getCanonicalIcon.iconName;
|
|
1433
|
+
mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
|
|
1434
|
+
if (iconName)
|
|
1435
|
+
mutationRecord.target.setAttribute(DATA_ICON, iconName);
|
|
1436
|
+
} else if (hasBeenReplaced(mutationRecord.target)) {
|
|
1437
|
+
nodeCallback(mutationRecord.target);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
});
|
|
1441
|
+
});
|
|
1442
|
+
if (!IS_DOM)
|
|
1443
|
+
return;
|
|
1444
|
+
mo.observe(observeMutationsRoot, {
|
|
1445
|
+
childList: true,
|
|
1446
|
+
attributes: true,
|
|
1447
|
+
characterData: true,
|
|
1448
|
+
subtree: true
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
function disconnect() {
|
|
1452
|
+
if (!mo)
|
|
1453
|
+
return;
|
|
1454
|
+
mo.disconnect();
|
|
1455
|
+
}
|
|
1456
|
+
function styleParser(node) {
|
|
1457
|
+
var style = node.getAttribute("style");
|
|
1458
|
+
var val = [];
|
|
1459
|
+
if (style) {
|
|
1460
|
+
val = style.split(";").reduce(function(acc, style2) {
|
|
1461
|
+
var styles2 = style2.split(":");
|
|
1462
|
+
var prop = styles2[0];
|
|
1463
|
+
var value = styles2.slice(1);
|
|
1464
|
+
if (prop && value.length > 0) {
|
|
1465
|
+
acc[prop] = value.join(":").trim();
|
|
1466
|
+
}
|
|
1467
|
+
return acc;
|
|
1468
|
+
}, {});
|
|
1469
|
+
}
|
|
1470
|
+
return val;
|
|
1471
|
+
}
|
|
1472
|
+
function classParser(node) {
|
|
1473
|
+
var existingPrefix = node.getAttribute("data-prefix");
|
|
1474
|
+
var existingIconName = node.getAttribute("data-icon");
|
|
1475
|
+
var innerText = node.innerText !== void 0 ? node.innerText.trim() : "";
|
|
1476
|
+
var val = getCanonicalIcon(classArray(node));
|
|
1477
|
+
if (!val.prefix) {
|
|
1478
|
+
val.prefix = getDefaultUsablePrefix();
|
|
1479
|
+
}
|
|
1480
|
+
if (existingPrefix && existingIconName) {
|
|
1481
|
+
val.prefix = existingPrefix;
|
|
1482
|
+
val.iconName = existingIconName;
|
|
1483
|
+
}
|
|
1484
|
+
if (val.iconName && val.prefix) {
|
|
1485
|
+
return val;
|
|
1486
|
+
}
|
|
1487
|
+
if (val.prefix && innerText.length > 0) {
|
|
1488
|
+
val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
|
|
1489
|
+
}
|
|
1490
|
+
return val;
|
|
1491
|
+
}
|
|
1492
|
+
function attributesParser(node) {
|
|
1493
|
+
var extraAttributes = toArray(node.attributes).reduce(function(acc, attr) {
|
|
1494
|
+
if (acc.name !== "class" && acc.name !== "style") {
|
|
1495
|
+
acc[attr.name] = attr.value;
|
|
1496
|
+
}
|
|
1497
|
+
return acc;
|
|
1498
|
+
}, {});
|
|
1499
|
+
var title = node.getAttribute("title");
|
|
1500
|
+
var titleId = node.getAttribute("data-fa-title-id");
|
|
1501
|
+
if (config.autoA11y) {
|
|
1502
|
+
if (title) {
|
|
1503
|
+
extraAttributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
1504
|
+
} else {
|
|
1505
|
+
extraAttributes["aria-hidden"] = "true";
|
|
1506
|
+
extraAttributes["focusable"] = "false";
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
return extraAttributes;
|
|
1510
|
+
}
|
|
1511
|
+
function blankMeta() {
|
|
1512
|
+
return {
|
|
1513
|
+
iconName: null,
|
|
1514
|
+
title: null,
|
|
1515
|
+
titleId: null,
|
|
1516
|
+
prefix: null,
|
|
1517
|
+
transform: meaninglessTransform,
|
|
1518
|
+
symbol: false,
|
|
1519
|
+
mask: {
|
|
1520
|
+
iconName: null,
|
|
1521
|
+
prefix: null,
|
|
1522
|
+
rest: []
|
|
1523
|
+
},
|
|
1524
|
+
maskId: null,
|
|
1525
|
+
extra: {
|
|
1526
|
+
classes: [],
|
|
1527
|
+
styles: {},
|
|
1528
|
+
attributes: {}
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
function parseMeta(node) {
|
|
1533
|
+
var parser = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
1534
|
+
styleParser: true
|
|
1535
|
+
};
|
|
1536
|
+
var _classParser = classParser(node), iconName = _classParser.iconName, prefix = _classParser.prefix, extraClasses = _classParser.rest;
|
|
1537
|
+
var extraAttributes = attributesParser(node);
|
|
1538
|
+
var pluginMeta = chainHooks("parseNodeAttributes", {}, node);
|
|
1539
|
+
var extraStyles = parser.styleParser ? styleParser(node) : [];
|
|
1540
|
+
return _objectSpread2({
|
|
1541
|
+
iconName,
|
|
1542
|
+
title: node.getAttribute("title"),
|
|
1543
|
+
titleId: node.getAttribute("data-fa-title-id"),
|
|
1544
|
+
prefix,
|
|
1545
|
+
transform: meaninglessTransform,
|
|
1546
|
+
mask: {
|
|
1547
|
+
iconName: null,
|
|
1548
|
+
prefix: null,
|
|
1549
|
+
rest: []
|
|
1550
|
+
},
|
|
1551
|
+
maskId: null,
|
|
1552
|
+
symbol: false,
|
|
1553
|
+
extra: {
|
|
1554
|
+
classes: extraClasses,
|
|
1555
|
+
styles: extraStyles,
|
|
1556
|
+
attributes: extraAttributes
|
|
1557
|
+
}
|
|
1558
|
+
}, pluginMeta);
|
|
1559
|
+
}
|
|
1560
|
+
var styles$2 = namespace.styles;
|
|
1561
|
+
function generateMutation(node) {
|
|
1562
|
+
var nodeMeta = config.autoReplaceSvg === "nest" ? parseMeta(node, {
|
|
1563
|
+
styleParser: false
|
|
1564
|
+
}) : parseMeta(node);
|
|
1565
|
+
if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
|
|
1566
|
+
return callProvided("generateLayersText", node, nodeMeta);
|
|
1567
|
+
} else {
|
|
1568
|
+
return callProvided("generateSvgReplacementMutation", node, nodeMeta);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
function onTree(root) {
|
|
1572
|
+
var callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1573
|
+
if (!IS_DOM)
|
|
1574
|
+
return Promise.resolve();
|
|
1575
|
+
var htmlClassList = DOCUMENT.documentElement.classList;
|
|
1576
|
+
var hclAdd = function hclAdd2(suffix) {
|
|
1577
|
+
return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
1578
|
+
};
|
|
1579
|
+
var hclRemove = function hclRemove2(suffix) {
|
|
1580
|
+
return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
|
|
1581
|
+
};
|
|
1582
|
+
var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$2);
|
|
1583
|
+
var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function(p2) {
|
|
1584
|
+
return ".".concat(p2, ":not([").concat(DATA_FA_I2SVG, "])");
|
|
1585
|
+
})).join(", ");
|
|
1586
|
+
if (prefixesDomQuery.length === 0) {
|
|
1587
|
+
return Promise.resolve();
|
|
1588
|
+
}
|
|
1589
|
+
var candidates = [];
|
|
1590
|
+
try {
|
|
1591
|
+
candidates = toArray(root.querySelectorAll(prefixesDomQuery));
|
|
1592
|
+
} catch (e) {
|
|
1593
|
+
}
|
|
1594
|
+
if (candidates.length > 0) {
|
|
1595
|
+
hclAdd("pending");
|
|
1596
|
+
hclRemove("complete");
|
|
1597
|
+
} else {
|
|
1598
|
+
return Promise.resolve();
|
|
1599
|
+
}
|
|
1600
|
+
var mark = perf.begin("onTree");
|
|
1601
|
+
var mutations = candidates.reduce(function(acc, node) {
|
|
1602
|
+
try {
|
|
1603
|
+
var mutation = generateMutation(node);
|
|
1604
|
+
if (mutation) {
|
|
1605
|
+
acc.push(mutation);
|
|
1606
|
+
}
|
|
1607
|
+
} catch (e) {
|
|
1608
|
+
if (!PRODUCTION$1) {
|
|
1609
|
+
if (e.name === "MissingIcon") {
|
|
1610
|
+
console.error(e);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
return acc;
|
|
1615
|
+
}, []);
|
|
1616
|
+
return new Promise(function(resolve, reject) {
|
|
1617
|
+
Promise.all(mutations).then(function(resolvedMutations) {
|
|
1618
|
+
perform(resolvedMutations, function() {
|
|
1619
|
+
hclAdd("active");
|
|
1620
|
+
hclAdd("complete");
|
|
1621
|
+
hclRemove("pending");
|
|
1622
|
+
if (typeof callback === "function")
|
|
1623
|
+
callback();
|
|
1624
|
+
mark();
|
|
1625
|
+
resolve();
|
|
1626
|
+
});
|
|
1627
|
+
}).catch(function(e) {
|
|
1628
|
+
mark();
|
|
1629
|
+
reject(e);
|
|
1630
|
+
});
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
function onNode(node) {
|
|
1634
|
+
var callback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1635
|
+
generateMutation(node).then(function(mutation) {
|
|
1636
|
+
if (mutation) {
|
|
1637
|
+
perform([mutation], callback);
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
function resolveIcons(next) {
|
|
1642
|
+
return function(maybeIconDefinition) {
|
|
1643
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1644
|
+
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
1645
|
+
var mask = params.mask;
|
|
1646
|
+
if (mask) {
|
|
1647
|
+
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
1648
|
+
}
|
|
1649
|
+
return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
|
|
1650
|
+
mask
|
|
1651
|
+
}));
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
var render = function render2(iconDefinition) {
|
|
1655
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1656
|
+
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$symbol = params.symbol, symbol = _params$symbol === void 0 ? false : _params$symbol, _params$mask = params.mask, mask = _params$mask === void 0 ? null : _params$mask, _params$maskId = params.maskId, maskId = _params$maskId === void 0 ? null : _params$maskId, _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$titleId = params.titleId, titleId = _params$titleId === void 0 ? null : _params$titleId, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1657
|
+
if (!iconDefinition)
|
|
1658
|
+
return;
|
|
1659
|
+
var prefix = iconDefinition.prefix, iconName = iconDefinition.iconName, icon3 = iconDefinition.icon;
|
|
1660
|
+
return domVariants(_objectSpread2({
|
|
1661
|
+
type: "icon"
|
|
1662
|
+
}, iconDefinition), function() {
|
|
1663
|
+
callHooks("beforeDOMElementCreation", {
|
|
1664
|
+
iconDefinition,
|
|
1665
|
+
params
|
|
1666
|
+
});
|
|
1667
|
+
if (config.autoA11y) {
|
|
1668
|
+
if (title) {
|
|
1669
|
+
attributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
1670
|
+
} else {
|
|
1671
|
+
attributes["aria-hidden"] = "true";
|
|
1672
|
+
attributes["focusable"] = "false";
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
return makeInlineSvgAbstract({
|
|
1676
|
+
icons: {
|
|
1677
|
+
main: asFoundIcon(icon3),
|
|
1678
|
+
mask: mask ? asFoundIcon(mask.icon) : {
|
|
1679
|
+
found: false,
|
|
1680
|
+
width: null,
|
|
1681
|
+
height: null,
|
|
1682
|
+
icon: {}
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
prefix,
|
|
1686
|
+
iconName,
|
|
1687
|
+
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
1688
|
+
symbol,
|
|
1689
|
+
title,
|
|
1690
|
+
maskId,
|
|
1691
|
+
titleId,
|
|
1692
|
+
extra: {
|
|
1693
|
+
attributes,
|
|
1694
|
+
styles: styles2,
|
|
1695
|
+
classes
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
});
|
|
1699
|
+
};
|
|
1700
|
+
var ReplaceElements = {
|
|
1701
|
+
mixout: function mixout2() {
|
|
1702
|
+
return {
|
|
1703
|
+
icon: resolveIcons(render)
|
|
1704
|
+
};
|
|
1705
|
+
},
|
|
1706
|
+
hooks: function hooks2() {
|
|
1707
|
+
return {
|
|
1708
|
+
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
1709
|
+
accumulator.treeCallback = onTree;
|
|
1710
|
+
accumulator.nodeCallback = onNode;
|
|
1711
|
+
return accumulator;
|
|
1712
|
+
}
|
|
1713
|
+
};
|
|
1714
|
+
},
|
|
1715
|
+
provides: function provides(providers$$1) {
|
|
1716
|
+
providers$$1.i2svg = function(params) {
|
|
1717
|
+
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node, _params$callback = params.callback, callback = _params$callback === void 0 ? function() {
|
|
1718
|
+
} : _params$callback;
|
|
1719
|
+
return onTree(node, callback);
|
|
1720
|
+
};
|
|
1721
|
+
providers$$1.generateSvgReplacementMutation = function(node, nodeMeta) {
|
|
1722
|
+
var iconName = nodeMeta.iconName, title = nodeMeta.title, titleId = nodeMeta.titleId, prefix = nodeMeta.prefix, transform = nodeMeta.transform, symbol = nodeMeta.symbol, mask = nodeMeta.mask, maskId = nodeMeta.maskId, extra = nodeMeta.extra;
|
|
1723
|
+
return new Promise(function(resolve, reject) {
|
|
1724
|
+
Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
|
|
1725
|
+
found: false,
|
|
1726
|
+
width: 512,
|
|
1727
|
+
height: 512,
|
|
1728
|
+
icon: {}
|
|
1729
|
+
})]).then(function(_ref2) {
|
|
1730
|
+
var _ref22 = _slicedToArray(_ref2, 2), main = _ref22[0], mask2 = _ref22[1];
|
|
1731
|
+
resolve([node, makeInlineSvgAbstract({
|
|
1732
|
+
icons: {
|
|
1733
|
+
main,
|
|
1734
|
+
mask: mask2
|
|
1735
|
+
},
|
|
1736
|
+
prefix,
|
|
1737
|
+
iconName,
|
|
1738
|
+
transform,
|
|
1739
|
+
symbol,
|
|
1740
|
+
maskId,
|
|
1741
|
+
title,
|
|
1742
|
+
titleId,
|
|
1743
|
+
extra,
|
|
1744
|
+
watchable: true
|
|
1745
|
+
})]);
|
|
1746
|
+
}).catch(reject);
|
|
1747
|
+
});
|
|
1748
|
+
};
|
|
1749
|
+
providers$$1.generateAbstractIcon = function(_ref3) {
|
|
1750
|
+
var children = _ref3.children, attributes = _ref3.attributes, main = _ref3.main, transform = _ref3.transform, styles2 = _ref3.styles;
|
|
1751
|
+
var styleString = joinStyles(styles2);
|
|
1752
|
+
if (styleString.length > 0) {
|
|
1753
|
+
attributes["style"] = styleString;
|
|
1754
|
+
}
|
|
1755
|
+
var nextChild;
|
|
1756
|
+
if (transformIsMeaningful(transform)) {
|
|
1757
|
+
nextChild = callProvided("generateAbstractTransformGrouping", {
|
|
1758
|
+
main,
|
|
1759
|
+
transform,
|
|
1760
|
+
containerWidth: main.width,
|
|
1761
|
+
iconWidth: main.width
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
children.push(nextChild || main.icon);
|
|
1765
|
+
return {
|
|
1766
|
+
children,
|
|
1767
|
+
attributes
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
var Layers = {
|
|
1773
|
+
mixout: function mixout3() {
|
|
1774
|
+
return {
|
|
1775
|
+
layer: function layer(assembler) {
|
|
1776
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1777
|
+
var _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes;
|
|
1778
|
+
return domVariants({
|
|
1779
|
+
type: "layer"
|
|
1780
|
+
}, function() {
|
|
1781
|
+
callHooks("beforeDOMElementCreation", {
|
|
1782
|
+
assembler,
|
|
1783
|
+
params
|
|
1784
|
+
});
|
|
1785
|
+
var children = [];
|
|
1786
|
+
assembler(function(args) {
|
|
1787
|
+
Array.isArray(args) ? args.map(function(a) {
|
|
1788
|
+
children = children.concat(a.abstract);
|
|
1789
|
+
}) : children = children.concat(args.abstract);
|
|
1790
|
+
});
|
|
1791
|
+
return [{
|
|
1792
|
+
tag: "span",
|
|
1793
|
+
attributes: {
|
|
1794
|
+
class: ["".concat(config.familyPrefix, "-layers")].concat(_toConsumableArray(classes)).join(" ")
|
|
1795
|
+
},
|
|
1796
|
+
children
|
|
1797
|
+
}];
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
};
|
|
1803
|
+
var LayersCounter = {
|
|
1804
|
+
mixout: function mixout4() {
|
|
1805
|
+
return {
|
|
1806
|
+
counter: function counter(content) {
|
|
1807
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1808
|
+
var _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1809
|
+
return domVariants({
|
|
1810
|
+
type: "counter",
|
|
1811
|
+
content
|
|
1812
|
+
}, function() {
|
|
1813
|
+
callHooks("beforeDOMElementCreation", {
|
|
1814
|
+
content,
|
|
1815
|
+
params
|
|
1816
|
+
});
|
|
1817
|
+
return makeLayersCounterAbstract({
|
|
1818
|
+
content: content.toString(),
|
|
1819
|
+
title,
|
|
1820
|
+
extra: {
|
|
1821
|
+
attributes,
|
|
1822
|
+
styles: styles2,
|
|
1823
|
+
classes: ["".concat(config.familyPrefix, "-layers-counter")].concat(_toConsumableArray(classes))
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1831
|
+
var LayersText = {
|
|
1832
|
+
mixout: function mixout5() {
|
|
1833
|
+
return {
|
|
1834
|
+
text: function text2(content) {
|
|
1835
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1836
|
+
var _params$transform = params.transform, transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
1837
|
+
return domVariants({
|
|
1838
|
+
type: "text",
|
|
1839
|
+
content
|
|
1840
|
+
}, function() {
|
|
1841
|
+
callHooks("beforeDOMElementCreation", {
|
|
1842
|
+
content,
|
|
1843
|
+
params
|
|
1844
|
+
});
|
|
1845
|
+
return makeLayersTextAbstract({
|
|
1846
|
+
content,
|
|
1847
|
+
transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
|
|
1848
|
+
title,
|
|
1849
|
+
extra: {
|
|
1850
|
+
attributes,
|
|
1851
|
+
styles: styles2,
|
|
1852
|
+
classes: ["".concat(config.familyPrefix, "-layers-text")].concat(_toConsumableArray(classes))
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
};
|
|
1858
|
+
},
|
|
1859
|
+
provides: function provides2(providers$$1) {
|
|
1860
|
+
providers$$1.generateLayersText = function(node, nodeMeta) {
|
|
1861
|
+
var title = nodeMeta.title, transform = nodeMeta.transform, extra = nodeMeta.extra;
|
|
1862
|
+
var width = null;
|
|
1863
|
+
var height = null;
|
|
1864
|
+
if (IS_IE) {
|
|
1865
|
+
var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
|
|
1866
|
+
var boundingClientRect = node.getBoundingClientRect();
|
|
1867
|
+
width = boundingClientRect.width / computedFontSize;
|
|
1868
|
+
height = boundingClientRect.height / computedFontSize;
|
|
1869
|
+
}
|
|
1870
|
+
if (config.autoA11y && !title) {
|
|
1871
|
+
extra.attributes["aria-hidden"] = "true";
|
|
1872
|
+
}
|
|
1873
|
+
return Promise.resolve([node, makeLayersTextAbstract({
|
|
1874
|
+
content: node.innerHTML,
|
|
1875
|
+
width,
|
|
1876
|
+
height,
|
|
1877
|
+
transform,
|
|
1878
|
+
title,
|
|
1879
|
+
extra,
|
|
1880
|
+
watchable: true
|
|
1881
|
+
})]);
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1885
|
+
var CLEAN_CONTENT_PATTERN = new RegExp('"', "ug");
|
|
1886
|
+
var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
|
|
1887
|
+
function hexValueFromContent(content) {
|
|
1888
|
+
var cleaned = content.replace(CLEAN_CONTENT_PATTERN, "");
|
|
1889
|
+
var codePoint = codePointAt(cleaned, 0);
|
|
1890
|
+
var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
|
|
1891
|
+
var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
|
|
1892
|
+
return {
|
|
1893
|
+
value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
|
|
1894
|
+
isSecondary: isPrependTen || isDoubled
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
function replaceForPosition(node, position) {
|
|
1898
|
+
var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(":", "-"));
|
|
1899
|
+
return new Promise(function(resolve, reject) {
|
|
1900
|
+
if (node.getAttribute(pendingAttribute) !== null) {
|
|
1901
|
+
return resolve();
|
|
1902
|
+
}
|
|
1903
|
+
var children = toArray(node.children);
|
|
1904
|
+
var alreadyProcessedPseudoElement = children.filter(function(c) {
|
|
1905
|
+
return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
|
|
1906
|
+
})[0];
|
|
1907
|
+
var styles2 = WINDOW.getComputedStyle(node, position);
|
|
1908
|
+
var fontFamily = styles2.getPropertyValue("font-family").match(FONT_FAMILY_PATTERN);
|
|
1909
|
+
var fontWeight = styles2.getPropertyValue("font-weight");
|
|
1910
|
+
var content = styles2.getPropertyValue("content");
|
|
1911
|
+
if (alreadyProcessedPseudoElement && !fontFamily) {
|
|
1912
|
+
node.removeChild(alreadyProcessedPseudoElement);
|
|
1913
|
+
return resolve();
|
|
1914
|
+
} else if (fontFamily && content !== "none" && content !== "") {
|
|
1915
|
+
var _content = styles2.getPropertyValue("content");
|
|
1916
|
+
var prefix = ~["Solid", "Regular", "Light", "Thin", "Duotone", "Brands", "Kit"].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];
|
|
1917
|
+
var _hexValueFromContent = hexValueFromContent(_content), hexValue = _hexValueFromContent.value, isSecondary = _hexValueFromContent.isSecondary;
|
|
1918
|
+
var isV4 = fontFamily[0].startsWith("FontAwesome");
|
|
1919
|
+
var iconName = byUnicode(prefix, hexValue);
|
|
1920
|
+
var iconIdentifier = iconName;
|
|
1921
|
+
if (isV4) {
|
|
1922
|
+
var iconName4 = byOldUnicode(hexValue);
|
|
1923
|
+
if (iconName4.iconName && iconName4.prefix) {
|
|
1924
|
+
iconName = iconName4.iconName;
|
|
1925
|
+
prefix = iconName4.prefix;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
|
|
1929
|
+
node.setAttribute(pendingAttribute, iconIdentifier);
|
|
1930
|
+
if (alreadyProcessedPseudoElement) {
|
|
1931
|
+
node.removeChild(alreadyProcessedPseudoElement);
|
|
1932
|
+
}
|
|
1933
|
+
var meta = blankMeta();
|
|
1934
|
+
var extra = meta.extra;
|
|
1935
|
+
extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
|
|
1936
|
+
findIcon(iconName, prefix).then(function(main) {
|
|
1937
|
+
var abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
|
|
1938
|
+
icons: {
|
|
1939
|
+
main,
|
|
1940
|
+
mask: emptyCanonicalIcon()
|
|
1941
|
+
},
|
|
1942
|
+
prefix,
|
|
1943
|
+
iconName: iconIdentifier,
|
|
1944
|
+
extra,
|
|
1945
|
+
watchable: true
|
|
1946
|
+
}));
|
|
1947
|
+
var element = DOCUMENT.createElement("svg");
|
|
1948
|
+
if (position === "::before") {
|
|
1949
|
+
node.insertBefore(element, node.firstChild);
|
|
1950
|
+
} else {
|
|
1951
|
+
node.appendChild(element);
|
|
1952
|
+
}
|
|
1953
|
+
element.outerHTML = abstract.map(function(a) {
|
|
1954
|
+
return toHtml(a);
|
|
1955
|
+
}).join("\n");
|
|
1956
|
+
node.removeAttribute(pendingAttribute);
|
|
1957
|
+
resolve();
|
|
1958
|
+
}).catch(reject);
|
|
1959
|
+
} else {
|
|
1960
|
+
resolve();
|
|
1961
|
+
}
|
|
1962
|
+
} else {
|
|
1963
|
+
resolve();
|
|
1964
|
+
}
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
function replace2(node) {
|
|
1968
|
+
return Promise.all([replaceForPosition(node, "::before"), replaceForPosition(node, "::after")]);
|
|
1969
|
+
}
|
|
1970
|
+
function processable(node) {
|
|
1971
|
+
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");
|
|
1972
|
+
}
|
|
1973
|
+
function searchPseudoElements(root) {
|
|
1974
|
+
if (!IS_DOM)
|
|
1975
|
+
return;
|
|
1976
|
+
return new Promise(function(resolve, reject) {
|
|
1977
|
+
var operations = toArray(root.querySelectorAll("*")).filter(processable).map(replace2);
|
|
1978
|
+
var end3 = perf.begin("searchPseudoElements");
|
|
1979
|
+
disableObservation();
|
|
1980
|
+
Promise.all(operations).then(function() {
|
|
1981
|
+
end3();
|
|
1982
|
+
enableObservation();
|
|
1983
|
+
resolve();
|
|
1984
|
+
}).catch(function() {
|
|
1985
|
+
end3();
|
|
1986
|
+
enableObservation();
|
|
1987
|
+
reject();
|
|
1988
|
+
});
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
var PseudoElements = {
|
|
1992
|
+
hooks: function hooks3() {
|
|
1993
|
+
return {
|
|
1994
|
+
mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
|
|
1995
|
+
accumulator.pseudoElementsCallback = searchPseudoElements;
|
|
1996
|
+
return accumulator;
|
|
1997
|
+
}
|
|
1998
|
+
};
|
|
1999
|
+
},
|
|
2000
|
+
provides: function provides3(providers$$1) {
|
|
2001
|
+
providers$$1.pseudoElements2svg = function(params) {
|
|
2002
|
+
var _params$node = params.node, node = _params$node === void 0 ? DOCUMENT : _params$node;
|
|
2003
|
+
if (config.searchPseudoElements) {
|
|
2004
|
+
searchPseudoElements(node);
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
var _unwatched = false;
|
|
2010
|
+
var MutationObserver$1 = {
|
|
2011
|
+
mixout: function mixout6() {
|
|
2012
|
+
return {
|
|
2013
|
+
dom: {
|
|
2014
|
+
unwatch: function unwatch() {
|
|
2015
|
+
disableObservation();
|
|
2016
|
+
_unwatched = true;
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
},
|
|
2021
|
+
hooks: function hooks4() {
|
|
2022
|
+
return {
|
|
2023
|
+
bootstrap: function bootstrap() {
|
|
2024
|
+
observe(chainHooks("mutationObserverCallbacks", {}));
|
|
2025
|
+
},
|
|
2026
|
+
noAuto: function noAuto3() {
|
|
2027
|
+
disconnect();
|
|
2028
|
+
},
|
|
2029
|
+
watch: function watch3(params) {
|
|
2030
|
+
var observeMutationsRoot = params.observeMutationsRoot;
|
|
2031
|
+
if (_unwatched) {
|
|
2032
|
+
enableObservation();
|
|
2033
|
+
} else {
|
|
2034
|
+
observe(chainHooks("mutationObserverCallbacks", {
|
|
2035
|
+
observeMutationsRoot
|
|
2036
|
+
}));
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
var parseTransformString = function parseTransformString2(transformString) {
|
|
2043
|
+
var transform = {
|
|
2044
|
+
size: 16,
|
|
2045
|
+
x: 0,
|
|
2046
|
+
y: 0,
|
|
2047
|
+
flipX: false,
|
|
2048
|
+
flipY: false,
|
|
2049
|
+
rotate: 0
|
|
2050
|
+
};
|
|
2051
|
+
return transformString.toLowerCase().split(" ").reduce(function(acc, n) {
|
|
2052
|
+
var parts = n.toLowerCase().split("-");
|
|
2053
|
+
var first = parts[0];
|
|
2054
|
+
var rest = parts.slice(1).join("-");
|
|
2055
|
+
if (first && rest === "h") {
|
|
2056
|
+
acc.flipX = true;
|
|
2057
|
+
return acc;
|
|
2058
|
+
}
|
|
2059
|
+
if (first && rest === "v") {
|
|
2060
|
+
acc.flipY = true;
|
|
2061
|
+
return acc;
|
|
2062
|
+
}
|
|
2063
|
+
rest = parseFloat(rest);
|
|
2064
|
+
if (isNaN(rest)) {
|
|
2065
|
+
return acc;
|
|
2066
|
+
}
|
|
2067
|
+
switch (first) {
|
|
2068
|
+
case "grow":
|
|
2069
|
+
acc.size = acc.size + rest;
|
|
2070
|
+
break;
|
|
2071
|
+
case "shrink":
|
|
2072
|
+
acc.size = acc.size - rest;
|
|
2073
|
+
break;
|
|
2074
|
+
case "left":
|
|
2075
|
+
acc.x = acc.x - rest;
|
|
2076
|
+
break;
|
|
2077
|
+
case "right":
|
|
2078
|
+
acc.x = acc.x + rest;
|
|
2079
|
+
break;
|
|
2080
|
+
case "up":
|
|
2081
|
+
acc.y = acc.y - rest;
|
|
2082
|
+
break;
|
|
2083
|
+
case "down":
|
|
2084
|
+
acc.y = acc.y + rest;
|
|
2085
|
+
break;
|
|
2086
|
+
case "rotate":
|
|
2087
|
+
acc.rotate = acc.rotate + rest;
|
|
2088
|
+
break;
|
|
2089
|
+
}
|
|
2090
|
+
return acc;
|
|
2091
|
+
}, transform);
|
|
2092
|
+
};
|
|
2093
|
+
var PowerTransforms = {
|
|
2094
|
+
mixout: function mixout7() {
|
|
2095
|
+
return {
|
|
2096
|
+
parse: {
|
|
2097
|
+
transform: function transform(transformString) {
|
|
2098
|
+
return parseTransformString(transformString);
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
},
|
|
2103
|
+
hooks: function hooks5() {
|
|
2104
|
+
return {
|
|
2105
|
+
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2106
|
+
var transformString = node.getAttribute("data-fa-transform");
|
|
2107
|
+
if (transformString) {
|
|
2108
|
+
accumulator.transform = parseTransformString(transformString);
|
|
2109
|
+
}
|
|
2110
|
+
return accumulator;
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
},
|
|
2114
|
+
provides: function provides4(providers2) {
|
|
2115
|
+
providers2.generateAbstractTransformGrouping = function(_ref2) {
|
|
2116
|
+
var main = _ref2.main, transform = _ref2.transform, containerWidth = _ref2.containerWidth, iconWidth = _ref2.iconWidth;
|
|
2117
|
+
var outer = {
|
|
2118
|
+
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
2119
|
+
};
|
|
2120
|
+
var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
|
|
2121
|
+
var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
|
|
2122
|
+
var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
|
|
2123
|
+
var inner = {
|
|
2124
|
+
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
2125
|
+
};
|
|
2126
|
+
var path = {
|
|
2127
|
+
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
2128
|
+
};
|
|
2129
|
+
var operations = {
|
|
2130
|
+
outer,
|
|
2131
|
+
inner,
|
|
2132
|
+
path
|
|
2133
|
+
};
|
|
2134
|
+
return {
|
|
2135
|
+
tag: "g",
|
|
2136
|
+
attributes: _objectSpread2({}, operations.outer),
|
|
2137
|
+
children: [{
|
|
2138
|
+
tag: "g",
|
|
2139
|
+
attributes: _objectSpread2({}, operations.inner),
|
|
2140
|
+
children: [{
|
|
2141
|
+
tag: main.icon.tag,
|
|
2142
|
+
children: main.icon.children,
|
|
2143
|
+
attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
|
|
2144
|
+
}]
|
|
2145
|
+
}]
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
769
2148
|
}
|
|
770
|
-
|
|
2149
|
+
};
|
|
2150
|
+
var ALL_SPACE = {
|
|
2151
|
+
x: 0,
|
|
2152
|
+
y: 0,
|
|
2153
|
+
width: "100%",
|
|
2154
|
+
height: "100%"
|
|
2155
|
+
};
|
|
2156
|
+
function fillBlack(abstract) {
|
|
2157
|
+
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
2158
|
+
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
2159
|
+
abstract.attributes.fill = "black";
|
|
2160
|
+
}
|
|
2161
|
+
return abstract;
|
|
771
2162
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
2163
|
+
function deGroup(abstract) {
|
|
2164
|
+
if (abstract.tag === "g") {
|
|
2165
|
+
return abstract.children;
|
|
2166
|
+
} else {
|
|
2167
|
+
return [abstract];
|
|
776
2168
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
2169
|
+
}
|
|
2170
|
+
var Masks = {
|
|
2171
|
+
hooks: function hooks6() {
|
|
2172
|
+
return {
|
|
2173
|
+
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2174
|
+
var maskData = node.getAttribute("data-fa-mask");
|
|
2175
|
+
var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(" ").map(function(i) {
|
|
2176
|
+
return i.trim();
|
|
2177
|
+
}));
|
|
2178
|
+
if (!mask.prefix) {
|
|
2179
|
+
mask.prefix = getDefaultUsablePrefix();
|
|
2180
|
+
}
|
|
2181
|
+
accumulator.mask = mask;
|
|
2182
|
+
accumulator.maskId = node.getAttribute("data-fa-mask-id");
|
|
2183
|
+
return accumulator;
|
|
783
2184
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
2185
|
+
};
|
|
2186
|
+
},
|
|
2187
|
+
provides: function provides5(providers2) {
|
|
2188
|
+
providers2.generateAbstractMask = function(_ref2) {
|
|
2189
|
+
var children = _ref2.children, attributes = _ref2.attributes, main = _ref2.main, mask = _ref2.mask, explicitMaskId = _ref2.maskId, transform = _ref2.transform;
|
|
2190
|
+
var mainWidth = main.width, mainPath = main.icon;
|
|
2191
|
+
var maskWidth = mask.width, maskPath = mask.icon;
|
|
2192
|
+
var trans = transformForSvg({
|
|
2193
|
+
transform,
|
|
2194
|
+
containerWidth: maskWidth,
|
|
2195
|
+
iconWidth: mainWidth
|
|
789
2196
|
});
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
2197
|
+
var maskRect = {
|
|
2198
|
+
tag: "rect",
|
|
2199
|
+
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2200
|
+
fill: "white"
|
|
2201
|
+
})
|
|
2202
|
+
};
|
|
2203
|
+
var maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
2204
|
+
children: mainPath.children.map(fillBlack)
|
|
2205
|
+
} : {};
|
|
2206
|
+
var maskInnerGroup = {
|
|
2207
|
+
tag: "g",
|
|
2208
|
+
attributes: _objectSpread2({}, trans.inner),
|
|
2209
|
+
children: [fillBlack(_objectSpread2({
|
|
2210
|
+
tag: mainPath.tag,
|
|
2211
|
+
attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
|
|
2212
|
+
}, maskInnerGroupChildrenMixin))]
|
|
2213
|
+
};
|
|
2214
|
+
var maskOuterGroup = {
|
|
2215
|
+
tag: "g",
|
|
2216
|
+
attributes: _objectSpread2({}, trans.outer),
|
|
2217
|
+
children: [maskInnerGroup]
|
|
2218
|
+
};
|
|
2219
|
+
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
2220
|
+
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
2221
|
+
var maskTag = {
|
|
2222
|
+
tag: "mask",
|
|
2223
|
+
attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
|
|
2224
|
+
id: maskId,
|
|
2225
|
+
maskUnits: "userSpaceOnUse",
|
|
2226
|
+
maskContentUnits: "userSpaceOnUse"
|
|
2227
|
+
}),
|
|
2228
|
+
children: [maskRect, maskOuterGroup]
|
|
2229
|
+
};
|
|
2230
|
+
var defs = {
|
|
2231
|
+
tag: "defs",
|
|
2232
|
+
children: [{
|
|
2233
|
+
tag: "clipPath",
|
|
2234
|
+
attributes: {
|
|
2235
|
+
id: clipId
|
|
2236
|
+
},
|
|
2237
|
+
children: deGroup(maskPath)
|
|
2238
|
+
}, maskTag]
|
|
2239
|
+
};
|
|
2240
|
+
children.push(defs, {
|
|
2241
|
+
tag: "rect",
|
|
2242
|
+
attributes: _objectSpread2({
|
|
2243
|
+
fill: "currentColor",
|
|
2244
|
+
"clip-path": "url(#".concat(clipId, ")"),
|
|
2245
|
+
mask: "url(#".concat(maskId, ")")
|
|
2246
|
+
}, ALL_SPACE)
|
|
807
2247
|
});
|
|
808
|
-
return
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
813
|
-
function ensureCss() {
|
|
814
|
-
if (config.autoAddCss && !_cssInserted) {
|
|
815
|
-
insertCss(css());
|
|
816
|
-
_cssInserted = true;
|
|
2248
|
+
return {
|
|
2249
|
+
children,
|
|
2250
|
+
attributes
|
|
2251
|
+
};
|
|
2252
|
+
};
|
|
817
2253
|
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
get: function get() {
|
|
825
|
-
return val.abstract.map(function(a) {
|
|
826
|
-
return toHtml(a);
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
});
|
|
830
|
-
Object.defineProperty(val, "node", {
|
|
831
|
-
get: function get() {
|
|
832
|
-
if (!IS_DOM)
|
|
833
|
-
return;
|
|
834
|
-
var container = DOCUMENT.createElement("div");
|
|
835
|
-
container.innerHTML = val.html;
|
|
836
|
-
return container.children;
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
return val;
|
|
840
|
-
}
|
|
841
|
-
function findIconDefinition(iconLookup) {
|
|
842
|
-
var _iconLookup$prefix = iconLookup.prefix, prefix = _iconLookup$prefix === void 0 ? "fa" : _iconLookup$prefix, iconName = iconLookup.iconName;
|
|
843
|
-
if (!iconName)
|
|
844
|
-
return;
|
|
845
|
-
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
846
|
-
}
|
|
847
|
-
function resolveIcons(next) {
|
|
848
|
-
return function(maybeIconDefinition) {
|
|
849
|
-
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
850
|
-
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
851
|
-
var mask = params.mask;
|
|
852
|
-
if (mask) {
|
|
853
|
-
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
2254
|
+
};
|
|
2255
|
+
var MissingIconIndicator = {
|
|
2256
|
+
provides: function provides6(providers2) {
|
|
2257
|
+
var reduceMotion = false;
|
|
2258
|
+
if (WINDOW.matchMedia) {
|
|
2259
|
+
reduceMotion = WINDOW.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
854
2260
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
var
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
2261
|
+
providers2.missingIconAbstract = function() {
|
|
2262
|
+
var gChildren = [];
|
|
2263
|
+
var FILL = {
|
|
2264
|
+
fill: "currentColor"
|
|
2265
|
+
};
|
|
2266
|
+
var ANIMATION_BASE = {
|
|
2267
|
+
attributeType: "XML",
|
|
2268
|
+
repeatCount: "indefinite",
|
|
2269
|
+
dur: "2s"
|
|
2270
|
+
};
|
|
2271
|
+
gChildren.push({
|
|
2272
|
+
tag: "path",
|
|
2273
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2274
|
+
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"
|
|
2275
|
+
})
|
|
2276
|
+
});
|
|
2277
|
+
var OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2278
|
+
attributeName: "opacity"
|
|
2279
|
+
});
|
|
2280
|
+
var dot = {
|
|
2281
|
+
tag: "circle",
|
|
2282
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2283
|
+
cx: "256",
|
|
2284
|
+
cy: "364",
|
|
2285
|
+
r: "28"
|
|
2286
|
+
}),
|
|
2287
|
+
children: []
|
|
2288
|
+
};
|
|
2289
|
+
if (!reduceMotion) {
|
|
2290
|
+
dot.children.push({
|
|
2291
|
+
tag: "animate",
|
|
2292
|
+
attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
|
|
2293
|
+
attributeName: "r",
|
|
2294
|
+
values: "28;14;28;28;14;28;"
|
|
2295
|
+
})
|
|
2296
|
+
}, {
|
|
2297
|
+
tag: "animate",
|
|
2298
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2299
|
+
values: "1;0;1;1;0;1;"
|
|
2300
|
+
})
|
|
2301
|
+
});
|
|
2302
|
+
}
|
|
2303
|
+
gChildren.push(dot);
|
|
2304
|
+
gChildren.push({
|
|
2305
|
+
tag: "path",
|
|
2306
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2307
|
+
opacity: "1",
|
|
2308
|
+
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"
|
|
2309
|
+
}),
|
|
2310
|
+
children: reduceMotion ? [] : [{
|
|
2311
|
+
tag: "animate",
|
|
2312
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2313
|
+
values: "1;0;0;0;0;1;"
|
|
2314
|
+
})
|
|
2315
|
+
}]
|
|
2316
|
+
});
|
|
2317
|
+
if (!reduceMotion) {
|
|
2318
|
+
gChildren.push({
|
|
2319
|
+
tag: "path",
|
|
2320
|
+
attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
|
|
2321
|
+
opacity: "0",
|
|
2322
|
+
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"
|
|
2323
|
+
}),
|
|
2324
|
+
children: [{
|
|
2325
|
+
tag: "animate",
|
|
2326
|
+
attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
|
|
2327
|
+
values: "0;0;1;1;0;0;"
|
|
2328
|
+
})
|
|
2329
|
+
}]
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
return {
|
|
2333
|
+
tag: "g",
|
|
2334
|
+
attributes: {
|
|
2335
|
+
"class": "missing"
|
|
2336
|
+
},
|
|
2337
|
+
children: gChildren
|
|
2338
|
+
};
|
|
2339
|
+
};
|
|
865
2340
|
}
|
|
866
2341
|
};
|
|
867
|
-
var
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}, iconDefinition), function() {
|
|
876
|
-
ensureCss();
|
|
877
|
-
if (config.autoA11y) {
|
|
878
|
-
if (title) {
|
|
879
|
-
attributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
880
|
-
} else {
|
|
881
|
-
attributes["aria-hidden"] = "true";
|
|
882
|
-
attributes["focusable"] = "false";
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
return makeInlineSvgAbstract({
|
|
886
|
-
icons: {
|
|
887
|
-
main: asFoundIcon(icon2),
|
|
888
|
-
mask: mask ? asFoundIcon(mask.icon) : {
|
|
889
|
-
found: false,
|
|
890
|
-
width: null,
|
|
891
|
-
height: null,
|
|
892
|
-
icon: {}
|
|
893
|
-
}
|
|
894
|
-
},
|
|
895
|
-
prefix,
|
|
896
|
-
iconName,
|
|
897
|
-
transform: _objectSpread({}, meaninglessTransform, transform2),
|
|
898
|
-
symbol,
|
|
899
|
-
title,
|
|
900
|
-
maskId,
|
|
901
|
-
titleId,
|
|
902
|
-
extra: {
|
|
903
|
-
attributes,
|
|
904
|
-
styles: styles2,
|
|
905
|
-
classes
|
|
2342
|
+
var SvgSymbols = {
|
|
2343
|
+
hooks: function hooks7() {
|
|
2344
|
+
return {
|
|
2345
|
+
parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
|
|
2346
|
+
var symbolData = node.getAttribute("data-fa-symbol");
|
|
2347
|
+
var symbol = symbolData === null ? false : symbolData === "" ? true : symbolData;
|
|
2348
|
+
accumulator["symbol"] = symbol;
|
|
2349
|
+
return accumulator;
|
|
906
2350
|
}
|
|
907
|
-
}
|
|
908
|
-
}
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
};
|
|
2354
|
+
var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
|
|
2355
|
+
registerPlugins(plugins, {
|
|
2356
|
+
mixoutsTo: api
|
|
909
2357
|
});
|
|
2358
|
+
api.noAuto;
|
|
2359
|
+
var config$1 = api.config;
|
|
2360
|
+
api.library;
|
|
2361
|
+
api.dom;
|
|
2362
|
+
var parse$1 = api.parse;
|
|
2363
|
+
api.findIconDefinition;
|
|
2364
|
+
api.toHtml;
|
|
2365
|
+
var icon2 = api.icon;
|
|
2366
|
+
api.layer;
|
|
2367
|
+
var text = api.text;
|
|
2368
|
+
api.counter;
|
|
910
2369
|
var commonjsGlobal = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
911
2370
|
function createCommonjsModule(fn, module) {
|
|
912
2371
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -1052,68 +2511,67 @@ var objectWithoutProperties = function(obj, keys) {
|
|
|
1052
2511
|
}
|
|
1053
2512
|
return target;
|
|
1054
2513
|
};
|
|
2514
|
+
var toConsumableArray = function(arr) {
|
|
2515
|
+
if (Array.isArray(arr)) {
|
|
2516
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++)
|
|
2517
|
+
arr2[i] = arr[i];
|
|
2518
|
+
return arr2;
|
|
2519
|
+
} else {
|
|
2520
|
+
return Array.from(arr);
|
|
2521
|
+
}
|
|
2522
|
+
};
|
|
1055
2523
|
function styleToObject(style) {
|
|
1056
2524
|
return style.split(";").map(function(s) {
|
|
1057
2525
|
return s.trim();
|
|
1058
2526
|
}).filter(function(s) {
|
|
1059
2527
|
return s;
|
|
1060
|
-
}).reduce(function(
|
|
1061
|
-
var
|
|
1062
|
-
var prop = humps.camelize(pair.slice(0,
|
|
1063
|
-
var value = pair.slice(
|
|
1064
|
-
|
|
1065
|
-
return
|
|
2528
|
+
}).reduce(function(output, pair) {
|
|
2529
|
+
var idx = pair.indexOf(":");
|
|
2530
|
+
var prop = humps.camelize(pair.slice(0, idx));
|
|
2531
|
+
var value = pair.slice(idx + 1).trim();
|
|
2532
|
+
output[prop] = value;
|
|
2533
|
+
return output;
|
|
1066
2534
|
}, {});
|
|
1067
2535
|
}
|
|
1068
|
-
function classToObject(
|
|
1069
|
-
return
|
|
1070
|
-
|
|
1071
|
-
return
|
|
2536
|
+
function classToObject(classes) {
|
|
2537
|
+
return classes.split(/\s+/).reduce(function(output, className) {
|
|
2538
|
+
output[className] = true;
|
|
2539
|
+
return output;
|
|
1072
2540
|
}, {});
|
|
1073
2541
|
}
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1076
|
-
|
|
2542
|
+
function convert(abstractElement) {
|
|
2543
|
+
var props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2544
|
+
var attrs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2545
|
+
if (typeof abstractElement === "string") {
|
|
2546
|
+
return abstractElement;
|
|
1077
2547
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
}
|
|
1084
|
-
return acc;
|
|
1085
|
-
}, []);
|
|
1086
|
-
}
|
|
1087
|
-
function convert(h, element) {
|
|
1088
|
-
var props = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1089
|
-
var data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1090
|
-
var children = (element.children || []).map(convert.bind(null, h));
|
|
1091
|
-
var mixins = Object.keys(element.attributes || {}).reduce(function(acc, key) {
|
|
1092
|
-
var val = element.attributes[key];
|
|
2548
|
+
var children = (abstractElement.children || []).map(function(child) {
|
|
2549
|
+
return convert(child);
|
|
2550
|
+
});
|
|
2551
|
+
var mixins = Object.keys(abstractElement.attributes || {}).reduce(function(mixins2, key) {
|
|
2552
|
+
var value = abstractElement.attributes[key];
|
|
1093
2553
|
switch (key) {
|
|
1094
2554
|
case "class":
|
|
1095
|
-
|
|
2555
|
+
mixins2.class = classToObject(value);
|
|
1096
2556
|
break;
|
|
1097
2557
|
case "style":
|
|
1098
|
-
|
|
2558
|
+
mixins2.style = styleToObject(value);
|
|
1099
2559
|
break;
|
|
1100
2560
|
default:
|
|
1101
|
-
|
|
2561
|
+
mixins2.attrs[key] = value;
|
|
1102
2562
|
}
|
|
1103
|
-
return
|
|
1104
|
-
}, {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
},
|
|
1114
|
-
|
|
1115
|
-
}), children);
|
|
1116
|
-
}
|
|
2563
|
+
return mixins2;
|
|
2564
|
+
}, {
|
|
2565
|
+
attrs: {},
|
|
2566
|
+
class: {},
|
|
2567
|
+
style: {}
|
|
2568
|
+
});
|
|
2569
|
+
attrs.class;
|
|
2570
|
+
var _attrs$style = attrs.style, aStyle = _attrs$style === void 0 ? {} : _attrs$style, otherAttrs = objectWithoutProperties(attrs, ["class", "style"]);
|
|
2571
|
+
return h(abstractElement.tag, _extends({}, props, {
|
|
2572
|
+
class: mixins.class,
|
|
2573
|
+
style: _extends({}, mixins.style, aStyle)
|
|
2574
|
+
}, mixins.attrs, otherAttrs), children);
|
|
1117
2575
|
}
|
|
1118
2576
|
var PRODUCTION = false;
|
|
1119
2577
|
try {
|
|
@@ -1161,9 +2619,8 @@ function normalizeIconArgs(icon$$1) {
|
|
|
1161
2619
|
return { prefix: "fas", iconName: icon$$1 };
|
|
1162
2620
|
}
|
|
1163
2621
|
}
|
|
1164
|
-
var FontAwesomeIcon = {
|
|
2622
|
+
var FontAwesomeIcon = defineComponent({
|
|
1165
2623
|
name: "FontAwesomeIcon",
|
|
1166
|
-
functional: true,
|
|
1167
2624
|
props: {
|
|
1168
2625
|
border: {
|
|
1169
2626
|
type: Boolean,
|
|
@@ -1207,7 +2664,7 @@ var FontAwesomeIcon = {
|
|
|
1207
2664
|
type: [String, Number],
|
|
1208
2665
|
default: null,
|
|
1209
2666
|
validator: function validator3(value) {
|
|
1210
|
-
return [90, 180, 270].indexOf(parseInt(value, 10)) > -1;
|
|
2667
|
+
return [90, 180, 270].indexOf(Number.parseInt(value, 10)) > -1;
|
|
1211
2668
|
}
|
|
1212
2669
|
},
|
|
1213
2670
|
swapOpacity: {
|
|
@@ -1242,115 +2699,128 @@ var FontAwesomeIcon = {
|
|
|
1242
2699
|
default: false
|
|
1243
2700
|
}
|
|
1244
2701
|
},
|
|
1245
|
-
|
|
1246
|
-
var
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
var
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
return
|
|
2702
|
+
setup: function setup(props, _ref2) {
|
|
2703
|
+
var attrs = _ref2.attrs;
|
|
2704
|
+
var icon$$1 = computed(function() {
|
|
2705
|
+
return normalizeIconArgs(props.icon);
|
|
2706
|
+
});
|
|
2707
|
+
var classes = computed(function() {
|
|
2708
|
+
return objectWithKey("classes", classList(props));
|
|
2709
|
+
});
|
|
2710
|
+
var transform = computed(function() {
|
|
2711
|
+
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
|
|
2712
|
+
});
|
|
2713
|
+
var mask = computed(function() {
|
|
2714
|
+
return objectWithKey("mask", normalizeIconArgs(props.mask));
|
|
2715
|
+
});
|
|
2716
|
+
var renderedIcon = computed(function() {
|
|
2717
|
+
return icon2(icon$$1.value, _extends({}, classes.value, transform.value, mask.value, {
|
|
2718
|
+
symbol: props.symbol,
|
|
2719
|
+
title: props.title
|
|
2720
|
+
}));
|
|
2721
|
+
});
|
|
2722
|
+
watch(renderedIcon, function(value) {
|
|
2723
|
+
if (!value) {
|
|
2724
|
+
return log("Could not find one or more icon(s)", icon$$1.value, mask.value);
|
|
2725
|
+
}
|
|
2726
|
+
}, { immediate: true });
|
|
2727
|
+
var vnode = computed(function() {
|
|
2728
|
+
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null;
|
|
2729
|
+
});
|
|
2730
|
+
return function() {
|
|
2731
|
+
return vnode.value;
|
|
2732
|
+
};
|
|
2733
|
+
}
|
|
2734
|
+
});
|
|
2735
|
+
defineComponent({
|
|
2736
|
+
name: "FontAwesomeLayers",
|
|
2737
|
+
props: {
|
|
2738
|
+
fixedWidth: {
|
|
2739
|
+
type: Boolean,
|
|
2740
|
+
default: false
|
|
2741
|
+
}
|
|
2742
|
+
},
|
|
2743
|
+
setup: function setup2(props, _ref2) {
|
|
2744
|
+
var slots = _ref2.slots;
|
|
2745
|
+
var familyPrefix = config$1.familyPrefix;
|
|
2746
|
+
var className = computed(function() {
|
|
2747
|
+
return [familyPrefix + "-layers"].concat(toConsumableArray(props.fixedWidth ? [familyPrefix + "-fw"] : []));
|
|
2748
|
+
});
|
|
2749
|
+
return function() {
|
|
2750
|
+
return h("div", { class: className.value }, slots.default ? slots.default() : []);
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2753
|
+
});
|
|
2754
|
+
defineComponent({
|
|
2755
|
+
name: "FontAwesomeLayersText",
|
|
2756
|
+
props: {
|
|
2757
|
+
value: {
|
|
2758
|
+
type: [String, Number],
|
|
2759
|
+
default: ""
|
|
2760
|
+
},
|
|
2761
|
+
transform: {
|
|
2762
|
+
type: [String, Object],
|
|
2763
|
+
default: null
|
|
2764
|
+
},
|
|
2765
|
+
counter: {
|
|
2766
|
+
type: Boolean,
|
|
2767
|
+
default: false
|
|
2768
|
+
},
|
|
2769
|
+
position: {
|
|
2770
|
+
type: String,
|
|
2771
|
+
default: null,
|
|
2772
|
+
validator: function validator5(value) {
|
|
2773
|
+
return ["bottom-left", "bottom-right", "top-left", "top-right"].indexOf(value) > -1;
|
|
2774
|
+
}
|
|
1255
2775
|
}
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
2776
|
+
},
|
|
2777
|
+
setup: function setup3(props, _ref2) {
|
|
2778
|
+
var attrs = _ref2.attrs;
|
|
2779
|
+
var familyPrefix = config$1.familyPrefix;
|
|
2780
|
+
var classes = computed(function() {
|
|
2781
|
+
return objectWithKey("classes", [].concat(toConsumableArray(props.counter ? [familyPrefix + "-layers-counter"] : []), toConsumableArray(props.position ? [familyPrefix + "-layers-" + props.position] : [])));
|
|
2782
|
+
});
|
|
2783
|
+
var transform = computed(function() {
|
|
2784
|
+
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
|
|
2785
|
+
});
|
|
2786
|
+
var abstractElement = computed(function() {
|
|
2787
|
+
var _text = text(props.value.toString(), _extends({}, transform.value, classes.value)), abstract = _text.abstract;
|
|
2788
|
+
if (props.counter) {
|
|
2789
|
+
abstract[0].attributes.class = abstract[0].attributes.class.replace("fa-layers-text", "");
|
|
2790
|
+
}
|
|
2791
|
+
return abstract[0];
|
|
2792
|
+
});
|
|
2793
|
+
var vnode = computed(function() {
|
|
2794
|
+
return convert(abstractElement.value, {}, attrs);
|
|
2795
|
+
});
|
|
2796
|
+
return function() {
|
|
2797
|
+
return vnode.value;
|
|
2798
|
+
};
|
|
1259
2799
|
}
|
|
1260
|
-
};
|
|
2800
|
+
});
|
|
1261
2801
|
/*!
|
|
1262
|
-
* Font Awesome Free
|
|
2802
|
+
* Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com
|
|
1263
2803
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
2804
|
+
* Copyright 2022 Fonticons, Inc.
|
|
1264
2805
|
*/
|
|
1265
2806
|
var faCheck = {
|
|
1266
2807
|
prefix: "fas",
|
|
1267
2808
|
iconName: "check",
|
|
1268
|
-
icon: [
|
|
2809
|
+
icon: [448, 512, [10004, 10003], "f00c", "M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"]
|
|
1269
2810
|
};
|
|
1270
|
-
var render2 = function() {
|
|
1271
|
-
var _vm = this;
|
|
1272
|
-
var _h = _vm.$createElement;
|
|
1273
|
-
var _c = _vm._self._c || _h;
|
|
1274
|
-
return _c("label", _vm._g({ staticClass: "checkbox", class: { "checkbox-disabled": _vm.disabled } }, _vm.listeners), [_c("span", { staticClass: "checkbox-input", class: { "checkbox-checked": _vm.isChecked, "checkbox-focused": _vm.focused } }, [_c("font-awesome-icon", { staticClass: "checkbox-input-icon", attrs: { "icon": _vm.iconCheck } }), _c("input", { directives: [{ name: "model", rawName: "v-model", value: _vm.internalChecked, expression: "internalChecked" }], attrs: { "type": "checkbox", "disabled": _vm.disabled }, domProps: { "value": _vm.value, "checked": Array.isArray(_vm.internalChecked) ? _vm._i(_vm.internalChecked, _vm.value) > -1 : _vm.internalChecked }, on: { "focus": function($event) {
|
|
1275
|
-
_vm.focused = true;
|
|
1276
|
-
}, "focusout": function($event) {
|
|
1277
|
-
_vm.focused = false;
|
|
1278
|
-
}, "change": function($event) {
|
|
1279
|
-
var $$a = _vm.internalChecked, $$el = $event.target, $$c = $$el.checked ? true : false;
|
|
1280
|
-
if (Array.isArray($$a)) {
|
|
1281
|
-
var $$v = _vm.value, $$i = _vm._i($$a, $$v);
|
|
1282
|
-
if ($$el.checked) {
|
|
1283
|
-
$$i < 0 && (_vm.internalChecked = $$a.concat([$$v]));
|
|
1284
|
-
} else {
|
|
1285
|
-
$$i > -1 && (_vm.internalChecked = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
|
|
1286
|
-
}
|
|
1287
|
-
} else {
|
|
1288
|
-
_vm.internalChecked = $$c;
|
|
1289
|
-
}
|
|
1290
|
-
} } })], 1), _c("span", { staticClass: "checkbox-label" }, [_vm._v(_vm._s(_vm.value))])]);
|
|
1291
|
-
};
|
|
1292
|
-
var staticRenderFns = [];
|
|
1293
2811
|
var Checkbox_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
options.staticRenderFns = staticRenderFns2;
|
|
1299
|
-
options._compiled = true;
|
|
1300
|
-
}
|
|
1301
|
-
if (functionalTemplate) {
|
|
1302
|
-
options.functional = true;
|
|
1303
|
-
}
|
|
1304
|
-
if (scopeId) {
|
|
1305
|
-
options._scopeId = "data-v-" + scopeId;
|
|
1306
|
-
}
|
|
1307
|
-
var hook;
|
|
1308
|
-
if (moduleIdentifier) {
|
|
1309
|
-
hook = function(context) {
|
|
1310
|
-
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1311
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1312
|
-
context = __VUE_SSR_CONTEXT__;
|
|
1313
|
-
}
|
|
1314
|
-
if (injectStyles) {
|
|
1315
|
-
injectStyles.call(this, context);
|
|
1316
|
-
}
|
|
1317
|
-
if (context && context._registeredComponents) {
|
|
1318
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
1319
|
-
}
|
|
1320
|
-
};
|
|
1321
|
-
options._ssrRegister = hook;
|
|
1322
|
-
} else if (injectStyles) {
|
|
1323
|
-
hook = shadowMode ? function() {
|
|
1324
|
-
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1325
|
-
} : injectStyles;
|
|
1326
|
-
}
|
|
1327
|
-
if (hook) {
|
|
1328
|
-
if (options.functional) {
|
|
1329
|
-
options._injectStyles = hook;
|
|
1330
|
-
var originalRender = options.render;
|
|
1331
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
1332
|
-
hook.call(context);
|
|
1333
|
-
return originalRender(h, context);
|
|
1334
|
-
};
|
|
1335
|
-
} else {
|
|
1336
|
-
var existing = options.beforeCreate;
|
|
1337
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1338
|
-
}
|
|
2812
|
+
var _export_sfc = (sfc, props) => {
|
|
2813
|
+
const target = sfc.__vccOpts || sfc;
|
|
2814
|
+
for (const [key, val] of props) {
|
|
2815
|
+
target[key] = val;
|
|
1339
2816
|
}
|
|
1340
|
-
return
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
const __vue2_script = {
|
|
2817
|
+
return target;
|
|
2818
|
+
};
|
|
2819
|
+
const _sfc_main = {
|
|
1346
2820
|
name: "Checkbox",
|
|
1347
2821
|
components: {
|
|
1348
2822
|
FontAwesomeIcon
|
|
1349
2823
|
},
|
|
1350
|
-
model: {
|
|
1351
|
-
prop: "checked",
|
|
1352
|
-
event: "change"
|
|
1353
|
-
},
|
|
1354
2824
|
props: {
|
|
1355
2825
|
checked: {
|
|
1356
2826
|
type: [Boolean, Array],
|
|
@@ -1365,6 +2835,7 @@ const __vue2_script = {
|
|
|
1365
2835
|
default: false
|
|
1366
2836
|
}
|
|
1367
2837
|
},
|
|
2838
|
+
emits: ["update:checked"],
|
|
1368
2839
|
data() {
|
|
1369
2840
|
return {
|
|
1370
2841
|
focused: false,
|
|
@@ -1379,30 +2850,44 @@ const __vue2_script = {
|
|
|
1379
2850
|
} else {
|
|
1380
2851
|
return this.internalChecked.includes(this.value);
|
|
1381
2852
|
}
|
|
1382
|
-
},
|
|
1383
|
-
listeners() {
|
|
1384
|
-
let self2 = this;
|
|
1385
|
-
return Object.assign({}, this.$listeners, {
|
|
1386
|
-
change() {
|
|
1387
|
-
self2.$emit("change", self2.internalChecked);
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
2853
|
}
|
|
1391
2854
|
},
|
|
1392
2855
|
watch: {
|
|
1393
2856
|
checked() {
|
|
1394
2857
|
this.internalChecked = this.checked;
|
|
2858
|
+
},
|
|
2859
|
+
internalChecked() {
|
|
2860
|
+
this.$emit("update:checked", this.internalChecked);
|
|
1395
2861
|
}
|
|
1396
2862
|
}
|
|
1397
2863
|
};
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
2864
|
+
const _hoisted_1 = ["value", "disabled"];
|
|
2865
|
+
const _hoisted_2 = { class: "checkbox-label" };
|
|
2866
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2867
|
+
const _component_font_awesome_icon = resolveComponent("font-awesome-icon");
|
|
2868
|
+
return openBlock(), createElementBlock("label", {
|
|
2869
|
+
class: normalizeClass(["checkbox", { "checkbox-disabled": $props.disabled }])
|
|
2870
|
+
}, [
|
|
2871
|
+
createElementVNode("span", {
|
|
2872
|
+
class: normalizeClass(["checkbox-input", { "checkbox-checked": $options.isChecked, "checkbox-focused": $data.focused }])
|
|
2873
|
+
}, [
|
|
2874
|
+
createVNode(_component_font_awesome_icon, {
|
|
2875
|
+
class: "checkbox-input-icon",
|
|
2876
|
+
icon: $data.iconCheck
|
|
2877
|
+
}, null, 8, ["icon"]),
|
|
2878
|
+
withDirectives(createElementVNode("input", {
|
|
2879
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.internalChecked = $event),
|
|
2880
|
+
type: "checkbox",
|
|
2881
|
+
value: $props.value,
|
|
2882
|
+
disabled: $props.disabled,
|
|
2883
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => $data.focused = true),
|
|
2884
|
+
onFocusout: _cache[2] || (_cache[2] = ($event) => $data.focused = false)
|
|
2885
|
+
}, null, 40, _hoisted_1), [
|
|
2886
|
+
[vModelCheckbox, $data.internalChecked]
|
|
2887
|
+
])
|
|
2888
|
+
], 2),
|
|
2889
|
+
createElementVNode("span", _hoisted_2, toDisplayString($props.value), 1)
|
|
2890
|
+
], 2);
|
|
1404
2891
|
}
|
|
1405
|
-
var Checkbox = /* @__PURE__ */
|
|
1406
|
-
return __component__.exports;
|
|
1407
|
-
}();
|
|
2892
|
+
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0966d807"]]);
|
|
1408
2893
|
export { Checkbox as default };
|