@carbon/charts-vue 1.3.1 → 1.3.2
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/CHANGELOG.md +8 -0
- package/charts-vue.common.js +920 -970
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +920 -970
- package/charts-vue.umd.js.map +1 -1
- package/charts-vue.umd.min.js +1 -1
- package/charts-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
package/charts-vue.umd.js
CHANGED
|
@@ -11263,8 +11263,8 @@ Selection.prototype = selection_selection.prototype = {
|
|
|
11263
11263
|
// EXTERNAL MODULE: /home/runner/work/carbon-charts/carbon-charts/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
11264
11264
|
var ResizeObserver_es = __webpack_require__("2da1");
|
|
11265
11265
|
|
|
11266
|
-
// EXTERNAL MODULE:
|
|
11267
|
-
var dom_to_image = __webpack_require__("
|
|
11266
|
+
// EXTERNAL MODULE: ./node_modules/@carbon/charts/services/essentials/dom-to-image.js
|
|
11267
|
+
var dom_to_image = __webpack_require__("b1b0");
|
|
11268
11268
|
var dom_to_image_default = /*#__PURE__*/__webpack_require__.n(dom_to_image);
|
|
11269
11269
|
|
|
11270
11270
|
// CONCATENATED MODULE: ./node_modules/@carbon/charts/services/essentials/dom-utils.js
|
|
@@ -49445,6 +49445,732 @@ module.exports = [
|
|
|
49445
49445
|
];
|
|
49446
49446
|
|
|
49447
49447
|
|
|
49448
|
+
/***/ }),
|
|
49449
|
+
|
|
49450
|
+
/***/ "b1b0":
|
|
49451
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
49452
|
+
|
|
49453
|
+
/**
|
|
49454
|
+
The MIT License (MIT)
|
|
49455
|
+
|
|
49456
|
+
Copyright 2015 Anatolii Saienko
|
|
49457
|
+
https://github.com/tsayen
|
|
49458
|
+
|
|
49459
|
+
Copyright 2012 Paul Bakaus
|
|
49460
|
+
http://paulbakaus.com/
|
|
49461
|
+
|
|
49462
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49463
|
+
a copy of this software and associated documentation files (the
|
|
49464
|
+
"Software"), to deal in the Software without restriction, including
|
|
49465
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
49466
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
49467
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
49468
|
+
the following conditions:
|
|
49469
|
+
|
|
49470
|
+
The above copyright notice and this permission notice shall be
|
|
49471
|
+
included in all copies or substantial portions of the Software.
|
|
49472
|
+
|
|
49473
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
49474
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
49475
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
49476
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
49477
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
49478
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
49479
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
49480
|
+
*/
|
|
49481
|
+
(function (global) {
|
|
49482
|
+
'use strict';
|
|
49483
|
+
var util = newUtil();
|
|
49484
|
+
var inliner = newInliner();
|
|
49485
|
+
var fontFaces = newFontFaces();
|
|
49486
|
+
var images = newImages();
|
|
49487
|
+
// Default impl options
|
|
49488
|
+
var defaultOptions = {
|
|
49489
|
+
// Default is to fail on error, no placeholder
|
|
49490
|
+
imagePlaceholder: undefined,
|
|
49491
|
+
// Default cache bust is false, it will use the cache
|
|
49492
|
+
cacheBust: false,
|
|
49493
|
+
};
|
|
49494
|
+
var domtoimage = {
|
|
49495
|
+
toSvg: toSvg,
|
|
49496
|
+
toPng: toPng,
|
|
49497
|
+
toJpeg: toJpeg,
|
|
49498
|
+
toBlob: toBlob,
|
|
49499
|
+
toPixelData: toPixelData,
|
|
49500
|
+
impl: {
|
|
49501
|
+
fontFaces: fontFaces,
|
|
49502
|
+
images: images,
|
|
49503
|
+
util: util,
|
|
49504
|
+
inliner: inliner,
|
|
49505
|
+
options: {},
|
|
49506
|
+
},
|
|
49507
|
+
};
|
|
49508
|
+
if (true)
|
|
49509
|
+
module.exports = domtoimage;
|
|
49510
|
+
else
|
|
49511
|
+
{}
|
|
49512
|
+
/**
|
|
49513
|
+
* @param {Node} node - The DOM Node object to render
|
|
49514
|
+
* @param {Object} options - Rendering options
|
|
49515
|
+
* @param {Function} options.filter - Should return true if passed node should be included in the output
|
|
49516
|
+
* (excluding node means excluding it's children as well). Not called on the root node.
|
|
49517
|
+
* @param {String} options.bgcolor - color for the background, any valid CSS color value.
|
|
49518
|
+
* @param {Number} options.width - width to be applied to node before rendering.
|
|
49519
|
+
* @param {Number} options.height - height to be applied to node before rendering.
|
|
49520
|
+
* @param {Object} options.style - an object whose properties to be copied to node's style before rendering.
|
|
49521
|
+
* @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),
|
|
49522
|
+
defaults to 1.0.
|
|
49523
|
+
* @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch
|
|
49524
|
+
* @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url
|
|
49525
|
+
* @return {Promise} - A promise that is fulfilled with a SVG image data URL
|
|
49526
|
+
* */
|
|
49527
|
+
function toSvg(node, options) {
|
|
49528
|
+
options = options || {};
|
|
49529
|
+
copyOptions(options);
|
|
49530
|
+
return Promise.resolve(node)
|
|
49531
|
+
.then(function (node) {
|
|
49532
|
+
return cloneNode(node, options.filter, true);
|
|
49533
|
+
})
|
|
49534
|
+
.then(embedFonts)
|
|
49535
|
+
.then(inlineImages)
|
|
49536
|
+
.then(applyOptions)
|
|
49537
|
+
.then(function (clone) {
|
|
49538
|
+
return makeSvgDataUri(clone, options.width || util.width(node), options.height || util.height(node));
|
|
49539
|
+
});
|
|
49540
|
+
function applyOptions(clone) {
|
|
49541
|
+
if (options.bgcolor)
|
|
49542
|
+
clone.style.backgroundColor = options.bgcolor;
|
|
49543
|
+
if (options.width)
|
|
49544
|
+
clone.style.width = options.width + 'px';
|
|
49545
|
+
if (options.height)
|
|
49546
|
+
clone.style.height = options.height + 'px';
|
|
49547
|
+
if (options.style)
|
|
49548
|
+
Object.keys(options.style).forEach(function (property) {
|
|
49549
|
+
clone.style[property] = options.style[property];
|
|
49550
|
+
});
|
|
49551
|
+
return clone;
|
|
49552
|
+
}
|
|
49553
|
+
}
|
|
49554
|
+
/**
|
|
49555
|
+
* @param {Node} node - The DOM Node object to render
|
|
49556
|
+
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
49557
|
+
* @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.
|
|
49558
|
+
* */
|
|
49559
|
+
function toPixelData(node, options) {
|
|
49560
|
+
return draw(node, options || {}).then(function (canvas) {
|
|
49561
|
+
return canvas
|
|
49562
|
+
.getContext('2d')
|
|
49563
|
+
.getImageData(0, 0, util.width(node), util.height(node)).data;
|
|
49564
|
+
});
|
|
49565
|
+
}
|
|
49566
|
+
/**
|
|
49567
|
+
* @param {Node} node - The DOM Node object to render
|
|
49568
|
+
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
49569
|
+
* @return {Promise} - A promise that is fulfilled with a PNG image data URL
|
|
49570
|
+
* */
|
|
49571
|
+
function toPng(node, options) {
|
|
49572
|
+
return draw(node, options || {}).then(function (canvas) {
|
|
49573
|
+
return canvas.toDataURL();
|
|
49574
|
+
});
|
|
49575
|
+
}
|
|
49576
|
+
/**
|
|
49577
|
+
* @param {Node} node - The DOM Node object to render
|
|
49578
|
+
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
49579
|
+
* @return {Promise} - A promise that is fulfilled with a JPEG image data URL
|
|
49580
|
+
* */
|
|
49581
|
+
function toJpeg(node, options) {
|
|
49582
|
+
options = options || {};
|
|
49583
|
+
return draw(node, options).then(function (canvas) {
|
|
49584
|
+
return canvas.toDataURL('image/jpeg', options.quality || 1.0);
|
|
49585
|
+
});
|
|
49586
|
+
}
|
|
49587
|
+
/**
|
|
49588
|
+
* @param {Node} node - The DOM Node object to render
|
|
49589
|
+
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
49590
|
+
* @return {Promise} - A promise that is fulfilled with a PNG image blob
|
|
49591
|
+
* */
|
|
49592
|
+
function toBlob(node, options) {
|
|
49593
|
+
return draw(node, options || {}).then(util.canvasToBlob);
|
|
49594
|
+
}
|
|
49595
|
+
function copyOptions(options) {
|
|
49596
|
+
// Copy options to impl options for use in impl
|
|
49597
|
+
if (typeof options.imagePlaceholder === 'undefined') {
|
|
49598
|
+
domtoimage.impl.options.imagePlaceholder =
|
|
49599
|
+
defaultOptions.imagePlaceholder;
|
|
49600
|
+
}
|
|
49601
|
+
else {
|
|
49602
|
+
domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;
|
|
49603
|
+
}
|
|
49604
|
+
if (typeof options.cacheBust === 'undefined') {
|
|
49605
|
+
domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;
|
|
49606
|
+
}
|
|
49607
|
+
else {
|
|
49608
|
+
domtoimage.impl.options.cacheBust = options.cacheBust;
|
|
49609
|
+
}
|
|
49610
|
+
}
|
|
49611
|
+
function draw(domNode, options) {
|
|
49612
|
+
return toSvg(domNode, options)
|
|
49613
|
+
.then(util.makeImage)
|
|
49614
|
+
.then(util.delay(100))
|
|
49615
|
+
.then(function (image) {
|
|
49616
|
+
var canvas = newCanvas(domNode);
|
|
49617
|
+
canvas.getContext('2d').drawImage(image, 0, 0);
|
|
49618
|
+
return canvas;
|
|
49619
|
+
});
|
|
49620
|
+
function newCanvas(domNode) {
|
|
49621
|
+
var canvas = document.createElement('canvas');
|
|
49622
|
+
canvas.width = options.width || util.width(domNode);
|
|
49623
|
+
canvas.height = options.height || util.height(domNode);
|
|
49624
|
+
if (options.bgcolor) {
|
|
49625
|
+
var ctx = canvas.getContext('2d');
|
|
49626
|
+
ctx.fillStyle = options.bgcolor;
|
|
49627
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
49628
|
+
}
|
|
49629
|
+
return canvas;
|
|
49630
|
+
}
|
|
49631
|
+
}
|
|
49632
|
+
function cloneNode(node, filter, root) {
|
|
49633
|
+
if (!root && filter && !filter(node))
|
|
49634
|
+
return Promise.resolve();
|
|
49635
|
+
return Promise.resolve(node)
|
|
49636
|
+
.then(makeNodeCopy)
|
|
49637
|
+
.then(function (clone) {
|
|
49638
|
+
return cloneChildren(node, clone, filter);
|
|
49639
|
+
})
|
|
49640
|
+
.then(function (clone) {
|
|
49641
|
+
return processClone(node, clone);
|
|
49642
|
+
});
|
|
49643
|
+
function makeNodeCopy(node) {
|
|
49644
|
+
if (node instanceof HTMLCanvasElement)
|
|
49645
|
+
return util.makeImage(node.toDataURL());
|
|
49646
|
+
return node.cloneNode(false);
|
|
49647
|
+
}
|
|
49648
|
+
function cloneChildren(original, clone, filter) {
|
|
49649
|
+
var children = original.childNodes;
|
|
49650
|
+
if (children.length === 0)
|
|
49651
|
+
return Promise.resolve(clone);
|
|
49652
|
+
return cloneChildrenInOrder(clone, util.asArray(children), filter).then(function () {
|
|
49653
|
+
return clone;
|
|
49654
|
+
});
|
|
49655
|
+
function cloneChildrenInOrder(parent, children, filter) {
|
|
49656
|
+
var done = Promise.resolve();
|
|
49657
|
+
children.forEach(function (child) {
|
|
49658
|
+
done = done
|
|
49659
|
+
.then(function () {
|
|
49660
|
+
return cloneNode(child, filter);
|
|
49661
|
+
})
|
|
49662
|
+
.then(function (childClone) {
|
|
49663
|
+
if (childClone)
|
|
49664
|
+
parent.appendChild(childClone);
|
|
49665
|
+
});
|
|
49666
|
+
});
|
|
49667
|
+
return done;
|
|
49668
|
+
}
|
|
49669
|
+
}
|
|
49670
|
+
function processClone(original, clone) {
|
|
49671
|
+
if (!(clone instanceof Element))
|
|
49672
|
+
return clone;
|
|
49673
|
+
return Promise.resolve()
|
|
49674
|
+
.then(cloneStyle)
|
|
49675
|
+
.then(clonePseudoElements)
|
|
49676
|
+
.then(copyUserInput)
|
|
49677
|
+
.then(fixSvg)
|
|
49678
|
+
.then(function () {
|
|
49679
|
+
return clone;
|
|
49680
|
+
});
|
|
49681
|
+
function cloneStyle() {
|
|
49682
|
+
copyStyle(window.getComputedStyle(original), clone.style);
|
|
49683
|
+
function copyStyle(source, target) {
|
|
49684
|
+
if (source.cssText)
|
|
49685
|
+
target.cssText = source.cssText;
|
|
49686
|
+
else
|
|
49687
|
+
copyProperties(source, target);
|
|
49688
|
+
function copyProperties(source, target) {
|
|
49689
|
+
util.asArray(source).forEach(function (name) {
|
|
49690
|
+
target.setProperty(name, source.getPropertyValue(name), source.getPropertyPriority(name));
|
|
49691
|
+
});
|
|
49692
|
+
}
|
|
49693
|
+
}
|
|
49694
|
+
}
|
|
49695
|
+
function clonePseudoElements() {
|
|
49696
|
+
[':before', ':after'].forEach(function (element) {
|
|
49697
|
+
clonePseudoElement(element);
|
|
49698
|
+
});
|
|
49699
|
+
function clonePseudoElement(element) {
|
|
49700
|
+
var style = window.getComputedStyle(original, element);
|
|
49701
|
+
var content = style.getPropertyValue('content');
|
|
49702
|
+
if (content === '' || content === 'none')
|
|
49703
|
+
return;
|
|
49704
|
+
var className = util.uid();
|
|
49705
|
+
clone.className = clone.className + ' ' + className;
|
|
49706
|
+
var styleElement = document.createElement('style');
|
|
49707
|
+
styleElement.appendChild(formatPseudoElementStyle(className, element, style));
|
|
49708
|
+
clone.appendChild(styleElement);
|
|
49709
|
+
function formatPseudoElementStyle(className, element, style) {
|
|
49710
|
+
var selector = '.' + className + ':' + element;
|
|
49711
|
+
var cssText = style.cssText
|
|
49712
|
+
? formatCssText(style)
|
|
49713
|
+
: formatCssProperties(style);
|
|
49714
|
+
return document.createTextNode(selector + '{' + cssText + '}');
|
|
49715
|
+
function formatCssText(style) {
|
|
49716
|
+
var content = style.getPropertyValue('content');
|
|
49717
|
+
return style.cssText + ' content: ' + content + ';';
|
|
49718
|
+
}
|
|
49719
|
+
function formatCssProperties(style) {
|
|
49720
|
+
return (util
|
|
49721
|
+
.asArray(style)
|
|
49722
|
+
.map(formatProperty)
|
|
49723
|
+
.join('; ') + ';');
|
|
49724
|
+
function formatProperty(name) {
|
|
49725
|
+
return (name +
|
|
49726
|
+
': ' +
|
|
49727
|
+
style.getPropertyValue(name) +
|
|
49728
|
+
(style.getPropertyPriority(name)
|
|
49729
|
+
? ' !important'
|
|
49730
|
+
: ''));
|
|
49731
|
+
}
|
|
49732
|
+
}
|
|
49733
|
+
}
|
|
49734
|
+
}
|
|
49735
|
+
}
|
|
49736
|
+
function copyUserInput() {
|
|
49737
|
+
if (original instanceof HTMLTextAreaElement)
|
|
49738
|
+
clone.innerHTML = original.value;
|
|
49739
|
+
if (original instanceof HTMLInputElement)
|
|
49740
|
+
clone.setAttribute('value', original.value);
|
|
49741
|
+
}
|
|
49742
|
+
function fixSvg() {
|
|
49743
|
+
if (!(clone instanceof SVGElement))
|
|
49744
|
+
return;
|
|
49745
|
+
clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
49746
|
+
if (!(clone instanceof SVGRectElement))
|
|
49747
|
+
return;
|
|
49748
|
+
['width', 'height'].forEach(function (attribute) {
|
|
49749
|
+
var value = clone.getAttribute(attribute);
|
|
49750
|
+
if (!value)
|
|
49751
|
+
return;
|
|
49752
|
+
clone.style.setProperty(attribute, value);
|
|
49753
|
+
});
|
|
49754
|
+
}
|
|
49755
|
+
}
|
|
49756
|
+
}
|
|
49757
|
+
function embedFonts(node) {
|
|
49758
|
+
return fontFaces.resolveAll().then(function (cssText) {
|
|
49759
|
+
var styleNode = document.createElement('style');
|
|
49760
|
+
node.appendChild(styleNode);
|
|
49761
|
+
styleNode.appendChild(document.createTextNode(cssText));
|
|
49762
|
+
return node;
|
|
49763
|
+
});
|
|
49764
|
+
}
|
|
49765
|
+
function inlineImages(node) {
|
|
49766
|
+
return images.inlineAll(node).then(function () {
|
|
49767
|
+
return node;
|
|
49768
|
+
});
|
|
49769
|
+
}
|
|
49770
|
+
function makeSvgDataUri(node, width, height) {
|
|
49771
|
+
return Promise.resolve(node)
|
|
49772
|
+
.then(function (node) {
|
|
49773
|
+
node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
|
|
49774
|
+
return new XMLSerializer().serializeToString(node);
|
|
49775
|
+
})
|
|
49776
|
+
.then(util.escapeXhtml)
|
|
49777
|
+
.then(function (xhtml) {
|
|
49778
|
+
return ('<foreignObject x="0" y="0" width="100%" height="100%">' +
|
|
49779
|
+
xhtml +
|
|
49780
|
+
'</foreignObject>');
|
|
49781
|
+
})
|
|
49782
|
+
.then(function (foreignObject) {
|
|
49783
|
+
return ('<svg xmlns="http://www.w3.org/2000/svg" width="' +
|
|
49784
|
+
width +
|
|
49785
|
+
'" height="' +
|
|
49786
|
+
height +
|
|
49787
|
+
'">' +
|
|
49788
|
+
foreignObject +
|
|
49789
|
+
'</svg>');
|
|
49790
|
+
})
|
|
49791
|
+
.then(function (svg) {
|
|
49792
|
+
return 'data:image/svg+xml;charset=utf-8,' + svg;
|
|
49793
|
+
});
|
|
49794
|
+
}
|
|
49795
|
+
function newUtil() {
|
|
49796
|
+
return {
|
|
49797
|
+
escape: escape,
|
|
49798
|
+
parseExtension: parseExtension,
|
|
49799
|
+
mimeType: mimeType,
|
|
49800
|
+
dataAsUrl: dataAsUrl,
|
|
49801
|
+
isDataUrl: isDataUrl,
|
|
49802
|
+
canvasToBlob: canvasToBlob,
|
|
49803
|
+
resolveUrl: resolveUrl,
|
|
49804
|
+
getAndEncode: getAndEncode,
|
|
49805
|
+
uid: uid(),
|
|
49806
|
+
delay: delay,
|
|
49807
|
+
asArray: asArray,
|
|
49808
|
+
escapeXhtml: escapeXhtml,
|
|
49809
|
+
makeImage: makeImage,
|
|
49810
|
+
width: width,
|
|
49811
|
+
height: height,
|
|
49812
|
+
};
|
|
49813
|
+
function mimes() {
|
|
49814
|
+
/*
|
|
49815
|
+
* Only WOFF and EOT mime types for fonts are 'real'
|
|
49816
|
+
* see http://www.iana.org/assignments/media-types/media-types.xhtml
|
|
49817
|
+
*/
|
|
49818
|
+
var WOFF = 'application/font-woff';
|
|
49819
|
+
var JPEG = 'image/jpeg';
|
|
49820
|
+
return {
|
|
49821
|
+
woff: WOFF,
|
|
49822
|
+
woff2: WOFF,
|
|
49823
|
+
ttf: 'application/font-truetype',
|
|
49824
|
+
eot: 'application/vnd.ms-fontobject',
|
|
49825
|
+
png: 'image/png',
|
|
49826
|
+
jpg: JPEG,
|
|
49827
|
+
jpeg: JPEG,
|
|
49828
|
+
gif: 'image/gif',
|
|
49829
|
+
tiff: 'image/tiff',
|
|
49830
|
+
svg: 'image/svg+xml',
|
|
49831
|
+
};
|
|
49832
|
+
}
|
|
49833
|
+
function parseExtension(url) {
|
|
49834
|
+
var match = /\.([^\.\/]*?)$/g.exec(url);
|
|
49835
|
+
if (match)
|
|
49836
|
+
return match[1];
|
|
49837
|
+
else
|
|
49838
|
+
return '';
|
|
49839
|
+
}
|
|
49840
|
+
function mimeType(url) {
|
|
49841
|
+
var extension = parseExtension(url).toLowerCase();
|
|
49842
|
+
return mimes()[extension] || '';
|
|
49843
|
+
}
|
|
49844
|
+
function isDataUrl(url) {
|
|
49845
|
+
return url.search(/^(data:)/) !== -1;
|
|
49846
|
+
}
|
|
49847
|
+
function toBlob(canvas) {
|
|
49848
|
+
return new Promise(function (resolve) {
|
|
49849
|
+
var binaryString = window.atob(canvas.toDataURL().split(',')[1]);
|
|
49850
|
+
var length = binaryString.length;
|
|
49851
|
+
var binaryArray = new Uint8Array(length);
|
|
49852
|
+
for (var i = 0; i < length; i++)
|
|
49853
|
+
binaryArray[i] = binaryString.charCodeAt(i);
|
|
49854
|
+
resolve(new Blob([binaryArray], {
|
|
49855
|
+
type: 'image/png',
|
|
49856
|
+
}));
|
|
49857
|
+
});
|
|
49858
|
+
}
|
|
49859
|
+
function canvasToBlob(canvas) {
|
|
49860
|
+
if (canvas.toBlob)
|
|
49861
|
+
return new Promise(function (resolve) {
|
|
49862
|
+
canvas.toBlob(resolve);
|
|
49863
|
+
});
|
|
49864
|
+
return toBlob(canvas);
|
|
49865
|
+
}
|
|
49866
|
+
function resolveUrl(url, baseUrl) {
|
|
49867
|
+
var doc = document.implementation.createHTMLDocument();
|
|
49868
|
+
var base = doc.createElement('base');
|
|
49869
|
+
doc.head.appendChild(base);
|
|
49870
|
+
var a = doc.createElement('a');
|
|
49871
|
+
doc.body.appendChild(a);
|
|
49872
|
+
base.href = baseUrl;
|
|
49873
|
+
a.href = url;
|
|
49874
|
+
return a.href;
|
|
49875
|
+
}
|
|
49876
|
+
function uid() {
|
|
49877
|
+
var index = 0;
|
|
49878
|
+
return function () {
|
|
49879
|
+
return 'u' + fourRandomChars() + index++;
|
|
49880
|
+
function fourRandomChars() {
|
|
49881
|
+
/* see http://stackoverflow.com/a/6248722/2519373 */
|
|
49882
|
+
return ('0000' +
|
|
49883
|
+
((Math.random() * Math.pow(36, 4)) << 0).toString(36)).slice(-4);
|
|
49884
|
+
}
|
|
49885
|
+
};
|
|
49886
|
+
}
|
|
49887
|
+
function makeImage(uri) {
|
|
49888
|
+
return new Promise(function (resolve, reject) {
|
|
49889
|
+
var image = new Image();
|
|
49890
|
+
image.onload = function () {
|
|
49891
|
+
resolve(image);
|
|
49892
|
+
};
|
|
49893
|
+
image.onerror = reject;
|
|
49894
|
+
image.src = uri;
|
|
49895
|
+
});
|
|
49896
|
+
}
|
|
49897
|
+
function getAndEncode(url) {
|
|
49898
|
+
var TIMEOUT = 30000;
|
|
49899
|
+
if (domtoimage.impl.options.cacheBust) {
|
|
49900
|
+
// Cache bypass so we dont have CORS issues with cached images
|
|
49901
|
+
// Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
|
|
49902
|
+
url += (/\?/.test(url) ? '&' : '?') + new Date().getTime();
|
|
49903
|
+
}
|
|
49904
|
+
return new Promise(function (resolve) {
|
|
49905
|
+
var request = new XMLHttpRequest();
|
|
49906
|
+
request.onreadystatechange = done;
|
|
49907
|
+
request.ontimeout = timeout;
|
|
49908
|
+
request.responseType = 'blob';
|
|
49909
|
+
request.timeout = TIMEOUT;
|
|
49910
|
+
request.open('GET', url, true);
|
|
49911
|
+
request.send();
|
|
49912
|
+
var placeholder;
|
|
49913
|
+
if (domtoimage.impl.options.imagePlaceholder) {
|
|
49914
|
+
var split = domtoimage.impl.options.imagePlaceholder.split(/,/);
|
|
49915
|
+
if (split && split[1]) {
|
|
49916
|
+
placeholder = split[1];
|
|
49917
|
+
}
|
|
49918
|
+
}
|
|
49919
|
+
function done() {
|
|
49920
|
+
if (request.readyState !== 4)
|
|
49921
|
+
return;
|
|
49922
|
+
if (request.status !== 200) {
|
|
49923
|
+
if (placeholder) {
|
|
49924
|
+
resolve(placeholder);
|
|
49925
|
+
}
|
|
49926
|
+
else {
|
|
49927
|
+
fail('cannot fetch resource: ' +
|
|
49928
|
+
url +
|
|
49929
|
+
', status: ' +
|
|
49930
|
+
request.status);
|
|
49931
|
+
}
|
|
49932
|
+
return;
|
|
49933
|
+
}
|
|
49934
|
+
var encoder = new FileReader();
|
|
49935
|
+
encoder.onloadend = function () {
|
|
49936
|
+
var content = encoder.result.split(/,/)[1];
|
|
49937
|
+
resolve(content);
|
|
49938
|
+
};
|
|
49939
|
+
encoder.readAsDataURL(request.response);
|
|
49940
|
+
}
|
|
49941
|
+
function timeout() {
|
|
49942
|
+
if (placeholder) {
|
|
49943
|
+
resolve(placeholder);
|
|
49944
|
+
}
|
|
49945
|
+
else {
|
|
49946
|
+
fail('timeout of ' +
|
|
49947
|
+
TIMEOUT +
|
|
49948
|
+
'ms occured while fetching resource: ' +
|
|
49949
|
+
url);
|
|
49950
|
+
}
|
|
49951
|
+
}
|
|
49952
|
+
function fail(message) {
|
|
49953
|
+
console.error(message);
|
|
49954
|
+
resolve('');
|
|
49955
|
+
}
|
|
49956
|
+
});
|
|
49957
|
+
}
|
|
49958
|
+
function dataAsUrl(content, type) {
|
|
49959
|
+
return 'data:' + type + ';base64,' + content;
|
|
49960
|
+
}
|
|
49961
|
+
function escape(string) {
|
|
49962
|
+
return string.replace(/([.*+?^${}()|\[\]\/\\])/g, '\\$1');
|
|
49963
|
+
}
|
|
49964
|
+
function delay(ms) {
|
|
49965
|
+
return function (arg) {
|
|
49966
|
+
return new Promise(function (resolve) {
|
|
49967
|
+
setTimeout(function () {
|
|
49968
|
+
resolve(arg);
|
|
49969
|
+
}, ms);
|
|
49970
|
+
});
|
|
49971
|
+
};
|
|
49972
|
+
}
|
|
49973
|
+
function asArray(arrayLike) {
|
|
49974
|
+
var array = [];
|
|
49975
|
+
var length = arrayLike.length;
|
|
49976
|
+
for (var i = 0; i < length; i++)
|
|
49977
|
+
array.push(arrayLike[i]);
|
|
49978
|
+
return array;
|
|
49979
|
+
}
|
|
49980
|
+
function escapeXhtml(string) {
|
|
49981
|
+
return string.replace(/#/g, '%23').replace(/\n/g, '%0A');
|
|
49982
|
+
}
|
|
49983
|
+
function width(node) {
|
|
49984
|
+
var leftBorder = px(node, 'border-left-width');
|
|
49985
|
+
var rightBorder = px(node, 'border-right-width');
|
|
49986
|
+
return node.scrollWidth + leftBorder + rightBorder;
|
|
49987
|
+
}
|
|
49988
|
+
function height(node) {
|
|
49989
|
+
var topBorder = px(node, 'border-top-width');
|
|
49990
|
+
var bottomBorder = px(node, 'border-bottom-width');
|
|
49991
|
+
return node.scrollHeight + topBorder + bottomBorder;
|
|
49992
|
+
}
|
|
49993
|
+
function px(node, styleProperty) {
|
|
49994
|
+
var value = window
|
|
49995
|
+
.getComputedStyle(node)
|
|
49996
|
+
.getPropertyValue(styleProperty);
|
|
49997
|
+
return parseFloat(value.replace('px', ''));
|
|
49998
|
+
}
|
|
49999
|
+
}
|
|
50000
|
+
function newInliner() {
|
|
50001
|
+
var URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
|
|
50002
|
+
return {
|
|
50003
|
+
inlineAll: inlineAll,
|
|
50004
|
+
shouldProcess: shouldProcess,
|
|
50005
|
+
impl: {
|
|
50006
|
+
readUrls: readUrls,
|
|
50007
|
+
inline: inline,
|
|
50008
|
+
},
|
|
50009
|
+
};
|
|
50010
|
+
function shouldProcess(string) {
|
|
50011
|
+
return string.search(URL_REGEX) !== -1;
|
|
50012
|
+
}
|
|
50013
|
+
function readUrls(string) {
|
|
50014
|
+
var result = [];
|
|
50015
|
+
var match;
|
|
50016
|
+
while ((match = URL_REGEX.exec(string)) !== null) {
|
|
50017
|
+
result.push(match[1]);
|
|
50018
|
+
}
|
|
50019
|
+
return result.filter(function (url) {
|
|
50020
|
+
return !util.isDataUrl(url);
|
|
50021
|
+
});
|
|
50022
|
+
}
|
|
50023
|
+
function inline(string, url, baseUrl, get) {
|
|
50024
|
+
return Promise.resolve(url)
|
|
50025
|
+
.then(function (url) {
|
|
50026
|
+
return baseUrl ? util.resolveUrl(url, baseUrl) : url;
|
|
50027
|
+
})
|
|
50028
|
+
.then(get || util.getAndEncode)
|
|
50029
|
+
.then(function (data) {
|
|
50030
|
+
return util.dataAsUrl(data, util.mimeType(url));
|
|
50031
|
+
})
|
|
50032
|
+
.then(function (dataUrl) {
|
|
50033
|
+
return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');
|
|
50034
|
+
});
|
|
50035
|
+
function urlAsRegex(url) {
|
|
50036
|
+
return new RegExp('(url\\([\'"]?)(' + util.escape(url) + ')([\'"]?\\))', 'g');
|
|
50037
|
+
}
|
|
50038
|
+
}
|
|
50039
|
+
function inlineAll(string, baseUrl, get) {
|
|
50040
|
+
if (nothingToInline())
|
|
50041
|
+
return Promise.resolve(string);
|
|
50042
|
+
return Promise.resolve(string)
|
|
50043
|
+
.then(readUrls)
|
|
50044
|
+
.then(function (urls) {
|
|
50045
|
+
var done = Promise.resolve(string);
|
|
50046
|
+
urls.forEach(function (url) {
|
|
50047
|
+
done = done.then(function (string) {
|
|
50048
|
+
return inline(string, url, baseUrl, get);
|
|
50049
|
+
});
|
|
50050
|
+
});
|
|
50051
|
+
return done;
|
|
50052
|
+
});
|
|
50053
|
+
function nothingToInline() {
|
|
50054
|
+
return !shouldProcess(string);
|
|
50055
|
+
}
|
|
50056
|
+
}
|
|
50057
|
+
}
|
|
50058
|
+
function newFontFaces() {
|
|
50059
|
+
return {
|
|
50060
|
+
resolveAll: resolveAll,
|
|
50061
|
+
impl: {
|
|
50062
|
+
readAll: readAll,
|
|
50063
|
+
},
|
|
50064
|
+
};
|
|
50065
|
+
function resolveAll() {
|
|
50066
|
+
return readAll(document)
|
|
50067
|
+
.then(function (webFonts) {
|
|
50068
|
+
return Promise.all(webFonts.map(function (webFont) {
|
|
50069
|
+
return webFont.resolve();
|
|
50070
|
+
}));
|
|
50071
|
+
})
|
|
50072
|
+
.then(function (cssStrings) {
|
|
50073
|
+
return cssStrings.join('\n');
|
|
50074
|
+
});
|
|
50075
|
+
}
|
|
50076
|
+
function readAll() {
|
|
50077
|
+
return Promise.resolve(util.asArray(document.styleSheets))
|
|
50078
|
+
.then(getCssRules)
|
|
50079
|
+
.then(selectWebFontRules)
|
|
50080
|
+
.then(function (rules) {
|
|
50081
|
+
return rules.map(newWebFont);
|
|
50082
|
+
});
|
|
50083
|
+
function selectWebFontRules(cssRules) {
|
|
50084
|
+
return cssRules
|
|
50085
|
+
.filter(function (rule) {
|
|
50086
|
+
return rule.type === CSSRule.FONT_FACE_RULE;
|
|
50087
|
+
})
|
|
50088
|
+
.filter(function (rule) {
|
|
50089
|
+
return inliner.shouldProcess(rule.style.getPropertyValue('src'));
|
|
50090
|
+
});
|
|
50091
|
+
}
|
|
50092
|
+
function getCssRules(styleSheets) {
|
|
50093
|
+
var cssRules = [];
|
|
50094
|
+
styleSheets.forEach(function (sheet) {
|
|
50095
|
+
try {
|
|
50096
|
+
util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
|
|
50097
|
+
}
|
|
50098
|
+
catch (e) {
|
|
50099
|
+
console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
|
|
50100
|
+
}
|
|
50101
|
+
});
|
|
50102
|
+
return cssRules;
|
|
50103
|
+
}
|
|
50104
|
+
function newWebFont(webFontRule) {
|
|
50105
|
+
return {
|
|
50106
|
+
resolve: function resolve() {
|
|
50107
|
+
var baseUrl = (webFontRule.parentStyleSheet || {}).href;
|
|
50108
|
+
return inliner.inlineAll(webFontRule.cssText, baseUrl);
|
|
50109
|
+
},
|
|
50110
|
+
src: function () {
|
|
50111
|
+
return webFontRule.style.getPropertyValue('src');
|
|
50112
|
+
},
|
|
50113
|
+
};
|
|
50114
|
+
}
|
|
50115
|
+
}
|
|
50116
|
+
}
|
|
50117
|
+
function newImages() {
|
|
50118
|
+
return {
|
|
50119
|
+
inlineAll: inlineAll,
|
|
50120
|
+
impl: {
|
|
50121
|
+
newImage: newImage,
|
|
50122
|
+
},
|
|
50123
|
+
};
|
|
50124
|
+
function newImage(element) {
|
|
50125
|
+
return {
|
|
50126
|
+
inline: inline,
|
|
50127
|
+
};
|
|
50128
|
+
function inline(get) {
|
|
50129
|
+
if (util.isDataUrl(element.src))
|
|
50130
|
+
return Promise.resolve();
|
|
50131
|
+
return Promise.resolve(element.src)
|
|
50132
|
+
.then(get || util.getAndEncode)
|
|
50133
|
+
.then(function (data) {
|
|
50134
|
+
return util.dataAsUrl(data, util.mimeType(element.src));
|
|
50135
|
+
})
|
|
50136
|
+
.then(function (dataUrl) {
|
|
50137
|
+
return new Promise(function (resolve, reject) {
|
|
50138
|
+
element.onload = resolve;
|
|
50139
|
+
element.onerror = reject;
|
|
50140
|
+
element.src = dataUrl;
|
|
50141
|
+
});
|
|
50142
|
+
});
|
|
50143
|
+
}
|
|
50144
|
+
}
|
|
50145
|
+
function inlineAll(node) {
|
|
50146
|
+
if (!(node instanceof Element))
|
|
50147
|
+
return Promise.resolve(node);
|
|
50148
|
+
return inlineBackground(node).then(function () {
|
|
50149
|
+
if (node instanceof HTMLImageElement)
|
|
50150
|
+
return newImage(node).inline();
|
|
50151
|
+
else
|
|
50152
|
+
return Promise.all(util.asArray(node.childNodes).map(function (child) {
|
|
50153
|
+
return inlineAll(child);
|
|
50154
|
+
}));
|
|
50155
|
+
});
|
|
50156
|
+
function inlineBackground(node) {
|
|
50157
|
+
var background = node.style.getPropertyValue('background');
|
|
50158
|
+
if (!background)
|
|
50159
|
+
return Promise.resolve(node);
|
|
50160
|
+
return inliner
|
|
50161
|
+
.inlineAll(background)
|
|
50162
|
+
.then(function (inlined) {
|
|
50163
|
+
node.style.setProperty('background', inlined, node.style.getPropertyPriority('background'));
|
|
50164
|
+
})
|
|
50165
|
+
.then(function () {
|
|
50166
|
+
return node;
|
|
50167
|
+
});
|
|
50168
|
+
}
|
|
50169
|
+
}
|
|
50170
|
+
}
|
|
50171
|
+
})(this);
|
|
50172
|
+
//# sourceMappingURL=../../../src/services/essentials/dom-to-image.js.map
|
|
50173
|
+
|
|
49448
50174
|
/***/ }),
|
|
49449
50175
|
|
|
49450
50176
|
/***/ "b489":
|
|
@@ -50312,1039 +51038,263 @@ $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymb
|
|
|
50312
51038
|
});
|
|
50313
51039
|
|
|
50314
51040
|
// `JSON.stringify` method behavior with symbols
|
|
50315
|
-
// https://tc39.github.io/ecma262/#sec-json.stringify
|
|
50316
|
-
if ($stringify) {
|
|
50317
|
-
var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
|
|
50318
|
-
var symbol = $Symbol();
|
|
50319
|
-
// MS Edge converts symbol values to JSON as {}
|
|
50320
|
-
return $stringify([symbol]) != '[null]'
|
|
50321
|
-
// WebKit converts symbol values to JSON as null
|
|
50322
|
-
|| $stringify({ a: symbol }) != '{}'
|
|
50323
|
-
// V8 throws on boxed symbols
|
|
50324
|
-
|| $stringify(Object(symbol)) != '{}';
|
|
50325
|
-
});
|
|
50326
|
-
|
|
50327
|
-
$({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
50328
|
-
// eslint-disable-next-line no-unused-vars
|
|
50329
|
-
stringify: function stringify(it, replacer, space) {
|
|
50330
|
-
var args = [it];
|
|
50331
|
-
var index = 1;
|
|
50332
|
-
var $replacer;
|
|
50333
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
|
50334
|
-
$replacer = replacer;
|
|
50335
|
-
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
50336
|
-
if (!isArray(replacer)) replacer = function (key, value) {
|
|
50337
|
-
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
50338
|
-
if (!isSymbol(value)) return value;
|
|
50339
|
-
};
|
|
50340
|
-
args[1] = replacer;
|
|
50341
|
-
return $stringify.apply(null, args);
|
|
50342
|
-
}
|
|
50343
|
-
});
|
|
50344
|
-
}
|
|
50345
|
-
|
|
50346
|
-
// `Symbol.prototype[@@toPrimitive]` method
|
|
50347
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
50348
|
-
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
|
|
50349
|
-
createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
50350
|
-
}
|
|
50351
|
-
// `Symbol.prototype[@@toStringTag]` property
|
|
50352
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
50353
|
-
setToStringTag($Symbol, SYMBOL);
|
|
50354
|
-
|
|
50355
|
-
hiddenKeys[HIDDEN] = true;
|
|
50356
|
-
|
|
50357
|
-
|
|
50358
|
-
/***/ }),
|
|
50359
|
-
|
|
50360
|
-
/***/ "d6f0":
|
|
50361
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
50362
|
-
|
|
50363
|
-
"use strict";
|
|
50364
|
-
/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f0d");
|
|
50365
|
-
|
|
50366
|
-
|
|
50367
|
-
/** Detect free variable `exports`. */
|
|
50368
|
-
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
50369
|
-
|
|
50370
|
-
/** Detect free variable `module`. */
|
|
50371
|
-
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
50372
|
-
|
|
50373
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
50374
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
50375
|
-
|
|
50376
|
-
/** Built-in value references. */
|
|
50377
|
-
var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined,
|
|
50378
|
-
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
50379
|
-
|
|
50380
|
-
/**
|
|
50381
|
-
* Creates a clone of `buffer`.
|
|
50382
|
-
*
|
|
50383
|
-
* @private
|
|
50384
|
-
* @param {Buffer} buffer The buffer to clone.
|
|
50385
|
-
* @param {boolean} [isDeep] Specify a deep clone.
|
|
50386
|
-
* @returns {Buffer} Returns the cloned buffer.
|
|
50387
|
-
*/
|
|
50388
|
-
function cloneBuffer(buffer, isDeep) {
|
|
50389
|
-
if (isDeep) {
|
|
50390
|
-
return buffer.slice();
|
|
50391
|
-
}
|
|
50392
|
-
var length = buffer.length,
|
|
50393
|
-
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
50394
|
-
|
|
50395
|
-
buffer.copy(result);
|
|
50396
|
-
return result;
|
|
50397
|
-
}
|
|
50398
|
-
|
|
50399
|
-
/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
|
|
50400
|
-
|
|
50401
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7326")(module)))
|
|
50402
|
-
|
|
50403
|
-
/***/ }),
|
|
50404
|
-
|
|
50405
|
-
/***/ "da06":
|
|
50406
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50407
|
-
|
|
50408
|
-
var TO_STRING_TAG_SUPPORT = __webpack_require__("3cec");
|
|
50409
|
-
var classofRaw = __webpack_require__("6a61");
|
|
50410
|
-
var wellKnownSymbol = __webpack_require__("7d53");
|
|
50411
|
-
|
|
50412
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
50413
|
-
// ES3 wrong here
|
|
50414
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
50415
|
-
|
|
50416
|
-
// fallback for IE11 Script Access Denied error
|
|
50417
|
-
var tryGet = function (it, key) {
|
|
50418
|
-
try {
|
|
50419
|
-
return it[key];
|
|
50420
|
-
} catch (error) { /* empty */ }
|
|
50421
|
-
};
|
|
50422
|
-
|
|
50423
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
50424
|
-
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
50425
|
-
var O, tag, result;
|
|
50426
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
50427
|
-
// @@toStringTag case
|
|
50428
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
50429
|
-
// builtinTag case
|
|
50430
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
50431
|
-
// ES3 arguments fallback
|
|
50432
|
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
|
50433
|
-
};
|
|
50434
|
-
|
|
50435
|
-
|
|
50436
|
-
/***/ }),
|
|
50437
|
-
|
|
50438
|
-
/***/ "df6f":
|
|
50439
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50440
|
-
|
|
50441
|
-
var store = __webpack_require__("c607");
|
|
50442
|
-
|
|
50443
|
-
var functionToString = Function.toString;
|
|
50444
|
-
|
|
50445
|
-
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
50446
|
-
if (typeof store.inspectSource != 'function') {
|
|
50447
|
-
store.inspectSource = function (it) {
|
|
50448
|
-
return functionToString.call(it);
|
|
50449
|
-
};
|
|
50450
|
-
}
|
|
50451
|
-
|
|
50452
|
-
module.exports = store.inspectSource;
|
|
50453
|
-
|
|
50454
|
-
|
|
50455
|
-
/***/ }),
|
|
50456
|
-
|
|
50457
|
-
/***/ "e129":
|
|
50458
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50459
|
-
|
|
50460
|
-
"use strict";
|
|
50461
|
-
|
|
50462
|
-
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
50463
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
50464
|
-
|
|
50465
|
-
// Nashorn ~ JDK8 bug
|
|
50466
|
-
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
50467
|
-
|
|
50468
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
50469
|
-
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
|
50470
|
-
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
50471
|
-
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
50472
|
-
return !!descriptor && descriptor.enumerable;
|
|
50473
|
-
} : nativePropertyIsEnumerable;
|
|
50474
|
-
|
|
50475
|
-
|
|
50476
|
-
/***/ }),
|
|
50477
|
-
|
|
50478
|
-
/***/ "e7a0":
|
|
50479
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50480
|
-
|
|
50481
|
-
var fails = __webpack_require__("72df");
|
|
50482
|
-
|
|
50483
|
-
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
50484
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
50485
|
-
// eslint-disable-next-line no-undef
|
|
50486
|
-
return !String(Symbol());
|
|
50487
|
-
});
|
|
50488
|
-
|
|
50489
|
-
|
|
50490
|
-
/***/ }),
|
|
50491
|
-
|
|
50492
|
-
/***/ "ebac":
|
|
50493
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50494
|
-
|
|
50495
|
-
var fails = __webpack_require__("72df");
|
|
50496
|
-
|
|
50497
|
-
var replacement = /#|\.prototype\./;
|
|
50498
|
-
|
|
50499
|
-
var isForced = function (feature, detection) {
|
|
50500
|
-
var value = data[normalize(feature)];
|
|
50501
|
-
return value == POLYFILL ? true
|
|
50502
|
-
: value == NATIVE ? false
|
|
50503
|
-
: typeof detection == 'function' ? fails(detection)
|
|
50504
|
-
: !!detection;
|
|
50505
|
-
};
|
|
50506
|
-
|
|
50507
|
-
var normalize = isForced.normalize = function (string) {
|
|
50508
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
50509
|
-
};
|
|
50510
|
-
|
|
50511
|
-
var data = isForced.data = {};
|
|
50512
|
-
var NATIVE = isForced.NATIVE = 'N';
|
|
50513
|
-
var POLYFILL = isForced.POLYFILL = 'P';
|
|
50514
|
-
|
|
50515
|
-
module.exports = isForced;
|
|
50516
|
-
|
|
50517
|
-
|
|
50518
|
-
/***/ }),
|
|
50519
|
-
|
|
50520
|
-
/***/ "ed2b":
|
|
50521
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50522
|
-
|
|
50523
|
-
var wellKnownSymbol = __webpack_require__("7d53");
|
|
50524
|
-
var create = __webpack_require__("82e8");
|
|
50525
|
-
var definePropertyModule = __webpack_require__("abdf");
|
|
50526
|
-
|
|
50527
|
-
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
50528
|
-
var ArrayPrototype = Array.prototype;
|
|
50529
|
-
|
|
50530
|
-
// Array.prototype[@@unscopables]
|
|
50531
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
50532
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
50533
|
-
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
|
|
50534
|
-
configurable: true,
|
|
50535
|
-
value: create(null)
|
|
50536
|
-
});
|
|
50537
|
-
}
|
|
50538
|
-
|
|
50539
|
-
// add a key to Array.prototype[@@unscopables]
|
|
50540
|
-
module.exports = function (key) {
|
|
50541
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
50542
|
-
};
|
|
50543
|
-
|
|
50544
|
-
|
|
50545
|
-
/***/ }),
|
|
50546
|
-
|
|
50547
|
-
/***/ "ee58":
|
|
50548
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50549
|
-
|
|
50550
|
-
var toIndexedObject = __webpack_require__("378c");
|
|
50551
|
-
var nativeGetOwnPropertyNames = __webpack_require__("65d0").f;
|
|
50552
|
-
|
|
50553
|
-
var toString = {}.toString;
|
|
50554
|
-
|
|
50555
|
-
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
50556
|
-
? Object.getOwnPropertyNames(window) : [];
|
|
50557
|
-
|
|
50558
|
-
var getWindowNames = function (it) {
|
|
50559
|
-
try {
|
|
50560
|
-
return nativeGetOwnPropertyNames(it);
|
|
50561
|
-
} catch (error) {
|
|
50562
|
-
return windowNames.slice();
|
|
50563
|
-
}
|
|
50564
|
-
};
|
|
50565
|
-
|
|
50566
|
-
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
50567
|
-
module.exports.f = function getOwnPropertyNames(it) {
|
|
50568
|
-
return windowNames && toString.call(it) == '[object Window]'
|
|
50569
|
-
? getWindowNames(it)
|
|
50570
|
-
: nativeGetOwnPropertyNames(toIndexedObject(it));
|
|
50571
|
-
};
|
|
50572
|
-
|
|
50573
|
-
|
|
50574
|
-
/***/ }),
|
|
50575
|
-
|
|
50576
|
-
/***/ "eeea":
|
|
50577
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
50578
|
-
|
|
50579
|
-
(function (global) {
|
|
50580
|
-
'use strict';
|
|
50581
|
-
|
|
50582
|
-
var util = newUtil();
|
|
50583
|
-
var inliner = newInliner();
|
|
50584
|
-
var fontFaces = newFontFaces();
|
|
50585
|
-
var images = newImages();
|
|
50586
|
-
|
|
50587
|
-
// Default impl options
|
|
50588
|
-
var defaultOptions = {
|
|
50589
|
-
// Default is to fail on error, no placeholder
|
|
50590
|
-
imagePlaceholder: undefined,
|
|
50591
|
-
// Default cache bust is false, it will use the cache
|
|
50592
|
-
cacheBust: false
|
|
50593
|
-
};
|
|
50594
|
-
|
|
50595
|
-
var domtoimage = {
|
|
50596
|
-
toSvg: toSvg,
|
|
50597
|
-
toPng: toPng,
|
|
50598
|
-
toJpeg: toJpeg,
|
|
50599
|
-
toBlob: toBlob,
|
|
50600
|
-
toPixelData: toPixelData,
|
|
50601
|
-
impl: {
|
|
50602
|
-
fontFaces: fontFaces,
|
|
50603
|
-
images: images,
|
|
50604
|
-
util: util,
|
|
50605
|
-
inliner: inliner,
|
|
50606
|
-
options: {}
|
|
50607
|
-
}
|
|
50608
|
-
};
|
|
50609
|
-
|
|
50610
|
-
if (true)
|
|
50611
|
-
module.exports = domtoimage;
|
|
50612
|
-
else
|
|
50613
|
-
{}
|
|
50614
|
-
|
|
50615
|
-
|
|
50616
|
-
/**
|
|
50617
|
-
* @param {Node} node - The DOM Node object to render
|
|
50618
|
-
* @param {Object} options - Rendering options
|
|
50619
|
-
* @param {Function} options.filter - Should return true if passed node should be included in the output
|
|
50620
|
-
* (excluding node means excluding it's children as well). Not called on the root node.
|
|
50621
|
-
* @param {String} options.bgcolor - color for the background, any valid CSS color value.
|
|
50622
|
-
* @param {Number} options.width - width to be applied to node before rendering.
|
|
50623
|
-
* @param {Number} options.height - height to be applied to node before rendering.
|
|
50624
|
-
* @param {Object} options.style - an object whose properties to be copied to node's style before rendering.
|
|
50625
|
-
* @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),
|
|
50626
|
-
defaults to 1.0.
|
|
50627
|
-
* @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch
|
|
50628
|
-
* @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url
|
|
50629
|
-
* @return {Promise} - A promise that is fulfilled with a SVG image data URL
|
|
50630
|
-
* */
|
|
50631
|
-
function toSvg(node, options) {
|
|
50632
|
-
options = options || {};
|
|
50633
|
-
copyOptions(options);
|
|
50634
|
-
return Promise.resolve(node)
|
|
50635
|
-
.then(function (node) {
|
|
50636
|
-
return cloneNode(node, options.filter, true);
|
|
50637
|
-
})
|
|
50638
|
-
.then(embedFonts)
|
|
50639
|
-
.then(inlineImages)
|
|
50640
|
-
.then(applyOptions)
|
|
50641
|
-
.then(function (clone) {
|
|
50642
|
-
return makeSvgDataUri(clone,
|
|
50643
|
-
options.width || util.width(node),
|
|
50644
|
-
options.height || util.height(node)
|
|
50645
|
-
);
|
|
50646
|
-
});
|
|
50647
|
-
|
|
50648
|
-
function applyOptions(clone) {
|
|
50649
|
-
if (options.bgcolor) clone.style.backgroundColor = options.bgcolor;
|
|
50650
|
-
|
|
50651
|
-
if (options.width) clone.style.width = options.width + 'px';
|
|
50652
|
-
if (options.height) clone.style.height = options.height + 'px';
|
|
50653
|
-
|
|
50654
|
-
if (options.style)
|
|
50655
|
-
Object.keys(options.style).forEach(function (property) {
|
|
50656
|
-
clone.style[property] = options.style[property];
|
|
50657
|
-
});
|
|
50658
|
-
|
|
50659
|
-
return clone;
|
|
50660
|
-
}
|
|
50661
|
-
}
|
|
50662
|
-
|
|
50663
|
-
/**
|
|
50664
|
-
* @param {Node} node - The DOM Node object to render
|
|
50665
|
-
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
50666
|
-
* @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.
|
|
50667
|
-
* */
|
|
50668
|
-
function toPixelData(node, options) {
|
|
50669
|
-
return draw(node, options || {})
|
|
50670
|
-
.then(function (canvas) {
|
|
50671
|
-
return canvas.getContext('2d').getImageData(
|
|
50672
|
-
0,
|
|
50673
|
-
0,
|
|
50674
|
-
util.width(node),
|
|
50675
|
-
util.height(node)
|
|
50676
|
-
).data;
|
|
50677
|
-
});
|
|
50678
|
-
}
|
|
50679
|
-
|
|
50680
|
-
/**
|
|
50681
|
-
* @param {Node} node - The DOM Node object to render
|
|
50682
|
-
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
50683
|
-
* @return {Promise} - A promise that is fulfilled with a PNG image data URL
|
|
50684
|
-
* */
|
|
50685
|
-
function toPng(node, options) {
|
|
50686
|
-
return draw(node, options || {})
|
|
50687
|
-
.then(function (canvas) {
|
|
50688
|
-
return canvas.toDataURL();
|
|
50689
|
-
});
|
|
50690
|
-
}
|
|
50691
|
-
|
|
50692
|
-
/**
|
|
50693
|
-
* @param {Node} node - The DOM Node object to render
|
|
50694
|
-
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
50695
|
-
* @return {Promise} - A promise that is fulfilled with a JPEG image data URL
|
|
50696
|
-
* */
|
|
50697
|
-
function toJpeg(node, options) {
|
|
50698
|
-
options = options || {};
|
|
50699
|
-
return draw(node, options)
|
|
50700
|
-
.then(function (canvas) {
|
|
50701
|
-
return canvas.toDataURL('image/jpeg', options.quality || 1.0);
|
|
50702
|
-
});
|
|
50703
|
-
}
|
|
50704
|
-
|
|
50705
|
-
/**
|
|
50706
|
-
* @param {Node} node - The DOM Node object to render
|
|
50707
|
-
* @param {Object} options - Rendering options, @see {@link toSvg}
|
|
50708
|
-
* @return {Promise} - A promise that is fulfilled with a PNG image blob
|
|
50709
|
-
* */
|
|
50710
|
-
function toBlob(node, options) {
|
|
50711
|
-
return draw(node, options || {})
|
|
50712
|
-
.then(util.canvasToBlob);
|
|
50713
|
-
}
|
|
50714
|
-
|
|
50715
|
-
function copyOptions(options) {
|
|
50716
|
-
// Copy options to impl options for use in impl
|
|
50717
|
-
if(typeof(options.imagePlaceholder) === 'undefined') {
|
|
50718
|
-
domtoimage.impl.options.imagePlaceholder = defaultOptions.imagePlaceholder;
|
|
50719
|
-
} else {
|
|
50720
|
-
domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;
|
|
50721
|
-
}
|
|
50722
|
-
|
|
50723
|
-
if(typeof(options.cacheBust) === 'undefined') {
|
|
50724
|
-
domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;
|
|
50725
|
-
} else {
|
|
50726
|
-
domtoimage.impl.options.cacheBust = options.cacheBust;
|
|
50727
|
-
}
|
|
50728
|
-
}
|
|
50729
|
-
|
|
50730
|
-
function draw(domNode, options) {
|
|
50731
|
-
return toSvg(domNode, options)
|
|
50732
|
-
.then(util.makeImage)
|
|
50733
|
-
.then(util.delay(100))
|
|
50734
|
-
.then(function (image) {
|
|
50735
|
-
var canvas = newCanvas(domNode);
|
|
50736
|
-
canvas.getContext('2d').drawImage(image, 0, 0);
|
|
50737
|
-
return canvas;
|
|
50738
|
-
});
|
|
50739
|
-
|
|
50740
|
-
function newCanvas(domNode) {
|
|
50741
|
-
var canvas = document.createElement('canvas');
|
|
50742
|
-
canvas.width = options.width || util.width(domNode);
|
|
50743
|
-
canvas.height = options.height || util.height(domNode);
|
|
50744
|
-
|
|
50745
|
-
if (options.bgcolor) {
|
|
50746
|
-
var ctx = canvas.getContext('2d');
|
|
50747
|
-
ctx.fillStyle = options.bgcolor;
|
|
50748
|
-
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
50749
|
-
}
|
|
50750
|
-
|
|
50751
|
-
return canvas;
|
|
50752
|
-
}
|
|
50753
|
-
}
|
|
50754
|
-
|
|
50755
|
-
function cloneNode(node, filter, root) {
|
|
50756
|
-
if (!root && filter && !filter(node)) return Promise.resolve();
|
|
50757
|
-
|
|
50758
|
-
return Promise.resolve(node)
|
|
50759
|
-
.then(makeNodeCopy)
|
|
50760
|
-
.then(function (clone) {
|
|
50761
|
-
return cloneChildren(node, clone, filter);
|
|
50762
|
-
})
|
|
50763
|
-
.then(function (clone) {
|
|
50764
|
-
return processClone(node, clone);
|
|
50765
|
-
});
|
|
50766
|
-
|
|
50767
|
-
function makeNodeCopy(node) {
|
|
50768
|
-
if (node instanceof HTMLCanvasElement) return util.makeImage(node.toDataURL());
|
|
50769
|
-
return node.cloneNode(false);
|
|
50770
|
-
}
|
|
50771
|
-
|
|
50772
|
-
function cloneChildren(original, clone, filter) {
|
|
50773
|
-
var children = original.childNodes;
|
|
50774
|
-
if (children.length === 0) return Promise.resolve(clone);
|
|
50775
|
-
|
|
50776
|
-
return cloneChildrenInOrder(clone, util.asArray(children), filter)
|
|
50777
|
-
.then(function () {
|
|
50778
|
-
return clone;
|
|
50779
|
-
});
|
|
50780
|
-
|
|
50781
|
-
function cloneChildrenInOrder(parent, children, filter) {
|
|
50782
|
-
var done = Promise.resolve();
|
|
50783
|
-
children.forEach(function (child) {
|
|
50784
|
-
done = done
|
|
50785
|
-
.then(function () {
|
|
50786
|
-
return cloneNode(child, filter);
|
|
50787
|
-
})
|
|
50788
|
-
.then(function (childClone) {
|
|
50789
|
-
if (childClone) parent.appendChild(childClone);
|
|
50790
|
-
});
|
|
50791
|
-
});
|
|
50792
|
-
return done;
|
|
50793
|
-
}
|
|
50794
|
-
}
|
|
50795
|
-
|
|
50796
|
-
function processClone(original, clone) {
|
|
50797
|
-
if (!(clone instanceof Element)) return clone;
|
|
50798
|
-
|
|
50799
|
-
return Promise.resolve()
|
|
50800
|
-
.then(cloneStyle)
|
|
50801
|
-
.then(clonePseudoElements)
|
|
50802
|
-
.then(copyUserInput)
|
|
50803
|
-
.then(fixSvg)
|
|
50804
|
-
.then(function () {
|
|
50805
|
-
return clone;
|
|
50806
|
-
});
|
|
50807
|
-
|
|
50808
|
-
function cloneStyle() {
|
|
50809
|
-
copyStyle(window.getComputedStyle(original), clone.style);
|
|
50810
|
-
|
|
50811
|
-
function copyStyle(source, target) {
|
|
50812
|
-
if (source.cssText) target.cssText = source.cssText;
|
|
50813
|
-
else copyProperties(source, target);
|
|
50814
|
-
|
|
50815
|
-
function copyProperties(source, target) {
|
|
50816
|
-
util.asArray(source).forEach(function (name) {
|
|
50817
|
-
target.setProperty(
|
|
50818
|
-
name,
|
|
50819
|
-
source.getPropertyValue(name),
|
|
50820
|
-
source.getPropertyPriority(name)
|
|
50821
|
-
);
|
|
50822
|
-
});
|
|
50823
|
-
}
|
|
50824
|
-
}
|
|
50825
|
-
}
|
|
50826
|
-
|
|
50827
|
-
function clonePseudoElements() {
|
|
50828
|
-
[':before', ':after'].forEach(function (element) {
|
|
50829
|
-
clonePseudoElement(element);
|
|
50830
|
-
});
|
|
50831
|
-
|
|
50832
|
-
function clonePseudoElement(element) {
|
|
50833
|
-
var style = window.getComputedStyle(original, element);
|
|
50834
|
-
var content = style.getPropertyValue('content');
|
|
50835
|
-
|
|
50836
|
-
if (content === '' || content === 'none') return;
|
|
50837
|
-
|
|
50838
|
-
var className = util.uid();
|
|
50839
|
-
clone.className = clone.className + ' ' + className;
|
|
50840
|
-
var styleElement = document.createElement('style');
|
|
50841
|
-
styleElement.appendChild(formatPseudoElementStyle(className, element, style));
|
|
50842
|
-
clone.appendChild(styleElement);
|
|
50843
|
-
|
|
50844
|
-
function formatPseudoElementStyle(className, element, style) {
|
|
50845
|
-
var selector = '.' + className + ':' + element;
|
|
50846
|
-
var cssText = style.cssText ? formatCssText(style) : formatCssProperties(style);
|
|
50847
|
-
return document.createTextNode(selector + '{' + cssText + '}');
|
|
50848
|
-
|
|
50849
|
-
function formatCssText(style) {
|
|
50850
|
-
var content = style.getPropertyValue('content');
|
|
50851
|
-
return style.cssText + ' content: ' + content + ';';
|
|
50852
|
-
}
|
|
50853
|
-
|
|
50854
|
-
function formatCssProperties(style) {
|
|
50855
|
-
|
|
50856
|
-
return util.asArray(style)
|
|
50857
|
-
.map(formatProperty)
|
|
50858
|
-
.join('; ') + ';';
|
|
50859
|
-
|
|
50860
|
-
function formatProperty(name) {
|
|
50861
|
-
return name + ': ' +
|
|
50862
|
-
style.getPropertyValue(name) +
|
|
50863
|
-
(style.getPropertyPriority(name) ? ' !important' : '');
|
|
50864
|
-
}
|
|
50865
|
-
}
|
|
50866
|
-
}
|
|
50867
|
-
}
|
|
50868
|
-
}
|
|
51041
|
+
// https://tc39.github.io/ecma262/#sec-json.stringify
|
|
51042
|
+
if ($stringify) {
|
|
51043
|
+
var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
|
|
51044
|
+
var symbol = $Symbol();
|
|
51045
|
+
// MS Edge converts symbol values to JSON as {}
|
|
51046
|
+
return $stringify([symbol]) != '[null]'
|
|
51047
|
+
// WebKit converts symbol values to JSON as null
|
|
51048
|
+
|| $stringify({ a: symbol }) != '{}'
|
|
51049
|
+
// V8 throws on boxed symbols
|
|
51050
|
+
|| $stringify(Object(symbol)) != '{}';
|
|
51051
|
+
});
|
|
50869
51052
|
|
|
50870
|
-
|
|
50871
|
-
|
|
50872
|
-
|
|
50873
|
-
|
|
51053
|
+
$({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
51054
|
+
// eslint-disable-next-line no-unused-vars
|
|
51055
|
+
stringify: function stringify(it, replacer, space) {
|
|
51056
|
+
var args = [it];
|
|
51057
|
+
var index = 1;
|
|
51058
|
+
var $replacer;
|
|
51059
|
+
while (arguments.length > index) args.push(arguments[index++]);
|
|
51060
|
+
$replacer = replacer;
|
|
51061
|
+
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
51062
|
+
if (!isArray(replacer)) replacer = function (key, value) {
|
|
51063
|
+
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
51064
|
+
if (!isSymbol(value)) return value;
|
|
51065
|
+
};
|
|
51066
|
+
args[1] = replacer;
|
|
51067
|
+
return $stringify.apply(null, args);
|
|
51068
|
+
}
|
|
51069
|
+
});
|
|
51070
|
+
}
|
|
50874
51071
|
|
|
50875
|
-
|
|
50876
|
-
|
|
50877
|
-
|
|
51072
|
+
// `Symbol.prototype[@@toPrimitive]` method
|
|
51073
|
+
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
51074
|
+
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
|
|
51075
|
+
createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
51076
|
+
}
|
|
51077
|
+
// `Symbol.prototype[@@toStringTag]` property
|
|
51078
|
+
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
51079
|
+
setToStringTag($Symbol, SYMBOL);
|
|
50878
51080
|
|
|
50879
|
-
|
|
50880
|
-
['width', 'height'].forEach(function (attribute) {
|
|
50881
|
-
var value = clone.getAttribute(attribute);
|
|
50882
|
-
if (!value) return;
|
|
51081
|
+
hiddenKeys[HIDDEN] = true;
|
|
50883
51082
|
|
|
50884
|
-
clone.style.setProperty(attribute, value);
|
|
50885
|
-
});
|
|
50886
|
-
}
|
|
50887
|
-
}
|
|
50888
|
-
}
|
|
50889
51083
|
|
|
50890
|
-
|
|
50891
|
-
return fontFaces.resolveAll()
|
|
50892
|
-
.then(function (cssText) {
|
|
50893
|
-
var styleNode = document.createElement('style');
|
|
50894
|
-
node.appendChild(styleNode);
|
|
50895
|
-
styleNode.appendChild(document.createTextNode(cssText));
|
|
50896
|
-
return node;
|
|
50897
|
-
});
|
|
50898
|
-
}
|
|
51084
|
+
/***/ }),
|
|
50899
51085
|
|
|
50900
|
-
|
|
50901
|
-
|
|
50902
|
-
.then(function () {
|
|
50903
|
-
return node;
|
|
50904
|
-
});
|
|
50905
|
-
}
|
|
51086
|
+
/***/ "d6f0":
|
|
51087
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
50906
51088
|
|
|
50907
|
-
|
|
50908
|
-
|
|
50909
|
-
.then(function (node) {
|
|
50910
|
-
node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
|
|
50911
|
-
return new XMLSerializer().serializeToString(node);
|
|
50912
|
-
})
|
|
50913
|
-
.then(util.escapeXhtml)
|
|
50914
|
-
.then(function (xhtml) {
|
|
50915
|
-
return '<foreignObject x="0" y="0" width="100%" height="100%">' + xhtml + '</foreignObject>';
|
|
50916
|
-
})
|
|
50917
|
-
.then(function (foreignObject) {
|
|
50918
|
-
return '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + height + '">' +
|
|
50919
|
-
foreignObject + '</svg>';
|
|
50920
|
-
})
|
|
50921
|
-
.then(function (svg) {
|
|
50922
|
-
return 'data:image/svg+xml;charset=utf-8,' + svg;
|
|
50923
|
-
});
|
|
50924
|
-
}
|
|
51089
|
+
"use strict";
|
|
51090
|
+
/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7f0d");
|
|
50925
51091
|
|
|
50926
|
-
function newUtil() {
|
|
50927
|
-
return {
|
|
50928
|
-
escape: escape,
|
|
50929
|
-
parseExtension: parseExtension,
|
|
50930
|
-
mimeType: mimeType,
|
|
50931
|
-
dataAsUrl: dataAsUrl,
|
|
50932
|
-
isDataUrl: isDataUrl,
|
|
50933
|
-
canvasToBlob: canvasToBlob,
|
|
50934
|
-
resolveUrl: resolveUrl,
|
|
50935
|
-
getAndEncode: getAndEncode,
|
|
50936
|
-
uid: uid(),
|
|
50937
|
-
delay: delay,
|
|
50938
|
-
asArray: asArray,
|
|
50939
|
-
escapeXhtml: escapeXhtml,
|
|
50940
|
-
makeImage: makeImage,
|
|
50941
|
-
width: width,
|
|
50942
|
-
height: height
|
|
50943
|
-
};
|
|
50944
51092
|
|
|
50945
|
-
|
|
50946
|
-
|
|
50947
|
-
* Only WOFF and EOT mime types for fonts are 'real'
|
|
50948
|
-
* see http://www.iana.org/assignments/media-types/media-types.xhtml
|
|
50949
|
-
*/
|
|
50950
|
-
var WOFF = 'application/font-woff';
|
|
50951
|
-
var JPEG = 'image/jpeg';
|
|
51093
|
+
/** Detect free variable `exports`. */
|
|
51094
|
+
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
50952
51095
|
|
|
50953
|
-
|
|
50954
|
-
|
|
50955
|
-
'woff2': WOFF,
|
|
50956
|
-
'ttf': 'application/font-truetype',
|
|
50957
|
-
'eot': 'application/vnd.ms-fontobject',
|
|
50958
|
-
'png': 'image/png',
|
|
50959
|
-
'jpg': JPEG,
|
|
50960
|
-
'jpeg': JPEG,
|
|
50961
|
-
'gif': 'image/gif',
|
|
50962
|
-
'tiff': 'image/tiff',
|
|
50963
|
-
'svg': 'image/svg+xml'
|
|
50964
|
-
};
|
|
50965
|
-
}
|
|
51096
|
+
/** Detect free variable `module`. */
|
|
51097
|
+
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
50966
51098
|
|
|
50967
|
-
|
|
50968
|
-
|
|
50969
|
-
if (match) return match[1];
|
|
50970
|
-
else return '';
|
|
50971
|
-
}
|
|
51099
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
51100
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
50972
51101
|
|
|
50973
|
-
|
|
50974
|
-
|
|
50975
|
-
|
|
50976
|
-
}
|
|
51102
|
+
/** Built-in value references. */
|
|
51103
|
+
var Buffer = moduleExports ? _root_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].Buffer : undefined,
|
|
51104
|
+
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
50977
51105
|
|
|
50978
|
-
|
|
50979
|
-
|
|
50980
|
-
|
|
51106
|
+
/**
|
|
51107
|
+
* Creates a clone of `buffer`.
|
|
51108
|
+
*
|
|
51109
|
+
* @private
|
|
51110
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
51111
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
51112
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
51113
|
+
*/
|
|
51114
|
+
function cloneBuffer(buffer, isDeep) {
|
|
51115
|
+
if (isDeep) {
|
|
51116
|
+
return buffer.slice();
|
|
51117
|
+
}
|
|
51118
|
+
var length = buffer.length,
|
|
51119
|
+
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
50981
51120
|
|
|
50982
|
-
|
|
50983
|
-
|
|
50984
|
-
|
|
50985
|
-
var length = binaryString.length;
|
|
50986
|
-
var binaryArray = new Uint8Array(length);
|
|
51121
|
+
buffer.copy(result);
|
|
51122
|
+
return result;
|
|
51123
|
+
}
|
|
50987
51124
|
|
|
50988
|
-
|
|
50989
|
-
binaryArray[i] = binaryString.charCodeAt(i);
|
|
51125
|
+
/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
|
|
50990
51126
|
|
|
50991
|
-
|
|
50992
|
-
type: 'image/png'
|
|
50993
|
-
}));
|
|
50994
|
-
});
|
|
50995
|
-
}
|
|
51127
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("7326")(module)))
|
|
50996
51128
|
|
|
50997
|
-
|
|
50998
|
-
if (canvas.toBlob)
|
|
50999
|
-
return new Promise(function (resolve) {
|
|
51000
|
-
canvas.toBlob(resolve);
|
|
51001
|
-
});
|
|
51129
|
+
/***/ }),
|
|
51002
51130
|
|
|
51003
|
-
|
|
51004
|
-
|
|
51131
|
+
/***/ "da06":
|
|
51132
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51005
51133
|
|
|
51006
|
-
|
|
51007
|
-
|
|
51008
|
-
|
|
51009
|
-
doc.head.appendChild(base);
|
|
51010
|
-
var a = doc.createElement('a');
|
|
51011
|
-
doc.body.appendChild(a);
|
|
51012
|
-
base.href = baseUrl;
|
|
51013
|
-
a.href = url;
|
|
51014
|
-
return a.href;
|
|
51015
|
-
}
|
|
51134
|
+
var TO_STRING_TAG_SUPPORT = __webpack_require__("3cec");
|
|
51135
|
+
var classofRaw = __webpack_require__("6a61");
|
|
51136
|
+
var wellKnownSymbol = __webpack_require__("7d53");
|
|
51016
51137
|
|
|
51017
|
-
|
|
51018
|
-
|
|
51138
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
51139
|
+
// ES3 wrong here
|
|
51140
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
51019
51141
|
|
|
51020
|
-
|
|
51021
|
-
|
|
51142
|
+
// fallback for IE11 Script Access Denied error
|
|
51143
|
+
var tryGet = function (it, key) {
|
|
51144
|
+
try {
|
|
51145
|
+
return it[key];
|
|
51146
|
+
} catch (error) { /* empty */ }
|
|
51147
|
+
};
|
|
51022
51148
|
|
|
51023
|
-
|
|
51024
|
-
|
|
51025
|
-
|
|
51026
|
-
|
|
51027
|
-
|
|
51028
|
-
|
|
51149
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
51150
|
+
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
51151
|
+
var O, tag, result;
|
|
51152
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
51153
|
+
// @@toStringTag case
|
|
51154
|
+
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
51155
|
+
// builtinTag case
|
|
51156
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
51157
|
+
// ES3 arguments fallback
|
|
51158
|
+
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
|
51159
|
+
};
|
|
51029
51160
|
|
|
51030
|
-
function makeImage(uri) {
|
|
51031
|
-
return new Promise(function (resolve, reject) {
|
|
51032
|
-
var image = new Image();
|
|
51033
|
-
image.onload = function () {
|
|
51034
|
-
resolve(image);
|
|
51035
|
-
};
|
|
51036
|
-
image.onerror = reject;
|
|
51037
|
-
image.src = uri;
|
|
51038
|
-
});
|
|
51039
|
-
}
|
|
51040
51161
|
|
|
51041
|
-
|
|
51042
|
-
var TIMEOUT = 30000;
|
|
51043
|
-
if(domtoimage.impl.options.cacheBust) {
|
|
51044
|
-
// Cache bypass so we dont have CORS issues with cached images
|
|
51045
|
-
// Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
|
|
51046
|
-
url += ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime();
|
|
51047
|
-
}
|
|
51162
|
+
/***/ }),
|
|
51048
51163
|
|
|
51049
|
-
|
|
51050
|
-
|
|
51164
|
+
/***/ "df6f":
|
|
51165
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51051
51166
|
|
|
51052
|
-
|
|
51053
|
-
request.ontimeout = timeout;
|
|
51054
|
-
request.responseType = 'blob';
|
|
51055
|
-
request.timeout = TIMEOUT;
|
|
51056
|
-
request.open('GET', url, true);
|
|
51057
|
-
request.send();
|
|
51167
|
+
var store = __webpack_require__("c607");
|
|
51058
51168
|
|
|
51059
|
-
|
|
51060
|
-
if(domtoimage.impl.options.imagePlaceholder) {
|
|
51061
|
-
var split = domtoimage.impl.options.imagePlaceholder.split(/,/);
|
|
51062
|
-
if(split && split[1]) {
|
|
51063
|
-
placeholder = split[1];
|
|
51064
|
-
}
|
|
51065
|
-
}
|
|
51169
|
+
var functionToString = Function.toString;
|
|
51066
51170
|
|
|
51067
|
-
|
|
51068
|
-
|
|
51171
|
+
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
51172
|
+
if (typeof store.inspectSource != 'function') {
|
|
51173
|
+
store.inspectSource = function (it) {
|
|
51174
|
+
return functionToString.call(it);
|
|
51175
|
+
};
|
|
51176
|
+
}
|
|
51069
51177
|
|
|
51070
|
-
|
|
51071
|
-
if(placeholder) {
|
|
51072
|
-
resolve(placeholder);
|
|
51073
|
-
} else {
|
|
51074
|
-
fail('cannot fetch resource: ' + url + ', status: ' + request.status);
|
|
51075
|
-
}
|
|
51178
|
+
module.exports = store.inspectSource;
|
|
51076
51179
|
|
|
51077
|
-
return;
|
|
51078
|
-
}
|
|
51079
51180
|
|
|
51080
|
-
|
|
51081
|
-
encoder.onloadend = function () {
|
|
51082
|
-
var content = encoder.result.split(/,/)[1];
|
|
51083
|
-
resolve(content);
|
|
51084
|
-
};
|
|
51085
|
-
encoder.readAsDataURL(request.response);
|
|
51086
|
-
}
|
|
51181
|
+
/***/ }),
|
|
51087
51182
|
|
|
51088
|
-
|
|
51089
|
-
|
|
51090
|
-
resolve(placeholder);
|
|
51091
|
-
} else {
|
|
51092
|
-
fail('timeout of ' + TIMEOUT + 'ms occured while fetching resource: ' + url);
|
|
51093
|
-
}
|
|
51094
|
-
}
|
|
51183
|
+
/***/ "e129":
|
|
51184
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51095
51185
|
|
|
51096
|
-
|
|
51097
|
-
console.error(message);
|
|
51098
|
-
resolve('');
|
|
51099
|
-
}
|
|
51100
|
-
});
|
|
51101
|
-
}
|
|
51186
|
+
"use strict";
|
|
51102
51187
|
|
|
51103
|
-
|
|
51104
|
-
|
|
51105
|
-
}
|
|
51188
|
+
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
|
51189
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
51106
51190
|
|
|
51107
|
-
|
|
51108
|
-
|
|
51109
|
-
}
|
|
51191
|
+
// Nashorn ~ JDK8 bug
|
|
51192
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
51110
51193
|
|
|
51111
|
-
|
|
51112
|
-
|
|
51113
|
-
|
|
51114
|
-
|
|
51115
|
-
|
|
51116
|
-
|
|
51117
|
-
});
|
|
51118
|
-
};
|
|
51119
|
-
}
|
|
51194
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
51195
|
+
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
|
51196
|
+
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
51197
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
51198
|
+
return !!descriptor && descriptor.enumerable;
|
|
51199
|
+
} : nativePropertyIsEnumerable;
|
|
51120
51200
|
|
|
51121
|
-
function asArray(arrayLike) {
|
|
51122
|
-
var array = [];
|
|
51123
|
-
var length = arrayLike.length;
|
|
51124
|
-
for (var i = 0; i < length; i++) array.push(arrayLike[i]);
|
|
51125
|
-
return array;
|
|
51126
|
-
}
|
|
51127
51201
|
|
|
51128
|
-
|
|
51129
|
-
return string.replace(/#/g, '%23').replace(/\n/g, '%0A');
|
|
51130
|
-
}
|
|
51202
|
+
/***/ }),
|
|
51131
51203
|
|
|
51132
|
-
|
|
51133
|
-
|
|
51134
|
-
var rightBorder = px(node, 'border-right-width');
|
|
51135
|
-
return node.scrollWidth + leftBorder + rightBorder;
|
|
51136
|
-
}
|
|
51204
|
+
/***/ "e7a0":
|
|
51205
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51137
51206
|
|
|
51138
|
-
|
|
51139
|
-
var topBorder = px(node, 'border-top-width');
|
|
51140
|
-
var bottomBorder = px(node, 'border-bottom-width');
|
|
51141
|
-
return node.scrollHeight + topBorder + bottomBorder;
|
|
51142
|
-
}
|
|
51207
|
+
var fails = __webpack_require__("72df");
|
|
51143
51208
|
|
|
51144
|
-
|
|
51145
|
-
|
|
51146
|
-
|
|
51147
|
-
|
|
51148
|
-
|
|
51209
|
+
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
51210
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
51211
|
+
// eslint-disable-next-line no-undef
|
|
51212
|
+
return !String(Symbol());
|
|
51213
|
+
});
|
|
51149
51214
|
|
|
51150
|
-
function newInliner() {
|
|
51151
|
-
var URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
|
|
51152
51215
|
|
|
51153
|
-
|
|
51154
|
-
inlineAll: inlineAll,
|
|
51155
|
-
shouldProcess: shouldProcess,
|
|
51156
|
-
impl: {
|
|
51157
|
-
readUrls: readUrls,
|
|
51158
|
-
inline: inline
|
|
51159
|
-
}
|
|
51160
|
-
};
|
|
51216
|
+
/***/ }),
|
|
51161
51217
|
|
|
51162
|
-
|
|
51163
|
-
|
|
51164
|
-
}
|
|
51218
|
+
/***/ "ebac":
|
|
51219
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51165
51220
|
|
|
51166
|
-
|
|
51167
|
-
var result = [];
|
|
51168
|
-
var match;
|
|
51169
|
-
while ((match = URL_REGEX.exec(string)) !== null) {
|
|
51170
|
-
result.push(match[1]);
|
|
51171
|
-
}
|
|
51172
|
-
return result.filter(function (url) {
|
|
51173
|
-
return !util.isDataUrl(url);
|
|
51174
|
-
});
|
|
51175
|
-
}
|
|
51221
|
+
var fails = __webpack_require__("72df");
|
|
51176
51222
|
|
|
51177
|
-
|
|
51178
|
-
return Promise.resolve(url)
|
|
51179
|
-
.then(function (url) {
|
|
51180
|
-
return baseUrl ? util.resolveUrl(url, baseUrl) : url;
|
|
51181
|
-
})
|
|
51182
|
-
.then(get || util.getAndEncode)
|
|
51183
|
-
.then(function (data) {
|
|
51184
|
-
return util.dataAsUrl(data, util.mimeType(url));
|
|
51185
|
-
})
|
|
51186
|
-
.then(function (dataUrl) {
|
|
51187
|
-
return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');
|
|
51188
|
-
});
|
|
51223
|
+
var replacement = /#|\.prototype\./;
|
|
51189
51224
|
|
|
51190
|
-
|
|
51191
|
-
|
|
51192
|
-
|
|
51193
|
-
|
|
51225
|
+
var isForced = function (feature, detection) {
|
|
51226
|
+
var value = data[normalize(feature)];
|
|
51227
|
+
return value == POLYFILL ? true
|
|
51228
|
+
: value == NATIVE ? false
|
|
51229
|
+
: typeof detection == 'function' ? fails(detection)
|
|
51230
|
+
: !!detection;
|
|
51231
|
+
};
|
|
51194
51232
|
|
|
51195
|
-
|
|
51196
|
-
|
|
51233
|
+
var normalize = isForced.normalize = function (string) {
|
|
51234
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
51235
|
+
};
|
|
51197
51236
|
|
|
51198
|
-
|
|
51199
|
-
|
|
51200
|
-
|
|
51201
|
-
var done = Promise.resolve(string);
|
|
51202
|
-
urls.forEach(function (url) {
|
|
51203
|
-
done = done.then(function (string) {
|
|
51204
|
-
return inline(string, url, baseUrl, get);
|
|
51205
|
-
});
|
|
51206
|
-
});
|
|
51207
|
-
return done;
|
|
51208
|
-
});
|
|
51237
|
+
var data = isForced.data = {};
|
|
51238
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
51239
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
51209
51240
|
|
|
51210
|
-
|
|
51211
|
-
return !shouldProcess(string);
|
|
51212
|
-
}
|
|
51213
|
-
}
|
|
51214
|
-
}
|
|
51241
|
+
module.exports = isForced;
|
|
51215
51242
|
|
|
51216
|
-
function newFontFaces() {
|
|
51217
|
-
return {
|
|
51218
|
-
resolveAll: resolveAll,
|
|
51219
|
-
impl: {
|
|
51220
|
-
readAll: readAll
|
|
51221
|
-
}
|
|
51222
|
-
};
|
|
51223
51243
|
|
|
51224
|
-
|
|
51225
|
-
return readAll(document)
|
|
51226
|
-
.then(function (webFonts) {
|
|
51227
|
-
return Promise.all(
|
|
51228
|
-
webFonts.map(function (webFont) {
|
|
51229
|
-
return webFont.resolve();
|
|
51230
|
-
})
|
|
51231
|
-
);
|
|
51232
|
-
})
|
|
51233
|
-
.then(function (cssStrings) {
|
|
51234
|
-
return cssStrings.join('\n');
|
|
51235
|
-
});
|
|
51236
|
-
}
|
|
51244
|
+
/***/ }),
|
|
51237
51245
|
|
|
51238
|
-
|
|
51239
|
-
|
|
51240
|
-
.then(getCssRules)
|
|
51241
|
-
.then(selectWebFontRules)
|
|
51242
|
-
.then(function (rules) {
|
|
51243
|
-
return rules.map(newWebFont);
|
|
51244
|
-
});
|
|
51246
|
+
/***/ "ed2b":
|
|
51247
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51245
51248
|
|
|
51246
|
-
|
|
51247
|
-
|
|
51248
|
-
|
|
51249
|
-
return rule.type === CSSRule.FONT_FACE_RULE;
|
|
51250
|
-
})
|
|
51251
|
-
.filter(function (rule) {
|
|
51252
|
-
return inliner.shouldProcess(rule.style.getPropertyValue('src'));
|
|
51253
|
-
});
|
|
51254
|
-
}
|
|
51249
|
+
var wellKnownSymbol = __webpack_require__("7d53");
|
|
51250
|
+
var create = __webpack_require__("82e8");
|
|
51251
|
+
var definePropertyModule = __webpack_require__("abdf");
|
|
51255
51252
|
|
|
51256
|
-
|
|
51257
|
-
|
|
51258
|
-
styleSheets.forEach(function (sheet) {
|
|
51259
|
-
try {
|
|
51260
|
-
util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
|
|
51261
|
-
} catch (e) {
|
|
51262
|
-
console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
|
|
51263
|
-
}
|
|
51264
|
-
});
|
|
51265
|
-
return cssRules;
|
|
51266
|
-
}
|
|
51253
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
51254
|
+
var ArrayPrototype = Array.prototype;
|
|
51267
51255
|
|
|
51268
|
-
|
|
51269
|
-
|
|
51270
|
-
|
|
51271
|
-
|
|
51272
|
-
|
|
51273
|
-
|
|
51274
|
-
|
|
51275
|
-
|
|
51276
|
-
}
|
|
51277
|
-
};
|
|
51278
|
-
}
|
|
51279
|
-
}
|
|
51280
|
-
}
|
|
51256
|
+
// Array.prototype[@@unscopables]
|
|
51257
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
51258
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
51259
|
+
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
|
|
51260
|
+
configurable: true,
|
|
51261
|
+
value: create(null)
|
|
51262
|
+
});
|
|
51263
|
+
}
|
|
51281
51264
|
|
|
51282
|
-
|
|
51283
|
-
|
|
51284
|
-
|
|
51285
|
-
|
|
51286
|
-
newImage: newImage
|
|
51287
|
-
}
|
|
51288
|
-
};
|
|
51265
|
+
// add a key to Array.prototype[@@unscopables]
|
|
51266
|
+
module.exports = function (key) {
|
|
51267
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
51268
|
+
};
|
|
51289
51269
|
|
|
51290
|
-
function newImage(element) {
|
|
51291
|
-
return {
|
|
51292
|
-
inline: inline
|
|
51293
|
-
};
|
|
51294
51270
|
|
|
51295
|
-
|
|
51296
|
-
if (util.isDataUrl(element.src)) return Promise.resolve();
|
|
51271
|
+
/***/ }),
|
|
51297
51272
|
|
|
51298
|
-
|
|
51299
|
-
|
|
51300
|
-
.then(function (data) {
|
|
51301
|
-
return util.dataAsUrl(data, util.mimeType(element.src));
|
|
51302
|
-
})
|
|
51303
|
-
.then(function (dataUrl) {
|
|
51304
|
-
return new Promise(function (resolve, reject) {
|
|
51305
|
-
element.onload = resolve;
|
|
51306
|
-
element.onerror = reject;
|
|
51307
|
-
element.src = dataUrl;
|
|
51308
|
-
});
|
|
51309
|
-
});
|
|
51310
|
-
}
|
|
51311
|
-
}
|
|
51273
|
+
/***/ "ee58":
|
|
51274
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
51312
51275
|
|
|
51313
|
-
|
|
51314
|
-
|
|
51276
|
+
var toIndexedObject = __webpack_require__("378c");
|
|
51277
|
+
var nativeGetOwnPropertyNames = __webpack_require__("65d0").f;
|
|
51315
51278
|
|
|
51316
|
-
|
|
51317
|
-
.then(function () {
|
|
51318
|
-
if (node instanceof HTMLImageElement)
|
|
51319
|
-
return newImage(node).inline();
|
|
51320
|
-
else
|
|
51321
|
-
return Promise.all(
|
|
51322
|
-
util.asArray(node.childNodes).map(function (child) {
|
|
51323
|
-
return inlineAll(child);
|
|
51324
|
-
})
|
|
51325
|
-
);
|
|
51326
|
-
});
|
|
51279
|
+
var toString = {}.toString;
|
|
51327
51280
|
|
|
51328
|
-
|
|
51329
|
-
|
|
51281
|
+
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
51282
|
+
? Object.getOwnPropertyNames(window) : [];
|
|
51330
51283
|
|
|
51331
|
-
|
|
51284
|
+
var getWindowNames = function (it) {
|
|
51285
|
+
try {
|
|
51286
|
+
return nativeGetOwnPropertyNames(it);
|
|
51287
|
+
} catch (error) {
|
|
51288
|
+
return windowNames.slice();
|
|
51289
|
+
}
|
|
51290
|
+
};
|
|
51332
51291
|
|
|
51333
|
-
|
|
51334
|
-
|
|
51335
|
-
|
|
51336
|
-
|
|
51337
|
-
|
|
51338
|
-
|
|
51339
|
-
);
|
|
51340
|
-
})
|
|
51341
|
-
.then(function () {
|
|
51342
|
-
return node;
|
|
51343
|
-
});
|
|
51344
|
-
}
|
|
51345
|
-
}
|
|
51346
|
-
}
|
|
51347
|
-
})(this);
|
|
51292
|
+
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
51293
|
+
module.exports.f = function getOwnPropertyNames(it) {
|
|
51294
|
+
return windowNames && toString.call(it) == '[object Window]'
|
|
51295
|
+
? getWindowNames(it)
|
|
51296
|
+
: nativeGetOwnPropertyNames(toIndexedObject(it));
|
|
51297
|
+
};
|
|
51348
51298
|
|
|
51349
51299
|
|
|
51350
51300
|
/***/ }),
|