Version Description
- 2018-04-10 =
- Premium: subscriber export tool now supports dynamic segments;
- Improved: sending was optimized for large newsletters and slow hosts. Thanks, Alison;
- Fixed: help icon functionality was restored for all users.
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (New) |
Version | 3.6.5 |
Comparing to | |
See all releases |
Code changes from version 3.6.4 to 3.6.5
- assets/js/{admin.dff158ff.js → admin.1d02af45.js} +4295 -7010
- assets/js/{admin_vendor.b76a91ce.js → admin_vendor.bf69b320.js} +0 -0
- assets/js/lib/mailpoet_shortcodes/plugin.js +16 -18
- assets/js/manifest.json +4 -4
- assets/js/{newsletter_editor.c65261cf.js → newsletter_editor.0b7c23bb.js} +4293 -7008
- assets/js/{vendor.79f8bb9d.js → vendor.98a3aa8c.js} +1 -1
- lang/mailpoet-ca.mo +0 -0
- lang/mailpoet-da_DK.mo +0 -0
- lang/mailpoet-de_DE.mo +0 -0
- lang/mailpoet-es_ES.mo +0 -0
- lang/mailpoet-fa_IR.mo +0 -0
- lang/mailpoet-fr_CA.mo +0 -0
- lang/mailpoet-fr_FR.mo +0 -0
- lang/mailpoet-it_IT.mo +0 -0
- lang/mailpoet-ja.mo +0 -0
- lang/mailpoet-nl_NL.mo +0 -0
- lang/mailpoet-pl_PL.mo +0 -0
- lang/mailpoet-pt_BR.mo +0 -0
- lang/mailpoet-pt_PT.mo +0 -0
- lang/mailpoet-ru_RU.mo +0 -0
- lang/mailpoet-sq.mo +0 -0
- lang/mailpoet-sv_SE.mo +0 -0
- lang/mailpoet-tr_TR.mo +0 -0
- lang/mailpoet.pot +24 -24
- lib/Config/Menu.php +2 -2
- lib/Cron/Daemon.php +3 -0
- lib/Models/Segment.php +1 -1
- lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php +79 -0
- lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php +65 -0
- lib/Subscribers/ImportExport/Export/Export.php +30 -78
- lib/Subscribers/ImportExport/Export/SubscribersGetter.php +75 -0
- lib/Subscribers/ImportExport/ImportExportFactory.php +16 -4
- lib/Util/Helpers.php +1 -0
- mailpoet.php +2 -2
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +3 -0
- vendor/composer/autoload_real.php +4 -4
assets/js/{admin.dff158ff.js → admin.1d02af45.js}
RENAMED
@@ -12386,7256 +12386,4541 @@ webpackJsonp([0],[
|
|
12386 |
/* 536 */
|
12387 |
/***/ function(module, exports, __webpack_require__) {
|
12388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12389 |
/*!
|
12390 |
-
*
|
12391 |
-
* Copyright (c)
|
12392 |
-
*
|
|
|
|
|
12393 |
*/
|
12394 |
-
(function webpackUniversalModuleDefinition(root, factory) {
|
12395 |
-
if(true)
|
12396 |
-
module.exports = factory();
|
12397 |
-
else if(typeof define === 'function' && define.amd)
|
12398 |
-
define([], factory);
|
12399 |
-
else if(typeof exports === 'object')
|
12400 |
-
exports["html2canvas"] = factory();
|
12401 |
-
else
|
12402 |
-
root["html2canvas"] = factory();
|
12403 |
-
})(this, function() {
|
12404 |
-
return /******/ (function(modules) { // webpackBootstrap
|
12405 |
-
/******/ // The module cache
|
12406 |
-
/******/ var installedModules = {};
|
12407 |
-
/******/
|
12408 |
-
/******/ // The require function
|
12409 |
-
/******/ function __webpack_require__(moduleId) {
|
12410 |
-
/******/
|
12411 |
-
/******/ // Check if module is in cache
|
12412 |
-
/******/ if(installedModules[moduleId]) {
|
12413 |
-
/******/ return installedModules[moduleId].exports;
|
12414 |
-
/******/ }
|
12415 |
-
/******/ // Create a new module (and put it into the cache)
|
12416 |
-
/******/ var module = installedModules[moduleId] = {
|
12417 |
-
/******/ i: moduleId,
|
12418 |
-
/******/ l: false,
|
12419 |
-
/******/ exports: {}
|
12420 |
-
/******/ };
|
12421 |
-
/******/
|
12422 |
-
/******/ // Execute the module function
|
12423 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
12424 |
-
/******/
|
12425 |
-
/******/ // Flag the module as loaded
|
12426 |
-
/******/ module.l = true;
|
12427 |
-
/******/
|
12428 |
-
/******/ // Return the exports of the module
|
12429 |
-
/******/ return module.exports;
|
12430 |
-
/******/ }
|
12431 |
-
/******/
|
12432 |
-
/******/
|
12433 |
-
/******/ // expose the modules object (__webpack_modules__)
|
12434 |
-
/******/ __webpack_require__.m = modules;
|
12435 |
-
/******/
|
12436 |
-
/******/ // expose the module cache
|
12437 |
-
/******/ __webpack_require__.c = installedModules;
|
12438 |
-
/******/
|
12439 |
-
/******/ // define getter function for harmony exports
|
12440 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
12441 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
12442 |
-
/******/ Object.defineProperty(exports, name, {
|
12443 |
-
/******/ configurable: false,
|
12444 |
-
/******/ enumerable: true,
|
12445 |
-
/******/ get: getter
|
12446 |
-
/******/ });
|
12447 |
-
/******/ }
|
12448 |
-
/******/ };
|
12449 |
-
/******/
|
12450 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
12451 |
-
/******/ __webpack_require__.n = function(module) {
|
12452 |
-
/******/ var getter = module && module.__esModule ?
|
12453 |
-
/******/ function getDefault() { return module['default']; } :
|
12454 |
-
/******/ function getModuleExports() { return module; };
|
12455 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
12456 |
-
/******/ return getter;
|
12457 |
-
/******/ };
|
12458 |
-
/******/
|
12459 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
12460 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
12461 |
-
/******/
|
12462 |
-
/******/ // __webpack_public_path__
|
12463 |
-
/******/ __webpack_require__.p = "";
|
12464 |
-
/******/
|
12465 |
-
/******/ // Load entry module and return exports
|
12466 |
-
/******/ return __webpack_require__(__webpack_require__.s = 27);
|
12467 |
-
/******/ })
|
12468 |
-
/************************************************************************/
|
12469 |
-
/******/ ([
|
12470 |
-
/* 0 */
|
12471 |
-
/***/ (function(module, exports, __webpack_require__) {
|
12472 |
|
12473 |
-
|
12474 |
-
|
12475 |
-
|
12476 |
-
// http://dev.w3.org/csswg/css-color/
|
12477 |
-
|
12478 |
-
Object.defineProperty(exports, "__esModule", {
|
12479 |
-
value: true
|
12480 |
-
});
|
12481 |
-
|
12482 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
12483 |
|
12484 |
-
|
12485 |
-
|
12486 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12487 |
-
|
12488 |
-
var HEX3 = /^#([a-f0-9]{3})$/i;
|
12489 |
-
var hex3 = function hex3(value) {
|
12490 |
-
var match = value.match(HEX3);
|
12491 |
-
if (match) {
|
12492 |
-
return [parseInt(match[1][0] + match[1][0], 16), parseInt(match[1][1] + match[1][1], 16), parseInt(match[1][2] + match[1][2], 16), null];
|
12493 |
-
}
|
12494 |
-
return false;
|
12495 |
-
};
|
12496 |
-
|
12497 |
-
var HEX6 = /^#([a-f0-9]{6})$/i;
|
12498 |
-
var hex6 = function hex6(value) {
|
12499 |
-
var match = value.match(HEX6);
|
12500 |
-
if (match) {
|
12501 |
-
return [parseInt(match[1].substring(0, 2), 16), parseInt(match[1].substring(2, 4), 16), parseInt(match[1].substring(4, 6), 16), null];
|
12502 |
}
|
12503 |
-
return false;
|
12504 |
-
};
|
12505 |
|
12506 |
-
|
12507 |
-
|
12508 |
-
var match = value.match(RGB);
|
12509 |
-
if (match) {
|
12510 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), null];
|
12511 |
}
|
12512 |
-
return false;
|
12513 |
-
};
|
12514 |
|
12515 |
-
|
12516 |
-
|
12517 |
-
var match = value.match(RGBA);
|
12518 |
-
if (match && match.length > 4) {
|
12519 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
12520 |
}
|
12521 |
-
return false;
|
12522 |
-
};
|
12523 |
|
12524 |
-
|
12525 |
-
return [Math.min(array[0], 255), Math.min(array[1], 255), Math.min(array[2], 255), array.length > 3 ? array[3] : null];
|
12526 |
-
};
|
12527 |
-
|
12528 |
-
var namedColor = function namedColor(name) {
|
12529 |
-
var color = NAMED_COLORS[name.toLowerCase()];
|
12530 |
-
return color ? color : false;
|
12531 |
-
};
|
12532 |
|
12533 |
-
|
12534 |
-
|
12535 |
-
|
12536 |
-
|
12537 |
-
|
12538 |
-
|
12539 |
-
r = _ref2[0],
|
12540 |
-
g = _ref2[1],
|
12541 |
-
b = _ref2[2],
|
12542 |
-
a = _ref2[3];
|
12543 |
-
|
12544 |
-
this.r = r;
|
12545 |
-
this.g = g;
|
12546 |
-
this.b = b;
|
12547 |
-
this.a = a;
|
12548 |
}
|
12549 |
|
12550 |
-
|
12551 |
-
|
12552 |
-
|
12553 |
-
return this.a === 0;
|
12554 |
-
}
|
12555 |
-
}, {
|
12556 |
-
key: 'toString',
|
12557 |
-
value: function toString() {
|
12558 |
-
return this.a !== null && this.a !== 1 ? 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')' : 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
|
12559 |
-
}
|
12560 |
-
}]);
|
12561 |
-
|
12562 |
-
return Color;
|
12563 |
-
}();
|
12564 |
-
|
12565 |
-
exports.default = Color;
|
12566 |
-
|
12567 |
-
|
12568 |
-
var NAMED_COLORS = {
|
12569 |
-
transparent: [0, 0, 0, 0],
|
12570 |
-
aliceblue: [240, 248, 255, null],
|
12571 |
-
antiquewhite: [250, 235, 215, null],
|
12572 |
-
aqua: [0, 255, 255, null],
|
12573 |
-
aquamarine: [127, 255, 212, null],
|
12574 |
-
azure: [240, 255, 255, null],
|
12575 |
-
beige: [245, 245, 220, null],
|
12576 |
-
bisque: [255, 228, 196, null],
|
12577 |
-
black: [0, 0, 0, null],
|
12578 |
-
blanchedalmond: [255, 235, 205, null],
|
12579 |
-
blue: [0, 0, 255, null],
|
12580 |
-
blueviolet: [138, 43, 226, null],
|
12581 |
-
brown: [165, 42, 42, null],
|
12582 |
-
burlywood: [222, 184, 135, null],
|
12583 |
-
cadetblue: [95, 158, 160, null],
|
12584 |
-
chartreuse: [127, 255, 0, null],
|
12585 |
-
chocolate: [210, 105, 30, null],
|
12586 |
-
coral: [255, 127, 80, null],
|
12587 |
-
cornflowerblue: [100, 149, 237, null],
|
12588 |
-
cornsilk: [255, 248, 220, null],
|
12589 |
-
crimson: [220, 20, 60, null],
|
12590 |
-
cyan: [0, 255, 255, null],
|
12591 |
-
darkblue: [0, 0, 139, null],
|
12592 |
-
darkcyan: [0, 139, 139, null],
|
12593 |
-
darkgoldenrod: [184, 134, 11, null],
|
12594 |
-
darkgray: [169, 169, 169, null],
|
12595 |
-
darkgreen: [0, 100, 0, null],
|
12596 |
-
darkgrey: [169, 169, 169, null],
|
12597 |
-
darkkhaki: [189, 183, 107, null],
|
12598 |
-
darkmagenta: [139, 0, 139, null],
|
12599 |
-
darkolivegreen: [85, 107, 47, null],
|
12600 |
-
darkorange: [255, 140, 0, null],
|
12601 |
-
darkorchid: [153, 50, 204, null],
|
12602 |
-
darkred: [139, 0, 0, null],
|
12603 |
-
darksalmon: [233, 150, 122, null],
|
12604 |
-
darkseagreen: [143, 188, 143, null],
|
12605 |
-
darkslateblue: [72, 61, 139, null],
|
12606 |
-
darkslategray: [47, 79, 79, null],
|
12607 |
-
darkslategrey: [47, 79, 79, null],
|
12608 |
-
darkturquoise: [0, 206, 209, null],
|
12609 |
-
darkviolet: [148, 0, 211, null],
|
12610 |
-
deeppink: [255, 20, 147, null],
|
12611 |
-
deepskyblue: [0, 191, 255, null],
|
12612 |
-
dimgray: [105, 105, 105, null],
|
12613 |
-
dimgrey: [105, 105, 105, null],
|
12614 |
-
dodgerblue: [30, 144, 255, null],
|
12615 |
-
firebrick: [178, 34, 34, null],
|
12616 |
-
floralwhite: [255, 250, 240, null],
|
12617 |
-
forestgreen: [34, 139, 34, null],
|
12618 |
-
fuchsia: [255, 0, 255, null],
|
12619 |
-
gainsboro: [220, 220, 220, null],
|
12620 |
-
ghostwhite: [248, 248, 255, null],
|
12621 |
-
gold: [255, 215, 0, null],
|
12622 |
-
goldenrod: [218, 165, 32, null],
|
12623 |
-
gray: [128, 128, 128, null],
|
12624 |
-
green: [0, 128, 0, null],
|
12625 |
-
greenyellow: [173, 255, 47, null],
|
12626 |
-
grey: [128, 128, 128, null],
|
12627 |
-
honeydew: [240, 255, 240, null],
|
12628 |
-
hotpink: [255, 105, 180, null],
|
12629 |
-
indianred: [205, 92, 92, null],
|
12630 |
-
indigo: [75, 0, 130, null],
|
12631 |
-
ivory: [255, 255, 240, null],
|
12632 |
-
khaki: [240, 230, 140, null],
|
12633 |
-
lavender: [230, 230, 250, null],
|
12634 |
-
lavenderblush: [255, 240, 245, null],
|
12635 |
-
lawngreen: [124, 252, 0, null],
|
12636 |
-
lemonchiffon: [255, 250, 205, null],
|
12637 |
-
lightblue: [173, 216, 230, null],
|
12638 |
-
lightcoral: [240, 128, 128, null],
|
12639 |
-
lightcyan: [224, 255, 255, null],
|
12640 |
-
lightgoldenrodyellow: [250, 250, 210, null],
|
12641 |
-
lightgray: [211, 211, 211, null],
|
12642 |
-
lightgreen: [144, 238, 144, null],
|
12643 |
-
lightgrey: [211, 211, 211, null],
|
12644 |
-
lightpink: [255, 182, 193, null],
|
12645 |
-
lightsalmon: [255, 160, 122, null],
|
12646 |
-
lightseagreen: [32, 178, 170, null],
|
12647 |
-
lightskyblue: [135, 206, 250, null],
|
12648 |
-
lightslategray: [119, 136, 153, null],
|
12649 |
-
lightslategrey: [119, 136, 153, null],
|
12650 |
-
lightsteelblue: [176, 196, 222, null],
|
12651 |
-
lightyellow: [255, 255, 224, null],
|
12652 |
-
lime: [0, 255, 0, null],
|
12653 |
-
limegreen: [50, 205, 50, null],
|
12654 |
-
linen: [250, 240, 230, null],
|
12655 |
-
magenta: [255, 0, 255, null],
|
12656 |
-
maroon: [128, 0, 0, null],
|
12657 |
-
mediumaquamarine: [102, 205, 170, null],
|
12658 |
-
mediumblue: [0, 0, 205, null],
|
12659 |
-
mediumorchid: [186, 85, 211, null],
|
12660 |
-
mediumpurple: [147, 112, 219, null],
|
12661 |
-
mediumseagreen: [60, 179, 113, null],
|
12662 |
-
mediumslateblue: [123, 104, 238, null],
|
12663 |
-
mediumspringgreen: [0, 250, 154, null],
|
12664 |
-
mediumturquoise: [72, 209, 204, null],
|
12665 |
-
mediumvioletred: [199, 21, 133, null],
|
12666 |
-
midnightblue: [25, 25, 112, null],
|
12667 |
-
mintcream: [245, 255, 250, null],
|
12668 |
-
mistyrose: [255, 228, 225, null],
|
12669 |
-
moccasin: [255, 228, 181, null],
|
12670 |
-
navajowhite: [255, 222, 173, null],
|
12671 |
-
navy: [0, 0, 128, null],
|
12672 |
-
oldlace: [253, 245, 230, null],
|
12673 |
-
olive: [128, 128, 0, null],
|
12674 |
-
olivedrab: [107, 142, 35, null],
|
12675 |
-
orange: [255, 165, 0, null],
|
12676 |
-
orangered: [255, 69, 0, null],
|
12677 |
-
orchid: [218, 112, 214, null],
|
12678 |
-
palegoldenrod: [238, 232, 170, null],
|
12679 |
-
palegreen: [152, 251, 152, null],
|
12680 |
-
paleturquoise: [175, 238, 238, null],
|
12681 |
-
palevioletred: [219, 112, 147, null],
|
12682 |
-
papayawhip: [255, 239, 213, null],
|
12683 |
-
peachpuff: [255, 218, 185, null],
|
12684 |
-
peru: [205, 133, 63, null],
|
12685 |
-
pink: [255, 192, 203, null],
|
12686 |
-
plum: [221, 160, 221, null],
|
12687 |
-
powderblue: [176, 224, 230, null],
|
12688 |
-
purple: [128, 0, 128, null],
|
12689 |
-
rebeccapurple: [102, 51, 153, null],
|
12690 |
-
red: [255, 0, 0, null],
|
12691 |
-
rosybrown: [188, 143, 143, null],
|
12692 |
-
royalblue: [65, 105, 225, null],
|
12693 |
-
saddlebrown: [139, 69, 19, null],
|
12694 |
-
salmon: [250, 128, 114, null],
|
12695 |
-
sandybrown: [244, 164, 96, null],
|
12696 |
-
seagreen: [46, 139, 87, null],
|
12697 |
-
seashell: [255, 245, 238, null],
|
12698 |
-
sienna: [160, 82, 45, null],
|
12699 |
-
silver: [192, 192, 192, null],
|
12700 |
-
skyblue: [135, 206, 235, null],
|
12701 |
-
slateblue: [106, 90, 205, null],
|
12702 |
-
slategray: [112, 128, 144, null],
|
12703 |
-
slategrey: [112, 128, 144, null],
|
12704 |
-
snow: [255, 250, 250, null],
|
12705 |
-
springgreen: [0, 255, 127, null],
|
12706 |
-
steelblue: [70, 130, 180, null],
|
12707 |
-
tan: [210, 180, 140, null],
|
12708 |
-
teal: [0, 128, 128, null],
|
12709 |
-
thistle: [216, 191, 216, null],
|
12710 |
-
tomato: [255, 99, 71, null],
|
12711 |
-
turquoise: [64, 224, 208, null],
|
12712 |
-
violet: [238, 130, 238, null],
|
12713 |
-
wheat: [245, 222, 179, null],
|
12714 |
-
white: [255, 255, 255, null],
|
12715 |
-
whitesmoke: [245, 245, 245, null],
|
12716 |
-
yellow: [255, 255, 0, null],
|
12717 |
-
yellowgreen: [154, 205, 50, null]
|
12718 |
-
};
|
12719 |
-
|
12720 |
-
var TRANSPARENT = exports.TRANSPARENT = new Color([0, 0, 0, 0]);
|
12721 |
|
12722 |
-
|
12723 |
-
|
12724 |
-
|
12725 |
-
|
12726 |
-
|
|
|
|
|
|
|
|
|
|
|
12727 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12728 |
|
12729 |
-
|
12730 |
-
|
12731 |
-
});
|
12732 |
-
exports.parseBoundCurves = exports.calculatePaddingBoxPath = exports.calculateBorderBoxPath = exports.parsePathForBorder = exports.parseDocumentSize = exports.calculateContentBox = exports.calculatePaddingBox = exports.parseBounds = exports.Bounds = undefined;
|
12733 |
|
12734 |
-
|
|
|
|
|
|
|
12735 |
|
12736 |
-
|
|
|
|
|
|
|
|
|
|
|
12737 |
|
12738 |
-
|
|
|
|
|
|
|
|
|
12739 |
|
12740 |
-
|
|
|
|
|
|
|
12741 |
|
12742 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12743 |
|
12744 |
-
|
|
|
|
|
|
|
|
|
12745 |
|
12746 |
-
|
12747 |
|
12748 |
-
|
12749 |
-
|
12750 |
-
|
12751 |
-
|
12752 |
|
12753 |
-
|
12754 |
-
var V = 1;
|
12755 |
|
12756 |
-
|
12757 |
-
|
12758 |
-
|
12759 |
|
12760 |
-
|
12761 |
-
this.top = y;
|
12762 |
-
this.width = w;
|
12763 |
-
this.height = h;
|
12764 |
}
|
12765 |
|
12766 |
-
|
12767 |
-
key: 'fromClientRect',
|
12768 |
-
value: function fromClientRect(clientRect, scrollX, scrollY) {
|
12769 |
-
return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
|
12770 |
-
}
|
12771 |
-
}]);
|
12772 |
-
|
12773 |
-
return Bounds;
|
12774 |
-
}();
|
12775 |
|
12776 |
-
|
12777 |
-
|
12778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12779 |
|
12780 |
-
|
12781 |
-
|
12782 |
-
|
|
|
|
|
12783 |
|
12784 |
-
|
12785 |
-
|
12786 |
-
|
12787 |
-
var paddingRight = padding[RIGHT].value;
|
12788 |
-
var paddingBottom = padding[BOTTOM].value;
|
12789 |
-
var paddingLeft = padding[LEFT].value;
|
12790 |
|
12791 |
-
|
12792 |
-
|
|
|
12793 |
|
12794 |
-
|
12795 |
-
|
12796 |
-
|
|
|
|
|
|
|
|
|
|
|
12797 |
|
12798 |
-
|
12799 |
-
|
|
|
|
|
|
|
|
|
12800 |
}
|
12801 |
-
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
12802 |
|
12803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12804 |
|
12805 |
-
|
12806 |
-
|
12807 |
|
12808 |
-
|
12809 |
-
|
12810 |
-
|
12811 |
-
|
12812 |
-
|
12813 |
-
return createPathFromCurves(curves.topRightOuter, curves.topRightInner, curves.bottomRightOuter, curves.bottomRightInner);
|
12814 |
-
case BOTTOM:
|
12815 |
-
return createPathFromCurves(curves.bottomRightOuter, curves.bottomRightInner, curves.bottomLeftOuter, curves.bottomLeftInner);
|
12816 |
-
case LEFT:
|
12817 |
-
default:
|
12818 |
-
return createPathFromCurves(curves.bottomLeftOuter, curves.bottomLeftInner, curves.topLeftOuter, curves.topLeftInner);
|
12819 |
}
|
12820 |
-
};
|
12821 |
|
12822 |
-
|
12823 |
-
|
12824 |
-
|
12825 |
-
|
12826 |
-
|
12827 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12828 |
}
|
12829 |
|
12830 |
-
|
12831 |
-
|
12832 |
-
|
12833 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12834 |
}
|
12835 |
|
12836 |
-
|
12837 |
-
|
12838 |
-
|
12839 |
-
|
|
|
|
|
|
|
|
|
12840 |
}
|
12841 |
|
12842 |
-
|
12843 |
-
|
12844 |
-
|
12845 |
-
|
|
|
|
|
12846 |
}
|
12847 |
|
12848 |
-
|
12849 |
-
|
12850 |
|
12851 |
-
|
12852 |
-
|
12853 |
-
};
|
12854 |
|
12855 |
-
|
12856 |
-
|
12857 |
-
|
|
|
|
|
12858 |
|
12859 |
-
|
12860 |
-
|
12861 |
-
|
12862 |
-
|
12863 |
-
|
12864 |
-
|
12865 |
-
var brv = borderRadius[CORNER.BOTTOM_RIGHT][V].getAbsoluteValue(bounds.height);
|
12866 |
-
var blh = borderRadius[CORNER.BOTTOM_LEFT][H].getAbsoluteValue(bounds.width);
|
12867 |
-
var blv = borderRadius[CORNER.BOTTOM_LEFT][V].getAbsoluteValue(bounds.height);
|
12868 |
-
|
12869 |
-
var factors = [];
|
12870 |
-
factors.push((tlh + trh) / bounds.width);
|
12871 |
-
factors.push((blh + brh) / bounds.width);
|
12872 |
-
factors.push((tlv + blv) / bounds.height);
|
12873 |
-
factors.push((trv + brv) / bounds.height);
|
12874 |
-
var maxFactor = Math.max.apply(Math, factors);
|
12875 |
-
|
12876 |
-
if (maxFactor > 1) {
|
12877 |
-
tlh /= maxFactor;
|
12878 |
-
tlv /= maxFactor;
|
12879 |
-
trh /= maxFactor;
|
12880 |
-
trv /= maxFactor;
|
12881 |
-
brh /= maxFactor;
|
12882 |
-
brv /= maxFactor;
|
12883 |
-
blh /= maxFactor;
|
12884 |
-
blv /= maxFactor;
|
12885 |
}
|
12886 |
|
12887 |
-
|
12888 |
-
|
12889 |
-
|
12890 |
-
var leftHeight = bounds.height - blv;
|
12891 |
|
12892 |
-
|
12893 |
-
topLeftOuter: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new _Vector2.default(bounds.left, bounds.top),
|
12894 |
-
topLeftInner: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, Math.max(0, tlh - borders[LEFT].borderWidth), Math.max(0, tlv - borders[TOP].borderWidth), CORNER.TOP_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
12895 |
-
topRightOuter: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top),
|
12896 |
-
topRightInner: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borders[LEFT].borderWidth), bounds.top + borders[TOP].borderWidth, topWidth > bounds.width + borders[LEFT].borderWidth ? 0 : trh - borders[LEFT].borderWidth, trv - borders[TOP].borderWidth, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
12897 |
-
bottomRightOuter: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top + bounds.height),
|
12898 |
-
bottomRightInner: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borders[LEFT].borderWidth), bounds.top + Math.min(rightHeight, bounds.height + borders[TOP].borderWidth), Math.max(0, brh - borders[RIGHT].borderWidth), brv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth),
|
12899 |
-
bottomLeftOuter: blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left, bounds.top + bounds.height),
|
12900 |
-
bottomLeftInner: blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + leftHeight, Math.max(0, blh - borders[LEFT].borderWidth), blv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth)
|
12901 |
-
};
|
12902 |
-
};
|
12903 |
|
12904 |
-
|
12905 |
-
|
12906 |
-
|
12907 |
-
BOTTOM_RIGHT: 2,
|
12908 |
-
BOTTOM_LEFT: 3
|
12909 |
-
};
|
12910 |
|
12911 |
-
|
12912 |
-
|
12913 |
-
|
12914 |
-
var oy = r2 * kappa; // control point offset vertical
|
12915 |
-
var xm = x + r1; // x-middle
|
12916 |
-
var ym = y + r2; // y-middle
|
12917 |
-
|
12918 |
-
switch (position) {
|
12919 |
-
case CORNER.TOP_LEFT:
|
12920 |
-
return new _BezierCurve2.default(new _Vector2.default(x, ym), new _Vector2.default(x, ym - oy), new _Vector2.default(xm - ox, y), new _Vector2.default(xm, y));
|
12921 |
-
case CORNER.TOP_RIGHT:
|
12922 |
-
return new _BezierCurve2.default(new _Vector2.default(x, y), new _Vector2.default(x + ox, y), new _Vector2.default(xm, ym - oy), new _Vector2.default(xm, ym));
|
12923 |
-
case CORNER.BOTTOM_RIGHT:
|
12924 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, y), new _Vector2.default(xm, y + oy), new _Vector2.default(x + ox, ym), new _Vector2.default(x, ym));
|
12925 |
-
case CORNER.BOTTOM_LEFT:
|
12926 |
-
default:
|
12927 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, ym), new _Vector2.default(xm - ox, ym), new _Vector2.default(x, y + oy), new _Vector2.default(x, y));
|
12928 |
}
|
12929 |
-
};
|
12930 |
|
12931 |
-
|
12932 |
-
|
12933 |
-
|
12934 |
|
12935 |
-
|
12936 |
|
|
|
12937 |
|
12938 |
-
|
12939 |
-
|
12940 |
-
|
12941 |
-
exports.calculateLengthFromValueWithUnit = exports.LENGTH_TYPE = undefined;
|
12942 |
|
12943 |
-
|
|
|
|
|
|
|
|
|
|
|
12944 |
|
12945 |
-
|
|
|
12946 |
|
12947 |
-
|
|
|
|
|
12948 |
|
12949 |
-
|
12950 |
|
12951 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12952 |
|
12953 |
-
|
|
|
|
|
12954 |
|
12955 |
-
|
12956 |
-
|
12957 |
-
PERCENTAGE: 1
|
12958 |
-
};
|
12959 |
|
12960 |
-
|
12961 |
-
|
12962 |
-
|
|
|
|
|
|
|
|
|
12963 |
|
12964 |
-
|
12965 |
-
|
12966 |
-
|
12967 |
-
console.error('Invalid value given for Length: "' + value + '"');
|
12968 |
}
|
12969 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12970 |
}
|
12971 |
|
12972 |
-
|
12973 |
-
|
12974 |
-
|
12975 |
-
|
12976 |
-
}
|
12977 |
-
|
12978 |
-
|
12979 |
-
|
12980 |
-
|
12981 |
-
|
12982 |
-
}
|
12983 |
-
key: 'create',
|
12984 |
-
value: function create(v) {
|
12985 |
-
return new Length(v);
|
12986 |
-
}
|
12987 |
-
}]);
|
12988 |
|
12989 |
-
|
12990 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12991 |
|
12992 |
-
|
|
|
|
|
|
|
12993 |
|
|
|
|
|
|
|
|
|
12994 |
|
12995 |
-
|
12996 |
-
var parent = container.parent;
|
12997 |
-
return parent ? getRootFontSize(parent) : parseFloat(container.style.font.fontSize);
|
12998 |
-
};
|
12999 |
|
13000 |
-
|
13001 |
-
|
13002 |
-
|
13003 |
-
|
13004 |
-
|
13005 |
-
|
13006 |
-
|
13007 |
-
|
13008 |
-
|
13009 |
-
|
13010 |
-
|
13011 |
-
|
13012 |
-
return new Length('0');
|
13013 |
}
|
13014 |
-
};
|
13015 |
|
13016 |
-
|
13017 |
-
|
13018 |
-
|
13019 |
|
13020 |
-
|
|
|
|
|
13021 |
|
|
|
|
|
|
|
13022 |
|
13023 |
-
|
13024 |
-
value: true
|
13025 |
-
});
|
13026 |
|
13027 |
-
|
|
|
|
|
|
|
13028 |
|
13029 |
-
|
|
|
|
|
|
|
13030 |
|
13031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13032 |
|
13033 |
-
|
|
|
13034 |
|
13035 |
-
|
|
|
13036 |
|
13037 |
-
|
|
|
|
|
|
|
|
|
|
|
13038 |
|
13039 |
-
|
|
|
|
|
|
|
13040 |
|
13041 |
-
|
|
|
|
|
13042 |
|
13043 |
-
|
|
|
13044 |
|
13045 |
-
|
|
|
|
|
|
|
|
|
|
|
13046 |
|
13047 |
-
|
|
|
|
|
13048 |
|
13049 |
-
|
|
|
|
|
13050 |
|
13051 |
-
|
13052 |
|
13053 |
-
|
|
|
|
|
|
|
13054 |
|
13055 |
-
|
13056 |
|
13057 |
-
|
|
|
|
|
13058 |
|
13059 |
-
|
|
|
|
|
13060 |
|
13061 |
-
|
|
|
|
|
13062 |
|
13063 |
-
|
|
|
13064 |
|
13065 |
-
|
|
|
|
|
13066 |
|
13067 |
-
|
|
|
|
|
13068 |
|
13069 |
-
|
|
|
|
|
|
|
13070 |
|
13071 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13072 |
|
13073 |
-
|
13074 |
|
13075 |
-
|
|
|
|
|
13076 |
|
13077 |
-
|
|
|
|
|
13078 |
|
13079 |
-
|
13080 |
|
13081 |
-
|
|
|
|
|
|
|
|
|
13082 |
|
13083 |
-
|
|
|
13084 |
|
13085 |
-
|
|
|
|
|
|
|
|
|
|
|
13086 |
|
13087 |
-
|
13088 |
|
13089 |
-
|
13090 |
-
|
13091 |
-
|
13092 |
|
13093 |
-
|
|
|
|
|
|
|
|
|
13094 |
|
13095 |
-
this.parent = parent;
|
13096 |
-
this.tagName = node.tagName;
|
13097 |
-
this.index = index;
|
13098 |
-
this.childNodes = [];
|
13099 |
-
this.listItems = [];
|
13100 |
-
if (typeof node.start === 'number') {
|
13101 |
-
this.listStart = node.start;
|
13102 |
-
}
|
13103 |
-
var defaultView = node.ownerDocument.defaultView;
|
13104 |
-
var scrollX = defaultView.pageXOffset;
|
13105 |
-
var scrollY = defaultView.pageYOffset;
|
13106 |
-
var style = defaultView.getComputedStyle(node, null);
|
13107 |
-
var display = (0, _display.parseDisplay)(style.display);
|
13108 |
-
|
13109 |
-
var IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
13110 |
-
|
13111 |
-
var position = (0, _position.parsePosition)(style.position);
|
13112 |
-
|
13113 |
-
this.style = {
|
13114 |
-
background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader),
|
13115 |
-
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
|
13116 |
-
borderRadius: (node instanceof defaultView.HTMLInputElement || node instanceof HTMLInputElement) && IS_INPUT ? (0, _Input.getInputBorderRadius)(node) : (0, _borderRadius.parseBorderRadius)(style),
|
13117 |
-
color: IS_INPUT ? _Input.INPUT_COLOR : new _Color2.default(style.color),
|
13118 |
-
display: display,
|
13119 |
-
float: (0, _float.parseCSSFloat)(style.float),
|
13120 |
-
font: (0, _font.parseFont)(style),
|
13121 |
-
letterSpacing: (0, _letterSpacing.parseLetterSpacing)(style.letterSpacing),
|
13122 |
-
listStyle: display === _display.DISPLAY.LIST_ITEM ? (0, _listStyle.parseListStyle)(style) : null,
|
13123 |
-
lineBreak: (0, _lineBreak.parseLineBreak)(style.lineBreak),
|
13124 |
-
margin: (0, _margin.parseMargin)(style),
|
13125 |
-
opacity: parseFloat(style.opacity),
|
13126 |
-
overflow: INPUT_TAGS.indexOf(node.tagName) === -1 ? (0, _overflow.parseOverflow)(style.overflow) : _overflow.OVERFLOW.HIDDEN,
|
13127 |
-
overflowWrap: (0, _overflowWrap.parseOverflowWrap)(style.overflowWrap ? style.overflowWrap : style.wordWrap),
|
13128 |
-
padding: (0, _padding.parsePadding)(style),
|
13129 |
-
position: position,
|
13130 |
-
textDecoration: (0, _textDecoration.parseTextDecoration)(style),
|
13131 |
-
textShadow: (0, _textShadow.parseTextShadow)(style.textShadow),
|
13132 |
-
textTransform: (0, _textTransform.parseTextTransform)(style.textTransform),
|
13133 |
-
transform: (0, _transform.parseTransform)(style),
|
13134 |
-
visibility: (0, _visibility.parseVisibility)(style.visibility),
|
13135 |
-
wordBreak: (0, _wordBreak.parseWordBreak)(style.wordBreak),
|
13136 |
-
zIndex: (0, _zIndex.parseZIndex)(position !== _position.POSITION.STATIC ? style.zIndex : 'auto')
|
13137 |
-
};
|
13138 |
|
13139 |
-
|
13140 |
-
|
13141 |
-
node.style.transform = 'matrix(1,0,0,1,0,0)';
|
13142 |
-
}
|
13143 |
|
13144 |
-
|
13145 |
-
|
13146 |
-
|
13147 |
-
|
13148 |
-
listOwner.listItems.push(this);
|
13149 |
-
this.listIndex = node.hasAttribute('value') && typeof node.value === 'number' ? node.value : listIndex === 0 ? typeof listOwner.listStart === 'number' ? listOwner.listStart : 1 : listOwner.listItems[listIndex - 1].listIndex + 1;
|
13150 |
-
}
|
13151 |
-
}
|
13152 |
|
13153 |
-
//
|
13154 |
-
|
13155 |
-
|
13156 |
-
_this.bounds = (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
13157 |
-
_this.curvedBounds = (0, _Bounds.parseBoundCurves)(_this.bounds, _this.style.border, _this.style.borderRadius);
|
13158 |
-
});
|
13159 |
-
}
|
13160 |
-
this.image = getImage(node, resourceLoader);
|
13161 |
-
this.bounds = IS_INPUT ? (0, _Input.reformatInputBounds)((0, _Bounds.parseBounds)(node, scrollX, scrollY)) : (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
13162 |
-
this.curvedBounds = (0, _Bounds.parseBoundCurves)(this.bounds, this.style.border, this.style.borderRadius);
|
13163 |
-
|
13164 |
-
if (true) {
|
13165 |
-
this.name = '' + node.tagName.toLowerCase() + (node.id ? '#' + node.id : '') + node.className.toString().split(' ').map(function (s) {
|
13166 |
-
return s.length ? '.' + s : '';
|
13167 |
-
}).join('');
|
13168 |
-
}
|
13169 |
-
}
|
13170 |
|
13171 |
-
|
13172 |
-
|
13173 |
-
|
13174 |
-
|
13175 |
-
|
|
|
13176 |
|
13177 |
-
|
13178 |
-
|
13179 |
-
}, {
|
13180 |
-
key: 'isInFlow',
|
13181 |
-
value: function isInFlow() {
|
13182 |
-
return this.isRootElement() && !this.isFloating() && !this.isAbsolutelyPositioned();
|
13183 |
-
}
|
13184 |
-
}, {
|
13185 |
-
key: 'isVisible',
|
13186 |
-
value: function isVisible() {
|
13187 |
-
return !(0, _Util.contains)(this.style.display, _display.DISPLAY.NONE) && this.style.opacity > 0 && this.style.visibility === _visibility.VISIBILITY.VISIBLE;
|
13188 |
-
}
|
13189 |
-
}, {
|
13190 |
-
key: 'isAbsolutelyPositioned',
|
13191 |
-
value: function isAbsolutelyPositioned() {
|
13192 |
-
return this.style.position !== _position.POSITION.STATIC && this.style.position !== _position.POSITION.RELATIVE;
|
13193 |
-
}
|
13194 |
-
}, {
|
13195 |
-
key: 'isPositioned',
|
13196 |
-
value: function isPositioned() {
|
13197 |
-
return this.style.position !== _position.POSITION.STATIC;
|
13198 |
-
}
|
13199 |
-
}, {
|
13200 |
-
key: 'isFloating',
|
13201 |
-
value: function isFloating() {
|
13202 |
-
return this.style.float !== _float.FLOAT.NONE;
|
13203 |
-
}
|
13204 |
-
}, {
|
13205 |
-
key: 'isRootElement',
|
13206 |
-
value: function isRootElement() {
|
13207 |
-
return this.parent === null;
|
13208 |
-
}
|
13209 |
-
}, {
|
13210 |
-
key: 'isTransformed',
|
13211 |
-
value: function isTransformed() {
|
13212 |
-
return this.style.transform !== null;
|
13213 |
-
}
|
13214 |
-
}, {
|
13215 |
-
key: 'isPositionedWithZIndex',
|
13216 |
-
value: function isPositionedWithZIndex() {
|
13217 |
-
return this.isPositioned() && !this.style.zIndex.auto;
|
13218 |
-
}
|
13219 |
-
}, {
|
13220 |
-
key: 'isInlineLevel',
|
13221 |
-
value: function isInlineLevel() {
|
13222 |
-
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_FLEX) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_GRID) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_LIST_ITEM) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
13223 |
-
}
|
13224 |
-
}, {
|
13225 |
-
key: 'isInlineBlockOrInlineTable',
|
13226 |
-
value: function isInlineBlockOrInlineTable() {
|
13227 |
-
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
13228 |
-
}
|
13229 |
-
}]);
|
13230 |
|
13231 |
-
|
13232 |
-
|
13233 |
|
13234 |
-
|
|
|
|
|
|
|
13235 |
|
|
|
|
|
|
|
|
|
|
|
13236 |
|
13237 |
-
|
13238 |
-
|
13239 |
-
|
13240 |
-
|
13241 |
-
|
13242 |
-
|
13243 |
-
|
13244 |
-
// $FlowFixMe
|
13245 |
-
var img = node;
|
13246 |
-
return resourceLoader.loadImage(img.currentSrc || img.src);
|
13247 |
-
case 'CANVAS':
|
13248 |
-
// $FlowFixMe
|
13249 |
-
var canvas = node;
|
13250 |
-
return resourceLoader.loadCanvas(canvas);
|
13251 |
-
case 'IFRAME':
|
13252 |
-
var iframeKey = node.getAttribute('data-html2canvas-internal-iframe-key');
|
13253 |
-
if (iframeKey) {
|
13254 |
-
return iframeKey;
|
13255 |
}
|
13256 |
-
|
13257 |
-
|
13258 |
-
|
13259 |
-
return null;
|
13260 |
-
};
|
13261 |
-
|
13262 |
-
/***/ }),
|
13263 |
-
/* 4 */
|
13264 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13265 |
|
13266 |
-
|
|
|
|
|
|
|
|
|
|
|
13267 |
|
|
|
13268 |
|
13269 |
-
|
13270 |
-
|
13271 |
-
|
13272 |
-
|
13273 |
-
|
13274 |
-
|
|
|
13275 |
|
13276 |
-
|
13277 |
-
|
13278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13279 |
|
13280 |
-
|
13281 |
-
|
13282 |
-
for (var i = style.length - 1; i >= 0; i--) {
|
13283 |
-
var property = style.item(i);
|
13284 |
-
// Safari shows pseudoelements if content is set
|
13285 |
-
if (property !== 'content') {
|
13286 |
-
target.style.setProperty(property, style.getPropertyValue(property));
|
13287 |
}
|
|
|
|
|
|
|
13288 |
}
|
13289 |
-
return target;
|
13290 |
-
};
|
13291 |
|
13292 |
-
|
|
|
|
|
|
|
13293 |
|
13294 |
-
|
13295 |
-
|
13296 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13297 |
|
13298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13300 |
|
13301 |
-
|
13302 |
-
|
13303 |
-
});
|
13304 |
-
exports.parseBackgroundImage = exports.parseBackground = exports.calculateBackgroundRepeatPath = exports.calculateBackgroundPosition = exports.calculateBackgroungPositioningArea = exports.calculateBackgroungPaintingArea = exports.calculateGradientBackgroundSize = exports.calculateBackgroundSize = exports.BACKGROUND_ORIGIN = exports.BACKGROUND_CLIP = exports.BACKGROUND_SIZE = exports.BACKGROUND_REPEAT = undefined;
|
13305 |
|
13306 |
-
|
|
|
|
|
|
|
13307 |
|
13308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13309 |
|
13310 |
-
|
13311 |
|
13312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13313 |
|
13314 |
-
|
|
|
13315 |
|
13316 |
-
|
13317 |
|
13318 |
-
|
|
|
13319 |
|
13320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13321 |
|
13322 |
-
|
13323 |
|
13324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13325 |
|
13326 |
-
|
13327 |
|
13328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13329 |
|
13330 |
-
|
13331 |
-
|
13332 |
-
NO_REPEAT: 1,
|
13333 |
-
REPEAT_X: 2,
|
13334 |
-
REPEAT_Y: 3
|
13335 |
-
};
|
13336 |
|
13337 |
-
|
13338 |
-
AUTO: 0,
|
13339 |
-
CONTAIN: 1,
|
13340 |
-
COVER: 2,
|
13341 |
-
LENGTH: 3
|
13342 |
-
};
|
13343 |
|
13344 |
-
|
13345 |
-
|
13346 |
-
PADDING_BOX: 1,
|
13347 |
-
CONTENT_BOX: 2
|
13348 |
-
};
|
13349 |
|
13350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13351 |
|
13352 |
-
|
13353 |
|
13354 |
-
|
13355 |
-
_classCallCheck(this, BackgroundSize);
|
13356 |
|
13357 |
-
|
13358 |
-
case 'contain':
|
13359 |
-
this.size = BACKGROUND_SIZE.CONTAIN;
|
13360 |
-
break;
|
13361 |
-
case 'cover':
|
13362 |
-
this.size = BACKGROUND_SIZE.COVER;
|
13363 |
-
break;
|
13364 |
-
case 'auto':
|
13365 |
-
this.size = BACKGROUND_SIZE.AUTO;
|
13366 |
-
break;
|
13367 |
-
default:
|
13368 |
-
this.value = new _Length2.default(size);
|
13369 |
-
}
|
13370 |
-
};
|
13371 |
-
|
13372 |
-
var calculateBackgroundSize = exports.calculateBackgroundSize = function calculateBackgroundSize(backgroundImage, image, bounds) {
|
13373 |
-
var width = 0;
|
13374 |
-
var height = 0;
|
13375 |
-
var size = backgroundImage.size;
|
13376 |
-
if (size[0].size === BACKGROUND_SIZE.CONTAIN || size[0].size === BACKGROUND_SIZE.COVER) {
|
13377 |
-
var targetRatio = bounds.width / bounds.height;
|
13378 |
-
var currentRatio = image.width / image.height;
|
13379 |
-
return targetRatio < currentRatio !== (size[0].size === BACKGROUND_SIZE.COVER) ? new _Size2.default(bounds.width, bounds.width / currentRatio) : new _Size2.default(bounds.height * currentRatio, bounds.height);
|
13380 |
-
}
|
13381 |
-
|
13382 |
-
if (size[0].value) {
|
13383 |
-
width = size[0].value.getAbsoluteValue(bounds.width);
|
13384 |
-
}
|
13385 |
-
|
13386 |
-
if (size[0].size === BACKGROUND_SIZE.AUTO && size[1].size === BACKGROUND_SIZE.AUTO) {
|
13387 |
-
height = image.height;
|
13388 |
-
} else if (size[1].size === BACKGROUND_SIZE.AUTO) {
|
13389 |
-
height = width / image.width * image.height;
|
13390 |
-
} else if (size[1].value) {
|
13391 |
-
height = size[1].value.getAbsoluteValue(bounds.height);
|
13392 |
-
}
|
13393 |
-
|
13394 |
-
if (size[0].size === BACKGROUND_SIZE.AUTO) {
|
13395 |
-
width = height / image.height * image.width;
|
13396 |
-
}
|
13397 |
-
|
13398 |
-
return new _Size2.default(width, height);
|
13399 |
-
};
|
13400 |
-
|
13401 |
-
var calculateGradientBackgroundSize = exports.calculateGradientBackgroundSize = function calculateGradientBackgroundSize(backgroundImage, bounds) {
|
13402 |
-
var size = backgroundImage.size;
|
13403 |
-
var width = size[0].value ? size[0].value.getAbsoluteValue(bounds.width) : bounds.width;
|
13404 |
-
var height = size[1].value ? size[1].value.getAbsoluteValue(bounds.height) : size[0].value ? width : bounds.height;
|
13405 |
-
|
13406 |
-
return new _Size2.default(width, height);
|
13407 |
-
};
|
13408 |
-
|
13409 |
-
var AUTO_SIZE = new BackgroundSize(AUTO);
|
13410 |
-
|
13411 |
-
var calculateBackgroungPaintingArea = exports.calculateBackgroungPaintingArea = function calculateBackgroungPaintingArea(curves, clip) {
|
13412 |
-
switch (clip) {
|
13413 |
-
case BACKGROUND_CLIP.BORDER_BOX:
|
13414 |
-
return (0, _Bounds.calculateBorderBoxPath)(curves);
|
13415 |
-
case BACKGROUND_CLIP.PADDING_BOX:
|
13416 |
-
default:
|
13417 |
-
return (0, _Bounds.calculatePaddingBoxPath)(curves);
|
13418 |
-
}
|
13419 |
-
};
|
13420 |
-
|
13421 |
-
var calculateBackgroungPositioningArea = exports.calculateBackgroungPositioningArea = function calculateBackgroungPositioningArea(backgroundOrigin, bounds, padding, border) {
|
13422 |
-
var paddingBox = (0, _Bounds.calculatePaddingBox)(bounds, border);
|
13423 |
-
|
13424 |
-
switch (backgroundOrigin) {
|
13425 |
-
case BACKGROUND_ORIGIN.BORDER_BOX:
|
13426 |
-
return bounds;
|
13427 |
-
case BACKGROUND_ORIGIN.CONTENT_BOX:
|
13428 |
-
var paddingLeft = padding[_padding.PADDING_SIDES.LEFT].getAbsoluteValue(bounds.width);
|
13429 |
-
var paddingRight = padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width);
|
13430 |
-
var paddingTop = padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width);
|
13431 |
-
var paddingBottom = padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);
|
13432 |
-
return new _Bounds.Bounds(paddingBox.left + paddingLeft, paddingBox.top + paddingTop, paddingBox.width - paddingLeft - paddingRight, paddingBox.height - paddingTop - paddingBottom);
|
13433 |
-
case BACKGROUND_ORIGIN.PADDING_BOX:
|
13434 |
-
default:
|
13435 |
-
return paddingBox;
|
13436 |
-
}
|
13437 |
-
};
|
13438 |
-
|
13439 |
-
var calculateBackgroundPosition = exports.calculateBackgroundPosition = function calculateBackgroundPosition(position, size, bounds) {
|
13440 |
-
return new _Vector2.default(position[0].getAbsoluteValue(bounds.width - size.width), position[1].getAbsoluteValue(bounds.height - size.height));
|
13441 |
-
};
|
13442 |
-
|
13443 |
-
var calculateBackgroundRepeatPath = exports.calculateBackgroundRepeatPath = function calculateBackgroundRepeatPath(background, position, size, backgroundPositioningArea, bounds) {
|
13444 |
-
var repeat = background.repeat;
|
13445 |
-
switch (repeat) {
|
13446 |
-
case BACKGROUND_REPEAT.REPEAT_X:
|
13447 |
-
return [new _Vector2.default(Math.round(bounds.left), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(size.height + backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left), Math.round(size.height + backgroundPositioningArea.top + position.y))];
|
13448 |
-
case BACKGROUND_REPEAT.REPEAT_Y:
|
13449 |
-
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.height + bounds.top))];
|
13450 |
-
case BACKGROUND_REPEAT.NO_REPEAT:
|
13451 |
-
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y + size.height)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y + size.height))];
|
13452 |
-
default:
|
13453 |
-
return [new _Vector2.default(Math.round(bounds.left), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(bounds.left), Math.round(bounds.height + bounds.top))];
|
13454 |
-
}
|
13455 |
-
};
|
13456 |
-
|
13457 |
-
var parseBackground = exports.parseBackground = function parseBackground(style, resourceLoader) {
|
13458 |
-
return {
|
13459 |
-
backgroundColor: new _Color2.default(style.backgroundColor),
|
13460 |
-
backgroundImage: parseBackgroundImages(style, resourceLoader),
|
13461 |
-
backgroundClip: parseBackgroundClip(style.backgroundClip),
|
13462 |
-
backgroundOrigin: parseBackgroundOrigin(style.backgroundOrigin)
|
13463 |
-
};
|
13464 |
-
};
|
13465 |
-
|
13466 |
-
var parseBackgroundClip = function parseBackgroundClip(backgroundClip) {
|
13467 |
-
switch (backgroundClip) {
|
13468 |
-
case 'padding-box':
|
13469 |
-
return BACKGROUND_CLIP.PADDING_BOX;
|
13470 |
-
case 'content-box':
|
13471 |
-
return BACKGROUND_CLIP.CONTENT_BOX;
|
13472 |
-
}
|
13473 |
-
return BACKGROUND_CLIP.BORDER_BOX;
|
13474 |
-
};
|
13475 |
-
|
13476 |
-
var parseBackgroundOrigin = function parseBackgroundOrigin(backgroundOrigin) {
|
13477 |
-
switch (backgroundOrigin) {
|
13478 |
-
case 'padding-box':
|
13479 |
-
return BACKGROUND_ORIGIN.PADDING_BOX;
|
13480 |
-
case 'content-box':
|
13481 |
-
return BACKGROUND_ORIGIN.CONTENT_BOX;
|
13482 |
-
}
|
13483 |
-
return BACKGROUND_ORIGIN.BORDER_BOX;
|
13484 |
-
};
|
13485 |
|
13486 |
-
|
13487 |
-
switch (backgroundRepeat.trim()) {
|
13488 |
-
case 'no-repeat':
|
13489 |
-
return BACKGROUND_REPEAT.NO_REPEAT;
|
13490 |
-
case 'repeat-x':
|
13491 |
-
case 'repeat no-repeat':
|
13492 |
-
return BACKGROUND_REPEAT.REPEAT_X;
|
13493 |
-
case 'repeat-y':
|
13494 |
-
case 'no-repeat repeat':
|
13495 |
-
return BACKGROUND_REPEAT.REPEAT_Y;
|
13496 |
-
case 'repeat':
|
13497 |
-
return BACKGROUND_REPEAT.REPEAT;
|
13498 |
-
}
|
13499 |
|
13500 |
-
|
13501 |
-
console.error('Invalid background-repeat value "' + backgroundRepeat + '"');
|
13502 |
-
}
|
13503 |
|
13504 |
-
|
13505 |
-
};
|
13506 |
|
13507 |
-
|
13508 |
-
|
13509 |
-
|
13510 |
-
|
13511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13512 |
}
|
13513 |
-
|
13514 |
-
|
13515 |
-
var positions = style.backgroundPosition.split(',');
|
13516 |
-
var repeats = style.backgroundRepeat.split(',');
|
13517 |
-
var sizes = style.backgroundSize.split(',');
|
13518 |
-
|
13519 |
-
return sources.map(function (source, index) {
|
13520 |
-
var size = (sizes[index] || AUTO).trim().split(' ').map(parseBackgroundSize);
|
13521 |
-
var position = (positions[index] || AUTO).trim().split(' ').map(parseBackgoundPosition);
|
13522 |
-
|
13523 |
-
return {
|
13524 |
-
source: source,
|
13525 |
-
repeat: parseBackgroundRepeat(typeof repeats[index] === 'string' ? repeats[index] : repeats[0]),
|
13526 |
-
size: size.length < 2 ? [size[0], AUTO_SIZE] : [size[0], size[1]],
|
13527 |
-
position: position.length < 2 ? [position[0], position[0]] : [position[0], position[1]]
|
13528 |
-
};
|
13529 |
-
});
|
13530 |
-
};
|
13531 |
-
|
13532 |
-
var parseBackgroundSize = function parseBackgroundSize(size) {
|
13533 |
-
return size === 'auto' ? AUTO_SIZE : new BackgroundSize(size);
|
13534 |
-
};
|
13535 |
-
|
13536 |
-
var parseBackgoundPosition = function parseBackgoundPosition(position) {
|
13537 |
-
switch (position) {
|
13538 |
-
case 'bottom':
|
13539 |
-
case 'right':
|
13540 |
-
return new _Length2.default('100%');
|
13541 |
-
case 'left':
|
13542 |
-
case 'top':
|
13543 |
-
return new _Length2.default('0%');
|
13544 |
-
case 'auto':
|
13545 |
-
return new _Length2.default('0');
|
13546 |
-
}
|
13547 |
-
return new _Length2.default(position);
|
13548 |
-
};
|
13549 |
-
|
13550 |
-
var parseBackgroundImage = exports.parseBackgroundImage = function parseBackgroundImage(image) {
|
13551 |
-
var whitespace = /^\s$/;
|
13552 |
-
var results = [];
|
13553 |
-
|
13554 |
-
var args = [];
|
13555 |
-
var method = '';
|
13556 |
-
var quote = null;
|
13557 |
-
var definition = '';
|
13558 |
-
var mode = 0;
|
13559 |
-
var numParen = 0;
|
13560 |
-
|
13561 |
-
var appendResult = function appendResult() {
|
13562 |
-
var prefix = '';
|
13563 |
-
if (method) {
|
13564 |
-
if (definition.substr(0, 1) === '"') {
|
13565 |
-
definition = definition.substr(1, definition.length - 2);
|
13566 |
-
}
|
13567 |
|
13568 |
-
|
13569 |
-
args.push(definition.trim());
|
13570 |
-
}
|
13571 |
|
13572 |
-
|
13573 |
-
|
13574 |
-
|
13575 |
-
|
13576 |
-
|
13577 |
-
|
13578 |
-
|
13579 |
-
|
13580 |
-
|
13581 |
-
|
13582 |
-
|
13583 |
-
|
13584 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13585 |
}
|
13586 |
-
args = [];
|
13587 |
-
method = definition = '';
|
13588 |
-
};
|
13589 |
|
13590 |
-
|
13591 |
-
|
13592 |
-
return;
|
13593 |
-
}
|
13594 |
-
switch (c) {
|
13595 |
-
case '"':
|
13596 |
-
if (!quote) {
|
13597 |
-
quote = c;
|
13598 |
-
} else if (quote === c) {
|
13599 |
-
quote = null;
|
13600 |
-
}
|
13601 |
-
break;
|
13602 |
-
case '(':
|
13603 |
-
if (quote) {
|
13604 |
-
break;
|
13605 |
-
} else if (mode === 0) {
|
13606 |
-
mode = 1;
|
13607 |
-
return;
|
13608 |
-
} else {
|
13609 |
-
numParen++;
|
13610 |
-
}
|
13611 |
-
break;
|
13612 |
-
case ')':
|
13613 |
-
if (quote) {
|
13614 |
-
break;
|
13615 |
-
} else if (mode === 1) {
|
13616 |
-
if (numParen === 0) {
|
13617 |
-
mode = 0;
|
13618 |
-
appendResult();
|
13619 |
-
return;
|
13620 |
-
} else {
|
13621 |
-
numParen--;
|
13622 |
-
}
|
13623 |
-
}
|
13624 |
-
break;
|
13625 |
-
|
13626 |
-
case ',':
|
13627 |
-
if (quote) {
|
13628 |
-
break;
|
13629 |
-
} else if (mode === 0) {
|
13630 |
-
appendResult();
|
13631 |
-
return;
|
13632 |
-
} else if (mode === 1) {
|
13633 |
-
if (numParen === 0 && !method.match(/^url$/i)) {
|
13634 |
-
args.push(definition.trim());
|
13635 |
-
definition = '';
|
13636 |
-
return;
|
13637 |
-
}
|
13638 |
-
}
|
13639 |
-
break;
|
13640 |
-
}
|
13641 |
|
13642 |
-
if (
|
13643 |
-
|
|
|
|
|
|
|
13644 |
} else {
|
13645 |
-
|
13646 |
}
|
13647 |
-
});
|
13648 |
-
|
13649 |
-
appendResult();
|
13650 |
-
return results;
|
13651 |
-
};
|
13652 |
-
|
13653 |
-
/***/ }),
|
13654 |
-
/* 6 */
|
13655 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13656 |
-
|
13657 |
-
"use strict";
|
13658 |
|
|
|
|
|
13659 |
|
13660 |
-
|
13661 |
-
|
13662 |
-
|
13663 |
-
var PATH = exports.PATH = {
|
13664 |
-
VECTOR: 0,
|
13665 |
-
BEZIER_CURVE: 1,
|
13666 |
-
CIRCLE: 2
|
13667 |
-
};
|
13668 |
|
13669 |
-
|
13670 |
-
|
13671 |
-
|
|
|
13672 |
|
13673 |
-
|
|
|
|
|
|
|
|
|
|
|
13674 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13675 |
|
13676 |
-
|
13677 |
-
|
13678 |
-
});
|
13679 |
|
13680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13681 |
|
13682 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13683 |
|
13684 |
-
|
13685 |
-
|
|
|
|
|
13686 |
|
13687 |
-
|
13688 |
-
|
13689 |
-
|
13690 |
-
if (
|
13691 |
-
|
13692 |
-
|
13693 |
-
|
13694 |
-
|
13695 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13696 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13697 |
}
|
13698 |
};
|
13699 |
|
13700 |
-
|
13701 |
-
|
13702 |
-
|
13703 |
-
|
13704 |
-
|
13705 |
-
|
13706 |
-
"use strict";
|
13707 |
-
|
13708 |
-
|
13709 |
-
Object.defineProperty(exports, "__esModule", {
|
13710 |
-
value: true
|
13711 |
-
});
|
13712 |
-
exports.parseListStyle = exports.parseListStyleType = exports.LIST_STYLE_TYPE = exports.LIST_STYLE_POSITION = undefined;
|
13713 |
-
|
13714 |
-
var _background = __webpack_require__(5);
|
13715 |
-
|
13716 |
-
var LIST_STYLE_POSITION = exports.LIST_STYLE_POSITION = {
|
13717 |
-
INSIDE: 0,
|
13718 |
-
OUTSIDE: 1
|
13719 |
-
};
|
13720 |
|
13721 |
-
|
13722 |
-
NONE: -1,
|
13723 |
-
DISC: 0,
|
13724 |
-
CIRCLE: 1,
|
13725 |
-
SQUARE: 2,
|
13726 |
-
DECIMAL: 3,
|
13727 |
-
CJK_DECIMAL: 4,
|
13728 |
-
DECIMAL_LEADING_ZERO: 5,
|
13729 |
-
LOWER_ROMAN: 6,
|
13730 |
-
UPPER_ROMAN: 7,
|
13731 |
-
LOWER_GREEK: 8,
|
13732 |
-
LOWER_ALPHA: 9,
|
13733 |
-
UPPER_ALPHA: 10,
|
13734 |
-
ARABIC_INDIC: 11,
|
13735 |
-
ARMENIAN: 12,
|
13736 |
-
BENGALI: 13,
|
13737 |
-
CAMBODIAN: 14,
|
13738 |
-
CJK_EARTHLY_BRANCH: 15,
|
13739 |
-
CJK_HEAVENLY_STEM: 16,
|
13740 |
-
CJK_IDEOGRAPHIC: 17,
|
13741 |
-
DEVANAGARI: 18,
|
13742 |
-
ETHIOPIC_NUMERIC: 19,
|
13743 |
-
GEORGIAN: 20,
|
13744 |
-
GUJARATI: 21,
|
13745 |
-
GURMUKHI: 22,
|
13746 |
-
HEBREW: 22,
|
13747 |
-
HIRAGANA: 23,
|
13748 |
-
HIRAGANA_IROHA: 24,
|
13749 |
-
JAPANESE_FORMAL: 25,
|
13750 |
-
JAPANESE_INFORMAL: 26,
|
13751 |
-
KANNADA: 27,
|
13752 |
-
KATAKANA: 28,
|
13753 |
-
KATAKANA_IROHA: 29,
|
13754 |
-
KHMER: 30,
|
13755 |
-
KOREAN_HANGUL_FORMAL: 31,
|
13756 |
-
KOREAN_HANJA_FORMAL: 32,
|
13757 |
-
KOREAN_HANJA_INFORMAL: 33,
|
13758 |
-
LAO: 34,
|
13759 |
-
LOWER_ARMENIAN: 35,
|
13760 |
-
MALAYALAM: 36,
|
13761 |
-
MONGOLIAN: 37,
|
13762 |
-
MYANMAR: 38,
|
13763 |
-
ORIYA: 39,
|
13764 |
-
PERSIAN: 40,
|
13765 |
-
SIMP_CHINESE_FORMAL: 41,
|
13766 |
-
SIMP_CHINESE_INFORMAL: 42,
|
13767 |
-
TAMIL: 43,
|
13768 |
-
TELUGU: 44,
|
13769 |
-
THAI: 45,
|
13770 |
-
TIBETAN: 46,
|
13771 |
-
TRAD_CHINESE_FORMAL: 47,
|
13772 |
-
TRAD_CHINESE_INFORMAL: 48,
|
13773 |
-
UPPER_ARMENIAN: 49,
|
13774 |
-
DISCLOSURE_OPEN: 50,
|
13775 |
-
DISCLOSURE_CLOSED: 51
|
13776 |
-
};
|
13777 |
|
13778 |
-
|
13779 |
-
|
13780 |
-
|
13781 |
-
|
13782 |
-
|
13783 |
-
|
13784 |
-
|
13785 |
-
return LIST_STYLE_TYPE.SQUARE;
|
13786 |
-
case 'decimal':
|
13787 |
-
return LIST_STYLE_TYPE.DECIMAL;
|
13788 |
-
case 'cjk-decimal':
|
13789 |
-
return LIST_STYLE_TYPE.CJK_DECIMAL;
|
13790 |
-
case 'decimal-leading-zero':
|
13791 |
-
return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;
|
13792 |
-
case 'lower-roman':
|
13793 |
-
return LIST_STYLE_TYPE.LOWER_ROMAN;
|
13794 |
-
case 'upper-roman':
|
13795 |
-
return LIST_STYLE_TYPE.UPPER_ROMAN;
|
13796 |
-
case 'lower-greek':
|
13797 |
-
return LIST_STYLE_TYPE.LOWER_GREEK;
|
13798 |
-
case 'lower-alpha':
|
13799 |
-
return LIST_STYLE_TYPE.LOWER_ALPHA;
|
13800 |
-
case 'upper-alpha':
|
13801 |
-
return LIST_STYLE_TYPE.UPPER_ALPHA;
|
13802 |
-
case 'arabic-indic':
|
13803 |
-
return LIST_STYLE_TYPE.ARABIC_INDIC;
|
13804 |
-
case 'armenian':
|
13805 |
-
return LIST_STYLE_TYPE.ARMENIAN;
|
13806 |
-
case 'bengali':
|
13807 |
-
return LIST_STYLE_TYPE.BENGALI;
|
13808 |
-
case 'cambodian':
|
13809 |
-
return LIST_STYLE_TYPE.CAMBODIAN;
|
13810 |
-
case 'cjk-earthly-branch':
|
13811 |
-
return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;
|
13812 |
-
case 'cjk-heavenly-stem':
|
13813 |
-
return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;
|
13814 |
-
case 'cjk-ideographic':
|
13815 |
-
return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;
|
13816 |
-
case 'devanagari':
|
13817 |
-
return LIST_STYLE_TYPE.DEVANAGARI;
|
13818 |
-
case 'ethiopic-numeric':
|
13819 |
-
return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;
|
13820 |
-
case 'georgian':
|
13821 |
-
return LIST_STYLE_TYPE.GEORGIAN;
|
13822 |
-
case 'gujarati':
|
13823 |
-
return LIST_STYLE_TYPE.GUJARATI;
|
13824 |
-
case 'gurmukhi':
|
13825 |
-
return LIST_STYLE_TYPE.GURMUKHI;
|
13826 |
-
case 'hebrew':
|
13827 |
-
return LIST_STYLE_TYPE.HEBREW;
|
13828 |
-
case 'hiragana':
|
13829 |
-
return LIST_STYLE_TYPE.HIRAGANA;
|
13830 |
-
case 'hiragana-iroha':
|
13831 |
-
return LIST_STYLE_TYPE.HIRAGANA_IROHA;
|
13832 |
-
case 'japanese-formal':
|
13833 |
-
return LIST_STYLE_TYPE.JAPANESE_FORMAL;
|
13834 |
-
case 'japanese-informal':
|
13835 |
-
return LIST_STYLE_TYPE.JAPANESE_INFORMAL;
|
13836 |
-
case 'kannada':
|
13837 |
-
return LIST_STYLE_TYPE.KANNADA;
|
13838 |
-
case 'katakana':
|
13839 |
-
return LIST_STYLE_TYPE.KATAKANA;
|
13840 |
-
case 'katakana-iroha':
|
13841 |
-
return LIST_STYLE_TYPE.KATAKANA_IROHA;
|
13842 |
-
case 'khmer':
|
13843 |
-
return LIST_STYLE_TYPE.KHMER;
|
13844 |
-
case 'korean-hangul-formal':
|
13845 |
-
return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;
|
13846 |
-
case 'korean-hanja-formal':
|
13847 |
-
return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;
|
13848 |
-
case 'korean-hanja-informal':
|
13849 |
-
return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;
|
13850 |
-
case 'lao':
|
13851 |
-
return LIST_STYLE_TYPE.LAO;
|
13852 |
-
case 'lower-armenian':
|
13853 |
-
return LIST_STYLE_TYPE.LOWER_ARMENIAN;
|
13854 |
-
case 'malayalam':
|
13855 |
-
return LIST_STYLE_TYPE.MALAYALAM;
|
13856 |
-
case 'mongolian':
|
13857 |
-
return LIST_STYLE_TYPE.MONGOLIAN;
|
13858 |
-
case 'myanmar':
|
13859 |
-
return LIST_STYLE_TYPE.MYANMAR;
|
13860 |
-
case 'oriya':
|
13861 |
-
return LIST_STYLE_TYPE.ORIYA;
|
13862 |
-
case 'persian':
|
13863 |
-
return LIST_STYLE_TYPE.PERSIAN;
|
13864 |
-
case 'simp-chinese-formal':
|
13865 |
-
return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;
|
13866 |
-
case 'simp-chinese-informal':
|
13867 |
-
return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;
|
13868 |
-
case 'tamil':
|
13869 |
-
return LIST_STYLE_TYPE.TAMIL;
|
13870 |
-
case 'telugu':
|
13871 |
-
return LIST_STYLE_TYPE.TELUGU;
|
13872 |
-
case 'thai':
|
13873 |
-
return LIST_STYLE_TYPE.THAI;
|
13874 |
-
case 'tibetan':
|
13875 |
-
return LIST_STYLE_TYPE.TIBETAN;
|
13876 |
-
case 'trad-chinese-formal':
|
13877 |
-
return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;
|
13878 |
-
case 'trad-chinese-informal':
|
13879 |
-
return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;
|
13880 |
-
case 'upper-armenian':
|
13881 |
-
return LIST_STYLE_TYPE.UPPER_ARMENIAN;
|
13882 |
-
case 'disclosure-open':
|
13883 |
-
return LIST_STYLE_TYPE.DISCLOSURE_OPEN;
|
13884 |
-
case 'disclosure-closed':
|
13885 |
-
return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;
|
13886 |
-
case 'none':
|
13887 |
-
default:
|
13888 |
-
return LIST_STYLE_TYPE.NONE;
|
13889 |
-
}
|
13890 |
-
};
|
13891 |
|
13892 |
-
|
13893 |
-
|
13894 |
-
return {
|
13895 |
-
listStyleType: parseListStyleType(style.getPropertyValue('list-style-type')),
|
13896 |
-
listStyleImage: listStyleImage.length ? listStyleImage[0] : null,
|
13897 |
-
listStylePosition: parseListStylePosition(style.getPropertyValue('list-style-position'))
|
13898 |
-
};
|
13899 |
};
|
13900 |
|
13901 |
-
|
13902 |
-
|
13903 |
-
|
13904 |
-
|
13905 |
-
case 'outside':
|
13906 |
-
default:
|
13907 |
-
return LIST_STYLE_POSITION.OUTSIDE;
|
13908 |
-
}
|
13909 |
};
|
|
|
13910 |
|
13911 |
-
|
13912 |
-
|
13913 |
-
|
13914 |
-
|
13915 |
-
"use strict";
|
13916 |
-
|
13917 |
-
|
13918 |
-
Object.defineProperty(exports, "__esModule", {
|
13919 |
-
value: true
|
13920 |
-
});
|
13921 |
-
|
13922 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
13923 |
-
|
13924 |
-
var _textTransform = __webpack_require__(20);
|
13925 |
-
|
13926 |
-
var _TextBounds = __webpack_require__(22);
|
13927 |
-
|
13928 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13929 |
-
|
13930 |
-
var TextContainer = function () {
|
13931 |
-
function TextContainer(text, parent, bounds) {
|
13932 |
-
_classCallCheck(this, TextContainer);
|
13933 |
-
|
13934 |
-
this.text = text;
|
13935 |
-
this.parent = parent;
|
13936 |
-
this.bounds = bounds;
|
13937 |
-
}
|
13938 |
-
|
13939 |
-
_createClass(TextContainer, null, [{
|
13940 |
-
key: 'fromTextNode',
|
13941 |
-
value: function fromTextNode(node, parent) {
|
13942 |
-
var text = transform(node.data, parent.style.textTransform);
|
13943 |
-
return new TextContainer(text, parent, (0, _TextBounds.parseTextBounds)(text, parent, node));
|
13944 |
-
}
|
13945 |
-
}]);
|
13946 |
-
|
13947 |
-
return TextContainer;
|
13948 |
-
}();
|
13949 |
-
|
13950 |
-
exports.default = TextContainer;
|
13951 |
-
|
13952 |
-
|
13953 |
-
var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
|
13954 |
-
|
13955 |
-
var transform = function transform(text, _transform) {
|
13956 |
-
switch (_transform) {
|
13957 |
-
case _textTransform.TEXT_TRANSFORM.LOWERCASE:
|
13958 |
-
return text.toLowerCase();
|
13959 |
-
case _textTransform.TEXT_TRANSFORM.CAPITALIZE:
|
13960 |
-
return text.replace(CAPITALIZE, capitalize);
|
13961 |
-
case _textTransform.TEXT_TRANSFORM.UPPERCASE:
|
13962 |
-
return text.toUpperCase();
|
13963 |
-
default:
|
13964 |
-
return text;
|
13965 |
-
}
|
13966 |
-
};
|
13967 |
|
13968 |
-
|
13969 |
-
|
13970 |
-
|
13971 |
-
|
|
|
|
|
|
|
|
|
13972 |
|
13973 |
-
|
13974 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13975 |
|
13976 |
-
|
13977 |
-
|
13978 |
-
|
|
|
13979 |
|
13980 |
-
|
|
|
13981 |
|
|
|
13982 |
|
13983 |
-
|
13984 |
-
|
13985 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13986 |
|
13987 |
-
|
13988 |
-
|
13989 |
-
|
13990 |
-
|
13991 |
-
|
13992 |
-
|
13993 |
-
|
13994 |
-
|
13995 |
-
|
13996 |
-
|
13997 |
-
|
13998 |
-
|
13999 |
-
|
14000 |
-
|
14001 |
-
|
14002 |
-
var rangeHeight = Math.round(rangeBounds.height);
|
14003 |
-
document.body.removeChild(testElement);
|
14004 |
-
if (rangeHeight === TEST_HEIGHT) {
|
14005 |
-
return true;
|
14006 |
-
}
|
14007 |
-
}
|
14008 |
-
}
|
14009 |
|
14010 |
-
|
14011 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14012 |
|
14013 |
-
|
14014 |
-
|
14015 |
-
|
14016 |
-
|
14017 |
-
|
14018 |
-
|
14019 |
-
|
14020 |
-
|
14021 |
-
|
14022 |
-
|
14023 |
-
|
14024 |
-
|
14025 |
-
|
14026 |
-
|
14027 |
-
|
14028 |
-
|
14029 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14030 |
|
14031 |
-
|
14032 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14033 |
|
14034 |
-
|
14035 |
-
|
14036 |
-
|
14037 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14038 |
|
14039 |
-
|
14040 |
-
|
14041 |
-
|
14042 |
-
|
14043 |
-
|
14044 |
-
|
14045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14046 |
|
14047 |
-
|
14048 |
-
|
14049 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14050 |
|
14051 |
-
|
14052 |
-
|
14053 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14054 |
|
14055 |
-
|
14056 |
-
|
14057 |
-
|
14058 |
-
|
14059 |
-
|
|
|
|
|
14060 |
|
14061 |
-
|
14062 |
-
|
14063 |
-
canvas.toDataURL();
|
14064 |
-
} catch (e) {
|
14065 |
-
return false;
|
14066 |
-
}
|
14067 |
-
return true;
|
14068 |
-
};
|
14069 |
|
14070 |
-
|
14071 |
-
return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
14072 |
-
};
|
14073 |
|
14074 |
-
|
14075 |
-
|
14076 |
-
|
14077 |
-
|
14078 |
-
|
14079 |
-
|
14080 |
-
ctx.fillStyle = 'rgb(0, 255, 0)';
|
14081 |
-
ctx.fillRect(0, 0, size, size);
|
14082 |
-
|
14083 |
-
var img = new Image();
|
14084 |
-
var greenImageSrc = canvas.toDataURL();
|
14085 |
-
img.src = greenImageSrc;
|
14086 |
-
var svg = (0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, img);
|
14087 |
-
ctx.fillStyle = 'red';
|
14088 |
-
ctx.fillRect(0, 0, size, size);
|
14089 |
-
|
14090 |
-
return (0, _ForeignObjectRenderer.loadSerializedSVG)(svg).then(function (img) {
|
14091 |
-
ctx.drawImage(img, 0, 0);
|
14092 |
-
var data = ctx.getImageData(0, 0, size, size).data;
|
14093 |
-
ctx.fillStyle = 'red';
|
14094 |
-
ctx.fillRect(0, 0, size, size);
|
14095 |
-
|
14096 |
-
var node = document.createElement('div');
|
14097 |
-
node.style.backgroundImage = 'url(' + greenImageSrc + ')';
|
14098 |
-
node.style.height = size + 'px';
|
14099 |
-
// Firefox 55 does not render inline <img /> tags
|
14100 |
-
return isGreenPixel(data) ? (0, _ForeignObjectRenderer.loadSerializedSVG)((0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, node)) : Promise.reject(false);
|
14101 |
-
}).then(function (img) {
|
14102 |
-
ctx.drawImage(img, 0, 0);
|
14103 |
-
// Edge does not render background-images
|
14104 |
-
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
14105 |
-
}).catch(function (e) {
|
14106 |
-
return false;
|
14107 |
-
});
|
14108 |
-
};
|
14109 |
|
14110 |
-
|
14111 |
-
|
14112 |
-
|
14113 |
-
'use strict';
|
14114 |
|
14115 |
-
|
14116 |
-
Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
|
14117 |
-
return value;
|
14118 |
-
},
|
14119 |
-
// $FlowFixMe - get/set properties not yet supported
|
14120 |
-
get SUPPORT_SVG_DRAWING() {
|
14121 |
-
'use strict';
|
14122 |
|
14123 |
-
|
14124 |
-
|
14125 |
-
|
14126 |
-
},
|
14127 |
-
// $FlowFixMe - get/set properties not yet supported
|
14128 |
-
get SUPPORT_BASE64_DRAWING() {
|
14129 |
-
'use strict';
|
14130 |
-
|
14131 |
-
return function (src) {
|
14132 |
-
var _value = testBase64(document, src);
|
14133 |
-
Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {
|
14134 |
-
return _value;
|
14135 |
-
} });
|
14136 |
-
return _value;
|
14137 |
-
};
|
14138 |
-
},
|
14139 |
-
// $FlowFixMe - get/set properties not yet supported
|
14140 |
-
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
14141 |
-
'use strict';
|
14142 |
|
14143 |
-
|
14144 |
-
|
14145 |
-
return value;
|
14146 |
-
},
|
14147 |
-
// $FlowFixMe - get/set properties not yet supported
|
14148 |
-
get SUPPORT_CORS_IMAGES() {
|
14149 |
-
'use strict';
|
14150 |
|
14151 |
-
|
14152 |
-
|
14153 |
-
|
14154 |
-
},
|
14155 |
-
// $FlowFixMe - get/set properties not yet supported
|
14156 |
-
get SUPPORT_RESPONSE_TYPE() {
|
14157 |
-
'use strict';
|
14158 |
|
14159 |
-
|
14160 |
-
|
14161 |
-
|
14162 |
-
|
14163 |
-
// $FlowFixMe - get/set properties not yet supported
|
14164 |
-
get SUPPORT_CORS_XHR() {
|
14165 |
-
'use strict';
|
14166 |
|
14167 |
-
|
14168 |
-
Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });
|
14169 |
-
return value;
|
14170 |
-
}
|
14171 |
-
};
|
14172 |
|
14173 |
-
|
14174 |
|
14175 |
-
|
14176 |
-
|
14177 |
-
/***/ (function(module, exports, __webpack_require__) {
|
14178 |
|
14179 |
-
|
|
|
|
|
|
|
|
|
14180 |
|
|
|
|
|
14181 |
|
14182 |
-
|
14183 |
-
|
14184 |
-
});
|
14185 |
-
exports.parseTextDecoration = exports.TEXT_DECORATION_LINE = exports.TEXT_DECORATION = exports.TEXT_DECORATION_STYLE = undefined;
|
14186 |
|
14187 |
-
|
14188 |
|
14189 |
-
|
|
|
14190 |
|
14191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14192 |
|
14193 |
-
|
14194 |
-
SOLID: 0,
|
14195 |
-
DOUBLE: 1,
|
14196 |
-
DOTTED: 2,
|
14197 |
-
DASHED: 3,
|
14198 |
-
WAVY: 4
|
14199 |
-
};
|
14200 |
|
14201 |
-
|
14202 |
-
|
14203 |
-
};
|
14204 |
|
14205 |
-
|
14206 |
-
|
14207 |
-
|
14208 |
-
|
14209 |
-
BLINK: 4
|
14210 |
-
};
|
14211 |
|
14212 |
-
|
14213 |
-
|
14214 |
-
case 'underline':
|
14215 |
-
return TEXT_DECORATION_LINE.UNDERLINE;
|
14216 |
-
case 'overline':
|
14217 |
-
return TEXT_DECORATION_LINE.OVERLINE;
|
14218 |
-
case 'line-through':
|
14219 |
-
return TEXT_DECORATION_LINE.LINE_THROUGH;
|
14220 |
-
}
|
14221 |
-
return TEXT_DECORATION_LINE.BLINK;
|
14222 |
-
};
|
14223 |
|
14224 |
-
|
14225 |
-
|
14226 |
-
|
14227 |
-
|
|
|
|
|
|
|
|
|
14228 |
|
14229 |
-
|
14230 |
-
|
|
|
|
|
|
|
|
|
14231 |
|
14232 |
-
|
14233 |
-
|
14234 |
-
|
14235 |
-
|
14236 |
-
|
14237 |
-
|
14238 |
-
|
14239 |
-
|
14240 |
-
|
14241 |
-
|
14242 |
-
|
14243 |
-
|
14244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14245 |
|
14246 |
-
|
14247 |
-
|
14248 |
-
if (textDecorationLine === null) {
|
14249 |
-
return TEXT_DECORATION.NONE;
|
14250 |
-
}
|
14251 |
|
14252 |
-
|
14253 |
-
|
|
|
14254 |
|
14255 |
-
|
14256 |
-
|
14257 |
-
|
14258 |
-
|
14259 |
-
|
14260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14261 |
|
14262 |
-
|
14263 |
-
|
14264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14265 |
|
14266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14268 |
|
14269 |
-
|
14270 |
-
|
14271 |
-
})
|
14272 |
-
exports
|
14273 |
-
|
14274 |
-
var
|
14275 |
-
|
14276 |
-
var
|
14277 |
-
|
14278 |
-
|
14279 |
-
|
14280 |
-
|
14281 |
-
|
14282 |
-
|
14283 |
-
|
14284 |
-
|
14285 |
-
|
14286 |
-
|
14287 |
-
|
14288 |
-
|
14289 |
-
|
14290 |
-
|
14291 |
-
|
14292 |
-
|
14293 |
-
|
14294 |
-
|
14295 |
-
|
14296 |
-
|
14297 |
-
|
14298 |
-
|
14299 |
-
|
14300 |
-
|
14301 |
-
|
14302 |
-
|
14303 |
-
|
14304 |
-
|
14305 |
-
|
14306 |
-
|
14307 |
-
|
14308 |
-
|
14309 |
-
|
14310 |
-
|
14311 |
-
|
14312 |
-
|
14313 |
-
|
14314 |
-
|
14315 |
-
|
14316 |
-
|
14317 |
-
|
14318 |
-
|
14319 |
-
|
14320 |
-
|
14321 |
-
|
14322 |
-
|
14323 |
-
|
14324 |
-
|
14325 |
-
|
14326 |
-
|
14327 |
-
|
14328 |
-
|
14329 |
-
|
14330 |
-
|
14331 |
-
|
14332 |
-
|
14333 |
-
|
14334 |
-
|
14335 |
-
|
14336 |
-
|
14337 |
-
|
14338 |
-
|
14339 |
-
|
14340 |
-
|
14341 |
-
|
14342 |
-
|
14343 |
-
|
14344 |
-
|
14345 |
-
|
14346 |
-
|
14347 |
-
|
14348 |
-
|
14349 |
-
|
14350 |
-
|
14351 |
-
|
14352 |
-
|
14353 |
-
|
14354 |
-
|
14355 |
-
|
14356 |
-
|
14357 |
-
|
14358 |
-
|
14359 |
-
|
14360 |
-
|
14361 |
-
|
14362 |
-
|
14363 |
-
|
14364 |
-
|
14365 |
-
|
14366 |
-
|
14367 |
-
|
14368 |
-
|
14369 |
-
|
14370 |
-
|
14371 |
-
|
14372 |
-
|
14373 |
-
|
14374 |
-
|
14375 |
-
|
14376 |
-
|
14377 |
-
|
14378 |
-
|
14379 |
-
|
14380 |
-
|
14381 |
-
|
14382 |
-
|
14383 |
-
|
14384 |
-
|
14385 |
-
|
14386 |
-
|
14387 |
-
|
14388 |
-
|
14389 |
-
|
14390 |
-
|
14391 |
-
|
14392 |
-
|
14393 |
-
|
14394 |
-
|
14395 |
-
|
14396 |
-
|
14397 |
-
|
14398 |
-
|
14399 |
-
|
14400 |
-
|
14401 |
-
|
14402 |
-
|
14403 |
-
|
14404 |
-
|
14405 |
-
|
14406 |
-
|
14407 |
-
|
14408 |
-
|
14409 |
-
|
14410 |
-
|
14411 |
-
|
14412 |
-
|
14413 |
-
|
14414 |
-
|
14415 |
-
|
14416 |
-
|
14417 |
-
return
|
14418 |
-
|
14419 |
-
|
14420 |
-
|
14421 |
-
|
14422 |
-
|
14423 |
-
|
14424 |
-
|
14425 |
-
|
14426 |
-
return
|
14427 |
-
};
|
14428 |
-
|
14429 |
-
|
14430 |
-
|
14431 |
-
|
14432 |
-
|
14433 |
-
|
14434 |
-
|
14435 |
-
|
14436 |
-
|
14437 |
-
|
14438 |
-
|
14439 |
-
|
14440 |
-
|
14441 |
-
|
14442 |
-
|
14443 |
-
|
14444 |
-
|
14445 |
-
|
14446 |
-
|
14447 |
-
|
14448 |
-
|
14449 |
-
|
14450 |
-
|
14451 |
-
|
14452 |
-
|
14453 |
-
|
14454 |
-
|
14455 |
-
|
14456 |
-
|
14457 |
-
|
14458 |
-
var
|
14459 |
-
|
14460 |
-
|
14461 |
-
|
14462 |
-
|
14463 |
-
|
14464 |
-
|
14465 |
-
|
14466 |
-
|
14467 |
-
|
14468 |
-
|
14469 |
-
|
14470 |
-
|
14471 |
-
var
|
14472 |
-
|
14473 |
-
|
14474 |
-
|
14475 |
-
|
14476 |
-
|
14477 |
-
|
14478 |
-
|
14479 |
-
|
14480 |
-
|
14481 |
-
|
14482 |
-
|
14483 |
-
|
14484 |
-
|
14485 |
-
|
14486 |
-
|
14487 |
-
|
14488 |
-
|
14489 |
-
|
14490 |
-
|
14491 |
-
|
14492 |
-
|
14493 |
-
|
14494 |
-
|
14495 |
-
|
14496 |
-
|
14497 |
-
|
14498 |
-
|
14499 |
-
|
14500 |
-
|
14501 |
-
|
14502 |
-
|
14503 |
-
|
14504 |
-
|
14505 |
-
|
14506 |
-
|
14507 |
-
|
14508 |
-
|
14509 |
-
|
14510 |
-
|
14511 |
-
|
14512 |
-
|
14513 |
-
|
14514 |
-
|
14515 |
-
|
14516 |
-
|
14517 |
-
|
14518 |
-
|
14519 |
-
|
14520 |
-
|
14521 |
-
|
14522 |
-
|
14523 |
-
|
14524 |
-
|
14525 |
-
|
14526 |
-
|
14527 |
-
|
14528 |
-
|
14529 |
-
|
14530 |
-
|
14531 |
-
|
14532 |
-
|
14533 |
-
|
14534 |
-
|
14535 |
-
|
14536 |
-
|
14537 |
-
|
14538 |
-
|
14539 |
-
|
14540 |
-
|
14541 |
-
|
14542 |
-
|
14543 |
-
|
14544 |
-
|
14545 |
-
|
14546 |
-
|
14547 |
-
|
14548 |
-
|
14549 |
-
|
14550 |
-
|
14551 |
-
|
14552 |
-
|
14553 |
-
|
14554 |
-
|
14555 |
-
|
14556 |
-
|
14557 |
-
|
14558 |
-
|
14559 |
-
|
14560 |
-
|
14561 |
-
|
14562 |
-
|
14563 |
-
|
14564 |
-
|
14565 |
-
|
14566 |
-
|
14567 |
-
|
14568 |
-
|
14569 |
-
|
14570 |
-
|
14571 |
-
|
14572 |
-
|
14573 |
-
|
14574 |
-
|
14575 |
-
|
14576 |
-
|
14577 |
-
|
14578 |
-
|
14579 |
-
|
14580 |
-
|
14581 |
-
|
14582 |
-
|
14583 |
-
|
14584 |
-
|
14585 |
-
|
14586 |
-
|
14587 |
-
|
14588 |
-
|
14589 |
-
|
14590 |
-
|
14591 |
-
|
14592 |
-
|
14593 |
-
|
14594 |
-
|
14595 |
-
|
14596 |
-
|
14597 |
-
|
14598 |
-
|
14599 |
-
|
14600 |
-
|
14601 |
-
|
14602 |
-
|
14603 |
-
|
14604 |
-
|
14605 |
-
|
14606 |
-
|
14607 |
-
|
14608 |
-
|
14609 |
-
|
14610 |
-
|
14611 |
-
|
14612 |
-
|
14613 |
-
|
14614 |
-
|
14615 |
-
|
14616 |
-
|
14617 |
-
|
14618 |
-
|
14619 |
-
|
14620 |
-
|
14621 |
-
|
14622 |
-
|
14623 |
-
|
14624 |
-
|
14625 |
-
|
14626 |
-
|
14627 |
-
|
14628 |
-
|
14629 |
-
|
14630 |
-
|
14631 |
-
|
14632 |
-
|
14633 |
-
|
14634 |
-
|
14635 |
-
|
14636 |
-
|
14637 |
-
|
14638 |
-
|
14639 |
-
|
14640 |
-
|
14641 |
-
|
14642 |
-
|
14643 |
-
|
14644 |
-
|
14645 |
-
|
14646 |
-
|
14647 |
-
|
14648 |
-
|
14649 |
-
|
14650 |
-
|
14651 |
-
|
14652 |
-
|
14653 |
-
|
14654 |
-
|
14655 |
-
|
14656 |
-
|
14657 |
-
|
14658 |
-
|
14659 |
-
|
14660 |
-
|
14661 |
-
|
14662 |
-
|
14663 |
-
|
14664 |
-
|
14665 |
-
|
14666 |
-
|
14667 |
-
|
14668 |
-
|
14669 |
-
|
14670 |
-
|
14671 |
-
|
14672 |
-
|
14673 |
-
|
14674 |
-
|
14675 |
-
|
14676 |
-
|
14677 |
-
|
14678 |
-
|
14679 |
-
|
14680 |
-
|
14681 |
-
|
14682 |
-
|
14683 |
-
|
14684 |
-
|
14685 |
-
|
14686 |
-
|
14687 |
-
|
14688 |
-
|
14689 |
-
|
14690 |
-
|
14691 |
-
|
14692 |
-
|
14693 |
-
|
14694 |
-
|
14695 |
-
|
14696 |
-
|
14697 |
-
|
14698 |
-
|
14699 |
-
|
14700 |
-
|
14701 |
-
|
14702 |
-
|
14703 |
-
|
14704 |
-
|
14705 |
-
|
14706 |
-
return
|
14707 |
-
|
14708 |
-
|
14709 |
-
|
14710 |
-
|
14711 |
-
|
14712 |
-
|
14713 |
-
|
14714 |
-
|
14715 |
-
|
14716 |
-
|
14717 |
-
|
14718 |
-
|
14719 |
-
|
14720 |
-
|
14721 |
-
|
14722 |
-
|
14723 |
-
|
14724 |
-
|
14725 |
-
|
14726 |
-
|
14727 |
-
|
14728 |
-
|
14729 |
-
|
14730 |
-
|
14731 |
-
|
14732 |
-
|
14733 |
-
|
14734 |
-
|
14735 |
-
|
14736 |
-
|
14737 |
-
|
14738 |
-
|
14739 |
-
|
14740 |
-
|
14741 |
-
|
14742 |
-
|
14743 |
-
|
14744 |
-
|
14745 |
-
|
14746 |
-
return
|
14747 |
-
|
14748 |
-
|
14749 |
-
|
14750 |
-
|
14751 |
-
|
14752 |
-
|
14753 |
-
|
14754 |
-
|
14755 |
-
|
14756 |
-
|
14757 |
-
|
14758 |
-
|
14759 |
-
|
14760 |
-
|
14761 |
-
|
14762 |
-
|
14763 |
-
|
14764 |
-
|
14765 |
-
|
14766 |
-
|
14767 |
-
|
14768 |
-
|
14769 |
-
|
14770 |
-
|
14771 |
-
|
14772 |
-
|
14773 |
-
|
14774 |
-
|
14775 |
-
|
14776 |
-
|
14777 |
-
|
14778 |
-
|
14779 |
-
|
14780 |
-
|
14781 |
-
|
14782 |
-
|
14783 |
-
|
14784 |
-
|
14785 |
-
|
14786 |
-
|
14787 |
-
|
14788 |
-
|
14789 |
-
|
14790 |
-
|
14791 |
-
|
14792 |
-
|
14793 |
-
|
14794 |
-
|
14795 |
-
|
14796 |
-
|
14797 |
-
|
14798 |
-
|
14799 |
-
|
14800 |
-
|
14801 |
-
|
14802 |
-
|
14803 |
-
|
14804 |
-
|
14805 |
-
|
14806 |
-
|
14807 |
-
|
14808 |
-
|
14809 |
-
|
14810 |
-
|
14811 |
-
|
14812 |
-
|
14813 |
-
|
14814 |
-
|
14815 |
-
|
14816 |
-
|
14817 |
-
|
14818 |
-
|
14819 |
-
|
14820 |
-
|
14821 |
-
|
14822 |
-
|
14823 |
-
|
14824 |
-
|
14825 |
-
|
14826 |
-
|
14827 |
-
|
14828 |
-
|
14829 |
-
|
14830 |
-
|
14831 |
-
|
14832 |
-
|
14833 |
-
|
14834 |
-
|
14835 |
-
|
14836 |
-
|
14837 |
-
|
14838 |
-
|
14839 |
-
|
14840 |
-
|
14841 |
-
|
14842 |
-
|
14843 |
-
|
14844 |
-
|
14845 |
-
|
14846 |
-
|
14847 |
-
|
14848 |
-
|
14849 |
-
|
14850 |
-
|
14851 |
-
|
14852 |
-
|
14853 |
-
|
14854 |
-
|
14855 |
-
|
14856 |
-
|
14857 |
-
|
14858 |
-
|
14859 |
-
|
14860 |
-
|
14861 |
-
|
14862 |
-
|
14863 |
-
|
14864 |
-
|
14865 |
-
|
14866 |
-
|
14867 |
-
|
14868 |
-
|
14869 |
-
|
14870 |
-
|
14871 |
-
|
14872 |
-
|
14873 |
-
|
14874 |
-
|
14875 |
-
|
14876 |
-
|
14877 |
-
|
14878 |
-
|
14879 |
-
|
14880 |
-
|
14881 |
-
|
14882 |
-
|
14883 |
-
|
14884 |
-
|
14885 |
-
|
14886 |
-
|
14887 |
-
|
14888 |
-
|
14889 |
-
|
14890 |
-
|
14891 |
-
|
14892 |
-
|
14893 |
-
|
14894 |
-
|
14895 |
-
|
14896 |
-
|
14897 |
-
|
14898 |
-
|
14899 |
-
|
14900 |
-
|
14901 |
-
|
14902 |
-
|
14903 |
-
|
14904 |
-
|
14905 |
-
|
14906 |
-
|
14907 |
-
|
14908 |
-
|
14909 |
-
|
14910 |
-
|
14911 |
-
|
14912 |
-
|
14913 |
-
|
14914 |
-
|
14915 |
-
|
14916 |
-
|
14917 |
-
|
14918 |
-
|
14919 |
-
|
14920 |
-
|
14921 |
-
|
14922 |
-
|
14923 |
-
|
14924 |
-
|
14925 |
-
|
14926 |
-
|
14927 |
-
|
14928 |
-
|
14929 |
-
|
14930 |
-
|
14931 |
-
|
14932 |
-
}
|
14933 |
-
|
14934 |
-
|
14935 |
-
|
14936 |
-
|
14937 |
-
|
14938 |
-
|
14939 |
-
|
14940 |
-
|
14941 |
-
|
14942 |
-
|
14943 |
-
|
14944 |
-
|
14945 |
-
|
14946 |
-
|
14947 |
-
|
14948 |
-
|
14949 |
-
|
14950 |
-
|
14951 |
-
|
14952 |
-
|
14953 |
-
|
14954 |
-
|
14955 |
-
|
14956 |
-
|
14957 |
-
|
14958 |
-
|
14959 |
-
|
14960 |
-
|
14961 |
-
|
14962 |
-
|
14963 |
-
|
14964 |
-
|
14965 |
-
|
14966 |
-
|
14967 |
-
|
14968 |
-
|
14969 |
-
|
14970 |
-
|
14971 |
-
|
14972 |
-
|
14973 |
-
|
14974 |
-
|
14975 |
-
|
14976 |
-
|
14977 |
-
|
14978 |
-
|
14979 |
-
|
14980 |
-
|
14981 |
-
|
14982 |
-
|
14983 |
-
|
14984 |
-
|
14985 |
-
|
14986 |
-
|
14987 |
-
|
14988 |
-
|
14989 |
-
|
14990 |
-
|
14991 |
-
|
14992 |
-
|
14993 |
-
|
14994 |
-
|
14995 |
-
|
14996 |
-
|
14997 |
-
|
14998 |
-
|
14999 |
-
|
15000 |
-
|
15001 |
-
|
15002 |
-
|
15003 |
-
|
15004 |
-
|
15005 |
-
|
15006 |
-
|
15007 |
-
|
15008 |
-
|
15009 |
-
|
15010 |
-
|
15011 |
-
|
15012 |
-
|
15013 |
-
|
15014 |
-
|
15015 |
-
|
15016 |
-
|
15017 |
-
|
15018 |
-
|
15019 |
-
|
15020 |
-
|
15021 |
-
|
15022 |
-
|
15023 |
-
|
15024 |
-
|
15025 |
-
|
15026 |
-
|
15027 |
-
|
15028 |
-
|
15029 |
-
|
15030 |
-
|
15031 |
-
|
15032 |
-
|
15033 |
-
|
15034 |
-
|
15035 |
-
|
15036 |
-
|
15037 |
-
|
15038 |
-
|
15039 |
-
|
15040 |
-
|
15041 |
-
|
15042 |
-
|
15043 |
-
|
15044 |
-
|
15045 |
-
|
15046 |
-
|
15047 |
-
|
15048 |
-
|
15049 |
-
|
15050 |
-
|
15051 |
-
|
15052 |
-
|
15053 |
-
|
15054 |
-
|
15055 |
-
|
15056 |
-
|
15057 |
-
|
15058 |
-
|
15059 |
-
|
15060 |
-
|
15061 |
-
|
15062 |
-
|
15063 |
-
|
15064 |
-
|
15065 |
-
|
15066 |
-
|
15067 |
-
|
15068 |
-
|
15069 |
-
|
15070 |
-
|
15071 |
-
|
15072 |
-
|
15073 |
-
|
15074 |
-
|
15075 |
-
|
15076 |
-
|
15077 |
-
|
15078 |
-
|
15079 |
-
|
15080 |
-
|
15081 |
-
|
15082 |
-
|
15083 |
-
|
15084 |
-
|
15085 |
-
|
15086 |
-
|
15087 |
-
|
15088 |
-
|
15089 |
-
|
15090 |
-
|
15091 |
-
|
15092 |
-
|
15093 |
-
|
15094 |
-
|
15095 |
-
|
15096 |
-
|
15097 |
-
|
15098 |
-
|
15099 |
-
|
15100 |
-
|
15101 |
-
|
15102 |
-
|
15103 |
-
|
15104 |
-
|
15105 |
-
|
15106 |
-
|
15107 |
-
|
15108 |
-
|
15109 |
-
|
15110 |
-
|
15111 |
-
|
15112 |
-
|
15113 |
-
|
15114 |
-
|
15115 |
-
|
15116 |
-
|
15117 |
-
|
15118 |
-
|
15119 |
-
|
15120 |
-
|
15121 |
-
|
15122 |
-
|
15123 |
-
|
15124 |
-
|
15125 |
-
|
15126 |
-
|
15127 |
-
|
15128 |
-
|
15129 |
-
|
15130 |
-
|
15131 |
-
|
15132 |
-
|
15133 |
-
|
15134 |
-
|
15135 |
-
|
15136 |
-
|
15137 |
-
|
15138 |
-
|
15139 |
-
|
15140 |
-
|
15141 |
-
|
15142 |
-
|
15143 |
-
|
15144 |
-
|
15145 |
-
|
15146 |
-
|
15147 |
-
|
15148 |
-
|
15149 |
-
|
15150 |
-
|
15151 |
-
|
15152 |
-
|
15153 |
-
|
15154 |
-
|
15155 |
-
|
15156 |
-
|
15157 |
-
|
15158 |
-
|
15159 |
-
|
15160 |
-
|
15161 |
-
|
15162 |
-
|
15163 |
-
|
15164 |
-
|
15165 |
-
|
15166 |
-
|
15167 |
-
|
15168 |
-
|
15169 |
-
|
15170 |
-
|
15171 |
-
|
15172 |
-
|
15173 |
-
|
15174 |
-
|
15175 |
-
|
15176 |
-
|
15177 |
-
|
15178 |
-
|
15179 |
-
|
15180 |
-
|
15181 |
-
|
15182 |
-
|
15183 |
-
|
15184 |
-
|
15185 |
-
|
15186 |
-
|
15187 |
-
|
15188 |
-
|
15189 |
-
|
15190 |
-
|
15191 |
-
|
15192 |
-
|
15193 |
-
|
15194 |
-
|
15195 |
-
|
15196 |
-
|
15197 |
-
|
15198 |
-
|
15199 |
-
|
15200 |
-
|
15201 |
-
|
15202 |
-
|
15203 |
-
|
15204 |
-
|
15205 |
-
|
15206 |
-
|
15207 |
-
|
15208 |
-
|
15209 |
-
|
15210 |
-
|
15211 |
-
|
15212 |
-
|
15213 |
-
|
15214 |
-
|
15215 |
-
|
15216 |
-
|
15217 |
-
|
15218 |
-
|
15219 |
-
|
15220 |
-
|
15221 |
-
|
15222 |
-
|
15223 |
-
|
15224 |
-
|
15225 |
-
|
15226 |
-
|
15227 |
-
|
15228 |
-
|
15229 |
-
|
15230 |
-
|
15231 |
-
|
15232 |
-
|
15233 |
-
|
15234 |
-
|
15235 |
-
|
15236 |
-
|
15237 |
-
|
15238 |
-
|
15239 |
-
|
15240 |
-
|
15241 |
-
|
15242 |
-
var
|
15243 |
-
|
15244 |
-
var
|
15245 |
-
|
15246 |
-
var
|
15247 |
-
|
15248 |
-
function
|
15249 |
-
|
15250 |
-
|
15251 |
-
|
15252 |
-
|
15253 |
-
|
15254 |
-
|
15255 |
-
|
15256 |
-
|
15257 |
-
|
15258 |
-
|
15259 |
-
|
15260 |
-
|
15261 |
-
|
15262 |
-
|
15263 |
-
|
15264 |
-
|
15265 |
-
|
15266 |
-
|
15267 |
-
|
15268 |
-
|
15269 |
-
|
15270 |
-
|
15271 |
-
|
15272 |
-
|
15273 |
-
|
15274 |
-
|
15275 |
-
|
15276 |
-
|
15277 |
-
|
15278 |
-
|
15279 |
-
|
15280 |
-
|
15281 |
-
|
15282 |
-
|
15283 |
-
|
15284 |
-
|
15285 |
-
|
15286 |
-
|
15287 |
-
};
|
15288 |
-
|
15289 |
-
|
15290 |
-
|
15291 |
-
|
15292 |
-
|
15293 |
-
|
15294 |
-
|
15295 |
-
|
15296 |
-
};
|
15297 |
-
|
15298 |
-
|
15299 |
-
if (
|
15300 |
-
|
15301 |
-
|
15302 |
-
|
15303 |
-
|
15304 |
-
|
15305 |
-
|
15306 |
-
|
15307 |
-
|
15308 |
-
|
15309 |
-
|
15310 |
-
|
15311 |
-
|
15312 |
-
|
15313 |
-
|
15314 |
-
|
15315 |
-
|
15316 |
-
|
15317 |
-
|
15318 |
-
|
15319 |
-
|
15320 |
-
|
15321 |
-
|
15322 |
-
|
15323 |
-
|
15324 |
-
|
15325 |
-
|
15326 |
-
|
15327 |
-
|
15328 |
-
|
15329 |
-
|
15330 |
-
|
15331 |
-
|
15332 |
-
|
15333 |
-
|
15334 |
-
|
15335 |
-
|
15336 |
-
|
15337 |
-
|
15338 |
-
|
15339 |
-
|
15340 |
-
|
15341 |
-
|
15342 |
-
|
15343 |
-
|
15344 |
-
|
15345 |
-
|
15346 |
-
|
15347 |
-
|
15348 |
-
|
15349 |
-
|
15350 |
-
|
15351 |
-
|
15352 |
-
|
15353 |
-
|
15354 |
-
|
15355 |
-
|
15356 |
-
|
15357 |
-
|
15358 |
-
|
15359 |
-
|
15360 |
-
|
15361 |
-
|
15362 |
-
|
15363 |
-
this.
|
15364 |
-
|
15365 |
-
|
15366 |
-
|
15367 |
-
|
15368 |
-
|
15369 |
-
|
15370 |
-
|
15371 |
-
|
15372 |
-
|
15373 |
-
|
15374 |
-
|
15375 |
-
|
15376 |
-
|
15377 |
-
var
|
15378 |
-
|
15379 |
-
|
15380 |
-
|
15381 |
-
|
15382 |
-
|
15383 |
-
|
15384 |
-
|
15385 |
-
|
15386 |
-
|
15387 |
-
|
15388 |
-
|
15389 |
-
|
15390 |
-
|
15391 |
-
|
15392 |
-
|
15393 |
-
|
15394 |
-
|
15395 |
-
|
15396 |
-
|
15397 |
-
|
15398 |
-
|
15399 |
-
|
15400 |
-
|
15401 |
-
|
15402 |
-
|
15403 |
-
|
15404 |
-
|
15405 |
-
|
15406 |
-
|
15407 |
-
|
15408 |
-
|
15409 |
-
|
15410 |
-
|
15411 |
-
|
15412 |
-
|
15413 |
-
|
15414 |
-
|
15415 |
-
|
15416 |
-
|
15417 |
-
|
15418 |
-
|
15419 |
-
|
15420 |
-
|
15421 |
-
|
15422 |
-
|
15423 |
-
|
15424 |
-
|
15425 |
-
|
15426 |
-
|
15427 |
-
|
15428 |
-
|
15429 |
-
|
15430 |
-
|
15431 |
-
|
15432 |
-
|
15433 |
-
|
15434 |
-
|
15435 |
-
|
15436 |
-
|
15437 |
-
|
15438 |
-
|
15439 |
-
|
15440 |
-
|
15441 |
-
|
15442 |
-
|
15443 |
-
|
15444 |
-
|
15445 |
-
|
15446 |
-
|
15447 |
-
|
15448 |
-
|
15449 |
-
|
15450 |
-
|
15451 |
-
|
15452 |
-
|
15453 |
-
|
15454 |
-
|
15455 |
-
|
15456 |
-
|
15457 |
-
|
15458 |
-
|
15459 |
-
|
15460 |
-
|
15461 |
-
|
15462 |
-
|
15463 |
-
|
15464 |
-
}
|
15465 |
-
}
|
15466 |
-
|
15467 |
-
|
15468 |
-
|
15469 |
-
|
15470 |
-
|
15471 |
-
|
15472 |
-
|
15473 |
-
|
15474 |
-
|
15475 |
-
|
15476 |
-
|
15477 |
-
|
15478 |
-
|
15479 |
-
|
15480 |
-
|
15481 |
-
|
15482 |
-
|
15483 |
-
|
15484 |
-
|
15485 |
-
|
15486 |
-
|
15487 |
-
|
15488 |
-
|
15489 |
-
|
15490 |
-
|
15491 |
-
|
15492 |
-
|
15493 |
-
|
15494 |
-
|
15495 |
-
|
15496 |
-
|
15497 |
-
|
15498 |
-
|
15499 |
-
|
15500 |
-
|
15501 |
-
|
15502 |
-
|
15503 |
-
|
15504 |
-
|
15505 |
-
|
15506 |
-
|
15507 |
-
|
15508 |
-
|
15509 |
-
|
15510 |
-
|
15511 |
-
|
15512 |
-
|
15513 |
-
|
15514 |
-
|
15515 |
-
|
15516 |
-
|
15517 |
-
|
15518 |
-
|
15519 |
-
|
15520 |
-
|
15521 |
-
|
15522 |
-
}
|
15523 |
-
|
15524 |
-
|
15525 |
-
|
15526 |
-
|
15527 |
-
|
15528 |
-
|
15529 |
-
|
15530 |
-
|
15531 |
-
|
15532 |
-
|
15533 |
-
|
15534 |
-
|
15535 |
-
|
15536 |
-
|
15537 |
-
|
15538 |
-
var
|
15539 |
-
|
15540 |
-
|
15541 |
-
|
15542 |
-
|
15543 |
-
|
15544 |
-
|
15545 |
-
|
15546 |
-
|
15547 |
-
|
15548 |
-
|
15549 |
-
|
15550 |
-
|
15551 |
-
|
15552 |
-
|
15553 |
-
|
15554 |
-
|
15555 |
-
|
15556 |
-
|
15557 |
-
|
15558 |
-
|
15559 |
-
|
15560 |
-
|
15561 |
-
|
15562 |
-
|
15563 |
-
|
15564 |
-
|
15565 |
-
|
15566 |
-
|
15567 |
-
|
15568 |
-
|
15569 |
-
|
15570 |
-
|
15571 |
-
|
15572 |
-
|
15573 |
-
|
15574 |
-
|
15575 |
-
|
15576 |
-
|
15577 |
-
|
15578 |
-
|
15579 |
-
|
15580 |
-
|
15581 |
-
|
15582 |
-
|
15583 |
-
|
15584 |
-
|
15585 |
-
|
15586 |
-
|
15587 |
-
|
15588 |
-
|
15589 |
-
|
15590 |
-
|
15591 |
-
|
15592 |
-
|
15593 |
-
|
15594 |
-
|
15595 |
-
|
15596 |
-
|
15597 |
-
|
15598 |
-
|
15599 |
-
|
15600 |
-
|
15601 |
-
|
15602 |
-
|
15603 |
-
|
15604 |
-
|
15605 |
-
|
15606 |
-
|
15607 |
-
|
15608 |
-
|
15609 |
-
|
15610 |
-
|
15611 |
-
|
15612 |
-
|
15613 |
-
|
15614 |
-
|
15615 |
-
|
15616 |
-
|
15617 |
-
|
15618 |
-
|
15619 |
-
|
15620 |
-
container.
|
15621 |
-
container.
|
15622 |
-
|
15623 |
-
|
15624 |
-
|
15625 |
-
|
15626 |
-
|
15627 |
-
|
15628 |
-
|
15629 |
-
|
15630 |
-
|
15631 |
-
|
15632 |
-
|
15633 |
-
|
15634 |
-
|
15635 |
-
|
15636 |
-
|
15637 |
-
|
15638 |
-
|
15639 |
-
|
15640 |
-
|
15641 |
-
|
15642 |
-
|
15643 |
-
|
15644 |
-
|
15645 |
-
|
15646 |
-
|
15647 |
-
|
15648 |
-
|
15649 |
-
|
15650 |
-
|
15651 |
-
|
15652 |
-
|
15653 |
-
|
15654 |
-
|
15655 |
-
|
15656 |
-
|
15657 |
-
|
15658 |
-
|
15659 |
-
|
15660 |
-
|
15661 |
-
|
15662 |
-
|
15663 |
-
|
15664 |
-
|
15665 |
-
|
15666 |
-
|
15667 |
-
|
15668 |
-
|
15669 |
-
var
|
15670 |
-
|
15671 |
-
|
15672 |
-
var
|
15673 |
-
|
15674 |
-
|
15675 |
-
|
15676 |
-
|
15677 |
-
|
15678 |
-
|
15679 |
-
|
15680 |
-
|
15681 |
-
|
15682 |
-
|
15683 |
-
|
15684 |
-
|
15685 |
-
|
15686 |
-
|
15687 |
-
|
15688 |
-
|
15689 |
-
|
15690 |
-
|
15691 |
-
|
15692 |
-
|
15693 |
-
|
15694 |
-
|
15695 |
-
|
15696 |
-
|
15697 |
-
|
15698 |
-
|
15699 |
-
|
15700 |
-
|
15701 |
-
|
15702 |
-
|
15703 |
-
|
15704 |
-
|
15705 |
-
|
15706 |
-
|
15707 |
-
|
15708 |
-
|
15709 |
-
|
15710 |
-
|
15711 |
-
|
15712 |
-
|
15713 |
-
|
15714 |
-
|
15715 |
-
|
15716 |
-
|
15717 |
-
|
15718 |
-
|
15719 |
-
|
15720 |
-
|
15721 |
-
|
15722 |
-
|
15723 |
-
|
15724 |
-
|
15725 |
-
|
15726 |
-
|
15727 |
-
|
15728 |
-
|
15729 |
-
|
15730 |
-
|
15731 |
-
|
15732 |
-
|
15733 |
-
|
15734 |
-
|
15735 |
-
|
15736 |
-
|
15737 |
-
|
15738 |
-
|
15739 |
-
|
15740 |
-
|
15741 |
-
|
15742 |
-
|
15743 |
-
|
15744 |
-
|
15745 |
-
|
15746 |
-
|
15747 |
-
|
15748 |
-
|
15749 |
-
|
15750 |
-
|
15751 |
-
|
15752 |
-
|
15753 |
-
|
15754 |
-
|
15755 |
-
|
15756 |
-
|
15757 |
-
|
15758 |
-
|
15759 |
-
|
15760 |
-
|
15761 |
-
|
15762 |
-
|
15763 |
-
|
15764 |
-
|
15765 |
-
|
15766 |
-
|
15767 |
-
|
15768 |
-
|
15769 |
-
|
15770 |
-
|
15771 |
-
|
15772 |
-
|
15773 |
-
|
15774 |
-
|
15775 |
-
|
15776 |
-
|
15777 |
-
|
15778 |
-
|
15779 |
-
|
15780 |
-
|
15781 |
-
|
15782 |
-
|
15783 |
-
|
15784 |
-
|
15785 |
-
|
15786 |
-
|
15787 |
-
|
15788 |
-
|
15789 |
-
|
15790 |
-
|
15791 |
-
|
15792 |
-
|
15793 |
-
|
15794 |
-
|
15795 |
-
|
15796 |
-
|
15797 |
-
|
15798 |
-
}
|
15799 |
-
|
15800 |
-
|
15801 |
-
|
15802 |
-
|
15803 |
-
|
15804 |
-
|
15805 |
-
|
15806 |
-
|
15807 |
-
|
15808 |
-
|
15809 |
-
|
15810 |
-
|
15811 |
-
|
15812 |
-
|
15813 |
-
|
15814 |
-
|
15815 |
-
|
15816 |
-
|
15817 |
-
|
15818 |
-
|
15819 |
-
|
15820 |
-
|
15821 |
-
|
15822 |
-
|
15823 |
-
|
15824 |
-
|
15825 |
-
|
15826 |
-
|
15827 |
-
|
15828 |
-
|
15829 |
-
|
15830 |
-
|
15831 |
-
|
15832 |
-
|
15833 |
-
|
15834 |
-
|
15835 |
-
|
15836 |
-
|
15837 |
-
|
15838 |
-
|
15839 |
-
|
15840 |
-
|
15841 |
-
|
15842 |
-
|
15843 |
-
|
15844 |
-
|
15845 |
-
|
15846 |
-
|
15847 |
-
|
15848 |
-
|
15849 |
-
|
15850 |
-
|
15851 |
-
|
15852 |
-
|
15853 |
-
|
15854 |
-
|
15855 |
-
|
15856 |
-
|
15857 |
-
|
15858 |
-
|
15859 |
-
|
15860 |
-
|
15861 |
-
|
15862 |
-
|
15863 |
-
|
15864 |
-
|
15865 |
-
|
15866 |
-
|
15867 |
-
|
15868 |
-
|
15869 |
-
|
15870 |
-
|
15871 |
-
|
15872 |
-
|
15873 |
-
|
15874 |
-
|
15875 |
-
|
15876 |
-
|
15877 |
-
|
15878 |
-
|
15879 |
-
|
15880 |
-
|
15881 |
-
|
15882 |
-
|
15883 |
-
|
15884 |
-
|
15885 |
-
|
15886 |
-
container
|
15887 |
-
|
15888 |
-
|
15889 |
-
|
15890 |
-
|
15891 |
-
|
15892 |
-
}
|
15893 |
-
|
15894 |
-
|
15895 |
-
|
15896 |
-
|
15897 |
-
|
15898 |
-
|
15899 |
-
|
15900 |
-
|
15901 |
-
|
15902 |
-
|
15903 |
-
|
15904 |
-
|
15905 |
-
|
15906 |
-
|
15907 |
-
|
15908 |
-
|
15909 |
-
|
15910 |
-
|
15911 |
-
|
15912 |
-
|
15913 |
-
|
15914 |
-
|
15915 |
-
|
15916 |
-
|
15917 |
-
|
15918 |
-
|
15919 |
-
|
15920 |
-
|
15921 |
-
|
15922 |
-
|
15923 |
-
|
15924 |
-
|
15925 |
-
|
15926 |
-
|
15927 |
-
|
15928 |
-
|
15929 |
-
|
15930 |
-
|
15931 |
-
|
15932 |
-
|
15933 |
-
|
15934 |
-
|
15935 |
-
|
15936 |
-
|
15937 |
-
|
15938 |
-
|
15939 |
-
|
15940 |
-
|
15941 |
-
|
15942 |
-
|
15943 |
-
|
15944 |
-
|
15945 |
-
|
15946 |
-
|
15947 |
-
|
15948 |
-
|
15949 |
-
|
15950 |
-
|
15951 |
-
|
15952 |
-
|
15953 |
-
|
15954 |
-
|
15955 |
-
|
15956 |
-
|
15957 |
-
|
15958 |
-
|
15959 |
-
|
15960 |
-
|
15961 |
-
|
15962 |
-
|
15963 |
-
|
15964 |
-
|
15965 |
-
|
15966 |
-
|
15967 |
-
|
15968 |
-
|
15969 |
-
|
15970 |
-
|
15971 |
-
|
15972 |
-
|
15973 |
-
|
15974 |
-
|
15975 |
-
|
15976 |
-
|
15977 |
-
|
15978 |
-
|
15979 |
-
|
15980 |
-
|
15981 |
-
|
15982 |
-
|
15983 |
-
|
15984 |
-
|
15985 |
-
|
15986 |
-
|
15987 |
-
|
15988 |
-
|
15989 |
-
|
15990 |
-
|
15991 |
-
|
15992 |
-
|
15993 |
-
|
15994 |
-
|
15995 |
-
|
15996 |
-
|
15997 |
-
|
15998 |
-
|
15999 |
-
|
16000 |
-
|
16001 |
-
|
16002 |
-
|
16003 |
-
|
16004 |
-
|
16005 |
-
|
16006 |
-
|
16007 |
-
|
16008 |
-
|
16009 |
-
|
16010 |
-
|
16011 |
-
|
16012 |
-
|
16013 |
-
|
16014 |
-
|
16015 |
-
|
16016 |
-
|
16017 |
-
|
16018 |
-
|
16019 |
-
|
16020 |
-
|
16021 |
-
|
16022 |
-
|
16023 |
-
|
16024 |
-
|
16025 |
-
|
16026 |
-
|
16027 |
-
|
16028 |
-
|
16029 |
-
|
16030 |
-
|
16031 |
-
|
16032 |
-
|
16033 |
-
|
16034 |
-
|
16035 |
-
|
16036 |
-
|
16037 |
-
|
16038 |
-
|
16039 |
-
|
16040 |
-
|
16041 |
-
|
16042 |
-
|
16043 |
-
|
16044 |
-
|
16045 |
-
|
16046 |
-
|
16047 |
-
|
16048 |
-
|
16049 |
-
|
16050 |
-
|
16051 |
-
|
16052 |
-
|
16053 |
-
|
16054 |
-
|
16055 |
-
|
16056 |
-
|
16057 |
-
|
16058 |
-
|
16059 |
-
|
16060 |
-
|
16061 |
-
|
16062 |
-
|
16063 |
-
|
16064 |
-
|
16065 |
-
|
16066 |
-
|
16067 |
-
|
16068 |
-
|
16069 |
-
|
16070 |
-
|
16071 |
-
|
16072 |
-
|
16073 |
-
|
16074 |
-
|
16075 |
-
|
16076 |
-
|
16077 |
-
|
16078 |
-
|
16079 |
-
|
16080 |
-
|
16081 |
-
|
16082 |
-
|
16083 |
-
|
16084 |
-
|
16085 |
-
|
16086 |
-
|
16087 |
-
|
16088 |
-
|
16089 |
-
|
16090 |
-
|
16091 |
-
|
16092 |
-
|
16093 |
-
|
16094 |
-
|
16095 |
-
|
16096 |
-
|
16097 |
-
|
16098 |
-
|
16099 |
-
|
16100 |
-
|
16101 |
-
|
16102 |
-
|
16103 |
-
|
16104 |
-
|
16105 |
-
|
16106 |
-
|
16107 |
-
|
16108 |
-
|
16109 |
-
|
16110 |
-
|
16111 |
-
|
16112 |
-
|
16113 |
-
|
16114 |
-
|
16115 |
-
|
16116 |
-
|
16117 |
-
|
16118 |
-
|
16119 |
-
|
16120 |
-
|
16121 |
-
|
16122 |
-
|
16123 |
-
|
16124 |
-
|
16125 |
-
|
16126 |
-
|
16127 |
-
|
16128 |
-
|
16129 |
-
|
16130 |
-
|
16131 |
-
|
16132 |
-
|
16133 |
-
|
16134 |
-
|
16135 |
-
|
16136 |
-
|
16137 |
-
|
16138 |
-
|
16139 |
-
|
16140 |
-
|
16141 |
-
|
16142 |
-
|
16143 |
-
|
16144 |
-
|
16145 |
-
|
16146 |
-
|
16147 |
-
|
16148 |
-
|
16149 |
-
|
16150 |
-
|
16151 |
-
|
16152 |
-
|
16153 |
-
|
16154 |
-
|
16155 |
-
|
16156 |
-
|
16157 |
-
|
16158 |
-
|
16159 |
-
|
16160 |
-
|
16161 |
-
|
16162 |
-
|
16163 |
-
|
16164 |
-
|
16165 |
-
|
16166 |
-
|
16167 |
-
|
16168 |
-
return
|
16169 |
-
|
16170 |
-
|
16171 |
-
|
16172 |
-
|
16173 |
-
|
16174 |
-
|
16175 |
-
|
16176 |
-
|
16177 |
-
|
16178 |
-
|
16179 |
-
|
16180 |
-
|
16181 |
-
|
16182 |
-
|
16183 |
-
|
16184 |
-
|
16185 |
-
|
16186 |
-
|
16187 |
-
|
16188 |
-
|
16189 |
-
|
16190 |
-
|
16191 |
-
|
16192 |
-
|
16193 |
-
|
16194 |
-
|
16195 |
-
|
16196 |
-
|
16197 |
-
|
16198 |
-
|
16199 |
-
|
16200 |
-
|
16201 |
-
|
16202 |
-
|
16203 |
-
|
16204 |
-
|
16205 |
-
|
16206 |
-
|
16207 |
-
|
16208 |
-
|
16209 |
-
|
16210 |
-
|
16211 |
-
|
16212 |
-
|
16213 |
-
|
16214 |
-
|
16215 |
-
|
16216 |
-
|
16217 |
-
|
16218 |
-
|
16219 |
-
|
16220 |
-
|
16221 |
-
|
16222 |
-
|
16223 |
-
|
16224 |
-
|
16225 |
-
|
16226 |
-
|
16227 |
-
|
16228 |
-
|
16229 |
-
|
16230 |
-
|
16231 |
-
|
16232 |
-
|
16233 |
-
|
16234 |
-
|
16235 |
-
|
16236 |
-
|
16237 |
-
|
16238 |
-
|
16239 |
-
|
16240 |
-
|
16241 |
-
|
16242 |
-
|
16243 |
-
|
16244 |
-
|
16245 |
-
|
16246 |
-
|
16247 |
-
|
16248 |
-
|
16249 |
-
|
16250 |
-
|
16251 |
-
|
16252 |
-
|
16253 |
-
|
16254 |
-
|
16255 |
-
|
16256 |
-
|
16257 |
-
|
16258 |
-
|
16259 |
-
|
16260 |
-
|
16261 |
-
|
16262 |
-
|
16263 |
-
|
16264 |
-
|
16265 |
-
|
16266 |
-
|
16267 |
-
|
16268 |
-
|
16269 |
-
|
16270 |
-
|
16271 |
-
|
16272 |
-
|
16273 |
-
|
16274 |
-
|
16275 |
-
|
16276 |
-
|
16277 |
-
|
16278 |
-
|
16279 |
-
|
16280 |
-
|
16281 |
-
}
|
16282 |
-
|
16283 |
-
|
16284 |
-
|
16285 |
-
|
16286 |
-
|
16287 |
-
|
16288 |
-
|
16289 |
-
|
16290 |
-
|
16291 |
-
|
16292 |
-
|
16293 |
-
|
16294 |
-
|
16295 |
-
|
16296 |
-
|
16297 |
-
|
16298 |
-
|
16299 |
-
|
16300 |
-
|
16301 |
-
|
16302 |
-
|
16303 |
-
|
16304 |
-
|
16305 |
-
|
16306 |
-
|
16307 |
-
|
16308 |
-
|
16309 |
-
|
16310 |
-
|
16311 |
-
|
16312 |
-
|
16313 |
-
|
16314 |
-
|
16315 |
-
|
16316 |
-
|
16317 |
-
|
16318 |
-
|
16319 |
-
|
16320 |
-
|
16321 |
-
|
16322 |
-
|
16323 |
-
|
16324 |
-
|
16325 |
-
|
16326 |
-
|
16327 |
-
|
16328 |
-
|
16329 |
-
|
16330 |
-
|
16331 |
-
|
16332 |
-
|
16333 |
-
|
16334 |
-
|
16335 |
-
|
16336 |
-
|
16337 |
-
|
16338 |
-
|
16339 |
-
|
16340 |
-
|
16341 |
-
|
16342 |
-
|
16343 |
-
|
16344 |
-
|
16345 |
-
|
16346 |
-
|
16347 |
-
|
16348 |
-
|
16349 |
-
|
16350 |
-
|
16351 |
-
|
16352 |
-
|
16353 |
-
|
16354 |
-
|
16355 |
-
|
16356 |
-
|
16357 |
-
|
16358 |
-
|
16359 |
-
|
16360 |
-
|
16361 |
-
|
16362 |
-
|
16363 |
-
|
16364 |
-
|
16365 |
-
|
16366 |
-
|
16367 |
-
|
16368 |
-
|
16369 |
-
|
16370 |
-
|
16371 |
-
|
16372 |
-
|
16373 |
-
|
16374 |
-
|
16375 |
-
|
16376 |
-
|
16377 |
-
|
16378 |
-
|
16379 |
-
|
16380 |
-
|
16381 |
-
|
16382 |
-
|
16383 |
-
|
16384 |
-
|
16385 |
-
|
16386 |
-
|
16387 |
-
|
16388 |
-
|
16389 |
-
|
16390 |
-
|
16391 |
-
|
16392 |
-
|
16393 |
-
|
16394 |
-
|
16395 |
-
|
16396 |
-
|
16397 |
-
|
16398 |
-
|
16399 |
-
|
16400 |
-
|
16401 |
-
|
16402 |
-
|
16403 |
-
|
16404 |
-
|
16405 |
-
|
16406 |
-
|
16407 |
-
|
16408 |
-
|
16409 |
-
|
16410 |
-
|
16411 |
-
|
16412 |
-
var
|
16413 |
-
|
16414 |
-
|
16415 |
-
|
16416 |
-
|
16417 |
-
|
16418 |
-
|
16419 |
-
|
16420 |
-
|
16421 |
-
|
16422 |
-
|
16423 |
-
|
16424 |
-
|
16425 |
-
|
16426 |
-
|
16427 |
-
|
16428 |
-
|
16429 |
-
|
16430 |
-
|
16431 |
-
|
16432 |
-
|
16433 |
-
|
16434 |
-
|
16435 |
-
|
16436 |
-
|
16437 |
-
|
16438 |
-
|
16439 |
-
|
16440 |
-
|
16441 |
-
|
16442 |
-
|
16443 |
-
|
16444 |
-
|
16445 |
-
|
16446 |
-
|
16447 |
-
|
16448 |
-
|
16449 |
-
|
16450 |
-
|
16451 |
-
|
16452 |
-
|
16453 |
-
|
16454 |
-
|
16455 |
-
|
16456 |
-
|
16457 |
-
|
16458 |
-
|
16459 |
-
|
16460 |
-
|
16461 |
-
|
16462 |
-
|
16463 |
-
|
16464 |
-
|
16465 |
-
|
16466 |
-
|
16467 |
-
|
16468 |
-
|
16469 |
-
|
16470 |
-
|
16471 |
-
|
16472 |
-
|
16473 |
-
|
16474 |
-
|
16475 |
-
|
16476 |
-
|
16477 |
-
|
16478 |
-
|
16479 |
-
|
16480 |
-
|
16481 |
-
|
16482 |
-
|
16483 |
-
|
16484 |
-
|
16485 |
-
|
16486 |
-
|
16487 |
-
|
16488 |
-
|
16489 |
-
|
16490 |
-
|
16491 |
-
|
16492 |
-
|
16493 |
-
return
|
16494 |
-
}
|
16495 |
-
}
|
16496 |
-
|
16497 |
-
|
16498 |
-
|
16499 |
-
|
16500 |
-
|
16501 |
-
|
16502 |
-
|
16503 |
-
|
16504 |
-
|
16505 |
-
|
16506 |
-
|
16507 |
-
|
16508 |
-
|
16509 |
-
|
16510 |
-
|
16511 |
-
|
16512 |
-
|
16513 |
-
|
16514 |
-
|
16515 |
-
|
16516 |
-
|
16517 |
-
|
16518 |
-
|
16519 |
-
|
16520 |
-
|
16521 |
-
|
16522 |
-
|
16523 |
-
|
16524 |
-
|
16525 |
-
|
16526 |
-
|
16527 |
-
|
16528 |
-
|
16529 |
-
|
16530 |
-
|
16531 |
-
|
16532 |
-
|
16533 |
-
|
16534 |
-
|
16535 |
-
|
16536 |
-
|
16537 |
-
|
16538 |
-
|
16539 |
-
|
16540 |
-
|
16541 |
-
|
16542 |
-
|
16543 |
-
|
16544 |
-
|
16545 |
-
|
16546 |
-
|
16547 |
-
|
16548 |
-
|
16549 |
-
if (
|
16550 |
-
|
16551 |
-
}
|
16552 |
-
|
16553 |
-
|
16554 |
-
|
16555 |
-
|
16556 |
-
|
16557 |
-
|
16558 |
-
|
16559 |
-
|
16560 |
-
|
16561 |
-
|
16562 |
-
|
16563 |
-
|
16564 |
-
|
16565 |
-
|
16566 |
-
|
16567 |
-
|
16568 |
-
|
16569 |
-
|
16570 |
-
|
16571 |
-
|
16572 |
-
|
16573 |
-
|
16574 |
-
|
16575 |
-
|
16576 |
-
|
16577 |
-
|
16578 |
-
|
16579 |
-
|
16580 |
-
|
16581 |
-
|
16582 |
-
|
16583 |
-
|
16584 |
-
|
16585 |
-
|
16586 |
-
|
16587 |
-
|
16588 |
-
|
16589 |
-
|
16590 |
-
|
16591 |
-
|
16592 |
-
|
16593 |
-
|
16594 |
-
|
16595 |
-
|
16596 |
-
|
16597 |
-
|
16598 |
-
|
16599 |
-
|
16600 |
-
|
16601 |
-
|
16602 |
-
|
16603 |
-
|
16604 |
-
|
16605 |
-
|
16606 |
-
|
16607 |
-
|
16608 |
-
|
16609 |
-
|
16610 |
-
|
16611 |
-
|
16612 |
-
|
16613 |
-
|
16614 |
-
|
16615 |
-
|
16616 |
-
|
16617 |
-
|
16618 |
-
|
16619 |
-
|
16620 |
-
|
16621 |
-
|
16622 |
-
|
16623 |
-
|
16624 |
-
|
16625 |
-
|
16626 |
-
|
16627 |
-
|
16628 |
-
|
16629 |
-
|
16630 |
-
|
16631 |
-
|
16632 |
-
|
16633 |
-
|
16634 |
-
|
16635 |
-
|
16636 |
-
|
16637 |
-
|
16638 |
-
|
16639 |
-
|
16640 |
-
|
16641 |
-
|
16642 |
-
|
16643 |
-
|
16644 |
-
|
16645 |
-
|
16646 |
-
|
16647 |
-
|
16648 |
-
|
16649 |
-
|
16650 |
-
|
16651 |
-
|
16652 |
-
|
16653 |
-
|
16654 |
-
|
16655 |
-
|
16656 |
-
|
16657 |
-
|
16658 |
-
|
16659 |
-
|
16660 |
-
|
16661 |
-
|
16662 |
-
|
16663 |
-
|
16664 |
-
|
16665 |
-
|
16666 |
-
|
16667 |
-
|
16668 |
-
|
16669 |
-
|
16670 |
-
|
16671 |
-
|
16672 |
-
|
16673 |
-
|
16674 |
-
|
16675 |
-
|
16676 |
-
|
16677 |
-
|
16678 |
-
|
16679 |
-
|
16680 |
-
|
16681 |
-
}
|
16682 |
-
|
16683 |
-
|
16684 |
-
var
|
16685 |
-
|
16686 |
-
|
16687 |
-
|
16688 |
-
|
16689 |
-
|
16690 |
-
|
16691 |
-
|
16692 |
-
|
16693 |
-
|
16694 |
-
|
16695 |
-
|
16696 |
-
|
16697 |
-
|
16698 |
-
|
16699 |
-
|
16700 |
-
|
16701 |
-
|
16702 |
-
|
16703 |
-
|
16704 |
-
|
16705 |
-
|
16706 |
-
|
16707 |
-
|
16708 |
-
|
16709 |
-
|
16710 |
-
|
16711 |
-
|
16712 |
-
|
16713 |
-
|
16714 |
-
|
16715 |
-
|
16716 |
-
|
16717 |
-
|
16718 |
-
|
16719 |
-
|
16720 |
-
|
16721 |
-
|
16722 |
-
|
16723 |
-
|
16724 |
-
|
16725 |
-
|
16726 |
-
|
16727 |
-
|
16728 |
-
};
|
16729 |
-
|
16730 |
-
|
16731 |
-
|
16732 |
-
|
16733 |
-
|
16734 |
-
|
16735 |
-
|
16736 |
-
|
16737 |
-
|
16738 |
-
|
16739 |
-
|
16740 |
-
|
16741 |
-
|
16742 |
-
|
16743 |
-
|
16744 |
-
|
16745 |
-
|
16746 |
-
|
16747 |
-
|
16748 |
-
|
16749 |
-
|
16750 |
-
|
16751 |
-
|
16752 |
-
|
16753 |
-
|
16754 |
-
|
16755 |
-
}
|
16756 |
-
|
16757 |
-
|
16758 |
-
|
16759 |
-
|
16760 |
-
|
16761 |
-
|
16762 |
-
|
16763 |
-
|
16764 |
-
|
16765 |
-
|
16766 |
-
|
16767 |
-
|
16768 |
-
|
16769 |
-
|
16770 |
-
return
|
16771 |
-
|
16772 |
-
|
16773 |
-
|
16774 |
-
|
16775 |
-
|
16776 |
-
|
16777 |
-
|
16778 |
-
|
16779 |
-
|
16780 |
-
|
16781 |
-
|
16782 |
-
|
16783 |
-
|
16784 |
-
|
16785 |
-
|
16786 |
-
|
16787 |
-
|
16788 |
-
|
16789 |
-
|
16790 |
-
|
16791 |
-
|
16792 |
-
|
16793 |
-
|
16794 |
-
|
16795 |
-
|
16796 |
-
|
16797 |
-
|
16798 |
-
|
16799 |
-
|
16800 |
-
|
16801 |
-
|
16802 |
-
|
16803 |
-
|
16804 |
-
|
16805 |
-
|
16806 |
-
|
16807 |
-
|
16808 |
-
|
16809 |
-
|
16810 |
-
|
16811 |
-
|
16812 |
-
|
16813 |
-
|
16814 |
-
|
16815 |
-
|
16816 |
-
|
16817 |
-
|
16818 |
-
|
16819 |
-
|
16820 |
-
}
|
16821 |
-
|
16822 |
-
|
16823 |
-
|
16824 |
-
|
16825 |
-
|
16826 |
-
|
16827 |
-
|
16828 |
-
|
16829 |
-
|
16830 |
-
|
16831 |
-
|
16832 |
-
|
16833 |
-
|
16834 |
-
|
16835 |
-
|
16836 |
-
|
16837 |
-
|
16838 |
-
|
16839 |
-
|
16840 |
-
|
16841 |
-
|
16842 |
-
|
16843 |
-
|
16844 |
-
|
16845 |
-
|
16846 |
-
|
16847 |
-
|
16848 |
-
|
16849 |
-
|
16850 |
-
|
16851 |
-
|
16852 |
-
|
16853 |
-
|
16854 |
-
|
16855 |
-
|
16856 |
-
|
16857 |
-
|
16858 |
-
|
16859 |
-
|
16860 |
-
|
16861 |
-
|
16862 |
-
|
16863 |
-
|
16864 |
-
|
16865 |
-
var
|
16866 |
-
|
16867 |
-
|
16868 |
-
|
16869 |
-
|
16870 |
-
|
16871 |
-
|
16872 |
-
|
16873 |
-
|
16874 |
-
|
16875 |
-
|
16876 |
-
|
16877 |
-
|
16878 |
-
|
16879 |
-
|
16880 |
-
|
16881 |
-
|
16882 |
-
|
16883 |
-
|
16884 |
-
|
16885 |
-
|
16886 |
-
|
16887 |
-
|
16888 |
-
|
16889 |
-
|
16890 |
-
|
16891 |
-
|
16892 |
-
|
16893 |
-
|
16894 |
-
|
16895 |
-
|
16896 |
-
|
16897 |
-
|
16898 |
-
|
16899 |
-
|
16900 |
-
|
16901 |
-
|
16902 |
-
|
16903 |
-
|
16904 |
-
|
16905 |
-
|
16906 |
-
|
16907 |
-
|
16908 |
-
|
16909 |
-
|
16910 |
-
|
16911 |
-
|
16912 |
-
|
16913 |
-
|
16914 |
-
|
16915 |
-
|
16916 |
-
|
16917 |
-
|
16918 |
-
|
16919 |
-
|
16920 |
-
|
16921 |
-
|
16922 |
-
|
16923 |
-
|
16924 |
-
|
16925 |
-
|
16926 |
-
|
16927 |
-
|
16928 |
-
|
16929 |
-
|
16930 |
-
|
16931 |
-
|
16932 |
-
|
16933 |
-
|
16934 |
-
|
16935 |
-
|
16936 |
-
|
16937 |
-
|
16938 |
-
var
|
16939 |
-
var
|
16940 |
-
var
|
16941 |
-
|
16942 |
-
|
16943 |
-
|
16944 |
-
|
16945 |
-
|
16946 |
-
|
16947 |
-
|
16948 |
-
|
16949 |
-
|
16950 |
-
|
16951 |
-
|
16952 |
-
|
16953 |
-
|
16954 |
-
|
16955 |
-
|
16956 |
-
|
16957 |
-
|
16958 |
-
|
16959 |
-
|
16960 |
-
|
16961 |
-
|
16962 |
-
|
16963 |
-
|
16964 |
-
|
16965 |
-
|
16966 |
-
|
16967 |
-
|
16968 |
-
|
16969 |
-
|
16970 |
-
|
16971 |
-
|
16972 |
-
|
16973 |
-
|
16974 |
-
|
16975 |
-
|
16976 |
-
|
16977 |
-
|
16978 |
-
|
16979 |
-
|
16980 |
-
|
16981 |
-
|
16982 |
-
|
16983 |
-
|
16984 |
-
|
16985 |
-
|
16986 |
-
|
16987 |
-
|
16988 |
-
|
16989 |
-
|
16990 |
-
|
16991 |
-
|
16992 |
-
|
16993 |
-
|
16994 |
-
|
16995 |
-
|
16996 |
-
|
16997 |
-
|
16998 |
-
|
16999 |
-
|
17000 |
-
|
17001 |
-
|
17002 |
-
|
17003 |
-
|
17004 |
-
|
17005 |
-
|
17006 |
-
|
17007 |
-
|
17008 |
-
|
17009 |
-
|
17010 |
-
|
17011 |
-
|
17012 |
-
|
17013 |
-
|
17014 |
-
|
17015 |
-
|
17016 |
-
|
17017 |
-
|
17018 |
-
|
17019 |
-
|
17020 |
-
|
17021 |
-
|
17022 |
-
|
17023 |
-
|
17024 |
-
|
17025 |
-
|
17026 |
-
|
17027 |
-
|
17028 |
-
|
17029 |
-
|
17030 |
-
|
17031 |
-
|
17032 |
-
|
17033 |
-
|
17034 |
-
|
17035 |
-
|
17036 |
-
|
17037 |
-
|
17038 |
-
|
17039 |
-
|
17040 |
-
|
17041 |
-
|
17042 |
-
|
17043 |
-
|
17044 |
-
|
17045 |
-
|
17046 |
-
|
17047 |
-
|
17048 |
-
|
17049 |
-
|
17050 |
-
|
17051 |
-
|
17052 |
-
|
17053 |
-
|
17054 |
-
|
17055 |
-
|
17056 |
-
|
17057 |
-
|
17058 |
-
|
17059 |
-
|
17060 |
-
|
17061 |
-
|
17062 |
-
|
17063 |
-
|
17064 |
-
|
17065 |
-
|
17066 |
-
|
17067 |
-
|
17068 |
-
|
17069 |
-
|
17070 |
-
|
17071 |
-
|
17072 |
-
|
17073 |
-
|
17074 |
-
|
17075 |
-
|
17076 |
-
|
17077 |
-
|
17078 |
-
|
17079 |
-
|
17080 |
-
|
17081 |
-
|
17082 |
-
|
17083 |
-
|
17084 |
-
|
17085 |
-
|
17086 |
-
|
17087 |
-
|
17088 |
-
|
17089 |
-
|
17090 |
-
|
17091 |
-
|
17092 |
-
|
17093 |
-
|
17094 |
-
|
17095 |
-
|
17096 |
-
|
17097 |
-
|
17098 |
-
|
17099 |
-
|
17100 |
-
|
17101 |
-
|
17102 |
-
|
17103 |
-
|
17104 |
-
|
17105 |
-
return
|
17106 |
-
|
17107 |
-
|
17108 |
-
|
17109 |
-
|
17110 |
-
|
17111 |
-
|
17112 |
-
|
17113 |
-
|
17114 |
-
|
17115 |
-
|
17116 |
-
|
17117 |
-
|
17118 |
-
|
17119 |
-
|
17120 |
-
|
17121 |
-
|
17122 |
-
|
17123 |
-
|
17124 |
-
|
17125 |
-
|
17126 |
-
|
17127 |
-
|
17128 |
-
|
17129 |
-
|
17130 |
-
|
17131 |
-
|
17132 |
-
|
17133 |
-
|
17134 |
-
|
17135 |
-
|
17136 |
-
|
17137 |
-
|
17138 |
-
|
17139 |
-
|
17140 |
-
|
17141 |
-
|
17142 |
-
|
17143 |
-
|
17144 |
-
|
17145 |
-
|
17146 |
-
|
17147 |
-
|
17148 |
-
|
17149 |
-
|
17150 |
-
|
17151 |
-
|
17152 |
-
|
17153 |
-
|
17154 |
-
|
17155 |
-
|
17156 |
-
|
17157 |
-
|
17158 |
-
|
17159 |
-
|
17160 |
-
|
17161 |
-
|
17162 |
-
|
17163 |
-
|
17164 |
-
|
17165 |
-
|
17166 |
-
|
17167 |
-
|
17168 |
-
|
17169 |
-
|
17170 |
-
|
17171 |
-
|
17172 |
-
|
17173 |
-
|
17174 |
-
|
17175 |
-
|
17176 |
-
|
17177 |
-
|
17178 |
-
|
17179 |
-
|
17180 |
-
|
17181 |
-
|
17182 |
-
|
17183 |
-
|
17184 |
-
|
17185 |
-
|
17186 |
-
|
17187 |
-
|
17188 |
-
|
17189 |
-
|
17190 |
-
|
17191 |
-
|
17192 |
-
|
17193 |
-
|
17194 |
-
|
17195 |
-
|
17196 |
-
|
17197 |
-
|
17198 |
-
|
17199 |
-
|
17200 |
-
|
17201 |
-
|
17202 |
-
|
17203 |
-
|
17204 |
-
|
17205 |
-
|
17206 |
-
|
17207 |
-
|
17208 |
-
|
17209 |
-
|
17210 |
-
|
17211 |
-
|
17212 |
-
|
17213 |
-
|
17214 |
-
|
17215 |
-
|
17216 |
-
|
17217 |
-
|
17218 |
-
|
17219 |
-
|
17220 |
-
}
|
17221 |
-
|
17222 |
-
|
17223 |
-
|
17224 |
-
|
17225 |
-
|
17226 |
-
|
17227 |
-
|
17228 |
-
|
17229 |
-
|
17230 |
-
|
17231 |
-
|
17232 |
-
|
17233 |
-
|
17234 |
-
|
17235 |
-
|
17236 |
-
|
17237 |
-
|
17238 |
-
|
17239 |
-
|
17240 |
-
|
17241 |
-
|
17242 |
-
|
17243 |
-
|
17244 |
-
|
17245 |
-
|
17246 |
-
|
17247 |
-
|
17248 |
-
|
17249 |
-
|
17250 |
-
|
17251 |
-
|
17252 |
-
|
17253 |
-
|
17254 |
-
|
17255 |
-
|
17256 |
-
|
17257 |
-
|
17258 |
-
|
17259 |
-
|
17260 |
-
|
17261 |
-
|
17262 |
-
|
17263 |
-
|
17264 |
-
|
17265 |
-
return BREAK_NOT_ALLOWED;
|
17266 |
-
}
|
17267 |
-
|
17268 |
-
// LB27 Treat a Korean Syllable Block the same as ID.
|
17269 |
-
if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) {
|
17270 |
-
return BREAK_NOT_ALLOWED;
|
17271 |
-
}
|
17272 |
-
|
17273 |
-
// LB28 Do not break between alphabetics (“at”).
|
17274 |
-
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
17275 |
-
return BREAK_NOT_ALLOWED;
|
17276 |
-
}
|
17277 |
-
|
17278 |
-
// LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).
|
17279 |
-
if (current === IS && ALPHABETICS.indexOf(next) !== -1) {
|
17280 |
-
return BREAK_NOT_ALLOWED;
|
17281 |
-
}
|
17282 |
-
|
17283 |
-
// LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.
|
17284 |
-
if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP || ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) {
|
17285 |
-
return BREAK_NOT_ALLOWED;
|
17286 |
-
}
|
17287 |
-
|
17288 |
-
// LB30a Break between two regional indicator symbols if and only if there are an even number of regional
|
17289 |
-
// indicators preceding the position of the break.
|
17290 |
-
if (current === RI && next === RI) {
|
17291 |
-
var i = indicies[currentIndex];
|
17292 |
-
var count = 1;
|
17293 |
-
while (i > 0) {
|
17294 |
-
i--;
|
17295 |
-
if (classTypes[i] === RI) {
|
17296 |
-
count++;
|
17297 |
-
} else {
|
17298 |
-
break;
|
17299 |
-
}
|
17300 |
-
}
|
17301 |
-
if (count % 2 !== 0) {
|
17302 |
-
return BREAK_NOT_ALLOWED;
|
17303 |
-
}
|
17304 |
-
}
|
17305 |
-
|
17306 |
-
// LB30b Do not break between an emoji base and an emoji modifier.
|
17307 |
-
if (current === EB && next === EM) {
|
17308 |
-
return BREAK_NOT_ALLOWED;
|
17309 |
-
}
|
17310 |
-
|
17311 |
-
return BREAK_ALLOWED;
|
17312 |
-
};
|
17313 |
-
|
17314 |
-
var lineBreakAtIndex = exports.lineBreakAtIndex = function lineBreakAtIndex(codePoints, index) {
|
17315 |
-
// LB2 Never break at the start of text.
|
17316 |
-
if (index === 0) {
|
17317 |
-
return BREAK_NOT_ALLOWED;
|
17318 |
-
}
|
17319 |
-
|
17320 |
-
// LB3 Always break at the end of text.
|
17321 |
-
if (index >= codePoints.length) {
|
17322 |
-
return BREAK_MANDATORY;
|
17323 |
-
}
|
17324 |
-
|
17325 |
-
var _codePointsToCharacte = codePointsToCharacterClasses(codePoints),
|
17326 |
-
_codePointsToCharacte2 = _slicedToArray(_codePointsToCharacte, 2),
|
17327 |
-
indicies = _codePointsToCharacte2[0],
|
17328 |
-
classTypes = _codePointsToCharacte2[1];
|
17329 |
-
|
17330 |
-
return _lineBreakAtIndex(codePoints, classTypes, indicies, index);
|
17331 |
-
};
|
17332 |
-
|
17333 |
-
var cssFormattedClasses = function cssFormattedClasses(codePoints, options) {
|
17334 |
-
if (!options) {
|
17335 |
-
options = { lineBreak: 'normal', wordBreak: 'normal' };
|
17336 |
-
}
|
17337 |
-
|
17338 |
-
var _codePointsToCharacte3 = codePointsToCharacterClasses(codePoints, options.lineBreak),
|
17339 |
-
_codePointsToCharacte4 = _slicedToArray(_codePointsToCharacte3, 3),
|
17340 |
-
indicies = _codePointsToCharacte4[0],
|
17341 |
-
classTypes = _codePointsToCharacte4[1],
|
17342 |
-
isLetterNumber = _codePointsToCharacte4[2];
|
17343 |
-
|
17344 |
-
if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
|
17345 |
-
classTypes = classTypes.map(function (type) {
|
17346 |
-
return [NU, AL, SA].indexOf(type) !== -1 ? ID : type;
|
17347 |
-
});
|
17348 |
-
}
|
17349 |
-
|
17350 |
-
var forbiddenBreakpoints = options.wordBreak === 'keep-all' ? isLetterNumber.map(function (isLetterNumber, i) {
|
17351 |
-
return isLetterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
|
17352 |
-
}) : null;
|
17353 |
-
|
17354 |
-
return [indicies, classTypes, forbiddenBreakpoints];
|
17355 |
-
};
|
17356 |
-
|
17357 |
-
var inlineBreakOpportunities = exports.inlineBreakOpportunities = function inlineBreakOpportunities(str, options) {
|
17358 |
-
var codePoints = (0, _Util.toCodePoints)(str);
|
17359 |
-
var output = BREAK_NOT_ALLOWED;
|
17360 |
-
|
17361 |
-
var _cssFormattedClasses = cssFormattedClasses(codePoints, options),
|
17362 |
-
_cssFormattedClasses2 = _slicedToArray(_cssFormattedClasses, 3),
|
17363 |
-
indicies = _cssFormattedClasses2[0],
|
17364 |
-
classTypes = _cssFormattedClasses2[1],
|
17365 |
-
forbiddenBreakpoints = _cssFormattedClasses2[2];
|
17366 |
-
|
17367 |
-
codePoints.forEach(function (codePoint, i) {
|
17368 |
-
output += (0, _Util.fromCodePoint)(codePoint) + (i >= codePoints.length - 1 ? BREAK_MANDATORY : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));
|
17369 |
-
});
|
17370 |
-
|
17371 |
-
return output;
|
17372 |
-
};
|
17373 |
-
|
17374 |
-
var Break = function () {
|
17375 |
-
function Break(codePoints, lineBreak, start, end) {
|
17376 |
-
_classCallCheck(this, Break);
|
17377 |
-
|
17378 |
-
this._codePoints = codePoints;
|
17379 |
-
this.required = lineBreak === BREAK_MANDATORY;
|
17380 |
-
this.start = start;
|
17381 |
-
this.end = end;
|
17382 |
-
}
|
17383 |
-
|
17384 |
-
_createClass(Break, [{
|
17385 |
-
key: 'slice',
|
17386 |
-
value: function slice() {
|
17387 |
-
return _Util.fromCodePoint.apply(undefined, _toConsumableArray(this._codePoints.slice(this.start, this.end)));
|
17388 |
-
}
|
17389 |
-
}]);
|
17390 |
-
|
17391 |
-
return Break;
|
17392 |
-
}();
|
17393 |
-
|
17394 |
-
var LineBreaker = exports.LineBreaker = function LineBreaker(str, options) {
|
17395 |
-
var codePoints = (0, _Util.toCodePoints)(str);
|
17396 |
-
|
17397 |
-
var _cssFormattedClasses3 = cssFormattedClasses(codePoints, options),
|
17398 |
-
_cssFormattedClasses4 = _slicedToArray(_cssFormattedClasses3, 3),
|
17399 |
-
indicies = _cssFormattedClasses4[0],
|
17400 |
-
classTypes = _cssFormattedClasses4[1],
|
17401 |
-
forbiddenBreakpoints = _cssFormattedClasses4[2];
|
17402 |
-
|
17403 |
-
var length = codePoints.length;
|
17404 |
-
var lastEnd = 0;
|
17405 |
-
var nextIndex = 0;
|
17406 |
-
|
17407 |
-
return {
|
17408 |
-
next: function next() {
|
17409 |
-
if (nextIndex >= length) {
|
17410 |
-
return { done: true };
|
17411 |
-
}
|
17412 |
-
var lineBreak = BREAK_NOT_ALLOWED;
|
17413 |
-
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED) {}
|
17414 |
-
|
17415 |
-
if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {
|
17416 |
-
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
17417 |
-
lastEnd = nextIndex;
|
17418 |
-
return { value: value, done: false };
|
17419 |
-
}
|
17420 |
-
|
17421 |
-
return { done: true };
|
17422 |
-
}
|
17423 |
-
};
|
17424 |
-
};
|
17425 |
-
|
17426 |
-
/***/ }),
|
17427 |
-
/* 48 */
|
17428 |
-
/***/ (function(module, exports, __webpack_require__) {
|
17429 |
-
|
17430 |
-
"use strict";
|
17431 |
-
|
17432 |
-
|
17433 |
-
Object.defineProperty(exports, "__esModule", {
|
17434 |
-
value: true
|
17435 |
-
});
|
17436 |
-
exports.Trie = exports.createTrieFromBase64 = exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_INDEX_SHIFT = exports.UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_2 = undefined;
|
17437 |
-
|
17438 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
17439 |
-
|
17440 |
-
var _Util = __webpack_require__(13);
|
17441 |
-
|
17442 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17443 |
-
|
17444 |
-
/** Shift size for getting the index-2 table offset. */
|
17445 |
-
var UTRIE2_SHIFT_2 = exports.UTRIE2_SHIFT_2 = 5;
|
17446 |
-
|
17447 |
-
/** Shift size for getting the index-1 table offset. */
|
17448 |
-
var UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_1 = 6 + 5;
|
17449 |
-
|
17450 |
-
/**
|
17451 |
-
* Shift size for shifting left the index array values.
|
17452 |
-
* Increases possible data size with 16-bit index values at the cost
|
17453 |
-
* of compactability.
|
17454 |
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
17455 |
-
*/
|
17456 |
-
var UTRIE2_INDEX_SHIFT = exports.UTRIE2_INDEX_SHIFT = 2;
|
17457 |
-
|
17458 |
-
/**
|
17459 |
-
* Difference between the two shift sizes,
|
17460 |
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
17461 |
-
*/
|
17462 |
-
var UTRIE2_SHIFT_1_2 = exports.UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
17463 |
-
|
17464 |
-
/**
|
17465 |
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
17466 |
-
* lead surrogate code _units_ not code _points_.
|
17467 |
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
17468 |
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
17469 |
-
*/
|
17470 |
-
var UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
|
17471 |
-
|
17472 |
-
/** Number of entries in a data block. 32=0x20 */
|
17473 |
-
var UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
|
17474 |
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
17475 |
-
var UTRIE2_DATA_MASK = exports.UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
|
17476 |
-
|
17477 |
-
var UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
|
17478 |
-
/** Count the lengths of both BMP pieces. 2080=0x820 */
|
17479 |
-
var UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
|
17480 |
-
/**
|
17481 |
-
* The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
|
17482 |
-
* Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
|
17483 |
-
*/
|
17484 |
-
var UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
|
17485 |
-
var UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
|
17486 |
-
/**
|
17487 |
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
17488 |
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
17489 |
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
17490 |
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
17491 |
-
*
|
17492 |
-
* The part of the index-2 table for supplementary code points starts
|
17493 |
-
* after this index-1 table.
|
17494 |
-
*
|
17495 |
-
* Both the index-1 table and the following part of the index-2 table
|
17496 |
-
* are omitted completely if there is only BMP data.
|
17497 |
-
*/
|
17498 |
-
var UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
|
17499 |
-
|
17500 |
-
/**
|
17501 |
-
* Number of index-1 entries for the BMP. 32=0x20
|
17502 |
-
* This part of the index-1 table is omitted from the serialized form.
|
17503 |
-
*/
|
17504 |
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
|
17505 |
-
|
17506 |
-
/** Number of entries in an index-2 block. 64=0x40 */
|
17507 |
-
var UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
|
17508 |
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
17509 |
-
var UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
|
17510 |
-
|
17511 |
-
var createTrieFromBase64 = exports.createTrieFromBase64 = function createTrieFromBase64(base64) {
|
17512 |
-
var buffer = (0, _Util.decode)(base64);
|
17513 |
-
var view32 = Array.isArray(buffer) ? (0, _Util.polyUint32Array)(buffer) : new Uint32Array(buffer);
|
17514 |
-
var view16 = Array.isArray(buffer) ? (0, _Util.polyUint16Array)(buffer) : new Uint16Array(buffer);
|
17515 |
-
var headerLength = 24;
|
17516 |
-
|
17517 |
-
var index = view16.slice(headerLength / 2, view32[4] / 2);
|
17518 |
-
var data = view32[5] === 2 ? view16.slice((headerLength + view32[4]) / 2) : view32.slice(Math.ceil((headerLength + view32[4]) / 4));
|
17519 |
-
|
17520 |
-
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
17521 |
-
};
|
17522 |
-
|
17523 |
-
var Trie = exports.Trie = function () {
|
17524 |
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
17525 |
-
_classCallCheck(this, Trie);
|
17526 |
-
|
17527 |
-
this.initialValue = initialValue;
|
17528 |
-
this.errorValue = errorValue;
|
17529 |
-
this.highStart = highStart;
|
17530 |
-
this.highValueIndex = highValueIndex;
|
17531 |
-
this.index = index;
|
17532 |
-
this.data = data;
|
17533 |
-
}
|
17534 |
-
|
17535 |
-
/**
|
17536 |
-
* Get the value for a code point as stored in the Trie.
|
17537 |
-
*
|
17538 |
-
* @param codePoint the code point
|
17539 |
-
* @return the value
|
17540 |
-
*/
|
17541 |
-
|
17542 |
-
|
17543 |
-
_createClass(Trie, [{
|
17544 |
-
key: 'get',
|
17545 |
-
value: function get(codePoint) {
|
17546 |
-
var ix = void 0;
|
17547 |
-
if (codePoint >= 0) {
|
17548 |
-
if (codePoint < 0x0d800 || codePoint > 0x0dbff && codePoint <= 0x0ffff) {
|
17549 |
-
// Ordinary BMP code point, excluding leading surrogates.
|
17550 |
-
// BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.
|
17551 |
-
// 16 bit data is stored in the index array itself.
|
17552 |
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
17553 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17554 |
-
return this.data[ix];
|
17555 |
-
}
|
17556 |
-
|
17557 |
-
if (codePoint <= 0xffff) {
|
17558 |
-
// Lead Surrogate Code Point. A Separate index section is stored for
|
17559 |
-
// lead surrogate code units and code points.
|
17560 |
-
// The main index has the code unit data.
|
17561 |
-
// For this function, we need the code point data.
|
17562 |
-
// Note: this expression could be refactored for slightly improved efficiency, but
|
17563 |
-
// surrogate code points will be so rare in practice that it's not worth it.
|
17564 |
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> UTRIE2_SHIFT_2)];
|
17565 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17566 |
-
return this.data[ix];
|
17567 |
-
}
|
17568 |
-
|
17569 |
-
if (codePoint < this.highStart) {
|
17570 |
-
// Supplemental code point, use two-level lookup.
|
17571 |
-
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
17572 |
-
ix = this.index[ix];
|
17573 |
-
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
17574 |
-
ix = this.index[ix];
|
17575 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17576 |
-
return this.data[ix];
|
17577 |
-
}
|
17578 |
-
if (codePoint <= 0x10ffff) {
|
17579 |
-
return this.data[this.highValueIndex];
|
17580 |
-
}
|
17581 |
-
}
|
17582 |
-
|
17583 |
-
// Fall through. The code point is outside of the legal range of 0..0x10ffff.
|
17584 |
-
return this.errorValue;
|
17585 |
-
}
|
17586 |
-
}]);
|
17587 |
-
|
17588 |
-
return Trie;
|
17589 |
-
}();
|
17590 |
-
|
17591 |
-
/***/ }),
|
17592 |
-
/* 49 */
|
17593 |
-
/***/ (function(module, exports, __webpack_require__) {
|
17594 |
-
|
17595 |
-
"use strict";
|
17596 |
-
|
17597 |
-
|
17598 |
-
module.exports = 'KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA';
|
17599 |
-
|
17600 |
-
/***/ }),
|
17601 |
-
/* 50 */
|
17602 |
-
/***/ (function(module, exports, __webpack_require__) {
|
17603 |
-
|
17604 |
-
"use strict";
|
17605 |
-
|
17606 |
-
|
17607 |
-
Object.defineProperty(exports, "__esModule", {
|
17608 |
-
value: true
|
17609 |
-
});
|
17610 |
-
|
17611 |
-
var _Path = __webpack_require__(6);
|
17612 |
-
|
17613 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17614 |
-
|
17615 |
-
var Circle = function Circle(x, y, radius) {
|
17616 |
-
_classCallCheck(this, Circle);
|
17617 |
-
|
17618 |
-
this.type = _Path.PATH.CIRCLE;
|
17619 |
-
this.x = x;
|
17620 |
-
this.y = y;
|
17621 |
-
this.radius = radius;
|
17622 |
-
if (true) {
|
17623 |
-
if (isNaN(x)) {
|
17624 |
-
console.error('Invalid x value given for Circle');
|
17625 |
-
}
|
17626 |
-
if (isNaN(y)) {
|
17627 |
-
console.error('Invalid y value given for Circle');
|
17628 |
-
}
|
17629 |
-
if (isNaN(radius)) {
|
17630 |
-
console.error('Invalid radius value given for Circle');
|
17631 |
-
}
|
17632 |
-
}
|
17633 |
-
};
|
17634 |
-
|
17635 |
-
exports.default = Circle;
|
17636 |
-
|
17637 |
-
/***/ }),
|
17638 |
-
/* 51 */
|
17639 |
-
/***/ (function(module, exports, __webpack_require__) {
|
17640 |
-
|
17641 |
-
"use strict";
|
17642 |
-
|
17643 |
-
|
17644 |
-
Object.defineProperty(exports, "__esModule", {
|
17645 |
-
value: true
|
17646 |
-
});
|
17647 |
-
|
17648 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
17649 |
-
|
17650 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
17651 |
-
|
17652 |
-
var _Bounds = __webpack_require__(1);
|
17653 |
-
|
17654 |
-
var _Font = __webpack_require__(25);
|
17655 |
-
|
17656 |
-
var _Gradient = __webpack_require__(52);
|
17657 |
-
|
17658 |
-
var _TextContainer = __webpack_require__(9);
|
17659 |
-
|
17660 |
-
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
17661 |
-
|
17662 |
-
var _background = __webpack_require__(5);
|
17663 |
-
|
17664 |
-
var _border = __webpack_require__(12);
|
17665 |
-
|
17666 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17667 |
-
|
17668 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17669 |
-
|
17670 |
-
var Renderer = function () {
|
17671 |
-
function Renderer(target, options) {
|
17672 |
-
_classCallCheck(this, Renderer);
|
17673 |
-
|
17674 |
-
this.target = target;
|
17675 |
-
this.options = options;
|
17676 |
-
target.render(options);
|
17677 |
-
}
|
17678 |
-
|
17679 |
-
_createClass(Renderer, [{
|
17680 |
-
key: 'renderNode',
|
17681 |
-
value: function renderNode(container) {
|
17682 |
-
if (container.isVisible()) {
|
17683 |
-
this.renderNodeBackgroundAndBorders(container);
|
17684 |
-
this.renderNodeContent(container);
|
17685 |
-
}
|
17686 |
-
}
|
17687 |
-
}, {
|
17688 |
-
key: 'renderNodeContent',
|
17689 |
-
value: function renderNodeContent(container) {
|
17690 |
-
var _this = this;
|
17691 |
-
|
17692 |
-
var callback = function callback() {
|
17693 |
-
if (container.childNodes.length) {
|
17694 |
-
container.childNodes.forEach(function (child) {
|
17695 |
-
if (child instanceof _TextContainer2.default) {
|
17696 |
-
var style = child.parent.style;
|
17697 |
-
_this.target.renderTextNode(child.bounds, style.color, style.font, style.textDecoration, style.textShadow);
|
17698 |
-
} else {
|
17699 |
-
_this.target.drawShape(child, container.style.color);
|
17700 |
-
}
|
17701 |
-
});
|
17702 |
-
}
|
17703 |
-
|
17704 |
-
if (container.image) {
|
17705 |
-
var _image = _this.options.imageStore.get(container.image);
|
17706 |
-
if (_image) {
|
17707 |
-
var contentBox = (0, _Bounds.calculateContentBox)(container.bounds, container.style.padding, container.style.border);
|
17708 |
-
var _width = typeof _image.width === 'number' && _image.width > 0 ? _image.width : contentBox.width;
|
17709 |
-
var _height = typeof _image.height === 'number' && _image.height > 0 ? _image.height : contentBox.height;
|
17710 |
-
if (_width > 0 && _height > 0) {
|
17711 |
-
_this.target.clip([(0, _Bounds.calculatePaddingBoxPath)(container.curvedBounds)], function () {
|
17712 |
-
_this.target.drawImage(_image, new _Bounds.Bounds(0, 0, _width, _height), contentBox);
|
17713 |
-
});
|
17714 |
-
}
|
17715 |
-
}
|
17716 |
-
}
|
17717 |
-
};
|
17718 |
-
var paths = container.getClipPaths();
|
17719 |
-
if (paths.length) {
|
17720 |
-
this.target.clip(paths, callback);
|
17721 |
-
} else {
|
17722 |
-
callback();
|
17723 |
-
}
|
17724 |
-
}
|
17725 |
-
}, {
|
17726 |
-
key: 'renderNodeBackgroundAndBorders',
|
17727 |
-
value: function renderNodeBackgroundAndBorders(container) {
|
17728 |
-
var _this2 = this;
|
17729 |
-
|
17730 |
-
var HAS_BACKGROUND = !container.style.background.backgroundColor.isTransparent() || container.style.background.backgroundImage.length;
|
17731 |
-
|
17732 |
-
var hasRenderableBorders = container.style.border.some(function (border) {
|
17733 |
-
return border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent();
|
17734 |
-
});
|
17735 |
-
|
17736 |
-
var callback = function callback() {
|
17737 |
-
var backgroundPaintingArea = (0, _background.calculateBackgroungPaintingArea)(container.curvedBounds, container.style.background.backgroundClip);
|
17738 |
-
|
17739 |
-
if (HAS_BACKGROUND) {
|
17740 |
-
_this2.target.clip([backgroundPaintingArea], function () {
|
17741 |
-
if (!container.style.background.backgroundColor.isTransparent()) {
|
17742 |
-
_this2.target.fill(container.style.background.backgroundColor);
|
17743 |
-
}
|
17744 |
-
|
17745 |
-
_this2.renderBackgroundImage(container);
|
17746 |
-
});
|
17747 |
-
}
|
17748 |
-
|
17749 |
-
container.style.border.forEach(function (border, side) {
|
17750 |
-
if (border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent()) {
|
17751 |
-
_this2.renderBorder(border, side, container.curvedBounds);
|
17752 |
-
}
|
17753 |
-
});
|
17754 |
-
};
|
17755 |
-
|
17756 |
-
if (HAS_BACKGROUND || hasRenderableBorders) {
|
17757 |
-
var paths = container.parent ? container.parent.getClipPaths() : [];
|
17758 |
-
if (paths.length) {
|
17759 |
-
this.target.clip(paths, callback);
|
17760 |
-
} else {
|
17761 |
-
callback();
|
17762 |
-
}
|
17763 |
-
}
|
17764 |
-
}
|
17765 |
-
}, {
|
17766 |
-
key: 'renderBackgroundImage',
|
17767 |
-
value: function renderBackgroundImage(container) {
|
17768 |
-
var _this3 = this;
|
17769 |
-
|
17770 |
-
container.style.background.backgroundImage.slice(0).reverse().forEach(function (backgroundImage) {
|
17771 |
-
if (backgroundImage.source.method === 'url' && backgroundImage.source.args.length) {
|
17772 |
-
_this3.renderBackgroundRepeat(container, backgroundImage);
|
17773 |
-
} else if (/gradient/i.test(backgroundImage.source.method)) {
|
17774 |
-
_this3.renderBackgroundGradient(container, backgroundImage);
|
17775 |
-
}
|
17776 |
-
});
|
17777 |
-
}
|
17778 |
-
}, {
|
17779 |
-
key: 'renderBackgroundRepeat',
|
17780 |
-
value: function renderBackgroundRepeat(container, background) {
|
17781 |
-
var image = this.options.imageStore.get(background.source.args[0]);
|
17782 |
-
if (image) {
|
17783 |
-
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
17784 |
-
var backgroundImageSize = (0, _background.calculateBackgroundSize)(background, image, backgroundPositioningArea);
|
17785 |
-
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
17786 |
-
var _path = (0, _background.calculateBackgroundRepeatPath)(background, position, backgroundImageSize, backgroundPositioningArea, container.bounds);
|
17787 |
-
|
17788 |
-
var _offsetX = Math.round(backgroundPositioningArea.left + position.x);
|
17789 |
-
var _offsetY = Math.round(backgroundPositioningArea.top + position.y);
|
17790 |
-
this.target.renderRepeat(_path, image, backgroundImageSize, _offsetX, _offsetY);
|
17791 |
-
}
|
17792 |
-
}
|
17793 |
-
}, {
|
17794 |
-
key: 'renderBackgroundGradient',
|
17795 |
-
value: function renderBackgroundGradient(container, background) {
|
17796 |
-
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
17797 |
-
var backgroundImageSize = (0, _background.calculateGradientBackgroundSize)(background, backgroundPositioningArea);
|
17798 |
-
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
17799 |
-
var gradientBounds = new _Bounds.Bounds(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y), backgroundImageSize.width, backgroundImageSize.height);
|
17800 |
-
|
17801 |
-
var gradient = (0, _Gradient.parseGradient)(container, background.source, gradientBounds);
|
17802 |
-
if (gradient) {
|
17803 |
-
switch (gradient.type) {
|
17804 |
-
case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:
|
17805 |
-
// $FlowFixMe
|
17806 |
-
this.target.renderLinearGradient(gradientBounds, gradient);
|
17807 |
-
break;
|
17808 |
-
case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:
|
17809 |
-
// $FlowFixMe
|
17810 |
-
this.target.renderRadialGradient(gradientBounds, gradient);
|
17811 |
-
break;
|
17812 |
-
}
|
17813 |
-
}
|
17814 |
-
}
|
17815 |
-
}, {
|
17816 |
-
key: 'renderBorder',
|
17817 |
-
value: function renderBorder(border, side, curvePoints) {
|
17818 |
-
this.target.drawShape((0, _Bounds.parsePathForBorder)(curvePoints, side), border.borderColor);
|
17819 |
-
}
|
17820 |
-
}, {
|
17821 |
-
key: 'renderStack',
|
17822 |
-
value: function renderStack(stack) {
|
17823 |
-
var _this4 = this;
|
17824 |
-
|
17825 |
-
if (stack.container.isVisible()) {
|
17826 |
-
var _opacity = stack.getOpacity();
|
17827 |
-
if (_opacity !== this._opacity) {
|
17828 |
-
this.target.setOpacity(stack.getOpacity());
|
17829 |
-
this._opacity = _opacity;
|
17830 |
-
}
|
17831 |
-
|
17832 |
-
var _transform = stack.container.style.transform;
|
17833 |
-
if (_transform !== null) {
|
17834 |
-
this.target.transform(stack.container.bounds.left + _transform.transformOrigin[0].value, stack.container.bounds.top + _transform.transformOrigin[1].value, _transform.transform, function () {
|
17835 |
-
return _this4.renderStackContent(stack);
|
17836 |
-
});
|
17837 |
-
} else {
|
17838 |
-
this.renderStackContent(stack);
|
17839 |
-
}
|
17840 |
-
}
|
17841 |
-
}
|
17842 |
-
}, {
|
17843 |
-
key: 'renderStackContent',
|
17844 |
-
value: function renderStackContent(stack) {
|
17845 |
-
var _splitStackingContext = splitStackingContexts(stack),
|
17846 |
-
_splitStackingContext2 = _slicedToArray(_splitStackingContext, 5),
|
17847 |
-
negativeZIndex = _splitStackingContext2[0],
|
17848 |
-
zeroOrAutoZIndexOrTransformedOrOpacity = _splitStackingContext2[1],
|
17849 |
-
positiveZIndex = _splitStackingContext2[2],
|
17850 |
-
nonPositionedFloats = _splitStackingContext2[3],
|
17851 |
-
nonPositionedInlineLevel = _splitStackingContext2[4];
|
17852 |
-
|
17853 |
-
var _splitDescendants = splitDescendants(stack),
|
17854 |
-
_splitDescendants2 = _slicedToArray(_splitDescendants, 2),
|
17855 |
-
inlineLevel = _splitDescendants2[0],
|
17856 |
-
nonInlineLevel = _splitDescendants2[1];
|
17857 |
-
|
17858 |
-
// https://www.w3.org/TR/css-position-3/#painting-order
|
17859 |
-
// 1. the background and borders of the element forming the stacking context.
|
17860 |
-
|
17861 |
-
|
17862 |
-
this.renderNodeBackgroundAndBorders(stack.container);
|
17863 |
-
// 2. the child stacking contexts with negative stack levels (most negative first).
|
17864 |
-
negativeZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
17865 |
-
// 3. For all its in-flow, non-positioned, block-level descendants in tree order:
|
17866 |
-
this.renderNodeContent(stack.container);
|
17867 |
-
nonInlineLevel.forEach(this.renderNode, this);
|
17868 |
-
// 4. All non-positioned floating descendants, in tree order. For each one of these,
|
17869 |
-
// treat the element as if it created a new stacking context, but any positioned descendants and descendants
|
17870 |
-
// which actually create a new stacking context should be considered part of the parent stacking context,
|
17871 |
-
// not this new one.
|
17872 |
-
nonPositionedFloats.forEach(this.renderStack, this);
|
17873 |
-
// 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
17874 |
-
nonPositionedInlineLevel.forEach(this.renderStack, this);
|
17875 |
-
inlineLevel.forEach(this.renderNode, this);
|
17876 |
-
// 6. All positioned, opacity or transform descendants, in tree order that fall into the following categories:
|
17877 |
-
// All positioned descendants with 'z-index: auto' or 'z-index: 0', in tree order.
|
17878 |
-
// For those with 'z-index: auto', treat the element as if it created a new stacking context,
|
17879 |
-
// but any positioned descendants and descendants which actually create a new stacking context should be
|
17880 |
-
// considered part of the parent stacking context, not this new one. For those with 'z-index: 0',
|
17881 |
-
// treat the stacking context generated atomically.
|
17882 |
-
//
|
17883 |
-
// All opacity descendants with opacity less than 1
|
17884 |
-
//
|
17885 |
-
// All transform descendants with transform other than none
|
17886 |
-
zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack, this);
|
17887 |
-
// 7. Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index
|
17888 |
-
// order (smallest first) then tree order.
|
17889 |
-
positiveZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
17890 |
-
}
|
17891 |
-
}, {
|
17892 |
-
key: 'render',
|
17893 |
-
value: function render(stack) {
|
17894 |
-
var _this5 = this;
|
17895 |
-
|
17896 |
-
if (this.options.backgroundColor) {
|
17897 |
-
this.target.rectangle(this.options.x, this.options.y, this.options.width, this.options.height, this.options.backgroundColor);
|
17898 |
-
}
|
17899 |
-
this.renderStack(stack);
|
17900 |
-
var target = this.target.getTarget();
|
17901 |
-
if (true) {
|
17902 |
-
return target.then(function (output) {
|
17903 |
-
_this5.options.logger.log('Render completed');
|
17904 |
-
return output;
|
17905 |
-
});
|
17906 |
-
}
|
17907 |
-
return target;
|
17908 |
-
}
|
17909 |
-
}]);
|
17910 |
-
|
17911 |
-
return Renderer;
|
17912 |
-
}();
|
17913 |
-
|
17914 |
-
exports.default = Renderer;
|
17915 |
-
|
17916 |
-
|
17917 |
-
var splitDescendants = function splitDescendants(stack) {
|
17918 |
-
var inlineLevel = [];
|
17919 |
-
var nonInlineLevel = [];
|
17920 |
-
|
17921 |
-
var length = stack.children.length;
|
17922 |
-
for (var i = 0; i < length; i++) {
|
17923 |
-
var child = stack.children[i];
|
17924 |
-
if (child.isInlineLevel()) {
|
17925 |
-
inlineLevel.push(child);
|
17926 |
-
} else {
|
17927 |
-
nonInlineLevel.push(child);
|
17928 |
-
}
|
17929 |
-
}
|
17930 |
-
return [inlineLevel, nonInlineLevel];
|
17931 |
-
};
|
17932 |
-
|
17933 |
-
var splitStackingContexts = function splitStackingContexts(stack) {
|
17934 |
-
var negativeZIndex = [];
|
17935 |
-
var zeroOrAutoZIndexOrTransformedOrOpacity = [];
|
17936 |
-
var positiveZIndex = [];
|
17937 |
-
var nonPositionedFloats = [];
|
17938 |
-
var nonPositionedInlineLevel = [];
|
17939 |
-
var length = stack.contexts.length;
|
17940 |
-
for (var i = 0; i < length; i++) {
|
17941 |
-
var child = stack.contexts[i];
|
17942 |
-
if (child.container.isPositioned() || child.container.style.opacity < 1 || child.container.isTransformed()) {
|
17943 |
-
if (child.container.style.zIndex.order < 0) {
|
17944 |
-
negativeZIndex.push(child);
|
17945 |
-
} else if (child.container.style.zIndex.order > 0) {
|
17946 |
-
positiveZIndex.push(child);
|
17947 |
-
} else {
|
17948 |
-
zeroOrAutoZIndexOrTransformedOrOpacity.push(child);
|
17949 |
-
}
|
17950 |
-
} else {
|
17951 |
-
if (child.container.isFloating()) {
|
17952 |
-
nonPositionedFloats.push(child);
|
17953 |
-
} else {
|
17954 |
-
nonPositionedInlineLevel.push(child);
|
17955 |
-
}
|
17956 |
-
}
|
17957 |
-
}
|
17958 |
-
return [negativeZIndex, zeroOrAutoZIndexOrTransformedOrOpacity, positiveZIndex, nonPositionedFloats, nonPositionedInlineLevel];
|
17959 |
-
};
|
17960 |
-
|
17961 |
-
var sortByZIndex = function sortByZIndex(a, b) {
|
17962 |
-
if (a.container.style.zIndex.order > b.container.style.zIndex.order) {
|
17963 |
-
return 1;
|
17964 |
-
} else if (a.container.style.zIndex.order < b.container.style.zIndex.order) {
|
17965 |
-
return -1;
|
17966 |
-
}
|
17967 |
-
|
17968 |
-
return a.container.index > b.container.index ? 1 : -1;
|
17969 |
-
};
|
17970 |
-
|
17971 |
-
/***/ }),
|
17972 |
-
/* 52 */
|
17973 |
-
/***/ (function(module, exports, __webpack_require__) {
|
17974 |
-
|
17975 |
-
"use strict";
|
17976 |
-
|
17977 |
-
|
17978 |
-
Object.defineProperty(exports, "__esModule", {
|
17979 |
-
value: true
|
17980 |
-
});
|
17981 |
-
exports.transformWebkitRadialGradientArgs = exports.parseGradient = exports.RadialGradient = exports.LinearGradient = exports.RADIAL_GRADIENT_SHAPE = exports.GRADIENT_TYPE = undefined;
|
17982 |
-
|
17983 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
17984 |
-
|
17985 |
-
var _NodeContainer = __webpack_require__(3);
|
17986 |
-
|
17987 |
-
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
17988 |
-
|
17989 |
-
var _Angle = __webpack_require__(53);
|
17990 |
-
|
17991 |
-
var _Color = __webpack_require__(0);
|
17992 |
-
|
17993 |
-
var _Color2 = _interopRequireDefault(_Color);
|
17994 |
-
|
17995 |
-
var _Length = __webpack_require__(2);
|
17996 |
-
|
17997 |
-
var _Length2 = _interopRequireDefault(_Length);
|
17998 |
-
|
17999 |
-
var _Util = __webpack_require__(4);
|
18000 |
-
|
18001 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18002 |
-
|
18003 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18004 |
-
|
18005 |
-
var SIDE_OR_CORNER = /^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i;
|
18006 |
-
var PERCENTAGE_ANGLES = /^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i;
|
18007 |
-
var ENDS_WITH_LENGTH = /(px)|%|( 0)$/i;
|
18008 |
-
var FROM_TO_COLORSTOP = /^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i;
|
18009 |
-
var RADIAL_SHAPE_DEFINITION = /^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i;
|
18010 |
-
|
18011 |
-
var GRADIENT_TYPE = exports.GRADIENT_TYPE = {
|
18012 |
-
LINEAR_GRADIENT: 0,
|
18013 |
-
RADIAL_GRADIENT: 1
|
18014 |
-
};
|
18015 |
-
|
18016 |
-
var RADIAL_GRADIENT_SHAPE = exports.RADIAL_GRADIENT_SHAPE = {
|
18017 |
-
CIRCLE: 0,
|
18018 |
-
ELLIPSE: 1
|
18019 |
-
};
|
18020 |
-
|
18021 |
-
var LENGTH_FOR_POSITION = {
|
18022 |
-
left: new _Length2.default('0%'),
|
18023 |
-
top: new _Length2.default('0%'),
|
18024 |
-
center: new _Length2.default('50%'),
|
18025 |
-
right: new _Length2.default('100%'),
|
18026 |
-
bottom: new _Length2.default('100%')
|
18027 |
-
};
|
18028 |
-
|
18029 |
-
var LinearGradient = exports.LinearGradient = function LinearGradient(colorStops, direction) {
|
18030 |
-
_classCallCheck(this, LinearGradient);
|
18031 |
-
|
18032 |
-
this.type = GRADIENT_TYPE.LINEAR_GRADIENT;
|
18033 |
-
this.colorStops = colorStops;
|
18034 |
-
this.direction = direction;
|
18035 |
-
};
|
18036 |
-
|
18037 |
-
var RadialGradient = exports.RadialGradient = function RadialGradient(colorStops, shape, center, radius) {
|
18038 |
-
_classCallCheck(this, RadialGradient);
|
18039 |
-
|
18040 |
-
this.type = GRADIENT_TYPE.RADIAL_GRADIENT;
|
18041 |
-
this.colorStops = colorStops;
|
18042 |
-
this.shape = shape;
|
18043 |
-
this.center = center;
|
18044 |
-
this.radius = radius;
|
18045 |
-
};
|
18046 |
-
|
18047 |
-
var parseGradient = exports.parseGradient = function parseGradient(container, _ref, bounds) {
|
18048 |
-
var args = _ref.args,
|
18049 |
-
method = _ref.method,
|
18050 |
-
prefix = _ref.prefix;
|
18051 |
-
|
18052 |
-
if (method === 'linear-gradient') {
|
18053 |
-
return parseLinearGradient(args, bounds, !!prefix);
|
18054 |
-
} else if (method === 'gradient' && args[0] === 'linear') {
|
18055 |
-
// TODO handle correct angle
|
18056 |
-
return parseLinearGradient(['to bottom'].concat(transformObsoleteColorStops(args.slice(3))), bounds, !!prefix);
|
18057 |
-
} else if (method === 'radial-gradient') {
|
18058 |
-
return parseRadialGradient(container, prefix === '-webkit-' ? transformWebkitRadialGradientArgs(args) : args, bounds);
|
18059 |
-
} else if (method === 'gradient' && args[0] === 'radial') {
|
18060 |
-
return parseRadialGradient(container, transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))), bounds);
|
18061 |
-
}
|
18062 |
-
};
|
18063 |
-
|
18064 |
-
var parseColorStops = function parseColorStops(args, firstColorStopIndex, lineLength) {
|
18065 |
-
var colorStops = [];
|
18066 |
-
|
18067 |
-
for (var i = firstColorStopIndex; i < args.length; i++) {
|
18068 |
-
var value = args[i];
|
18069 |
-
var HAS_LENGTH = ENDS_WITH_LENGTH.test(value);
|
18070 |
-
var lastSpaceIndex = value.lastIndexOf(' ');
|
18071 |
-
var _color = new _Color2.default(HAS_LENGTH ? value.substring(0, lastSpaceIndex) : value);
|
18072 |
-
var _stop = HAS_LENGTH ? new _Length2.default(value.substring(lastSpaceIndex + 1)) : i === firstColorStopIndex ? new _Length2.default('0%') : i === args.length - 1 ? new _Length2.default('100%') : null;
|
18073 |
-
colorStops.push({ color: _color, stop: _stop });
|
18074 |
-
}
|
18075 |
-
|
18076 |
-
var absoluteValuedColorStops = colorStops.map(function (_ref2) {
|
18077 |
-
var color = _ref2.color,
|
18078 |
-
stop = _ref2.stop;
|
18079 |
-
|
18080 |
-
var absoluteStop = lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null;
|
18081 |
-
|
18082 |
-
return {
|
18083 |
-
color: color,
|
18084 |
-
// $FlowFixMe
|
18085 |
-
stop: absoluteStop
|
18086 |
-
};
|
18087 |
-
});
|
18088 |
-
|
18089 |
-
var previousColorStop = absoluteValuedColorStops[0].stop;
|
18090 |
-
for (var _i = 0; _i < absoluteValuedColorStops.length; _i++) {
|
18091 |
-
if (previousColorStop !== null) {
|
18092 |
-
var _stop2 = absoluteValuedColorStops[_i].stop;
|
18093 |
-
if (_stop2 === null) {
|
18094 |
-
var n = _i;
|
18095 |
-
while (absoluteValuedColorStops[n].stop === null) {
|
18096 |
-
n++;
|
18097 |
-
}
|
18098 |
-
var steps = n - _i + 1;
|
18099 |
-
var nextColorStep = absoluteValuedColorStops[n].stop;
|
18100 |
-
var stepSize = (nextColorStep - previousColorStop) / steps;
|
18101 |
-
for (; _i < n; _i++) {
|
18102 |
-
previousColorStop = absoluteValuedColorStops[_i].stop = previousColorStop + stepSize;
|
18103 |
-
}
|
18104 |
-
} else {
|
18105 |
-
previousColorStop = _stop2;
|
18106 |
-
}
|
18107 |
-
}
|
18108 |
-
}
|
18109 |
-
|
18110 |
-
return absoluteValuedColorStops;
|
18111 |
-
};
|
18112 |
-
|
18113 |
-
var parseLinearGradient = function parseLinearGradient(args, bounds, hasPrefix) {
|
18114 |
-
var angle = (0, _Angle.parseAngle)(args[0]);
|
18115 |
-
var HAS_SIDE_OR_CORNER = SIDE_OR_CORNER.test(args[0]);
|
18116 |
-
var HAS_DIRECTION = HAS_SIDE_OR_CORNER || angle !== null || PERCENTAGE_ANGLES.test(args[0]);
|
18117 |
-
var direction = HAS_DIRECTION ? angle !== null ? calculateGradientDirection(
|
18118 |
-
// if there is a prefix, the 0° angle points due East (instead of North per W3C)
|
18119 |
-
hasPrefix ? angle - Math.PI * 0.5 : angle, bounds) : HAS_SIDE_OR_CORNER ? parseSideOrCorner(args[0], bounds) : parsePercentageAngle(args[0], bounds) : calculateGradientDirection(Math.PI, bounds);
|
18120 |
-
var firstColorStopIndex = HAS_DIRECTION ? 1 : 0;
|
18121 |
-
|
18122 |
-
// TODO: Fix some inaccuracy with color stops with px values
|
18123 |
-
var lineLength = Math.min((0, _Util.distance)(Math.abs(direction.x0) + Math.abs(direction.x1), Math.abs(direction.y0) + Math.abs(direction.y1)), bounds.width * 2, bounds.height * 2);
|
18124 |
-
|
18125 |
-
return new LinearGradient(parseColorStops(args, firstColorStopIndex, lineLength), direction);
|
18126 |
-
};
|
18127 |
-
|
18128 |
-
var parseRadialGradient = function parseRadialGradient(container, args, bounds) {
|
18129 |
-
var m = args[0].match(RADIAL_SHAPE_DEFINITION);
|
18130 |
-
var shape = m && (m[1] === 'circle' || // explicit shape specification
|
18131 |
-
m[3] !== undefined && m[5] === undefined) // only one radius coordinate
|
18132 |
-
? RADIAL_GRADIENT_SHAPE.CIRCLE : RADIAL_GRADIENT_SHAPE.ELLIPSE;
|
18133 |
-
var radius = {};
|
18134 |
-
var center = {};
|
18135 |
-
|
18136 |
-
if (m) {
|
18137 |
-
// Radius
|
18138 |
-
if (m[3] !== undefined) {
|
18139 |
-
radius.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[3], m[4]).getAbsoluteValue(bounds.width);
|
18140 |
-
}
|
18141 |
-
|
18142 |
-
if (m[5] !== undefined) {
|
18143 |
-
radius.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[5], m[6]).getAbsoluteValue(bounds.height);
|
18144 |
-
}
|
18145 |
-
|
18146 |
-
// Position
|
18147 |
-
if (m[7]) {
|
18148 |
-
center.x = LENGTH_FOR_POSITION[m[7].toLowerCase()];
|
18149 |
-
} else if (m[8] !== undefined) {
|
18150 |
-
center.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[8], m[9]);
|
18151 |
-
}
|
18152 |
-
|
18153 |
-
if (m[10]) {
|
18154 |
-
center.y = LENGTH_FOR_POSITION[m[10].toLowerCase()];
|
18155 |
-
} else if (m[11] !== undefined) {
|
18156 |
-
center.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[11], m[12]);
|
18157 |
-
}
|
18158 |
-
}
|
18159 |
-
|
18160 |
-
var gradientCenter = {
|
18161 |
-
x: center.x === undefined ? bounds.width / 2 : center.x.getAbsoluteValue(bounds.width),
|
18162 |
-
y: center.y === undefined ? bounds.height / 2 : center.y.getAbsoluteValue(bounds.height)
|
18163 |
-
};
|
18164 |
-
var gradientRadius = calculateRadius(m && m[2] || 'farthest-corner', shape, gradientCenter, radius, bounds);
|
18165 |
-
|
18166 |
-
return new RadialGradient(parseColorStops(args, m ? 1 : 0, Math.min(gradientRadius.x, gradientRadius.y)), shape, gradientCenter, gradientRadius);
|
18167 |
-
};
|
18168 |
-
|
18169 |
-
var calculateGradientDirection = function calculateGradientDirection(radian, bounds) {
|
18170 |
-
var width = bounds.width;
|
18171 |
-
var height = bounds.height;
|
18172 |
-
var HALF_WIDTH = width * 0.5;
|
18173 |
-
var HALF_HEIGHT = height * 0.5;
|
18174 |
-
var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));
|
18175 |
-
var HALF_LINE_LENGTH = lineLength / 2;
|
18176 |
-
|
18177 |
-
var x0 = HALF_WIDTH + Math.sin(radian) * HALF_LINE_LENGTH;
|
18178 |
-
var y0 = HALF_HEIGHT - Math.cos(radian) * HALF_LINE_LENGTH;
|
18179 |
-
var x1 = width - x0;
|
18180 |
-
var y1 = height - y0;
|
18181 |
-
|
18182 |
-
return { x0: x0, x1: x1, y0: y0, y1: y1 };
|
18183 |
-
};
|
18184 |
-
|
18185 |
-
var parseTopRight = function parseTopRight(bounds) {
|
18186 |
-
return Math.acos(bounds.width / 2 / ((0, _Util.distance)(bounds.width, bounds.height) / 2));
|
18187 |
-
};
|
18188 |
-
|
18189 |
-
var parseSideOrCorner = function parseSideOrCorner(side, bounds) {
|
18190 |
-
switch (side) {
|
18191 |
-
case 'bottom':
|
18192 |
-
case 'to top':
|
18193 |
-
return calculateGradientDirection(0, bounds);
|
18194 |
-
case 'left':
|
18195 |
-
case 'to right':
|
18196 |
-
return calculateGradientDirection(Math.PI / 2, bounds);
|
18197 |
-
case 'right':
|
18198 |
-
case 'to left':
|
18199 |
-
return calculateGradientDirection(3 * Math.PI / 2, bounds);
|
18200 |
-
case 'top right':
|
18201 |
-
case 'right top':
|
18202 |
-
case 'to bottom left':
|
18203 |
-
case 'to left bottom':
|
18204 |
-
return calculateGradientDirection(Math.PI + parseTopRight(bounds), bounds);
|
18205 |
-
case 'top left':
|
18206 |
-
case 'left top':
|
18207 |
-
case 'to bottom right':
|
18208 |
-
case 'to right bottom':
|
18209 |
-
return calculateGradientDirection(Math.PI - parseTopRight(bounds), bounds);
|
18210 |
-
case 'bottom left':
|
18211 |
-
case 'left bottom':
|
18212 |
-
case 'to top right':
|
18213 |
-
case 'to right top':
|
18214 |
-
return calculateGradientDirection(parseTopRight(bounds), bounds);
|
18215 |
-
case 'bottom right':
|
18216 |
-
case 'right bottom':
|
18217 |
-
case 'to top left':
|
18218 |
-
case 'to left top':
|
18219 |
-
return calculateGradientDirection(2 * Math.PI - parseTopRight(bounds), bounds);
|
18220 |
-
case 'top':
|
18221 |
-
case 'to bottom':
|
18222 |
-
default:
|
18223 |
-
return calculateGradientDirection(Math.PI, bounds);
|
18224 |
-
}
|
18225 |
-
};
|
18226 |
-
|
18227 |
-
var parsePercentageAngle = function parsePercentageAngle(angle, bounds) {
|
18228 |
-
var _angle$split$map = angle.split(' ').map(parseFloat),
|
18229 |
-
_angle$split$map2 = _slicedToArray(_angle$split$map, 2),
|
18230 |
-
left = _angle$split$map2[0],
|
18231 |
-
top = _angle$split$map2[1];
|
18232 |
-
|
18233 |
-
var ratio = left / 100 * bounds.width / (top / 100 * bounds.height);
|
18234 |
-
|
18235 |
-
return calculateGradientDirection(Math.atan(isNaN(ratio) ? 1 : ratio) + Math.PI / 2, bounds);
|
18236 |
-
};
|
18237 |
-
|
18238 |
-
var findCorner = function findCorner(bounds, x, y, closest) {
|
18239 |
-
var corners = [{ x: 0, y: 0 }, { x: 0, y: bounds.height }, { x: bounds.width, y: 0 }, { x: bounds.width, y: bounds.height }];
|
18240 |
-
|
18241 |
-
// $FlowFixMe
|
18242 |
-
return corners.reduce(function (stat, corner) {
|
18243 |
-
var d = (0, _Util.distance)(x - corner.x, y - corner.y);
|
18244 |
-
if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {
|
18245 |
-
return {
|
18246 |
-
optimumCorner: corner,
|
18247 |
-
optimumDistance: d
|
18248 |
-
};
|
18249 |
-
}
|
18250 |
-
|
18251 |
-
return stat;
|
18252 |
-
}, {
|
18253 |
-
optimumDistance: closest ? Infinity : -Infinity,
|
18254 |
-
optimumCorner: null
|
18255 |
-
}).optimumCorner;
|
18256 |
-
};
|
18257 |
-
|
18258 |
-
var calculateRadius = function calculateRadius(extent, shape, center, radius, bounds) {
|
18259 |
-
var x = center.x;
|
18260 |
-
var y = center.y;
|
18261 |
-
var rx = 0;
|
18262 |
-
var ry = 0;
|
18263 |
-
|
18264 |
-
switch (extent) {
|
18265 |
-
case 'closest-side':
|
18266 |
-
// The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.
|
18267 |
-
// If the shape is an ellipse, it exactly meets the closest side in each dimension.
|
18268 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18269 |
-
rx = ry = Math.min(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
18270 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18271 |
-
rx = Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
18272 |
-
ry = Math.min(Math.abs(y), Math.abs(y - bounds.height));
|
18273 |
-
}
|
18274 |
-
break;
|
18275 |
-
|
18276 |
-
case 'closest-corner':
|
18277 |
-
// The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.
|
18278 |
-
// If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.
|
18279 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18280 |
-
rx = ry = Math.min((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
18281 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18282 |
-
// Compute the ratio ry/rx (which is to be the same as for "closest-side")
|
18283 |
-
var c = Math.min(Math.abs(y), Math.abs(y - bounds.height)) / Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
18284 |
-
var corner = findCorner(bounds, x, y, true);
|
18285 |
-
rx = (0, _Util.distance)(corner.x - x, (corner.y - y) / c);
|
18286 |
-
ry = c * rx;
|
18287 |
-
}
|
18288 |
-
break;
|
18289 |
-
|
18290 |
-
case 'farthest-side':
|
18291 |
-
// Same as closest-side, except the ending shape is sized based on the farthest side(s)
|
18292 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18293 |
-
rx = ry = Math.max(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
18294 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18295 |
-
rx = Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
18296 |
-
ry = Math.max(Math.abs(y), Math.abs(y - bounds.height));
|
18297 |
-
}
|
18298 |
-
break;
|
18299 |
-
|
18300 |
-
case 'farthest-corner':
|
18301 |
-
// Same as closest-corner, except the ending shape is sized based on the farthest corner.
|
18302 |
-
// If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.
|
18303 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18304 |
-
rx = ry = Math.max((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
18305 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18306 |
-
// Compute the ratio ry/rx (which is to be the same as for "farthest-side")
|
18307 |
-
var _c = Math.max(Math.abs(y), Math.abs(y - bounds.height)) / Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
18308 |
-
var _corner = findCorner(bounds, x, y, false);
|
18309 |
-
rx = (0, _Util.distance)(_corner.x - x, (_corner.y - y) / _c);
|
18310 |
-
ry = _c * rx;
|
18311 |
-
}
|
18312 |
-
break;
|
18313 |
-
|
18314 |
-
default:
|
18315 |
-
// pixel or percentage values
|
18316 |
-
rx = radius.x || 0;
|
18317 |
-
ry = radius.y !== undefined ? radius.y : rx;
|
18318 |
-
break;
|
18319 |
-
}
|
18320 |
-
|
18321 |
-
return {
|
18322 |
-
x: rx,
|
18323 |
-
y: ry
|
18324 |
-
};
|
18325 |
-
};
|
18326 |
-
|
18327 |
-
var transformWebkitRadialGradientArgs = exports.transformWebkitRadialGradientArgs = function transformWebkitRadialGradientArgs(args) {
|
18328 |
-
var shape = '';
|
18329 |
-
var radius = '';
|
18330 |
-
var extent = '';
|
18331 |
-
var position = '';
|
18332 |
-
var idx = 0;
|
18333 |
-
|
18334 |
-
var POSITION = /^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i;
|
18335 |
-
var SHAPE_AND_EXTENT = /^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i;
|
18336 |
-
var RADIUS = /^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i;
|
18337 |
-
|
18338 |
-
var matchStartPosition = args[idx].match(POSITION);
|
18339 |
-
if (matchStartPosition) {
|
18340 |
-
idx++;
|
18341 |
-
}
|
18342 |
-
|
18343 |
-
var matchShapeExtent = args[idx].match(SHAPE_AND_EXTENT);
|
18344 |
-
if (matchShapeExtent) {
|
18345 |
-
shape = matchShapeExtent[1] || '';
|
18346 |
-
extent = matchShapeExtent[2] || '';
|
18347 |
-
if (extent === 'contain') {
|
18348 |
-
extent = 'closest-side';
|
18349 |
-
} else if (extent === 'cover') {
|
18350 |
-
extent = 'farthest-corner';
|
18351 |
-
}
|
18352 |
-
idx++;
|
18353 |
-
}
|
18354 |
-
|
18355 |
-
var matchStartRadius = args[idx].match(RADIUS);
|
18356 |
-
if (matchStartRadius) {
|
18357 |
-
idx++;
|
18358 |
-
}
|
18359 |
-
|
18360 |
-
var matchEndPosition = args[idx].match(POSITION);
|
18361 |
-
if (matchEndPosition) {
|
18362 |
-
idx++;
|
18363 |
-
}
|
18364 |
-
|
18365 |
-
var matchEndRadius = args[idx].match(RADIUS);
|
18366 |
-
if (matchEndRadius) {
|
18367 |
-
idx++;
|
18368 |
-
}
|
18369 |
-
|
18370 |
-
var matchPosition = matchEndPosition || matchStartPosition;
|
18371 |
-
if (matchPosition && matchPosition[1]) {
|
18372 |
-
position = matchPosition[1] + (/^\d+$/.test(matchPosition[1]) ? 'px' : '');
|
18373 |
-
if (matchPosition[2]) {
|
18374 |
-
position += ' ' + matchPosition[2] + (/^\d+$/.test(matchPosition[2]) ? 'px' : '');
|
18375 |
-
}
|
18376 |
-
}
|
18377 |
-
|
18378 |
-
var matchRadius = matchEndRadius || matchStartRadius;
|
18379 |
-
if (matchRadius) {
|
18380 |
-
radius = matchRadius[0];
|
18381 |
-
if (!matchRadius[1]) {
|
18382 |
-
radius += 'px';
|
18383 |
-
}
|
18384 |
-
}
|
18385 |
-
|
18386 |
-
if (position && !shape && !radius && !extent) {
|
18387 |
-
radius = position;
|
18388 |
-
position = '';
|
18389 |
-
}
|
18390 |
-
|
18391 |
-
if (position) {
|
18392 |
-
position = 'at ' + position;
|
18393 |
-
}
|
18394 |
-
|
18395 |
-
return [[shape, extent, radius, position].filter(function (s) {
|
18396 |
-
return !!s;
|
18397 |
-
}).join(' ')].concat(args.slice(idx));
|
18398 |
-
};
|
18399 |
-
|
18400 |
-
var transformObsoleteColorStops = function transformObsoleteColorStops(args) {
|
18401 |
-
return args.map(function (color) {
|
18402 |
-
return color.match(FROM_TO_COLORSTOP);
|
18403 |
-
})
|
18404 |
-
// $FlowFixMe
|
18405 |
-
.map(function (v, index) {
|
18406 |
-
if (!v) {
|
18407 |
-
return args[index];
|
18408 |
-
}
|
18409 |
-
|
18410 |
-
switch (v[1]) {
|
18411 |
-
case 'from':
|
18412 |
-
return v[4] + ' 0%';
|
18413 |
-
case 'to':
|
18414 |
-
return v[4] + ' 100%';
|
18415 |
-
case 'color-stop':
|
18416 |
-
if (v[3] === '%') {
|
18417 |
-
return v[4] + ' ' + v[2];
|
18418 |
-
}
|
18419 |
-
return v[4] + ' ' + parseFloat(v[2]) * 100 + '%';
|
18420 |
-
}
|
18421 |
-
});
|
18422 |
-
};
|
18423 |
-
|
18424 |
-
/***/ }),
|
18425 |
-
/* 53 */
|
18426 |
-
/***/ (function(module, exports, __webpack_require__) {
|
18427 |
-
|
18428 |
-
"use strict";
|
18429 |
-
|
18430 |
-
|
18431 |
-
Object.defineProperty(exports, "__esModule", {
|
18432 |
-
value: true
|
18433 |
-
});
|
18434 |
-
var ANGLE = /([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;
|
18435 |
-
|
18436 |
-
var parseAngle = exports.parseAngle = function parseAngle(angle) {
|
18437 |
-
var match = angle.match(ANGLE);
|
18438 |
-
|
18439 |
-
if (match) {
|
18440 |
-
var value = parseFloat(match[1]);
|
18441 |
-
switch (match[2].toLowerCase()) {
|
18442 |
-
case 'deg':
|
18443 |
-
return Math.PI * value / 180;
|
18444 |
-
case 'grad':
|
18445 |
-
return Math.PI / 200 * value;
|
18446 |
-
case 'rad':
|
18447 |
-
return value;
|
18448 |
-
case 'turn':
|
18449 |
-
return Math.PI * 2 * value;
|
18450 |
-
}
|
18451 |
-
}
|
18452 |
-
|
18453 |
-
return null;
|
18454 |
-
};
|
18455 |
-
|
18456 |
-
/***/ }),
|
18457 |
-
/* 54 */
|
18458 |
-
/***/ (function(module, exports, __webpack_require__) {
|
18459 |
-
|
18460 |
-
"use strict";
|
18461 |
-
|
18462 |
-
|
18463 |
-
Object.defineProperty(exports, "__esModule", {
|
18464 |
-
value: true
|
18465 |
-
});
|
18466 |
-
exports.cloneWindow = exports.DocumentCloner = undefined;
|
18467 |
-
|
18468 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
18469 |
-
|
18470 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18471 |
-
|
18472 |
-
var _Bounds = __webpack_require__(1);
|
18473 |
-
|
18474 |
-
var _Proxy = __webpack_require__(26);
|
18475 |
-
|
18476 |
-
var _ResourceLoader = __webpack_require__(55);
|
18477 |
-
|
18478 |
-
var _ResourceLoader2 = _interopRequireDefault(_ResourceLoader);
|
18479 |
-
|
18480 |
-
var _Util = __webpack_require__(4);
|
18481 |
-
|
18482 |
-
var _background = __webpack_require__(5);
|
18483 |
-
|
18484 |
-
var _CanvasRenderer = __webpack_require__(15);
|
18485 |
-
|
18486 |
-
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
18487 |
-
|
18488 |
-
var _PseudoNodeContent = __webpack_require__(56);
|
18489 |
-
|
18490 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18491 |
-
|
18492 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18493 |
-
|
18494 |
-
var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';
|
18495 |
-
|
18496 |
-
var DocumentCloner = exports.DocumentCloner = function () {
|
18497 |
-
function DocumentCloner(element, options, logger, copyInline, renderer) {
|
18498 |
-
_classCallCheck(this, DocumentCloner);
|
18499 |
-
|
18500 |
-
this.referenceElement = element;
|
18501 |
-
this.scrolledElements = [];
|
18502 |
-
this.copyStyles = copyInline;
|
18503 |
-
this.inlineImages = copyInline;
|
18504 |
-
this.logger = logger;
|
18505 |
-
this.options = options;
|
18506 |
-
this.renderer = renderer;
|
18507 |
-
this.resourceLoader = new _ResourceLoader2.default(options, logger, window);
|
18508 |
-
this.pseudoContentData = {
|
18509 |
-
counters: {},
|
18510 |
-
quoteDepth: 0
|
18511 |
-
};
|
18512 |
-
// $FlowFixMe
|
18513 |
-
this.documentElement = this.cloneNode(element.ownerDocument.documentElement);
|
18514 |
-
}
|
18515 |
-
|
18516 |
-
_createClass(DocumentCloner, [{
|
18517 |
-
key: 'inlineAllImages',
|
18518 |
-
value: function inlineAllImages(node) {
|
18519 |
-
var _this = this;
|
18520 |
-
|
18521 |
-
if (this.inlineImages && node) {
|
18522 |
-
var style = node.style;
|
18523 |
-
Promise.all((0, _background.parseBackgroundImage)(style.backgroundImage).map(function (backgroundImage) {
|
18524 |
-
if (backgroundImage.method === 'url') {
|
18525 |
-
return _this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function (img) {
|
18526 |
-
return img && typeof img.src === 'string' ? 'url("' + img.src + '")' : 'none';
|
18527 |
-
}).catch(function (e) {
|
18528 |
-
if (true) {
|
18529 |
-
_this.logger.log('Unable to load image', e);
|
18530 |
-
}
|
18531 |
-
});
|
18532 |
-
}
|
18533 |
-
return Promise.resolve('' + backgroundImage.prefix + backgroundImage.method + '(' + backgroundImage.args.join(',') + ')');
|
18534 |
-
})).then(function (backgroundImages) {
|
18535 |
-
if (backgroundImages.length > 1) {
|
18536 |
-
// TODO Multiple backgrounds somehow broken in Chrome
|
18537 |
-
style.backgroundColor = '';
|
18538 |
-
}
|
18539 |
-
style.backgroundImage = backgroundImages.join(',');
|
18540 |
-
});
|
18541 |
-
|
18542 |
-
if (node instanceof HTMLImageElement) {
|
18543 |
-
this.resourceLoader.inlineImage(node.src).then(function (img) {
|
18544 |
-
if (img && node instanceof HTMLImageElement && node.parentNode) {
|
18545 |
-
var parentNode = node.parentNode;
|
18546 |
-
var clonedChild = (0, _Util.copyCSSStyles)(node.style, img.cloneNode(false));
|
18547 |
-
parentNode.replaceChild(clonedChild, node);
|
18548 |
-
}
|
18549 |
-
}).catch(function (e) {
|
18550 |
-
if (true) {
|
18551 |
-
_this.logger.log('Unable to load image', e);
|
18552 |
-
}
|
18553 |
-
});
|
18554 |
-
}
|
18555 |
-
}
|
18556 |
-
}
|
18557 |
-
}, {
|
18558 |
-
key: 'inlineFonts',
|
18559 |
-
value: function inlineFonts(document) {
|
18560 |
-
var _this2 = this;
|
18561 |
-
|
18562 |
-
return Promise.all(Array.from(document.styleSheets).map(function (sheet) {
|
18563 |
-
if (sheet.href) {
|
18564 |
-
return fetch(sheet.href).then(function (res) {
|
18565 |
-
return res.text();
|
18566 |
-
}).then(function (text) {
|
18567 |
-
return createStyleSheetFontsFromText(text, sheet.href);
|
18568 |
-
}).catch(function (e) {
|
18569 |
-
if (true) {
|
18570 |
-
_this2.logger.log('Unable to load stylesheet', e);
|
18571 |
-
}
|
18572 |
-
return [];
|
18573 |
-
});
|
18574 |
-
}
|
18575 |
-
return getSheetFonts(sheet, document);
|
18576 |
-
})).then(function (fonts) {
|
18577 |
-
return fonts.reduce(function (acc, font) {
|
18578 |
-
return acc.concat(font);
|
18579 |
-
}, []);
|
18580 |
-
}).then(function (fonts) {
|
18581 |
-
return Promise.all(fonts.map(function (font) {
|
18582 |
-
return fetch(font.formats[0].src).then(function (response) {
|
18583 |
-
return response.blob();
|
18584 |
-
}).then(function (blob) {
|
18585 |
-
return new Promise(function (resolve, reject) {
|
18586 |
-
var reader = new FileReader();
|
18587 |
-
reader.onerror = reject;
|
18588 |
-
reader.onload = function () {
|
18589 |
-
// $FlowFixMe
|
18590 |
-
var result = reader.result;
|
18591 |
-
resolve(result);
|
18592 |
-
};
|
18593 |
-
reader.readAsDataURL(blob);
|
18594 |
-
});
|
18595 |
-
}).then(function (dataUri) {
|
18596 |
-
font.fontFace.setProperty('src', 'url("' + dataUri + '")');
|
18597 |
-
return '@font-face {' + font.fontFace.cssText + ' ';
|
18598 |
-
});
|
18599 |
-
}));
|
18600 |
-
}).then(function (fontCss) {
|
18601 |
-
var style = document.createElement('style');
|
18602 |
-
style.textContent = fontCss.join('\n');
|
18603 |
-
_this2.documentElement.appendChild(style);
|
18604 |
-
});
|
18605 |
-
}
|
18606 |
-
}, {
|
18607 |
-
key: 'createElementClone',
|
18608 |
-
value: function createElementClone(node) {
|
18609 |
-
var _this3 = this;
|
18610 |
-
|
18611 |
-
if (this.copyStyles && node instanceof HTMLCanvasElement) {
|
18612 |
-
var img = node.ownerDocument.createElement('img');
|
18613 |
-
try {
|
18614 |
-
img.src = node.toDataURL();
|
18615 |
-
return img;
|
18616 |
-
} catch (e) {
|
18617 |
-
if (true) {
|
18618 |
-
this.logger.log('Unable to clone canvas contents, canvas is tainted');
|
18619 |
-
}
|
18620 |
-
}
|
18621 |
-
}
|
18622 |
-
|
18623 |
-
if (node instanceof HTMLIFrameElement) {
|
18624 |
-
var tempIframe = node.cloneNode(false);
|
18625 |
-
var iframeKey = generateIframeKey();
|
18626 |
-
tempIframe.setAttribute('data-html2canvas-internal-iframe-key', iframeKey);
|
18627 |
-
|
18628 |
-
var _parseBounds = (0, _Bounds.parseBounds)(node, 0, 0),
|
18629 |
-
width = _parseBounds.width,
|
18630 |
-
height = _parseBounds.height;
|
18631 |
-
|
18632 |
-
this.resourceLoader.cache[iframeKey] = getIframeDocumentElement(node, this.options).then(function (documentElement) {
|
18633 |
-
return _this3.renderer(documentElement, {
|
18634 |
-
async: _this3.options.async,
|
18635 |
-
allowTaint: _this3.options.allowTaint,
|
18636 |
-
backgroundColor: '#ffffff',
|
18637 |
-
canvas: null,
|
18638 |
-
imageTimeout: _this3.options.imageTimeout,
|
18639 |
-
logging: _this3.options.logging,
|
18640 |
-
proxy: _this3.options.proxy,
|
18641 |
-
removeContainer: _this3.options.removeContainer,
|
18642 |
-
scale: _this3.options.scale,
|
18643 |
-
foreignObjectRendering: _this3.options.foreignObjectRendering,
|
18644 |
-
useCORS: _this3.options.useCORS,
|
18645 |
-
target: new _CanvasRenderer2.default(),
|
18646 |
-
width: width,
|
18647 |
-
height: height,
|
18648 |
-
x: 0,
|
18649 |
-
y: 0,
|
18650 |
-
windowWidth: documentElement.ownerDocument.defaultView.innerWidth,
|
18651 |
-
windowHeight: documentElement.ownerDocument.defaultView.innerHeight,
|
18652 |
-
scrollX: documentElement.ownerDocument.defaultView.pageXOffset,
|
18653 |
-
scrollY: documentElement.ownerDocument.defaultView.pageYOffset
|
18654 |
-
}, _this3.logger.child(iframeKey));
|
18655 |
-
}).then(function (canvas) {
|
18656 |
-
return new Promise(function (resolve, reject) {
|
18657 |
-
var iframeCanvas = document.createElement('img');
|
18658 |
-
iframeCanvas.onload = function () {
|
18659 |
-
return resolve(canvas);
|
18660 |
-
};
|
18661 |
-
iframeCanvas.onerror = reject;
|
18662 |
-
iframeCanvas.src = canvas.toDataURL();
|
18663 |
-
if (tempIframe.parentNode) {
|
18664 |
-
tempIframe.parentNode.replaceChild((0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node), iframeCanvas), tempIframe);
|
18665 |
-
}
|
18666 |
-
});
|
18667 |
-
});
|
18668 |
-
return tempIframe;
|
18669 |
-
}
|
18670 |
-
|
18671 |
-
if (node instanceof HTMLStyleElement && node.sheet && node.sheet.cssRules) {
|
18672 |
-
var css = [].slice.call(node.sheet.cssRules, 0).reduce(function (css, rule) {
|
18673 |
-
return css + rule.cssText;
|
18674 |
-
}, '');
|
18675 |
-
var style = node.cloneNode(false);
|
18676 |
-
style.textContent = css;
|
18677 |
-
return style;
|
18678 |
-
}
|
18679 |
-
|
18680 |
-
return node.cloneNode(false);
|
18681 |
-
}
|
18682 |
-
}, {
|
18683 |
-
key: 'cloneNode',
|
18684 |
-
value: function cloneNode(node) {
|
18685 |
-
var clone = node.nodeType === Node.TEXT_NODE ? document.createTextNode(node.nodeValue) : this.createElementClone(node);
|
18686 |
-
|
18687 |
-
var window = node.ownerDocument.defaultView;
|
18688 |
-
var style = node instanceof window.HTMLElement ? window.getComputedStyle(node) : null;
|
18689 |
-
var styleBefore = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':before') : null;
|
18690 |
-
var styleAfter = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':after') : null;
|
18691 |
-
|
18692 |
-
if (this.referenceElement === node && clone instanceof window.HTMLElement) {
|
18693 |
-
this.clonedReferenceElement = clone;
|
18694 |
-
}
|
18695 |
-
|
18696 |
-
if (clone instanceof window.HTMLBodyElement) {
|
18697 |
-
createPseudoHideStyles(clone);
|
18698 |
-
}
|
18699 |
-
|
18700 |
-
var counters = (0, _PseudoNodeContent.parseCounterReset)(style, this.pseudoContentData);
|
18701 |
-
var contentBefore = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleBefore, this.pseudoContentData);
|
18702 |
-
|
18703 |
-
for (var child = node.firstChild; child; child = child.nextSibling) {
|
18704 |
-
if (child.nodeType !== Node.ELEMENT_NODE || child.nodeName !== 'SCRIPT' &&
|
18705 |
-
// $FlowFixMe
|
18706 |
-
!child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== 'function' ||
|
18707 |
-
// $FlowFixMe
|
18708 |
-
!this.options.ignoreElements(child))) {
|
18709 |
-
if (!this.copyStyles || child.nodeName !== 'STYLE') {
|
18710 |
-
clone.appendChild(this.cloneNode(child));
|
18711 |
-
}
|
18712 |
-
}
|
18713 |
-
}
|
18714 |
-
|
18715 |
-
var contentAfter = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleAfter, this.pseudoContentData);
|
18716 |
-
(0, _PseudoNodeContent.popCounters)(counters, this.pseudoContentData);
|
18717 |
-
|
18718 |
-
if (node instanceof window.HTMLElement && clone instanceof window.HTMLElement) {
|
18719 |
-
if (styleBefore) {
|
18720 |
-
this.inlineAllImages(inlinePseudoElement(node, clone, styleBefore, contentBefore, PSEUDO_BEFORE));
|
18721 |
-
}
|
18722 |
-
if (styleAfter) {
|
18723 |
-
this.inlineAllImages(inlinePseudoElement(node, clone, styleAfter, contentAfter, PSEUDO_AFTER));
|
18724 |
-
}
|
18725 |
-
if (style && this.copyStyles && !(node instanceof HTMLIFrameElement)) {
|
18726 |
-
(0, _Util.copyCSSStyles)(style, clone);
|
18727 |
-
}
|
18728 |
-
this.inlineAllImages(clone);
|
18729 |
-
if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
|
18730 |
-
this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);
|
18731 |
-
}
|
18732 |
-
switch (node.nodeName) {
|
18733 |
-
case 'CANVAS':
|
18734 |
-
if (!this.copyStyles) {
|
18735 |
-
cloneCanvasContents(node, clone);
|
18736 |
-
}
|
18737 |
-
break;
|
18738 |
-
case 'TEXTAREA':
|
18739 |
-
case 'SELECT':
|
18740 |
-
clone.value = node.value;
|
18741 |
-
break;
|
18742 |
-
}
|
18743 |
-
}
|
18744 |
-
return clone;
|
18745 |
-
}
|
18746 |
-
}]);
|
18747 |
-
|
18748 |
-
return DocumentCloner;
|
18749 |
-
}();
|
18750 |
-
|
18751 |
-
var getSheetFonts = function getSheetFonts(sheet, document) {
|
18752 |
-
// $FlowFixMe
|
18753 |
-
return (sheet.cssRules ? Array.from(sheet.cssRules) : []).filter(function (rule) {
|
18754 |
-
return rule.type === CSSRule.FONT_FACE_RULE;
|
18755 |
-
}).map(function (rule) {
|
18756 |
-
var src = (0, _background.parseBackgroundImage)(rule.style.getPropertyValue('src'));
|
18757 |
-
var formats = [];
|
18758 |
-
for (var i = 0; i < src.length; i++) {
|
18759 |
-
if (src[i].method === 'url' && src[i + 1] && src[i + 1].method === 'format') {
|
18760 |
-
var a = document.createElement('a');
|
18761 |
-
a.href = src[i].args[0];
|
18762 |
-
if (document.body) {
|
18763 |
-
document.body.appendChild(a);
|
18764 |
-
}
|
18765 |
-
|
18766 |
-
var font = {
|
18767 |
-
src: a.href,
|
18768 |
-
format: src[i + 1].args[0]
|
18769 |
-
};
|
18770 |
-
formats.push(font);
|
18771 |
-
}
|
18772 |
-
}
|
18773 |
-
|
18774 |
-
return {
|
18775 |
-
// TODO select correct format for browser),
|
18776 |
-
|
18777 |
-
formats: formats.filter(function (font) {
|
18778 |
-
return (/^woff/i.test(font.format)
|
18779 |
-
);
|
18780 |
-
}),
|
18781 |
-
fontFace: rule.style
|
18782 |
-
};
|
18783 |
-
}).filter(function (font) {
|
18784 |
-
return font.formats.length;
|
18785 |
-
});
|
18786 |
-
};
|
18787 |
-
|
18788 |
-
var createStyleSheetFontsFromText = function createStyleSheetFontsFromText(text, baseHref) {
|
18789 |
-
var doc = document.implementation.createHTMLDocument('');
|
18790 |
-
var base = document.createElement('base');
|
18791 |
-
// $FlowFixMe
|
18792 |
-
base.href = baseHref;
|
18793 |
-
var style = document.createElement('style');
|
18794 |
-
|
18795 |
-
style.textContent = text;
|
18796 |
-
if (doc.head) {
|
18797 |
-
doc.head.appendChild(base);
|
18798 |
-
}
|
18799 |
-
if (doc.body) {
|
18800 |
-
doc.body.appendChild(style);
|
18801 |
-
}
|
18802 |
-
|
18803 |
-
return style.sheet ? getSheetFonts(style.sheet, doc) : [];
|
18804 |
-
};
|
18805 |
-
|
18806 |
-
var restoreOwnerScroll = function restoreOwnerScroll(ownerDocument, x, y) {
|
18807 |
-
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
18808 |
-
ownerDocument.defaultView.scrollTo(x, y);
|
18809 |
-
}
|
18810 |
-
};
|
18811 |
-
|
18812 |
-
var cloneCanvasContents = function cloneCanvasContents(canvas, clonedCanvas) {
|
18813 |
-
try {
|
18814 |
-
if (clonedCanvas) {
|
18815 |
-
clonedCanvas.width = canvas.width;
|
18816 |
-
clonedCanvas.height = canvas.height;
|
18817 |
-
var ctx = canvas.getContext('2d');
|
18818 |
-
var clonedCtx = clonedCanvas.getContext('2d');
|
18819 |
-
if (ctx) {
|
18820 |
-
clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
18821 |
-
} else {
|
18822 |
-
clonedCtx.drawImage(canvas, 0, 0);
|
18823 |
-
}
|
18824 |
-
}
|
18825 |
-
} catch (e) {}
|
18826 |
-
};
|
18827 |
-
|
18828 |
-
var inlinePseudoElement = function inlinePseudoElement(node, clone, style, contentItems, pseudoElt) {
|
18829 |
-
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
18830 |
-
return;
|
18831 |
-
}
|
18832 |
-
|
18833 |
-
var anonymousReplacedElement = clone.ownerDocument.createElement('html2canvaspseudoelement');
|
18834 |
-
(0, _Util.copyCSSStyles)(style, anonymousReplacedElement);
|
18835 |
-
|
18836 |
-
if (contentItems) {
|
18837 |
-
var len = contentItems.length;
|
18838 |
-
for (var i = 0; i < len; i++) {
|
18839 |
-
var item = contentItems[i];
|
18840 |
-
switch (item.type) {
|
18841 |
-
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:
|
18842 |
-
var img = clone.ownerDocument.createElement('img');
|
18843 |
-
img.src = (0, _background.parseBackgroundImage)('url(' + item.value + ')')[0].args[0];
|
18844 |
-
img.style.opacity = '1';
|
18845 |
-
anonymousReplacedElement.appendChild(img);
|
18846 |
-
break;
|
18847 |
-
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:
|
18848 |
-
anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value));
|
18849 |
-
break;
|
18850 |
-
}
|
18851 |
-
}
|
18852 |
-
}
|
18853 |
-
|
18854 |
-
anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
18855 |
-
clone.className += pseudoElt === PSEUDO_BEFORE ? ' ' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
18856 |
-
if (pseudoElt === PSEUDO_BEFORE) {
|
18857 |
-
clone.insertBefore(anonymousReplacedElement, clone.firstChild);
|
18858 |
-
} else {
|
18859 |
-
clone.appendChild(anonymousReplacedElement);
|
18860 |
-
}
|
18861 |
-
|
18862 |
-
return anonymousReplacedElement;
|
18863 |
-
};
|
18864 |
-
|
18865 |
-
var URL_REGEXP = /^url\((.+)\)$/i;
|
18866 |
-
var PSEUDO_BEFORE = ':before';
|
18867 |
-
var PSEUDO_AFTER = ':after';
|
18868 |
-
var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';
|
18869 |
-
var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';
|
18870 |
-
|
18871 |
-
var PSEUDO_HIDE_ELEMENT_STYLE = '{\n content: "" !important;\n display: none !important;\n}';
|
18872 |
-
|
18873 |
-
var createPseudoHideStyles = function createPseudoHideStyles(body) {
|
18874 |
-
createStyles(body, '.' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + '\n .' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
|
18875 |
-
};
|
18876 |
-
|
18877 |
-
var createStyles = function createStyles(body, styles) {
|
18878 |
-
var style = body.ownerDocument.createElement('style');
|
18879 |
-
style.innerHTML = styles;
|
18880 |
-
body.appendChild(style);
|
18881 |
-
};
|
18882 |
-
|
18883 |
-
var initNode = function initNode(_ref) {
|
18884 |
-
var _ref2 = _slicedToArray(_ref, 3),
|
18885 |
-
element = _ref2[0],
|
18886 |
-
x = _ref2[1],
|
18887 |
-
y = _ref2[2];
|
18888 |
-
|
18889 |
-
element.scrollLeft = x;
|
18890 |
-
element.scrollTop = y;
|
18891 |
-
};
|
18892 |
-
|
18893 |
-
var generateIframeKey = function generateIframeKey() {
|
18894 |
-
return Math.ceil(Date.now() + Math.random() * 10000000).toString(16);
|
18895 |
-
};
|
18896 |
-
|
18897 |
-
var DATA_URI_REGEXP = /^data:text\/(.+);(base64)?,(.*)$/i;
|
18898 |
-
|
18899 |
-
var getIframeDocumentElement = function getIframeDocumentElement(node, options) {
|
18900 |
-
try {
|
18901 |
-
return Promise.resolve(node.contentWindow.document.documentElement);
|
18902 |
-
} catch (e) {
|
18903 |
-
return options.proxy ? (0, _Proxy.Proxy)(node.src, options).then(function (html) {
|
18904 |
-
var match = html.match(DATA_URI_REGEXP);
|
18905 |
-
if (!match) {
|
18906 |
-
return Promise.reject();
|
18907 |
-
}
|
18908 |
-
|
18909 |
-
return match[2] === 'base64' ? window.atob(decodeURIComponent(match[3])) : decodeURIComponent(match[3]);
|
18910 |
-
}).then(function (html) {
|
18911 |
-
return createIframeContainer(node.ownerDocument, (0, _Bounds.parseBounds)(node, 0, 0)).then(function (cloneIframeContainer) {
|
18912 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
18913 |
-
var documentClone = cloneWindow.document;
|
18914 |
-
|
18915 |
-
documentClone.open();
|
18916 |
-
documentClone.write(html);
|
18917 |
-
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
18918 |
-
return documentClone.documentElement;
|
18919 |
-
});
|
18920 |
-
|
18921 |
-
documentClone.close();
|
18922 |
-
return iframeLoad;
|
18923 |
-
});
|
18924 |
-
}) : Promise.reject();
|
18925 |
-
}
|
18926 |
-
};
|
18927 |
-
|
18928 |
-
var createIframeContainer = function createIframeContainer(ownerDocument, bounds) {
|
18929 |
-
var cloneIframeContainer = ownerDocument.createElement('iframe');
|
18930 |
-
|
18931 |
-
cloneIframeContainer.className = 'html2canvas-container';
|
18932 |
-
cloneIframeContainer.style.visibility = 'hidden';
|
18933 |
-
cloneIframeContainer.style.position = 'fixed';
|
18934 |
-
cloneIframeContainer.style.left = '-10000px';
|
18935 |
-
cloneIframeContainer.style.top = '0px';
|
18936 |
-
cloneIframeContainer.style.border = '0';
|
18937 |
-
cloneIframeContainer.width = bounds.width.toString();
|
18938 |
-
cloneIframeContainer.height = bounds.height.toString();
|
18939 |
-
cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
|
18940 |
-
cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
|
18941 |
-
if (!ownerDocument.body) {
|
18942 |
-
return Promise.reject( true ? 'Body element not found in Document that is getting rendered' : '');
|
18943 |
-
}
|
18944 |
-
|
18945 |
-
ownerDocument.body.appendChild(cloneIframeContainer);
|
18946 |
-
|
18947 |
-
return Promise.resolve(cloneIframeContainer);
|
18948 |
-
};
|
18949 |
-
|
18950 |
-
var iframeLoader = function iframeLoader(cloneIframeContainer) {
|
18951 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
18952 |
-
var documentClone = cloneWindow.document;
|
18953 |
-
|
18954 |
-
return new Promise(function (resolve, reject) {
|
18955 |
-
cloneWindow.onload = cloneIframeContainer.onload = documentClone.onreadystatechange = function () {
|
18956 |
-
var interval = setInterval(function () {
|
18957 |
-
if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
|
18958 |
-
clearInterval(interval);
|
18959 |
-
resolve(cloneIframeContainer);
|
18960 |
-
}
|
18961 |
-
}, 50);
|
18962 |
-
};
|
18963 |
-
});
|
18964 |
-
};
|
18965 |
-
|
18966 |
-
var cloneWindow = exports.cloneWindow = function cloneWindow(ownerDocument, bounds, referenceElement, options, logger, renderer) {
|
18967 |
-
var cloner = new DocumentCloner(referenceElement, options, logger, false, renderer);
|
18968 |
-
var scrollX = ownerDocument.defaultView.pageXOffset;
|
18969 |
-
var scrollY = ownerDocument.defaultView.pageYOffset;
|
18970 |
-
|
18971 |
-
return createIframeContainer(ownerDocument, bounds).then(function (cloneIframeContainer) {
|
18972 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
18973 |
-
var documentClone = cloneWindow.document;
|
18974 |
-
|
18975 |
-
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
18976 |
-
if window url is about:blank, we can assign the url to current by writing onto the document
|
18977 |
-
*/
|
18978 |
-
|
18979 |
-
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
18980 |
-
cloner.scrolledElements.forEach(initNode);
|
18981 |
-
cloneWindow.scrollTo(bounds.left, bounds.top);
|
18982 |
-
if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== bounds.top || cloneWindow.scrollX !== bounds.left)) {
|
18983 |
-
documentClone.documentElement.style.top = -bounds.top + 'px';
|
18984 |
-
documentClone.documentElement.style.left = -bounds.left + 'px';
|
18985 |
-
documentClone.documentElement.style.position = 'absolute';
|
18986 |
-
}
|
18987 |
-
|
18988 |
-
var result = Promise.resolve([cloneIframeContainer, cloner.clonedReferenceElement, cloner.resourceLoader]);
|
18989 |
-
|
18990 |
-
var onclone = options.onclone;
|
18991 |
-
|
18992 |
-
return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement || cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement || cloner.clonedReferenceElement instanceof HTMLElement ? typeof onclone === 'function' ? Promise.resolve().then(function () {
|
18993 |
-
return onclone(documentClone);
|
18994 |
-
}).then(function () {
|
18995 |
-
return result;
|
18996 |
-
}) : result : Promise.reject( true ? 'Error finding the ' + referenceElement.nodeName + ' in the cloned document' : '');
|
18997 |
-
});
|
18998 |
-
|
18999 |
-
documentClone.open();
|
19000 |
-
documentClone.write(serializeDoctype(document.doctype) + '<html></html>');
|
19001 |
-
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
19002 |
-
restoreOwnerScroll(referenceElement.ownerDocument, scrollX, scrollY);
|
19003 |
-
documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement), documentClone.documentElement);
|
19004 |
-
documentClone.close();
|
19005 |
-
|
19006 |
-
return iframeLoad;
|
19007 |
-
});
|
19008 |
-
};
|
19009 |
-
|
19010 |
-
var serializeDoctype = function serializeDoctype(doctype) {
|
19011 |
-
var str = '';
|
19012 |
-
if (doctype) {
|
19013 |
-
str += '<!DOCTYPE ';
|
19014 |
-
if (doctype.name) {
|
19015 |
-
str += doctype.name;
|
19016 |
-
}
|
19017 |
-
|
19018 |
-
if (doctype.internalSubset) {
|
19019 |
-
str += doctype.internalSubset;
|
19020 |
-
}
|
19021 |
-
|
19022 |
-
if (doctype.publicId) {
|
19023 |
-
str += '"' + doctype.publicId + '"';
|
19024 |
-
}
|
19025 |
-
|
19026 |
-
if (doctype.systemId) {
|
19027 |
-
str += '"' + doctype.systemId + '"';
|
19028 |
-
}
|
19029 |
-
|
19030 |
-
str += '>';
|
19031 |
-
}
|
19032 |
-
|
19033 |
-
return str;
|
19034 |
-
};
|
19035 |
-
|
19036 |
-
/***/ }),
|
19037 |
-
/* 55 */
|
19038 |
-
/***/ (function(module, exports, __webpack_require__) {
|
19039 |
-
|
19040 |
-
"use strict";
|
19041 |
-
|
19042 |
-
|
19043 |
-
Object.defineProperty(exports, "__esModule", {
|
19044 |
-
value: true
|
19045 |
-
});
|
19046 |
-
exports.ResourceStore = undefined;
|
19047 |
-
|
19048 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
19049 |
-
|
19050 |
-
var _Feature = __webpack_require__(10);
|
19051 |
-
|
19052 |
-
var _Feature2 = _interopRequireDefault(_Feature);
|
19053 |
-
|
19054 |
-
var _Proxy = __webpack_require__(26);
|
19055 |
-
|
19056 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19057 |
-
|
19058 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
19059 |
-
|
19060 |
-
var ResourceLoader = function () {
|
19061 |
-
function ResourceLoader(options, logger, window) {
|
19062 |
-
_classCallCheck(this, ResourceLoader);
|
19063 |
-
|
19064 |
-
this.options = options;
|
19065 |
-
this._window = window;
|
19066 |
-
this.origin = this.getOrigin(window.location.href);
|
19067 |
-
this.cache = {};
|
19068 |
-
this.logger = logger;
|
19069 |
-
this._index = 0;
|
19070 |
-
}
|
19071 |
-
|
19072 |
-
_createClass(ResourceLoader, [{
|
19073 |
-
key: 'loadImage',
|
19074 |
-
value: function loadImage(src) {
|
19075 |
-
var _this = this;
|
19076 |
-
|
19077 |
-
if (this.hasResourceInCache(src)) {
|
19078 |
-
return src;
|
19079 |
-
}
|
19080 |
-
|
19081 |
-
if (!isSVG(src) || _Feature2.default.SUPPORT_SVG_DRAWING) {
|
19082 |
-
if (this.options.allowTaint === true || isInlineImage(src) || this.isSameOrigin(src)) {
|
19083 |
-
return this.addImage(src, src, false);
|
19084 |
-
} else if (!this.isSameOrigin(src)) {
|
19085 |
-
if (typeof this.options.proxy === 'string') {
|
19086 |
-
this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
19087 |
-
return _loadImage(src, _this.options.imageTimeout || 0);
|
19088 |
-
});
|
19089 |
-
return src;
|
19090 |
-
} else if (this.options.useCORS === true && _Feature2.default.SUPPORT_CORS_IMAGES) {
|
19091 |
-
return this.addImage(src, src, true);
|
19092 |
-
}
|
19093 |
-
}
|
19094 |
-
}
|
19095 |
-
}
|
19096 |
-
}, {
|
19097 |
-
key: 'inlineImage',
|
19098 |
-
value: function inlineImage(src) {
|
19099 |
-
var _this2 = this;
|
19100 |
-
|
19101 |
-
if (isInlineImage(src)) {
|
19102 |
-
return _loadImage(src, this.options.imageTimeout || 0);
|
19103 |
-
}
|
19104 |
-
if (this.hasResourceInCache(src)) {
|
19105 |
-
return this.cache[src];
|
19106 |
-
}
|
19107 |
-
if (!this.isSameOrigin(src) && typeof this.options.proxy === 'string') {
|
19108 |
-
return this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
19109 |
-
return _loadImage(src, _this2.options.imageTimeout || 0);
|
19110 |
-
});
|
19111 |
-
}
|
19112 |
-
|
19113 |
-
return this.xhrImage(src);
|
19114 |
-
}
|
19115 |
-
}, {
|
19116 |
-
key: 'xhrImage',
|
19117 |
-
value: function xhrImage(src) {
|
19118 |
-
var _this3 = this;
|
19119 |
-
|
19120 |
-
this.cache[src] = new Promise(function (resolve, reject) {
|
19121 |
-
var xhr = new XMLHttpRequest();
|
19122 |
-
xhr.onreadystatechange = function () {
|
19123 |
-
if (xhr.readyState === 4) {
|
19124 |
-
if (xhr.status !== 200) {
|
19125 |
-
reject('Failed to fetch image ' + src.substring(0, 256) + ' with status code ' + xhr.status);
|
19126 |
-
} else {
|
19127 |
-
var reader = new FileReader();
|
19128 |
-
reader.addEventListener('load', function () {
|
19129 |
-
// $FlowFixMe
|
19130 |
-
var result = reader.result;
|
19131 |
-
resolve(result);
|
19132 |
-
}, false);
|
19133 |
-
reader.addEventListener('error', function (e) {
|
19134 |
-
return reject(e);
|
19135 |
-
}, false);
|
19136 |
-
reader.readAsDataURL(xhr.response);
|
19137 |
-
}
|
19138 |
-
}
|
19139 |
-
};
|
19140 |
-
xhr.responseType = 'blob';
|
19141 |
-
if (_this3.options.imageTimeout) {
|
19142 |
-
var timeout = _this3.options.imageTimeout;
|
19143 |
-
xhr.timeout = timeout;
|
19144 |
-
xhr.ontimeout = function () {
|
19145 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
19146 |
-
};
|
19147 |
-
}
|
19148 |
-
xhr.open('GET', src, true);
|
19149 |
-
xhr.send();
|
19150 |
-
}).then(function (src) {
|
19151 |
-
return _loadImage(src, _this3.options.imageTimeout || 0);
|
19152 |
-
});
|
19153 |
-
|
19154 |
-
return this.cache[src];
|
19155 |
-
}
|
19156 |
-
}, {
|
19157 |
-
key: 'loadCanvas',
|
19158 |
-
value: function loadCanvas(node) {
|
19159 |
-
var key = String(this._index++);
|
19160 |
-
this.cache[key] = Promise.resolve(node);
|
19161 |
-
return key;
|
19162 |
-
}
|
19163 |
-
}, {
|
19164 |
-
key: 'hasResourceInCache',
|
19165 |
-
value: function hasResourceInCache(key) {
|
19166 |
-
return typeof this.cache[key] !== 'undefined';
|
19167 |
-
}
|
19168 |
-
}, {
|
19169 |
-
key: 'addImage',
|
19170 |
-
value: function addImage(key, src, useCORS) {
|
19171 |
-
var _this4 = this;
|
19172 |
-
|
19173 |
-
if (true) {
|
19174 |
-
this.logger.log('Added image ' + key.substring(0, 256));
|
19175 |
-
}
|
19176 |
-
|
19177 |
-
var imageLoadHandler = function imageLoadHandler(supportsDataImages) {
|
19178 |
-
return new Promise(function (resolve, reject) {
|
19179 |
-
var img = new Image();
|
19180 |
-
img.onload = function () {
|
19181 |
-
return resolve(img);
|
19182 |
-
};
|
19183 |
-
//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
|
19184 |
-
if (!supportsDataImages || useCORS) {
|
19185 |
-
img.crossOrigin = 'anonymous';
|
19186 |
-
}
|
19187 |
-
|
19188 |
-
img.onerror = reject;
|
19189 |
-
img.src = src;
|
19190 |
-
if (img.complete === true) {
|
19191 |
-
// Inline XML images may fail to parse, throwing an Error later on
|
19192 |
-
setTimeout(function () {
|
19193 |
-
resolve(img);
|
19194 |
-
}, 500);
|
19195 |
-
}
|
19196 |
-
if (_this4.options.imageTimeout) {
|
19197 |
-
var timeout = _this4.options.imageTimeout;
|
19198 |
-
setTimeout(function () {
|
19199 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
19200 |
-
}, timeout);
|
19201 |
-
}
|
19202 |
-
});
|
19203 |
-
};
|
19204 |
-
|
19205 |
-
this.cache[key] = isInlineBase64Image(src) && !isSVG(src) ? // $FlowFixMe
|
19206 |
-
_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler) : imageLoadHandler(true);
|
19207 |
-
return key;
|
19208 |
-
}
|
19209 |
-
}, {
|
19210 |
-
key: 'isSameOrigin',
|
19211 |
-
value: function isSameOrigin(url) {
|
19212 |
-
return this.getOrigin(url) === this.origin;
|
19213 |
-
}
|
19214 |
-
}, {
|
19215 |
-
key: 'getOrigin',
|
19216 |
-
value: function getOrigin(url) {
|
19217 |
-
var link = this._link || (this._link = this._window.document.createElement('a'));
|
19218 |
-
link.href = url;
|
19219 |
-
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
19220 |
-
return link.protocol + link.hostname + link.port;
|
19221 |
-
}
|
19222 |
-
}, {
|
19223 |
-
key: 'ready',
|
19224 |
-
value: function ready() {
|
19225 |
-
var _this5 = this;
|
19226 |
-
|
19227 |
-
var keys = Object.keys(this.cache);
|
19228 |
-
var values = keys.map(function (str) {
|
19229 |
-
return _this5.cache[str].catch(function (e) {
|
19230 |
-
if (true) {
|
19231 |
-
_this5.logger.log('Unable to load image', e);
|
19232 |
-
}
|
19233 |
-
return null;
|
19234 |
-
});
|
19235 |
-
});
|
19236 |
-
return Promise.all(values).then(function (images) {
|
19237 |
-
if (true) {
|
19238 |
-
_this5.logger.log('Finished loading ' + images.length + ' images', images);
|
19239 |
-
}
|
19240 |
-
return new ResourceStore(keys, images);
|
19241 |
-
});
|
19242 |
-
}
|
19243 |
-
}]);
|
19244 |
-
|
19245 |
-
return ResourceLoader;
|
19246 |
-
}();
|
19247 |
-
|
19248 |
-
exports.default = ResourceLoader;
|
19249 |
-
|
19250 |
-
var ResourceStore = exports.ResourceStore = function () {
|
19251 |
-
function ResourceStore(keys, resources) {
|
19252 |
-
_classCallCheck(this, ResourceStore);
|
19253 |
-
|
19254 |
-
this._keys = keys;
|
19255 |
-
this._resources = resources;
|
19256 |
-
}
|
19257 |
-
|
19258 |
-
_createClass(ResourceStore, [{
|
19259 |
-
key: 'get',
|
19260 |
-
value: function get(key) {
|
19261 |
-
var index = this._keys.indexOf(key);
|
19262 |
-
return index === -1 ? null : this._resources[index];
|
19263 |
-
}
|
19264 |
-
}]);
|
19265 |
-
|
19266 |
-
return ResourceStore;
|
19267 |
-
}();
|
19268 |
-
|
19269 |
-
var INLINE_SVG = /^data:image\/svg\+xml/i;
|
19270 |
-
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
|
19271 |
-
var INLINE_IMG = /^data:image\/.*/i;
|
19272 |
-
|
19273 |
-
var isInlineImage = function isInlineImage(src) {
|
19274 |
-
return INLINE_IMG.test(src);
|
19275 |
-
};
|
19276 |
-
var isInlineBase64Image = function isInlineBase64Image(src) {
|
19277 |
-
return INLINE_BASE64.test(src);
|
19278 |
-
};
|
19279 |
-
|
19280 |
-
var isSVG = function isSVG(src) {
|
19281 |
-
return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);
|
19282 |
-
};
|
19283 |
-
|
19284 |
-
var _loadImage = function _loadImage(src, timeout) {
|
19285 |
-
return new Promise(function (resolve, reject) {
|
19286 |
-
var img = new Image();
|
19287 |
-
img.onload = function () {
|
19288 |
-
return resolve(img);
|
19289 |
-
};
|
19290 |
-
img.onerror = reject;
|
19291 |
-
img.src = src;
|
19292 |
-
if (img.complete === true) {
|
19293 |
-
// Inline XML images may fail to parse, throwing an Error later on
|
19294 |
-
setTimeout(function () {
|
19295 |
-
resolve(img);
|
19296 |
-
}, 500);
|
19297 |
-
}
|
19298 |
-
if (timeout) {
|
19299 |
-
setTimeout(function () {
|
19300 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) loading image' : '');
|
19301 |
-
}, timeout);
|
19302 |
-
}
|
19303 |
-
});
|
19304 |
-
};
|
19305 |
-
|
19306 |
-
/***/ }),
|
19307 |
-
/* 56 */
|
19308 |
-
/***/ (function(module, exports, __webpack_require__) {
|
19309 |
-
|
19310 |
-
"use strict";
|
19311 |
-
|
19312 |
-
|
19313 |
-
Object.defineProperty(exports, "__esModule", {
|
19314 |
-
value: true
|
19315 |
-
});
|
19316 |
-
exports.parseContent = exports.resolvePseudoContent = exports.popCounters = exports.parseCounterReset = exports.TOKEN_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = undefined;
|
19317 |
-
|
19318 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
19319 |
-
|
19320 |
-
var _ListItem = __webpack_require__(14);
|
19321 |
-
|
19322 |
-
var _listStyle = __webpack_require__(8);
|
19323 |
-
|
19324 |
-
var PSEUDO_CONTENT_ITEM_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = {
|
19325 |
-
TEXT: 0,
|
19326 |
-
IMAGE: 1
|
19327 |
-
};
|
19328 |
-
|
19329 |
-
var TOKEN_TYPE = exports.TOKEN_TYPE = {
|
19330 |
-
STRING: 0,
|
19331 |
-
ATTRIBUTE: 1,
|
19332 |
-
URL: 2,
|
19333 |
-
COUNTER: 3,
|
19334 |
-
COUNTERS: 4,
|
19335 |
-
OPENQUOTE: 5,
|
19336 |
-
CLOSEQUOTE: 6
|
19337 |
-
};
|
19338 |
-
|
19339 |
-
var parseCounterReset = exports.parseCounterReset = function parseCounterReset(style, data) {
|
19340 |
-
if (!style || !style.counterReset || style.counterReset === 'none') {
|
19341 |
-
return [];
|
19342 |
-
}
|
19343 |
-
|
19344 |
-
var counterNames = [];
|
19345 |
-
var counterResets = style.counterReset.split(/\s*,\s*/);
|
19346 |
-
var lenCounterResets = counterResets.length;
|
19347 |
-
|
19348 |
-
for (var i = 0; i < lenCounterResets; i++) {
|
19349 |
-
var _counterResets$i$spli = counterResets[i].split(/\s+/),
|
19350 |
-
_counterResets$i$spli2 = _slicedToArray(_counterResets$i$spli, 2),
|
19351 |
-
counterName = _counterResets$i$spli2[0],
|
19352 |
-
initialValue = _counterResets$i$spli2[1];
|
19353 |
-
|
19354 |
-
counterNames.push(counterName);
|
19355 |
-
var counter = data.counters[counterName];
|
19356 |
-
if (!counter) {
|
19357 |
-
counter = data.counters[counterName] = [];
|
19358 |
-
}
|
19359 |
-
counter.push(parseInt(initialValue || 0, 10));
|
19360 |
-
}
|
19361 |
-
|
19362 |
-
return counterNames;
|
19363 |
-
};
|
19364 |
-
|
19365 |
-
var popCounters = exports.popCounters = function popCounters(counterNames, data) {
|
19366 |
-
var lenCounters = counterNames.length;
|
19367 |
-
for (var i = 0; i < lenCounters; i++) {
|
19368 |
-
data.counters[counterNames[i]].pop();
|
19369 |
-
}
|
19370 |
-
};
|
19371 |
-
|
19372 |
-
var resolvePseudoContent = exports.resolvePseudoContent = function resolvePseudoContent(node, style, data) {
|
19373 |
-
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
19374 |
-
return null;
|
19375 |
-
}
|
19376 |
-
|
19377 |
-
var tokens = parseContent(style.content);
|
19378 |
-
|
19379 |
-
var len = tokens.length;
|
19380 |
-
var contentItems = [];
|
19381 |
-
var s = '';
|
19382 |
-
|
19383 |
-
// increment the counter (if there is a "counter-increment" declaration)
|
19384 |
-
var counterIncrement = style.counterIncrement;
|
19385 |
-
if (counterIncrement && counterIncrement !== 'none') {
|
19386 |
-
var _counterIncrement$spl = counterIncrement.split(/\s+/),
|
19387 |
-
_counterIncrement$spl2 = _slicedToArray(_counterIncrement$spl, 2),
|
19388 |
-
counterName = _counterIncrement$spl2[0],
|
19389 |
-
incrementValue = _counterIncrement$spl2[1];
|
19390 |
-
|
19391 |
-
var counter = data.counters[counterName];
|
19392 |
-
if (counter) {
|
19393 |
-
counter[counter.length - 1] += incrementValue === undefined ? 1 : parseInt(incrementValue, 10);
|
19394 |
-
}
|
19395 |
-
}
|
19396 |
-
|
19397 |
-
// build the content string
|
19398 |
-
for (var i = 0; i < len; i++) {
|
19399 |
-
var token = tokens[i];
|
19400 |
-
switch (token.type) {
|
19401 |
-
case TOKEN_TYPE.STRING:
|
19402 |
-
s += token.value || '';
|
19403 |
-
break;
|
19404 |
-
|
19405 |
-
case TOKEN_TYPE.ATTRIBUTE:
|
19406 |
-
if (node instanceof HTMLElement && token.value) {
|
19407 |
-
s += node.getAttribute(token.value) || '';
|
19408 |
-
}
|
19409 |
-
break;
|
19410 |
-
|
19411 |
-
case TOKEN_TYPE.COUNTER:
|
19412 |
-
var _counter = data.counters[token.name || ''];
|
19413 |
-
if (_counter) {
|
19414 |
-
s += formatCounterValue([_counter[_counter.length - 1]], '', token.format);
|
19415 |
-
}
|
19416 |
-
break;
|
19417 |
-
|
19418 |
-
case TOKEN_TYPE.COUNTERS:
|
19419 |
-
var _counters = data.counters[token.name || ''];
|
19420 |
-
if (_counters) {
|
19421 |
-
s += formatCounterValue(_counters, token.glue, token.format);
|
19422 |
-
}
|
19423 |
-
break;
|
19424 |
-
|
19425 |
-
case TOKEN_TYPE.OPENQUOTE:
|
19426 |
-
s += getQuote(style, true, data.quoteDepth);
|
19427 |
-
data.quoteDepth++;
|
19428 |
-
break;
|
19429 |
-
|
19430 |
-
case TOKEN_TYPE.CLOSEQUOTE:
|
19431 |
-
data.quoteDepth--;
|
19432 |
-
s += getQuote(style, false, data.quoteDepth);
|
19433 |
-
break;
|
19434 |
-
|
19435 |
-
case TOKEN_TYPE.URL:
|
19436 |
-
if (s) {
|
19437 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
19438 |
-
s = '';
|
19439 |
-
}
|
19440 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.IMAGE, value: token.value || '' });
|
19441 |
-
break;
|
19442 |
-
}
|
19443 |
-
}
|
19444 |
-
|
19445 |
-
if (s) {
|
19446 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
19447 |
-
}
|
19448 |
-
|
19449 |
-
return contentItems;
|
19450 |
-
};
|
19451 |
-
|
19452 |
-
var parseContent = exports.parseContent = function parseContent(content, cache) {
|
19453 |
-
if (cache && cache[content]) {
|
19454 |
-
return cache[content];
|
19455 |
-
}
|
19456 |
-
|
19457 |
-
var tokens = [];
|
19458 |
-
var len = content.length;
|
19459 |
-
|
19460 |
-
var isString = false;
|
19461 |
-
var isEscaped = false;
|
19462 |
-
var isFunction = false;
|
19463 |
-
var str = '';
|
19464 |
-
var functionName = '';
|
19465 |
-
var args = [];
|
19466 |
-
|
19467 |
-
for (var i = 0; i < len; i++) {
|
19468 |
-
var c = content.charAt(i);
|
19469 |
-
|
19470 |
-
switch (c) {
|
19471 |
-
case "'":
|
19472 |
-
case '"':
|
19473 |
-
if (isEscaped) {
|
19474 |
-
str += c;
|
19475 |
-
} else {
|
19476 |
-
isString = !isString;
|
19477 |
-
if (!isFunction && !isString) {
|
19478 |
-
tokens.push({ type: TOKEN_TYPE.STRING, value: str });
|
19479 |
-
str = '';
|
19480 |
-
}
|
19481 |
-
}
|
19482 |
-
break;
|
19483 |
-
|
19484 |
-
case '\\':
|
19485 |
-
if (isEscaped) {
|
19486 |
-
str += c;
|
19487 |
-
isEscaped = false;
|
19488 |
-
} else {
|
19489 |
-
isEscaped = true;
|
19490 |
-
}
|
19491 |
-
break;
|
19492 |
-
|
19493 |
-
case '(':
|
19494 |
-
if (isString) {
|
19495 |
-
str += c;
|
19496 |
-
} else {
|
19497 |
-
isFunction = true;
|
19498 |
-
functionName = str;
|
19499 |
-
str = '';
|
19500 |
-
args = [];
|
19501 |
-
}
|
19502 |
-
break;
|
19503 |
-
|
19504 |
-
case ')':
|
19505 |
-
if (isString) {
|
19506 |
-
str += c;
|
19507 |
-
} else if (isFunction) {
|
19508 |
-
if (str) {
|
19509 |
-
args.push(str);
|
19510 |
-
}
|
19511 |
-
|
19512 |
-
switch (functionName) {
|
19513 |
-
case 'attr':
|
19514 |
-
if (args.length > 0) {
|
19515 |
-
tokens.push({ type: TOKEN_TYPE.ATTRIBUTE, value: args[0] });
|
19516 |
-
}
|
19517 |
-
break;
|
19518 |
-
|
19519 |
-
case 'counter':
|
19520 |
-
if (args.length > 0) {
|
19521 |
-
var counter = {
|
19522 |
-
type: TOKEN_TYPE.COUNTER,
|
19523 |
-
name: args[0]
|
19524 |
-
};
|
19525 |
-
if (args.length > 1) {
|
19526 |
-
counter.format = args[1];
|
19527 |
-
}
|
19528 |
-
tokens.push(counter);
|
19529 |
-
}
|
19530 |
-
break;
|
19531 |
-
|
19532 |
-
case 'counters':
|
19533 |
-
if (args.length > 0) {
|
19534 |
-
var _counters2 = {
|
19535 |
-
type: TOKEN_TYPE.COUNTERS,
|
19536 |
-
name: args[0]
|
19537 |
-
};
|
19538 |
-
if (args.length > 1) {
|
19539 |
-
_counters2.glue = args[1];
|
19540 |
-
}
|
19541 |
-
if (args.length > 2) {
|
19542 |
-
_counters2.format = args[2];
|
19543 |
-
}
|
19544 |
-
tokens.push(_counters2);
|
19545 |
-
}
|
19546 |
-
break;
|
19547 |
-
|
19548 |
-
case 'url':
|
19549 |
-
if (args.length > 0) {
|
19550 |
-
tokens.push({ type: TOKEN_TYPE.URL, value: args[0] });
|
19551 |
-
}
|
19552 |
-
break;
|
19553 |
-
}
|
19554 |
-
|
19555 |
-
isFunction = false;
|
19556 |
-
str = '';
|
19557 |
-
}
|
19558 |
-
break;
|
19559 |
-
|
19560 |
-
case ',':
|
19561 |
-
if (isString) {
|
19562 |
-
str += c;
|
19563 |
-
} else if (isFunction) {
|
19564 |
-
args.push(str);
|
19565 |
-
str = '';
|
19566 |
-
}
|
19567 |
-
break;
|
19568 |
-
|
19569 |
-
case ' ':
|
19570 |
-
case '\t':
|
19571 |
-
if (isString) {
|
19572 |
-
str += c;
|
19573 |
-
} else if (str) {
|
19574 |
-
addOtherToken(tokens, str);
|
19575 |
-
str = '';
|
19576 |
-
}
|
19577 |
-
break;
|
19578 |
-
|
19579 |
-
default:
|
19580 |
-
str += c;
|
19581 |
-
}
|
19582 |
-
|
19583 |
-
if (c !== '\\') {
|
19584 |
-
isEscaped = false;
|
19585 |
-
}
|
19586 |
-
}
|
19587 |
-
|
19588 |
-
if (str) {
|
19589 |
-
addOtherToken(tokens, str);
|
19590 |
-
}
|
19591 |
-
|
19592 |
-
if (cache) {
|
19593 |
-
cache[content] = tokens;
|
19594 |
-
}
|
19595 |
-
|
19596 |
-
return tokens;
|
19597 |
-
};
|
19598 |
-
|
19599 |
-
var addOtherToken = function addOtherToken(tokens, identifier) {
|
19600 |
-
switch (identifier) {
|
19601 |
-
case 'open-quote':
|
19602 |
-
tokens.push({ type: TOKEN_TYPE.OPENQUOTE });
|
19603 |
-
break;
|
19604 |
-
case 'close-quote':
|
19605 |
-
tokens.push({ type: TOKEN_TYPE.CLOSEQUOTE });
|
19606 |
-
break;
|
19607 |
-
}
|
19608 |
-
};
|
19609 |
-
|
19610 |
-
var getQuote = function getQuote(style, isOpening, quoteDepth) {
|
19611 |
-
var quotes = style.quotes ? style.quotes.split(/\s+/) : ["'\"'", "'\"'"];
|
19612 |
-
var idx = quoteDepth * 2;
|
19613 |
-
if (idx >= quotes.length) {
|
19614 |
-
idx = quotes.length - 2;
|
19615 |
-
}
|
19616 |
-
if (!isOpening) {
|
19617 |
-
++idx;
|
19618 |
-
}
|
19619 |
-
return quotes[idx].replace(/^["']|["']$/g, '');
|
19620 |
-
};
|
19621 |
-
|
19622 |
-
var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
19623 |
-
var len = counter.length;
|
19624 |
-
var result = '';
|
19625 |
-
|
19626 |
-
for (var i = 0; i < len; i++) {
|
19627 |
-
if (i > 0) {
|
19628 |
-
result += glue || '';
|
19629 |
-
}
|
19630 |
-
result += (0, _ListItem.createCounterText)(counter[i], (0, _listStyle.parseListStyleType)(format || 'decimal'), false);
|
19631 |
-
}
|
19632 |
-
|
19633 |
-
return result;
|
19634 |
-
};
|
19635 |
-
|
19636 |
-
/***/ })
|
19637 |
-
/******/ ]);
|
19638 |
});
|
|
|
19639 |
|
19640 |
/***/ },
|
19641 |
/* 537 */
|
12386 |
/* 536 */
|
12387 |
/***/ function(module, exports, __webpack_require__) {
|
12388 |
|
12389 |
+
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
12390 |
+
html2canvas 0.5.0-alpha2 <http://html2canvas.hertzen.com>
|
12391 |
+
Copyright (c) 2015 Niklas von Hertzen
|
12392 |
+
|
12393 |
+
Released under MIT License
|
12394 |
+
*/
|
12395 |
+
|
12396 |
+
!function(e){if(true)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.html2canvas=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
12397 |
+
(function (process,global){
|
12398 |
/*!
|
12399 |
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
12400 |
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
12401 |
+
* @license Licensed under MIT license
|
12402 |
+
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
|
12403 |
+
* @version 2.0.1
|
12404 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12405 |
|
12406 |
+
(function() {
|
12407 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12408 |
|
12409 |
+
function $$utils$$objectOrFunction(x) {
|
12410 |
+
return typeof x === 'function' || (typeof x === 'object' && x !== null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12411 |
}
|
|
|
|
|
12412 |
|
12413 |
+
function $$utils$$isFunction(x) {
|
12414 |
+
return typeof x === 'function';
|
|
|
|
|
|
|
12415 |
}
|
|
|
|
|
12416 |
|
12417 |
+
function $$utils$$isMaybeThenable(x) {
|
12418 |
+
return typeof x === 'object' && x !== null;
|
|
|
|
|
|
|
12419 |
}
|
|
|
|
|
12420 |
|
12421 |
+
var $$utils$$_isArray;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12422 |
|
12423 |
+
if (!Array.isArray) {
|
12424 |
+
$$utils$$_isArray = function (x) {
|
12425 |
+
return Object.prototype.toString.call(x) === '[object Array]';
|
12426 |
+
};
|
12427 |
+
} else {
|
12428 |
+
$$utils$$_isArray = Array.isArray;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12429 |
}
|
12430 |
|
12431 |
+
var $$utils$$isArray = $$utils$$_isArray;
|
12432 |
+
var $$utils$$now = Date.now || function() { return new Date().getTime(); };
|
12433 |
+
function $$utils$$F() { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12434 |
|
12435 |
+
var $$utils$$o_create = (Object.create || function (o) {
|
12436 |
+
if (arguments.length > 1) {
|
12437 |
+
throw new Error('Second argument not supported');
|
12438 |
+
}
|
12439 |
+
if (typeof o !== 'object') {
|
12440 |
+
throw new TypeError('Argument must be an object');
|
12441 |
+
}
|
12442 |
+
$$utils$$F.prototype = o;
|
12443 |
+
return new $$utils$$F();
|
12444 |
+
});
|
12445 |
|
12446 |
+
var $$asap$$len = 0;
|
12447 |
+
|
12448 |
+
var $$asap$$default = function asap(callback, arg) {
|
12449 |
+
$$asap$$queue[$$asap$$len] = callback;
|
12450 |
+
$$asap$$queue[$$asap$$len + 1] = arg;
|
12451 |
+
$$asap$$len += 2;
|
12452 |
+
if ($$asap$$len === 2) {
|
12453 |
+
// If len is 1, that means that we need to schedule an async flush.
|
12454 |
+
// If additional callbacks are queued before the queue is flushed, they
|
12455 |
+
// will be processed by this flush that we are scheduling.
|
12456 |
+
$$asap$$scheduleFlush();
|
12457 |
+
}
|
12458 |
+
};
|
12459 |
|
12460 |
+
var $$asap$$browserGlobal = (typeof window !== 'undefined') ? window : {};
|
12461 |
+
var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver;
|
|
|
|
|
12462 |
|
12463 |
+
// test for web worker but not in IE10
|
12464 |
+
var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
12465 |
+
typeof importScripts !== 'undefined' &&
|
12466 |
+
typeof MessageChannel !== 'undefined';
|
12467 |
|
12468 |
+
// node
|
12469 |
+
function $$asap$$useNextTick() {
|
12470 |
+
return function() {
|
12471 |
+
process.nextTick($$asap$$flush);
|
12472 |
+
};
|
12473 |
+
}
|
12474 |
|
12475 |
+
function $$asap$$useMutationObserver() {
|
12476 |
+
var iterations = 0;
|
12477 |
+
var observer = new $$asap$$BrowserMutationObserver($$asap$$flush);
|
12478 |
+
var node = document.createTextNode('');
|
12479 |
+
observer.observe(node, { characterData: true });
|
12480 |
|
12481 |
+
return function() {
|
12482 |
+
node.data = (iterations = ++iterations % 2);
|
12483 |
+
};
|
12484 |
+
}
|
12485 |
|
12486 |
+
// web worker
|
12487 |
+
function $$asap$$useMessageChannel() {
|
12488 |
+
var channel = new MessageChannel();
|
12489 |
+
channel.port1.onmessage = $$asap$$flush;
|
12490 |
+
return function () {
|
12491 |
+
channel.port2.postMessage(0);
|
12492 |
+
};
|
12493 |
+
}
|
12494 |
|
12495 |
+
function $$asap$$useSetTimeout() {
|
12496 |
+
return function() {
|
12497 |
+
setTimeout($$asap$$flush, 1);
|
12498 |
+
};
|
12499 |
+
}
|
12500 |
|
12501 |
+
var $$asap$$queue = new Array(1000);
|
12502 |
|
12503 |
+
function $$asap$$flush() {
|
12504 |
+
for (var i = 0; i < $$asap$$len; i+=2) {
|
12505 |
+
var callback = $$asap$$queue[i];
|
12506 |
+
var arg = $$asap$$queue[i+1];
|
12507 |
|
12508 |
+
callback(arg);
|
|
|
12509 |
|
12510 |
+
$$asap$$queue[i] = undefined;
|
12511 |
+
$$asap$$queue[i+1] = undefined;
|
12512 |
+
}
|
12513 |
|
12514 |
+
$$asap$$len = 0;
|
|
|
|
|
|
|
12515 |
}
|
12516 |
|
12517 |
+
var $$asap$$scheduleFlush;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12518 |
|
12519 |
+
// Decide what async method to use to triggering processing of queued callbacks:
|
12520 |
+
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
|
12521 |
+
$$asap$$scheduleFlush = $$asap$$useNextTick();
|
12522 |
+
} else if ($$asap$$BrowserMutationObserver) {
|
12523 |
+
$$asap$$scheduleFlush = $$asap$$useMutationObserver();
|
12524 |
+
} else if ($$asap$$isWorker) {
|
12525 |
+
$$asap$$scheduleFlush = $$asap$$useMessageChannel();
|
12526 |
+
} else {
|
12527 |
+
$$asap$$scheduleFlush = $$asap$$useSetTimeout();
|
12528 |
+
}
|
12529 |
|
12530 |
+
function $$$internal$$noop() {}
|
12531 |
+
var $$$internal$$PENDING = void 0;
|
12532 |
+
var $$$internal$$FULFILLED = 1;
|
12533 |
+
var $$$internal$$REJECTED = 2;
|
12534 |
+
var $$$internal$$GET_THEN_ERROR = new $$$internal$$ErrorObject();
|
12535 |
|
12536 |
+
function $$$internal$$selfFullfillment() {
|
12537 |
+
return new TypeError("You cannot resolve a promise with itself");
|
12538 |
+
}
|
|
|
|
|
|
|
12539 |
|
12540 |
+
function $$$internal$$cannotReturnOwn() {
|
12541 |
+
return new TypeError('A promises callback cannot return that same promise.')
|
12542 |
+
}
|
12543 |
|
12544 |
+
function $$$internal$$getThen(promise) {
|
12545 |
+
try {
|
12546 |
+
return promise.then;
|
12547 |
+
} catch(error) {
|
12548 |
+
$$$internal$$GET_THEN_ERROR.error = error;
|
12549 |
+
return $$$internal$$GET_THEN_ERROR;
|
12550 |
+
}
|
12551 |
+
}
|
12552 |
|
12553 |
+
function $$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
|
12554 |
+
try {
|
12555 |
+
then.call(value, fulfillmentHandler, rejectionHandler);
|
12556 |
+
} catch(e) {
|
12557 |
+
return e;
|
12558 |
+
}
|
12559 |
}
|
|
|
12560 |
|
12561 |
+
function $$$internal$$handleForeignThenable(promise, thenable, then) {
|
12562 |
+
$$asap$$default(function(promise) {
|
12563 |
+
var sealed = false;
|
12564 |
+
var error = $$$internal$$tryThen(then, thenable, function(value) {
|
12565 |
+
if (sealed) { return; }
|
12566 |
+
sealed = true;
|
12567 |
+
if (thenable !== value) {
|
12568 |
+
$$$internal$$resolve(promise, value);
|
12569 |
+
} else {
|
12570 |
+
$$$internal$$fulfill(promise, value);
|
12571 |
+
}
|
12572 |
+
}, function(reason) {
|
12573 |
+
if (sealed) { return; }
|
12574 |
+
sealed = true;
|
12575 |
|
12576 |
+
$$$internal$$reject(promise, reason);
|
12577 |
+
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
12578 |
|
12579 |
+
if (!sealed && error) {
|
12580 |
+
sealed = true;
|
12581 |
+
$$$internal$$reject(promise, error);
|
12582 |
+
}
|
12583 |
+
}, promise);
|
|
|
|
|
|
|
|
|
|
|
|
|
12584 |
}
|
|
|
12585 |
|
12586 |
+
function $$$internal$$handleOwnThenable(promise, thenable) {
|
12587 |
+
if (thenable._state === $$$internal$$FULFILLED) {
|
12588 |
+
$$$internal$$fulfill(promise, thenable._result);
|
12589 |
+
} else if (promise._state === $$$internal$$REJECTED) {
|
12590 |
+
$$$internal$$reject(promise, thenable._result);
|
12591 |
+
} else {
|
12592 |
+
$$$internal$$subscribe(thenable, undefined, function(value) {
|
12593 |
+
$$$internal$$resolve(promise, value);
|
12594 |
+
}, function(reason) {
|
12595 |
+
$$$internal$$reject(promise, reason);
|
12596 |
+
});
|
12597 |
+
}
|
12598 |
}
|
12599 |
|
12600 |
+
function $$$internal$$handleMaybeThenable(promise, maybeThenable) {
|
12601 |
+
if (maybeThenable.constructor === promise.constructor) {
|
12602 |
+
$$$internal$$handleOwnThenable(promise, maybeThenable);
|
12603 |
+
} else {
|
12604 |
+
var then = $$$internal$$getThen(maybeThenable);
|
12605 |
+
|
12606 |
+
if (then === $$$internal$$GET_THEN_ERROR) {
|
12607 |
+
$$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error);
|
12608 |
+
} else if (then === undefined) {
|
12609 |
+
$$$internal$$fulfill(promise, maybeThenable);
|
12610 |
+
} else if ($$utils$$isFunction(then)) {
|
12611 |
+
$$$internal$$handleForeignThenable(promise, maybeThenable, then);
|
12612 |
+
} else {
|
12613 |
+
$$$internal$$fulfill(promise, maybeThenable);
|
12614 |
+
}
|
12615 |
+
}
|
12616 |
}
|
12617 |
|
12618 |
+
function $$$internal$$resolve(promise, value) {
|
12619 |
+
if (promise === value) {
|
12620 |
+
$$$internal$$reject(promise, $$$internal$$selfFullfillment());
|
12621 |
+
} else if ($$utils$$objectOrFunction(value)) {
|
12622 |
+
$$$internal$$handleMaybeThenable(promise, value);
|
12623 |
+
} else {
|
12624 |
+
$$$internal$$fulfill(promise, value);
|
12625 |
+
}
|
12626 |
}
|
12627 |
|
12628 |
+
function $$$internal$$publishRejection(promise) {
|
12629 |
+
if (promise._onerror) {
|
12630 |
+
promise._onerror(promise._result);
|
12631 |
+
}
|
12632 |
+
|
12633 |
+
$$$internal$$publish(promise);
|
12634 |
}
|
12635 |
|
12636 |
+
function $$$internal$$fulfill(promise, value) {
|
12637 |
+
if (promise._state !== $$$internal$$PENDING) { return; }
|
12638 |
|
12639 |
+
promise._result = value;
|
12640 |
+
promise._state = $$$internal$$FULFILLED;
|
|
|
12641 |
|
12642 |
+
if (promise._subscribers.length === 0) {
|
12643 |
+
} else {
|
12644 |
+
$$asap$$default($$$internal$$publish, promise);
|
12645 |
+
}
|
12646 |
+
}
|
12647 |
|
12648 |
+
function $$$internal$$reject(promise, reason) {
|
12649 |
+
if (promise._state !== $$$internal$$PENDING) { return; }
|
12650 |
+
promise._state = $$$internal$$REJECTED;
|
12651 |
+
promise._result = reason;
|
12652 |
+
|
12653 |
+
$$asap$$default($$$internal$$publishRejection, promise);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12654 |
}
|
12655 |
|
12656 |
+
function $$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
|
12657 |
+
var subscribers = parent._subscribers;
|
12658 |
+
var length = subscribers.length;
|
|
|
12659 |
|
12660 |
+
parent._onerror = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12661 |
|
12662 |
+
subscribers[length] = child;
|
12663 |
+
subscribers[length + $$$internal$$FULFILLED] = onFulfillment;
|
12664 |
+
subscribers[length + $$$internal$$REJECTED] = onRejection;
|
|
|
|
|
|
|
12665 |
|
12666 |
+
if (length === 0 && parent._state) {
|
12667 |
+
$$asap$$default($$$internal$$publish, parent);
|
12668 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12669 |
}
|
|
|
12670 |
|
12671 |
+
function $$$internal$$publish(promise) {
|
12672 |
+
var subscribers = promise._subscribers;
|
12673 |
+
var settled = promise._state;
|
12674 |
|
12675 |
+
if (subscribers.length === 0) { return; }
|
12676 |
|
12677 |
+
var child, callback, detail = promise._result;
|
12678 |
|
12679 |
+
for (var i = 0; i < subscribers.length; i += 3) {
|
12680 |
+
child = subscribers[i];
|
12681 |
+
callback = subscribers[i + settled];
|
|
|
12682 |
|
12683 |
+
if (child) {
|
12684 |
+
$$$internal$$invokeCallback(settled, child, callback, detail);
|
12685 |
+
} else {
|
12686 |
+
callback(detail);
|
12687 |
+
}
|
12688 |
+
}
|
12689 |
|
12690 |
+
promise._subscribers.length = 0;
|
12691 |
+
}
|
12692 |
|
12693 |
+
function $$$internal$$ErrorObject() {
|
12694 |
+
this.error = null;
|
12695 |
+
}
|
12696 |
|
12697 |
+
var $$$internal$$TRY_CATCH_ERROR = new $$$internal$$ErrorObject();
|
12698 |
|
12699 |
+
function $$$internal$$tryCatch(callback, detail) {
|
12700 |
+
try {
|
12701 |
+
return callback(detail);
|
12702 |
+
} catch(e) {
|
12703 |
+
$$$internal$$TRY_CATCH_ERROR.error = e;
|
12704 |
+
return $$$internal$$TRY_CATCH_ERROR;
|
12705 |
+
}
|
12706 |
+
}
|
12707 |
|
12708 |
+
function $$$internal$$invokeCallback(settled, promise, callback, detail) {
|
12709 |
+
var hasCallback = $$utils$$isFunction(callback),
|
12710 |
+
value, error, succeeded, failed;
|
12711 |
|
12712 |
+
if (hasCallback) {
|
12713 |
+
value = $$$internal$$tryCatch(callback, detail);
|
|
|
|
|
12714 |
|
12715 |
+
if (value === $$$internal$$TRY_CATCH_ERROR) {
|
12716 |
+
failed = true;
|
12717 |
+
error = value.error;
|
12718 |
+
value = null;
|
12719 |
+
} else {
|
12720 |
+
succeeded = true;
|
12721 |
+
}
|
12722 |
|
12723 |
+
if (promise === value) {
|
12724 |
+
$$$internal$$reject(promise, $$$internal$$cannotReturnOwn());
|
12725 |
+
return;
|
|
|
12726 |
}
|
12727 |
+
|
12728 |
+
} else {
|
12729 |
+
value = detail;
|
12730 |
+
succeeded = true;
|
12731 |
+
}
|
12732 |
+
|
12733 |
+
if (promise._state !== $$$internal$$PENDING) {
|
12734 |
+
// noop
|
12735 |
+
} else if (hasCallback && succeeded) {
|
12736 |
+
$$$internal$$resolve(promise, value);
|
12737 |
+
} else if (failed) {
|
12738 |
+
$$$internal$$reject(promise, error);
|
12739 |
+
} else if (settled === $$$internal$$FULFILLED) {
|
12740 |
+
$$$internal$$fulfill(promise, value);
|
12741 |
+
} else if (settled === $$$internal$$REJECTED) {
|
12742 |
+
$$$internal$$reject(promise, value);
|
12743 |
+
}
|
12744 |
}
|
12745 |
|
12746 |
+
function $$$internal$$initializePromise(promise, resolver) {
|
12747 |
+
try {
|
12748 |
+
resolver(function resolvePromise(value){
|
12749 |
+
$$$internal$$resolve(promise, value);
|
12750 |
+
}, function rejectPromise(reason) {
|
12751 |
+
$$$internal$$reject(promise, reason);
|
12752 |
+
});
|
12753 |
+
} catch(e) {
|
12754 |
+
$$$internal$$reject(promise, e);
|
12755 |
+
}
|
12756 |
+
}
|
|
|
|
|
|
|
|
|
|
|
12757 |
|
12758 |
+
function $$$enumerator$$makeSettledResult(state, position, value) {
|
12759 |
+
if (state === $$$internal$$FULFILLED) {
|
12760 |
+
return {
|
12761 |
+
state: 'fulfilled',
|
12762 |
+
value: value
|
12763 |
+
};
|
12764 |
+
} else {
|
12765 |
+
return {
|
12766 |
+
state: 'rejected',
|
12767 |
+
reason: value
|
12768 |
+
};
|
12769 |
+
}
|
12770 |
+
}
|
12771 |
|
12772 |
+
function $$$enumerator$$Enumerator(Constructor, input, abortOnReject, label) {
|
12773 |
+
this._instanceConstructor = Constructor;
|
12774 |
+
this.promise = new Constructor($$$internal$$noop, label);
|
12775 |
+
this._abortOnReject = abortOnReject;
|
12776 |
|
12777 |
+
if (this._validateInput(input)) {
|
12778 |
+
this._input = input;
|
12779 |
+
this.length = input.length;
|
12780 |
+
this._remaining = input.length;
|
12781 |
|
12782 |
+
this._init();
|
|
|
|
|
|
|
12783 |
|
12784 |
+
if (this.length === 0) {
|
12785 |
+
$$$internal$$fulfill(this.promise, this._result);
|
12786 |
+
} else {
|
12787 |
+
this.length = this.length || 0;
|
12788 |
+
this._enumerate();
|
12789 |
+
if (this._remaining === 0) {
|
12790 |
+
$$$internal$$fulfill(this.promise, this._result);
|
12791 |
+
}
|
12792 |
+
}
|
12793 |
+
} else {
|
12794 |
+
$$$internal$$reject(this.promise, this._validationError());
|
12795 |
+
}
|
|
|
12796 |
}
|
|
|
12797 |
|
12798 |
+
$$$enumerator$$Enumerator.prototype._validateInput = function(input) {
|
12799 |
+
return $$utils$$isArray(input);
|
12800 |
+
};
|
12801 |
|
12802 |
+
$$$enumerator$$Enumerator.prototype._validationError = function() {
|
12803 |
+
return new Error('Array Methods must be provided an Array');
|
12804 |
+
};
|
12805 |
|
12806 |
+
$$$enumerator$$Enumerator.prototype._init = function() {
|
12807 |
+
this._result = new Array(this.length);
|
12808 |
+
};
|
12809 |
|
12810 |
+
var $$$enumerator$$default = $$$enumerator$$Enumerator;
|
|
|
|
|
12811 |
|
12812 |
+
$$$enumerator$$Enumerator.prototype._enumerate = function() {
|
12813 |
+
var length = this.length;
|
12814 |
+
var promise = this.promise;
|
12815 |
+
var input = this._input;
|
12816 |
|
12817 |
+
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
|
12818 |
+
this._eachEntry(input[i], i);
|
12819 |
+
}
|
12820 |
+
};
|
12821 |
|
12822 |
+
$$$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
|
12823 |
+
var c = this._instanceConstructor;
|
12824 |
+
if ($$utils$$isMaybeThenable(entry)) {
|
12825 |
+
if (entry.constructor === c && entry._state !== $$$internal$$PENDING) {
|
12826 |
+
entry._onerror = null;
|
12827 |
+
this._settledAt(entry._state, i, entry._result);
|
12828 |
+
} else {
|
12829 |
+
this._willSettleAt(c.resolve(entry), i);
|
12830 |
+
}
|
12831 |
+
} else {
|
12832 |
+
this._remaining--;
|
12833 |
+
this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry);
|
12834 |
+
}
|
12835 |
+
};
|
12836 |
|
12837 |
+
$$$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
|
12838 |
+
var promise = this.promise;
|
12839 |
|
12840 |
+
if (promise._state === $$$internal$$PENDING) {
|
12841 |
+
this._remaining--;
|
12842 |
|
12843 |
+
if (this._abortOnReject && state === $$$internal$$REJECTED) {
|
12844 |
+
$$$internal$$reject(promise, value);
|
12845 |
+
} else {
|
12846 |
+
this._result[i] = this._makeResult(state, i, value);
|
12847 |
+
}
|
12848 |
+
}
|
12849 |
|
12850 |
+
if (this._remaining === 0) {
|
12851 |
+
$$$internal$$fulfill(promise, this._result);
|
12852 |
+
}
|
12853 |
+
};
|
12854 |
|
12855 |
+
$$$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) {
|
12856 |
+
return value;
|
12857 |
+
};
|
12858 |
|
12859 |
+
$$$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
|
12860 |
+
var enumerator = this;
|
12861 |
|
12862 |
+
$$$internal$$subscribe(promise, undefined, function(value) {
|
12863 |
+
enumerator._settledAt($$$internal$$FULFILLED, i, value);
|
12864 |
+
}, function(reason) {
|
12865 |
+
enumerator._settledAt($$$internal$$REJECTED, i, reason);
|
12866 |
+
});
|
12867 |
+
};
|
12868 |
|
12869 |
+
var $$promise$all$$default = function all(entries, label) {
|
12870 |
+
return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise;
|
12871 |
+
};
|
12872 |
|
12873 |
+
var $$promise$race$$default = function race(entries, label) {
|
12874 |
+
/*jshint validthis:true */
|
12875 |
+
var Constructor = this;
|
12876 |
|
12877 |
+
var promise = new Constructor($$$internal$$noop, label);
|
12878 |
|
12879 |
+
if (!$$utils$$isArray(entries)) {
|
12880 |
+
$$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
|
12881 |
+
return promise;
|
12882 |
+
}
|
12883 |
|
12884 |
+
var length = entries.length;
|
12885 |
|
12886 |
+
function onFulfillment(value) {
|
12887 |
+
$$$internal$$resolve(promise, value);
|
12888 |
+
}
|
12889 |
|
12890 |
+
function onRejection(reason) {
|
12891 |
+
$$$internal$$reject(promise, reason);
|
12892 |
+
}
|
12893 |
|
12894 |
+
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
|
12895 |
+
$$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
12896 |
+
}
|
12897 |
|
12898 |
+
return promise;
|
12899 |
+
};
|
12900 |
|
12901 |
+
var $$promise$resolve$$default = function resolve(object, label) {
|
12902 |
+
/*jshint validthis:true */
|
12903 |
+
var Constructor = this;
|
12904 |
|
12905 |
+
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
12906 |
+
return object;
|
12907 |
+
}
|
12908 |
|
12909 |
+
var promise = new Constructor($$$internal$$noop, label);
|
12910 |
+
$$$internal$$resolve(promise, object);
|
12911 |
+
return promise;
|
12912 |
+
};
|
12913 |
|
12914 |
+
var $$promise$reject$$default = function reject(reason, label) {
|
12915 |
+
/*jshint validthis:true */
|
12916 |
+
var Constructor = this;
|
12917 |
+
var promise = new Constructor($$$internal$$noop, label);
|
12918 |
+
$$$internal$$reject(promise, reason);
|
12919 |
+
return promise;
|
12920 |
+
};
|
12921 |
|
12922 |
+
var $$es6$promise$promise$$counter = 0;
|
12923 |
|
12924 |
+
function $$es6$promise$promise$$needsResolver() {
|
12925 |
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
12926 |
+
}
|
12927 |
|
12928 |
+
function $$es6$promise$promise$$needsNew() {
|
12929 |
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
12930 |
+
}
|
12931 |
|
12932 |
+
var $$es6$promise$promise$$default = $$es6$promise$promise$$Promise;
|
12933 |
|
12934 |
+
/**
|
12935 |
+
Promise objects represent the eventual result of an asynchronous operation. The
|
12936 |
+
primary way of interacting with a promise is through its `then` method, which
|
12937 |
+
registers callbacks to receive either a promise’s eventual value or the reason
|
12938 |
+
why the promise cannot be fulfilled.
|
12939 |
|
12940 |
+
Terminology
|
12941 |
+
-----------
|
12942 |
|
12943 |
+
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
|
12944 |
+
- `thenable` is an object or function that defines a `then` method.
|
12945 |
+
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
12946 |
+
- `exception` is a value that is thrown using the throw statement.
|
12947 |
+
- `reason` is a value that indicates why a promise was rejected.
|
12948 |
+
- `settled` the final resting state of a promise, fulfilled or rejected.
|
12949 |
|
12950 |
+
A promise can be in one of three states: pending, fulfilled, or rejected.
|
12951 |
|
12952 |
+
Promises that are fulfilled have a fulfillment value and are in the fulfilled
|
12953 |
+
state. Promises that are rejected have a rejection reason and are in the
|
12954 |
+
rejected state. A fulfillment value is never a thenable.
|
12955 |
|
12956 |
+
Promises can also be said to *resolve* a value. If this value is also a
|
12957 |
+
promise, then the original promise's settled state will match the value's
|
12958 |
+
settled state. So a promise that *resolves* a promise that rejects will
|
12959 |
+
itself reject, and a promise that *resolves* a promise that fulfills will
|
12960 |
+
itself fulfill.
|
12961 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12962 |
|
12963 |
+
Basic Usage:
|
12964 |
+
------------
|
|
|
|
|
12965 |
|
12966 |
+
```js
|
12967 |
+
var promise = new Promise(function(resolve, reject) {
|
12968 |
+
// on success
|
12969 |
+
resolve(value);
|
|
|
|
|
|
|
|
|
12970 |
|
12971 |
+
// on failure
|
12972 |
+
reject(reason);
|
12973 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12974 |
|
12975 |
+
promise.then(function(value) {
|
12976 |
+
// on fulfillment
|
12977 |
+
}, function(reason) {
|
12978 |
+
// on rejection
|
12979 |
+
});
|
12980 |
+
```
|
12981 |
|
12982 |
+
Advanced Usage:
|
12983 |
+
---------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12984 |
|
12985 |
+
Promises shine when abstracting away asynchronous interactions such as
|
12986 |
+
`XMLHttpRequest`s.
|
12987 |
|
12988 |
+
```js
|
12989 |
+
function getJSON(url) {
|
12990 |
+
return new Promise(function(resolve, reject){
|
12991 |
+
var xhr = new XMLHttpRequest();
|
12992 |
|
12993 |
+
xhr.open('GET', url);
|
12994 |
+
xhr.onreadystatechange = handler;
|
12995 |
+
xhr.responseType = 'json';
|
12996 |
+
xhr.setRequestHeader('Accept', 'application/json');
|
12997 |
+
xhr.send();
|
12998 |
|
12999 |
+
function handler() {
|
13000 |
+
if (this.readyState === this.DONE) {
|
13001 |
+
if (this.status === 200) {
|
13002 |
+
resolve(this.response);
|
13003 |
+
} else {
|
13004 |
+
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
13005 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13006 |
}
|
13007 |
+
};
|
13008 |
+
});
|
13009 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
13010 |
|
13011 |
+
getJSON('/posts.json').then(function(json) {
|
13012 |
+
// on fulfillment
|
13013 |
+
}, function(reason) {
|
13014 |
+
// on rejection
|
13015 |
+
});
|
13016 |
+
```
|
13017 |
|
13018 |
+
Unlike callbacks, promises are great composable primitives.
|
13019 |
|
13020 |
+
```js
|
13021 |
+
Promise.all([
|
13022 |
+
getJSON('/posts'),
|
13023 |
+
getJSON('/comments')
|
13024 |
+
]).then(function(values){
|
13025 |
+
values[0] // => postsJSON
|
13026 |
+
values[1] // => commentsJSON
|
13027 |
|
13028 |
+
return values;
|
13029 |
+
});
|
13030 |
+
```
|
13031 |
+
|
13032 |
+
@class Promise
|
13033 |
+
@param {function} resolver
|
13034 |
+
Useful for tooling.
|
13035 |
+
@constructor
|
13036 |
+
*/
|
13037 |
+
function $$es6$promise$promise$$Promise(resolver) {
|
13038 |
+
this._id = $$es6$promise$promise$$counter++;
|
13039 |
+
this._state = undefined;
|
13040 |
+
this._result = undefined;
|
13041 |
+
this._subscribers = [];
|
13042 |
+
|
13043 |
+
if ($$$internal$$noop !== resolver) {
|
13044 |
+
if (!$$utils$$isFunction(resolver)) {
|
13045 |
+
$$es6$promise$promise$$needsResolver();
|
13046 |
+
}
|
13047 |
|
13048 |
+
if (!(this instanceof $$es6$promise$promise$$Promise)) {
|
13049 |
+
$$es6$promise$promise$$needsNew();
|
|
|
|
|
|
|
|
|
|
|
13050 |
}
|
13051 |
+
|
13052 |
+
$$$internal$$initializePromise(this, resolver);
|
13053 |
+
}
|
13054 |
}
|
|
|
|
|
13055 |
|
13056 |
+
$$es6$promise$promise$$Promise.all = $$promise$all$$default;
|
13057 |
+
$$es6$promise$promise$$Promise.race = $$promise$race$$default;
|
13058 |
+
$$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default;
|
13059 |
+
$$es6$promise$promise$$Promise.reject = $$promise$reject$$default;
|
13060 |
|
13061 |
+
$$es6$promise$promise$$Promise.prototype = {
|
13062 |
+
constructor: $$es6$promise$promise$$Promise,
|
|
|
13063 |
|
13064 |
+
/**
|
13065 |
+
The primary way of interacting with a promise is through its `then` method,
|
13066 |
+
which registers callbacks to receive either a promise's eventual value or the
|
13067 |
+
reason why the promise cannot be fulfilled.
|
13068 |
+
|
13069 |
+
```js
|
13070 |
+
findUser().then(function(user){
|
13071 |
+
// user is available
|
13072 |
+
}, function(reason){
|
13073 |
+
// user is unavailable, and you are given the reason why
|
13074 |
+
});
|
13075 |
+
```
|
13076 |
+
|
13077 |
+
Chaining
|
13078 |
+
--------
|
13079 |
+
|
13080 |
+
The return value of `then` is itself a promise. This second, 'downstream'
|
13081 |
+
promise is resolved with the return value of the first promise's fulfillment
|
13082 |
+
or rejection handler, or rejected if the handler throws an exception.
|
13083 |
+
|
13084 |
+
```js
|
13085 |
+
findUser().then(function (user) {
|
13086 |
+
return user.name;
|
13087 |
+
}, function (reason) {
|
13088 |
+
return 'default name';
|
13089 |
+
}).then(function (userName) {
|
13090 |
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
13091 |
+
// will be `'default name'`
|
13092 |
+
});
|
13093 |
|
13094 |
+
findUser().then(function (user) {
|
13095 |
+
throw new Error('Found user, but still unhappy');
|
13096 |
+
}, function (reason) {
|
13097 |
+
throw new Error('`findUser` rejected and we're unhappy');
|
13098 |
+
}).then(function (value) {
|
13099 |
+
// never reached
|
13100 |
+
}, function (reason) {
|
13101 |
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
13102 |
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
13103 |
+
});
|
13104 |
+
```
|
13105 |
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
13106 |
+
|
13107 |
+
```js
|
13108 |
+
findUser().then(function (user) {
|
13109 |
+
throw new PedagogicalException('Upstream error');
|
13110 |
+
}).then(function (value) {
|
13111 |
+
// never reached
|
13112 |
+
}).then(function (value) {
|
13113 |
+
// never reached
|
13114 |
+
}, function (reason) {
|
13115 |
+
// The `PedgagocialException` is propagated all the way down to here
|
13116 |
+
});
|
13117 |
+
```
|
13118 |
|
13119 |
+
Assimilation
|
13120 |
+
------------
|
|
|
|
|
13121 |
|
13122 |
+
Sometimes the value you want to propagate to a downstream promise can only be
|
13123 |
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
13124 |
+
fulfillment or rejection handler. The downstream promise will then be pending
|
13125 |
+
until the returned promise is settled. This is called *assimilation*.
|
13126 |
|
13127 |
+
```js
|
13128 |
+
findUser().then(function (user) {
|
13129 |
+
return findCommentsByAuthor(user);
|
13130 |
+
}).then(function (comments) {
|
13131 |
+
// The user's comments are now available
|
13132 |
+
});
|
13133 |
+
```
|
13134 |
|
13135 |
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
13136 |
|
13137 |
+
```js
|
13138 |
+
findUser().then(function (user) {
|
13139 |
+
return findCommentsByAuthor(user);
|
13140 |
+
}).then(function (comments) {
|
13141 |
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
13142 |
+
}, function (reason) {
|
13143 |
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
13144 |
+
});
|
13145 |
+
```
|
13146 |
|
13147 |
+
Simple Example
|
13148 |
+
--------------
|
13149 |
|
13150 |
+
Synchronous Example
|
13151 |
|
13152 |
+
```javascript
|
13153 |
+
var result;
|
13154 |
|
13155 |
+
try {
|
13156 |
+
result = findResult();
|
13157 |
+
// success
|
13158 |
+
} catch(reason) {
|
13159 |
+
// failure
|
13160 |
+
}
|
13161 |
+
```
|
13162 |
|
13163 |
+
Errback Example
|
13164 |
|
13165 |
+
```js
|
13166 |
+
findResult(function(result, err){
|
13167 |
+
if (err) {
|
13168 |
+
// failure
|
13169 |
+
} else {
|
13170 |
+
// success
|
13171 |
+
}
|
13172 |
+
});
|
13173 |
+
```
|
13174 |
|
13175 |
+
Promise Example;
|
13176 |
|
13177 |
+
```javascript
|
13178 |
+
findResult().then(function(result){
|
13179 |
+
// success
|
13180 |
+
}, function(reason){
|
13181 |
+
// failure
|
13182 |
+
});
|
13183 |
+
```
|
13184 |
|
13185 |
+
Advanced Example
|
13186 |
+
--------------
|
|
|
|
|
|
|
|
|
13187 |
|
13188 |
+
Synchronous Example
|
|
|
|
|
|
|
|
|
|
|
13189 |
|
13190 |
+
```javascript
|
13191 |
+
var author, books;
|
|
|
|
|
|
|
13192 |
|
13193 |
+
try {
|
13194 |
+
author = findAuthor();
|
13195 |
+
books = findBooksByAuthor(author);
|
13196 |
+
// success
|
13197 |
+
} catch(reason) {
|
13198 |
+
// failure
|
13199 |
+
}
|
13200 |
+
```
|
13201 |
|
13202 |
+
Errback Example
|
13203 |
|
13204 |
+
```js
|
|
|
13205 |
|
13206 |
+
function foundBooks(books) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13207 |
|
13208 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13209 |
|
13210 |
+
function failure(reason) {
|
|
|
|
|
13211 |
|
13212 |
+
}
|
|
|
13213 |
|
13214 |
+
findAuthor(function(author, err){
|
13215 |
+
if (err) {
|
13216 |
+
failure(err);
|
13217 |
+
// failure
|
13218 |
+
} else {
|
13219 |
+
try {
|
13220 |
+
findBoooksByAuthor(author, function(books, err) {
|
13221 |
+
if (err) {
|
13222 |
+
failure(err);
|
13223 |
+
} else {
|
13224 |
+
try {
|
13225 |
+
foundBooks(books);
|
13226 |
+
} catch(reason) {
|
13227 |
+
failure(reason);
|
13228 |
+
}
|
13229 |
+
}
|
13230 |
+
});
|
13231 |
+
} catch(error) {
|
13232 |
+
failure(err);
|
13233 |
+
}
|
13234 |
+
// success
|
13235 |
}
|
13236 |
+
});
|
13237 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13238 |
|
13239 |
+
Promise Example;
|
|
|
|
|
13240 |
|
13241 |
+
```javascript
|
13242 |
+
findAuthor().
|
13243 |
+
then(findBooksByAuthor).
|
13244 |
+
then(function(books){
|
13245 |
+
// found books
|
13246 |
+
}).catch(function(reason){
|
13247 |
+
// something went wrong
|
13248 |
+
});
|
13249 |
+
```
|
13250 |
+
|
13251 |
+
@method then
|
13252 |
+
@param {Function} onFulfilled
|
13253 |
+
@param {Function} onRejected
|
13254 |
+
Useful for tooling.
|
13255 |
+
@return {Promise}
|
13256 |
+
*/
|
13257 |
+
then: function(onFulfillment, onRejection) {
|
13258 |
+
var parent = this;
|
13259 |
+
var state = parent._state;
|
13260 |
+
|
13261 |
+
if (state === $$$internal$$FULFILLED && !onFulfillment || state === $$$internal$$REJECTED && !onRejection) {
|
13262 |
+
return this;
|
13263 |
}
|
|
|
|
|
|
|
13264 |
|
13265 |
+
var child = new this.constructor($$$internal$$noop);
|
13266 |
+
var result = parent._result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13267 |
|
13268 |
+
if (state) {
|
13269 |
+
var callback = arguments[state - 1];
|
13270 |
+
$$asap$$default(function(){
|
13271 |
+
$$$internal$$invokeCallback(state, child, callback, result);
|
13272 |
+
});
|
13273 |
} else {
|
13274 |
+
$$$internal$$subscribe(parent, child, onFulfillment, onRejection);
|
13275 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13276 |
|
13277 |
+
return child;
|
13278 |
+
},
|
13279 |
|
13280 |
+
/**
|
13281 |
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
13282 |
+
as the catch block of a try/catch statement.
|
|
|
|
|
|
|
|
|
|
|
13283 |
|
13284 |
+
```js
|
13285 |
+
function findAuthor(){
|
13286 |
+
throw new Error('couldn't find that author');
|
13287 |
+
}
|
13288 |
|
13289 |
+
// synchronous
|
13290 |
+
try {
|
13291 |
+
findAuthor();
|
13292 |
+
} catch(reason) {
|
13293 |
+
// something went wrong
|
13294 |
+
}
|
13295 |
|
13296 |
+
// async with promises
|
13297 |
+
findAuthor().catch(function(reason){
|
13298 |
+
// something went wrong
|
13299 |
+
});
|
13300 |
+
```
|
13301 |
+
|
13302 |
+
@method catch
|
13303 |
+
@param {Function} onRejection
|
13304 |
+
Useful for tooling.
|
13305 |
+
@return {Promise}
|
13306 |
+
*/
|
13307 |
+
'catch': function(onRejection) {
|
13308 |
+
return this.then(null, onRejection);
|
13309 |
+
}
|
13310 |
+
};
|
13311 |
|
13312 |
+
var $$es6$promise$polyfill$$default = function polyfill() {
|
13313 |
+
var local;
|
|
|
13314 |
|
13315 |
+
if (typeof global !== 'undefined') {
|
13316 |
+
local = global;
|
13317 |
+
} else if (typeof window !== 'undefined' && window.document) {
|
13318 |
+
local = window;
|
13319 |
+
} else {
|
13320 |
+
local = self;
|
13321 |
+
}
|
13322 |
|
13323 |
+
var es6PromiseSupport =
|
13324 |
+
"Promise" in local &&
|
13325 |
+
// Some of these methods are missing from
|
13326 |
+
// Firefox/Chrome experimental implementations
|
13327 |
+
"resolve" in local.Promise &&
|
13328 |
+
"reject" in local.Promise &&
|
13329 |
+
"all" in local.Promise &&
|
13330 |
+
"race" in local.Promise &&
|
13331 |
+
// Older version of the spec had a resolver object
|
13332 |
+
// as the arg rather than a function
|
13333 |
+
(function() {
|
13334 |
+
var resolve;
|
13335 |
+
new local.Promise(function(r) { resolve = r; });
|
13336 |
+
return $$utils$$isFunction(resolve);
|
13337 |
+
}());
|
13338 |
+
|
13339 |
+
if (!es6PromiseSupport) {
|
13340 |
+
local.Promise = $$es6$promise$promise$$default;
|
13341 |
+
}
|
13342 |
+
};
|
13343 |
|
13344 |
+
var es6$promise$umd$$ES6Promise = {
|
13345 |
+
'Promise': $$es6$promise$promise$$default,
|
13346 |
+
'polyfill': $$es6$promise$polyfill$$default
|
13347 |
+
};
|
13348 |
|
13349 |
+
/* global define:true module:true window: true */
|
13350 |
+
if (typeof define === 'function' && define['amd']) {
|
13351 |
+
define(function() { return es6$promise$umd$$ES6Promise; });
|
13352 |
+
} else if (typeof module !== 'undefined' && module['exports']) {
|
13353 |
+
module['exports'] = es6$promise$umd$$ES6Promise;
|
13354 |
+
} else if (typeof this !== 'undefined') {
|
13355 |
+
this['ES6Promise'] = es6$promise$umd$$ES6Promise;
|
13356 |
+
}
|
13357 |
+
}).call(this);
|
13358 |
+
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
13359 |
+
},{"_process":2}],2:[function(require,module,exports){
|
13360 |
+
// shim for using process in browser
|
13361 |
+
|
13362 |
+
var process = module.exports = {};
|
13363 |
+
var queue = [];
|
13364 |
+
var draining = false;
|
13365 |
+
|
13366 |
+
function drainQueue() {
|
13367 |
+
if (draining) {
|
13368 |
+
return;
|
13369 |
+
}
|
13370 |
+
draining = true;
|
13371 |
+
var currentQueue;
|
13372 |
+
var len = queue.length;
|
13373 |
+
while(len) {
|
13374 |
+
currentQueue = queue;
|
13375 |
+
queue = [];
|
13376 |
+
var i = -1;
|
13377 |
+
while (++i < len) {
|
13378 |
+
currentQueue[i]();
|
13379 |
}
|
13380 |
+
len = queue.length;
|
13381 |
+
}
|
13382 |
+
draining = false;
|
13383 |
+
}
|
13384 |
+
process.nextTick = function (fun) {
|
13385 |
+
queue.push(fun);
|
13386 |
+
if (!draining) {
|
13387 |
+
setTimeout(drainQueue, 0);
|
13388 |
}
|
13389 |
};
|
13390 |
|
13391 |
+
process.title = 'browser';
|
13392 |
+
process.browser = true;
|
13393 |
+
process.env = {};
|
13394 |
+
process.argv = [];
|
13395 |
+
process.version = ''; // empty string to avoid regexp issues
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13396 |
|
13397 |
+
function noop() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13398 |
|
13399 |
+
process.on = noop;
|
13400 |
+
process.addListener = noop;
|
13401 |
+
process.once = noop;
|
13402 |
+
process.off = noop;
|
13403 |
+
process.removeListener = noop;
|
13404 |
+
process.removeAllListeners = noop;
|
13405 |
+
process.emit = noop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13406 |
|
13407 |
+
process.binding = function (name) {
|
13408 |
+
throw new Error('process.binding is not supported');
|
|
|
|
|
|
|
|
|
|
|
13409 |
};
|
13410 |
|
13411 |
+
// TODO(shtylman)
|
13412 |
+
process.cwd = function () { return '/' };
|
13413 |
+
process.chdir = function (dir) {
|
13414 |
+
throw new Error('process.chdir is not supported');
|
|
|
|
|
|
|
|
|
13415 |
};
|
13416 |
+
process.umask = function() { return 0; };
|
13417 |
|
13418 |
+
},{}],3:[function(require,module,exports){
|
13419 |
+
(function (global){
|
13420 |
+
/*! http://mths.be/punycode v1.2.4 by @mathias */
|
13421 |
+
;(function(root) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13422 |
|
13423 |
+
/** Detect free variables */
|
13424 |
+
var freeExports = typeof exports == 'object' && exports;
|
13425 |
+
var freeModule = typeof module == 'object' && module &&
|
13426 |
+
module.exports == freeExports && module;
|
13427 |
+
var freeGlobal = typeof global == 'object' && global;
|
13428 |
+
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
13429 |
+
root = freeGlobal;
|
13430 |
+
}
|
13431 |
|
13432 |
+
/**
|
13433 |
+
* The `punycode` object.
|
13434 |
+
* @name punycode
|
13435 |
+
* @type Object
|
13436 |
+
*/
|
13437 |
+
var punycode,
|
13438 |
+
|
13439 |
+
/** Highest positive signed 32-bit float value */
|
13440 |
+
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
13441 |
+
|
13442 |
+
/** Bootstring parameters */
|
13443 |
+
base = 36,
|
13444 |
+
tMin = 1,
|
13445 |
+
tMax = 26,
|
13446 |
+
skew = 38,
|
13447 |
+
damp = 700,
|
13448 |
+
initialBias = 72,
|
13449 |
+
initialN = 128, // 0x80
|
13450 |
+
delimiter = '-', // '\x2D'
|
13451 |
+
|
13452 |
+
/** Regular expressions */
|
13453 |
+
regexPunycode = /^xn--/,
|
13454 |
+
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
13455 |
+
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
|
13456 |
+
|
13457 |
+
/** Error messages */
|
13458 |
+
errors = {
|
13459 |
+
'overflow': 'Overflow: input needs wider integers to process',
|
13460 |
+
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
13461 |
+
'invalid-input': 'Invalid input'
|
13462 |
+
},
|
13463 |
|
13464 |
+
/** Convenience shortcuts */
|
13465 |
+
baseMinusTMin = base - tMin,
|
13466 |
+
floor = Math.floor,
|
13467 |
+
stringFromCharCode = String.fromCharCode,
|
13468 |
|
13469 |
+
/** Temporary variable */
|
13470 |
+
key;
|
13471 |
|
13472 |
+
/*--------------------------------------------------------------------------*/
|
13473 |
|
13474 |
+
/**
|
13475 |
+
* A generic error utility function.
|
13476 |
+
* @private
|
13477 |
+
* @param {String} type The error type.
|
13478 |
+
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
13479 |
+
*/
|
13480 |
+
function error(type) {
|
13481 |
+
throw RangeError(errors[type]);
|
13482 |
+
}
|
13483 |
|
13484 |
+
/**
|
13485 |
+
* A generic `Array#map` utility function.
|
13486 |
+
* @private
|
13487 |
+
* @param {Array} array The array to iterate over.
|
13488 |
+
* @param {Function} callback The function that gets called for every array
|
13489 |
+
* item.
|
13490 |
+
* @returns {Array} A new array of values returned by the callback function.
|
13491 |
+
*/
|
13492 |
+
function map(array, fn) {
|
13493 |
+
var length = array.length;
|
13494 |
+
while (length--) {
|
13495 |
+
array[length] = fn(array[length]);
|
13496 |
+
}
|
13497 |
+
return array;
|
13498 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13499 |
|
13500 |
+
/**
|
13501 |
+
* A simple `Array#map`-like wrapper to work with domain name strings.
|
13502 |
+
* @private
|
13503 |
+
* @param {String} domain The domain name.
|
13504 |
+
* @param {Function} callback The function that gets called for every
|
13505 |
+
* character.
|
13506 |
+
* @returns {Array} A new string of characters returned by the callback
|
13507 |
+
* function.
|
13508 |
+
*/
|
13509 |
+
function mapDomain(string, fn) {
|
13510 |
+
return map(string.split(regexSeparators), fn).join('.');
|
13511 |
+
}
|
13512 |
|
13513 |
+
/**
|
13514 |
+
* Creates an array containing the numeric code points of each Unicode
|
13515 |
+
* character in the string. While JavaScript uses UCS-2 internally,
|
13516 |
+
* this function will convert a pair of surrogate halves (each of which
|
13517 |
+
* UCS-2 exposes as separate characters) into a single code point,
|
13518 |
+
* matching UTF-16.
|
13519 |
+
* @see `punycode.ucs2.encode`
|
13520 |
+
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
13521 |
+
* @memberOf punycode.ucs2
|
13522 |
+
* @name decode
|
13523 |
+
* @param {String} string The Unicode input string (UCS-2).
|
13524 |
+
* @returns {Array} The new array of code points.
|
13525 |
+
*/
|
13526 |
+
function ucs2decode(string) {
|
13527 |
+
var output = [],
|
13528 |
+
counter = 0,
|
13529 |
+
length = string.length,
|
13530 |
+
value,
|
13531 |
+
extra;
|
13532 |
+
while (counter < length) {
|
13533 |
+
value = string.charCodeAt(counter++);
|
13534 |
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
13535 |
+
// high surrogate, and there is a next character
|
13536 |
+
extra = string.charCodeAt(counter++);
|
13537 |
+
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
13538 |
+
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
13539 |
+
} else {
|
13540 |
+
// unmatched surrogate; only append this code unit, in case the next
|
13541 |
+
// code unit is the high surrogate of a surrogate pair
|
13542 |
+
output.push(value);
|
13543 |
+
counter--;
|
13544 |
+
}
|
13545 |
+
} else {
|
13546 |
+
output.push(value);
|
13547 |
+
}
|
13548 |
+
}
|
13549 |
+
return output;
|
13550 |
+
}
|
13551 |
|
13552 |
+
/**
|
13553 |
+
* Creates a string based on an array of numeric code points.
|
13554 |
+
* @see `punycode.ucs2.decode`
|
13555 |
+
* @memberOf punycode.ucs2
|
13556 |
+
* @name encode
|
13557 |
+
* @param {Array} codePoints The array of numeric code points.
|
13558 |
+
* @returns {String} The new Unicode string (UCS-2).
|
13559 |
+
*/
|
13560 |
+
function ucs2encode(array) {
|
13561 |
+
return map(array, function(value) {
|
13562 |
+
var output = '';
|
13563 |
+
if (value > 0xFFFF) {
|
13564 |
+
value -= 0x10000;
|
13565 |
+
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
13566 |
+
value = 0xDC00 | value & 0x3FF;
|
13567 |
+
}
|
13568 |
+
output += stringFromCharCode(value);
|
13569 |
+
return output;
|
13570 |
+
}).join('');
|
13571 |
+
}
|
13572 |
|
13573 |
+
/**
|
13574 |
+
* Converts a basic code point into a digit/integer.
|
13575 |
+
* @see `digitToBasic()`
|
13576 |
+
* @private
|
13577 |
+
* @param {Number} codePoint The basic numeric code point value.
|
13578 |
+
* @returns {Number} The numeric value of a basic code point (for use in
|
13579 |
+
* representing integers) in the range `0` to `base - 1`, or `base` if
|
13580 |
+
* the code point does not represent a value.
|
13581 |
+
*/
|
13582 |
+
function basicToDigit(codePoint) {
|
13583 |
+
if (codePoint - 48 < 10) {
|
13584 |
+
return codePoint - 22;
|
13585 |
+
}
|
13586 |
+
if (codePoint - 65 < 26) {
|
13587 |
+
return codePoint - 65;
|
13588 |
+
}
|
13589 |
+
if (codePoint - 97 < 26) {
|
13590 |
+
return codePoint - 97;
|
13591 |
+
}
|
13592 |
+
return base;
|
13593 |
+
}
|
13594 |
|
13595 |
+
/**
|
13596 |
+
* Converts a digit/integer into a basic code point.
|
13597 |
+
* @see `basicToDigit()`
|
13598 |
+
* @private
|
13599 |
+
* @param {Number} digit The numeric value of a basic code point.
|
13600 |
+
* @returns {Number} The basic code point whose value (when used for
|
13601 |
+
* representing integers) is `digit`, which needs to be in the range
|
13602 |
+
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
13603 |
+
* used; else, the lowercase form is used. The behavior is undefined
|
13604 |
+
* if `flag` is non-zero and `digit` has no uppercase form.
|
13605 |
+
*/
|
13606 |
+
function digitToBasic(digit, flag) {
|
13607 |
+
// 0..25 map to ASCII a..z or A..Z
|
13608 |
+
// 26..35 map to ASCII 0..9
|
13609 |
+
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
13610 |
+
}
|
13611 |
|
13612 |
+
/**
|
13613 |
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
13614 |
+
* http://tools.ietf.org/html/rfc3492#section-3.4
|
13615 |
+
* @private
|
13616 |
+
*/
|
13617 |
+
function adapt(delta, numPoints, firstTime) {
|
13618 |
+
var k = 0;
|
13619 |
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
13620 |
+
delta += floor(delta / numPoints);
|
13621 |
+
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
13622 |
+
delta = floor(delta / baseMinusTMin);
|
13623 |
+
}
|
13624 |
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
13625 |
+
}
|
13626 |
|
13627 |
+
/**
|
13628 |
+
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
13629 |
+
* symbols.
|
13630 |
+
* @memberOf punycode
|
13631 |
+
* @param {String} input The Punycode string of ASCII-only symbols.
|
13632 |
+
* @returns {String} The resulting string of Unicode symbols.
|
13633 |
+
*/
|
13634 |
+
function decode(input) {
|
13635 |
+
// Don't use UCS-2
|
13636 |
+
var output = [],
|
13637 |
+
inputLength = input.length,
|
13638 |
+
out,
|
13639 |
+
i = 0,
|
13640 |
+
n = initialN,
|
13641 |
+
bias = initialBias,
|
13642 |
+
basic,
|
13643 |
+
j,
|
13644 |
+
index,
|
13645 |
+
oldi,
|
13646 |
+
w,
|
13647 |
+
k,
|
13648 |
+
digit,
|
13649 |
+
t,
|
13650 |
+
/** Cached calculation results */
|
13651 |
+
baseMinusT;
|
13652 |
+
|
13653 |
+
// Handle the basic code points: let `basic` be the number of input code
|
13654 |
+
// points before the last delimiter, or `0` if there is none, then copy
|
13655 |
+
// the first basic code points to the output.
|
13656 |
+
|
13657 |
+
basic = input.lastIndexOf(delimiter);
|
13658 |
+
if (basic < 0) {
|
13659 |
+
basic = 0;
|
13660 |
+
}
|
13661 |
|
13662 |
+
for (j = 0; j < basic; ++j) {
|
13663 |
+
// if it's not a basic code point
|
13664 |
+
if (input.charCodeAt(j) >= 0x80) {
|
13665 |
+
error('not-basic');
|
13666 |
+
}
|
13667 |
+
output.push(input.charCodeAt(j));
|
13668 |
+
}
|
13669 |
|
13670 |
+
// Main decoding loop: start just after the last delimiter if any basic code
|
13671 |
+
// points were copied; start at the beginning otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
13672 |
|
13673 |
+
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
|
|
|
|
|
13674 |
|
13675 |
+
// `index` is the index of the next character to be consumed.
|
13676 |
+
// Decode a generalized variable-length integer into `delta`,
|
13677 |
+
// which gets added to `i`. The overflow checking is easier
|
13678 |
+
// if we increase `i` as we go, then subtract off its starting
|
13679 |
+
// value at the end to obtain `delta`.
|
13680 |
+
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13681 |
|
13682 |
+
if (index >= inputLength) {
|
13683 |
+
error('invalid-input');
|
13684 |
+
}
|
|
|
13685 |
|
13686 |
+
digit = basicToDigit(input.charCodeAt(index++));
|
|
|
|
|
|
|
|
|
|
|
|
|
13687 |
|
13688 |
+
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
13689 |
+
error('overflow');
|
13690 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13691 |
|
13692 |
+
i += digit * w;
|
13693 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
|
|
|
|
|
|
|
|
|
13694 |
|
13695 |
+
if (digit < t) {
|
13696 |
+
break;
|
13697 |
+
}
|
|
|
|
|
|
|
|
|
13698 |
|
13699 |
+
baseMinusT = base - t;
|
13700 |
+
if (w > floor(maxInt / baseMinusT)) {
|
13701 |
+
error('overflow');
|
13702 |
+
}
|
|
|
|
|
|
|
13703 |
|
13704 |
+
w *= baseMinusT;
|
|
|
|
|
|
|
|
|
13705 |
|
13706 |
+
}
|
13707 |
|
13708 |
+
out = output.length + 1;
|
13709 |
+
bias = adapt(i - oldi, out, oldi == 0);
|
|
|
13710 |
|
13711 |
+
// `i` was supposed to wrap around from `out` to `0`,
|
13712 |
+
// incrementing `n` each time, so we'll fix that now:
|
13713 |
+
if (floor(i / out) > maxInt - n) {
|
13714 |
+
error('overflow');
|
13715 |
+
}
|
13716 |
|
13717 |
+
n += floor(i / out);
|
13718 |
+
i %= out;
|
13719 |
|
13720 |
+
// Insert `n` at position `i` of the output
|
13721 |
+
output.splice(i++, 0, n);
|
|
|
|
|
13722 |
|
13723 |
+
}
|
13724 |
|
13725 |
+
return ucs2encode(output);
|
13726 |
+
}
|
13727 |
|
13728 |
+
/**
|
13729 |
+
* Converts a string of Unicode symbols to a Punycode string of ASCII-only
|
13730 |
+
* symbols.
|
13731 |
+
* @memberOf punycode
|
13732 |
+
* @param {String} input The string of Unicode symbols.
|
13733 |
+
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
13734 |
+
*/
|
13735 |
+
function encode(input) {
|
13736 |
+
var n,
|
13737 |
+
delta,
|
13738 |
+
handledCPCount,
|
13739 |
+
basicLength,
|
13740 |
+
bias,
|
13741 |
+
j,
|
13742 |
+
m,
|
13743 |
+
q,
|
13744 |
+
k,
|
13745 |
+
t,
|
13746 |
+
currentValue,
|
13747 |
+
output = [],
|
13748 |
+
/** `inputLength` will hold the number of code points in `input`. */
|
13749 |
+
inputLength,
|
13750 |
+
/** Cached calculation results */
|
13751 |
+
handledCPCountPlusOne,
|
13752 |
+
baseMinusT,
|
13753 |
+
qMinusT;
|
13754 |
+
|
13755 |
+
// Convert the input in UCS-2 to Unicode
|
13756 |
+
input = ucs2decode(input);
|
13757 |
+
|
13758 |
+
// Cache the length
|
13759 |
+
inputLength = input.length;
|
13760 |
+
|
13761 |
+
// Initialize the state
|
13762 |
+
n = initialN;
|
13763 |
+
delta = 0;
|
13764 |
+
bias = initialBias;
|
13765 |
+
|
13766 |
+
// Handle the basic code points
|
13767 |
+
for (j = 0; j < inputLength; ++j) {
|
13768 |
+
currentValue = input[j];
|
13769 |
+
if (currentValue < 0x80) {
|
13770 |
+
output.push(stringFromCharCode(currentValue));
|
13771 |
+
}
|
13772 |
+
}
|
13773 |
|
13774 |
+
handledCPCount = basicLength = output.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
13775 |
|
13776 |
+
// `handledCPCount` is the number of code points that have been handled;
|
13777 |
+
// `basicLength` is the number of basic code points.
|
|
|
13778 |
|
13779 |
+
// Finish the basic string - if it is not empty - with a delimiter
|
13780 |
+
if (basicLength) {
|
13781 |
+
output.push(delimiter);
|
13782 |
+
}
|
|
|
|
|
13783 |
|
13784 |
+
// Main encoding loop:
|
13785 |
+
while (handledCPCount < inputLength) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13786 |
|
13787 |
+
// All non-basic code points < n have been handled already. Find the next
|
13788 |
+
// larger one:
|
13789 |
+
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
13790 |
+
currentValue = input[j];
|
13791 |
+
if (currentValue >= n && currentValue < m) {
|
13792 |
+
m = currentValue;
|
13793 |
+
}
|
13794 |
+
}
|
13795 |
|
13796 |
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
13797 |
+
// but guard against overflow
|
13798 |
+
handledCPCountPlusOne = handledCPCount + 1;
|
13799 |
+
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
13800 |
+
error('overflow');
|
13801 |
+
}
|
13802 |
|
13803 |
+
delta += (m - n) * handledCPCountPlusOne;
|
13804 |
+
n = m;
|
13805 |
+
|
13806 |
+
for (j = 0; j < inputLength; ++j) {
|
13807 |
+
currentValue = input[j];
|
13808 |
+
|
13809 |
+
if (currentValue < n && ++delta > maxInt) {
|
13810 |
+
error('overflow');
|
13811 |
+
}
|
13812 |
+
|
13813 |
+
if (currentValue == n) {
|
13814 |
+
// Represent delta as a generalized variable-length integer
|
13815 |
+
for (q = delta, k = base; /* no condition */; k += base) {
|
13816 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
13817 |
+
if (q < t) {
|
13818 |
+
break;
|
13819 |
+
}
|
13820 |
+
qMinusT = q - t;
|
13821 |
+
baseMinusT = base - t;
|
13822 |
+
output.push(
|
13823 |
+
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
13824 |
+
);
|
13825 |
+
q = floor(qMinusT / baseMinusT);
|
13826 |
+
}
|
13827 |
+
|
13828 |
+
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
13829 |
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
13830 |
+
delta = 0;
|
13831 |
+
++handledCPCount;
|
13832 |
+
}
|
13833 |
+
}
|
13834 |
|
13835 |
+
++delta;
|
13836 |
+
++n;
|
|
|
|
|
|
|
13837 |
|
13838 |
+
}
|
13839 |
+
return output.join('');
|
13840 |
+
}
|
13841 |
|
13842 |
+
/**
|
13843 |
+
* Converts a Punycode string representing a domain name to Unicode. Only the
|
13844 |
+
* Punycoded parts of the domain name will be converted, i.e. it doesn't
|
13845 |
+
* matter if you call it on a string that has already been converted to
|
13846 |
+
* Unicode.
|
13847 |
+
* @memberOf punycode
|
13848 |
+
* @param {String} domain The Punycode domain name to convert to Unicode.
|
13849 |
+
* @returns {String} The Unicode representation of the given Punycode
|
13850 |
+
* string.
|
13851 |
+
*/
|
13852 |
+
function toUnicode(domain) {
|
13853 |
+
return mapDomain(domain, function(string) {
|
13854 |
+
return regexPunycode.test(string)
|
13855 |
+
? decode(string.slice(4).toLowerCase())
|
13856 |
+
: string;
|
13857 |
+
});
|
13858 |
+
}
|
13859 |
|
13860 |
+
/**
|
13861 |
+
* Converts a Unicode string representing a domain name to Punycode. Only the
|
13862 |
+
* non-ASCII parts of the domain name will be converted, i.e. it doesn't
|
13863 |
+
* matter if you call it with a domain that's already in ASCII.
|
13864 |
+
* @memberOf punycode
|
13865 |
+
* @param {String} domain The domain name to convert, as a Unicode string.
|
13866 |
+
* @returns {String} The Punycode representation of the given domain name.
|
13867 |
+
*/
|
13868 |
+
function toASCII(domain) {
|
13869 |
+
return mapDomain(domain, function(string) {
|
13870 |
+
return regexNonASCII.test(string)
|
13871 |
+
? 'xn--' + encode(string)
|
13872 |
+
: string;
|
13873 |
+
});
|
13874 |
+
}
|
13875 |
|
13876 |
+
/*--------------------------------------------------------------------------*/
|
13877 |
+
|
13878 |
+
/** Define the public API */
|
13879 |
+
punycode = {
|
13880 |
+
/**
|
13881 |
+
* A string representing the current Punycode.js version number.
|
13882 |
+
* @memberOf punycode
|
13883 |
+
* @type String
|
13884 |
+
*/
|
13885 |
+
'version': '1.2.4',
|
13886 |
+
/**
|
13887 |
+
* An object of methods to convert from JavaScript's internal character
|
13888 |
+
* representation (UCS-2) to Unicode code points, and back.
|
13889 |
+
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
13890 |
+
* @memberOf punycode
|
13891 |
+
* @type Object
|
13892 |
+
*/
|
13893 |
+
'ucs2': {
|
13894 |
+
'decode': ucs2decode,
|
13895 |
+
'encode': ucs2encode
|
13896 |
+
},
|
13897 |
+
'decode': decode,
|
13898 |
+
'encode': encode,
|
13899 |
+
'toASCII': toASCII,
|
13900 |
+
'toUnicode': toUnicode
|
13901 |
+
};
|
13902 |
|
13903 |
+
/** Expose `punycode` */
|
13904 |
+
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
13905 |
+
// like the following:
|
13906 |
+
if (
|
13907 |
+
typeof define == 'function' &&
|
13908 |
+
typeof define.amd == 'object' &&
|
13909 |
+
define.amd
|
13910 |
+
) {
|
13911 |
+
define('punycode', function() {
|
13912 |
+
return punycode;
|
13913 |
+
});
|
13914 |
+
} else if (freeExports && !freeExports.nodeType) {
|
13915 |
+
if (freeModule) { // in Node.js or RingoJS v0.8.0+
|
13916 |
+
freeModule.exports = punycode;
|
13917 |
+
} else { // in Narwhal or RingoJS v0.7.0-
|
13918 |
+
for (key in punycode) {
|
13919 |
+
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
13920 |
+
}
|
13921 |
+
}
|
13922 |
+
} else { // in Rhino or a web browser
|
13923 |
+
root.punycode = punycode;
|
13924 |
+
}
|
13925 |
|
13926 |
+
}(this));
|
13927 |
+
|
13928 |
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
13929 |
+
},{}],4:[function(require,module,exports){
|
13930 |
+
var log = require('./log');
|
13931 |
+
var Promise = require('./promise');
|
13932 |
+
|
13933 |
+
var html2canvasCanvasCloneAttribute = "data-html2canvas-canvas-clone";
|
13934 |
+
var html2canvasCanvasCloneIndex = 0;
|
13935 |
+
|
13936 |
+
function cloneNodeValues(document, clone, nodeName) {
|
13937 |
+
var originalNodes = document.getElementsByTagName(nodeName);
|
13938 |
+
var clonedNodes = clone.getElementsByTagName(nodeName);
|
13939 |
+
var count = originalNodes.length;
|
13940 |
+
for (var i = 0; i < count; i++) {
|
13941 |
+
clonedNodes[i].value = originalNodes[i].value;
|
13942 |
+
}
|
13943 |
+
}
|
13944 |
+
|
13945 |
+
function restoreOwnerScroll(ownerDocument, x, y) {
|
13946 |
+
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
13947 |
+
ownerDocument.defaultView.scrollTo(x, y);
|
13948 |
+
}
|
13949 |
+
}
|
13950 |
+
|
13951 |
+
function labelCanvasElements(ownerDocument) {
|
13952 |
+
[].slice.call(ownerDocument.querySelectorAll("canvas"), 0).forEach(function(canvas) {
|
13953 |
+
canvas.setAttribute(html2canvasCanvasCloneAttribute, "canvas-" + html2canvasCanvasCloneIndex++);
|
13954 |
+
});
|
13955 |
+
}
|
13956 |
+
|
13957 |
+
function cloneCanvasContents(ownerDocument, documentClone) {
|
13958 |
+
[].slice.call(ownerDocument.querySelectorAll("[" + html2canvasCanvasCloneAttribute + "]"), 0).forEach(function(canvas) {
|
13959 |
+
try {
|
13960 |
+
var clonedCanvas = documentClone.querySelector('[' + html2canvasCanvasCloneAttribute + '="' + canvas.getAttribute(html2canvasCanvasCloneAttribute) + '"]');
|
13961 |
+
if (clonedCanvas) {
|
13962 |
+
clonedCanvas.width = canvas.width;
|
13963 |
+
clonedCanvas.height = canvas.height;
|
13964 |
+
clonedCanvas.getContext("2d").putImageData(canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
13965 |
+
}
|
13966 |
+
} catch(e) {
|
13967 |
+
log("Unable to copy canvas content from", canvas, e);
|
13968 |
+
}
|
13969 |
+
canvas.removeAttribute(html2canvasCanvasCloneAttribute);
|
13970 |
+
});
|
13971 |
+
}
|
13972 |
+
|
13973 |
+
function removeScriptNodes(parent) {
|
13974 |
+
[].slice.call(parent.childNodes, 0).filter(isElementNode).forEach(function(node) {
|
13975 |
+
if (node.tagName === "SCRIPT") {
|
13976 |
+
parent.removeChild(node);
|
13977 |
+
} else {
|
13978 |
+
removeScriptNodes(node);
|
13979 |
+
}
|
13980 |
+
});
|
13981 |
+
return parent;
|
13982 |
+
}
|
13983 |
+
|
13984 |
+
function isIE9() {
|
13985 |
+
return document.documentMode && document.documentMode <= 9;
|
13986 |
+
}
|
13987 |
+
|
13988 |
+
// https://github.com/niklasvh/html2canvas/issues/503
|
13989 |
+
function cloneNodeIE9(node, javascriptEnabled) {
|
13990 |
+
var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false);
|
13991 |
+
|
13992 |
+
var child = node.firstChild;
|
13993 |
+
while(child) {
|
13994 |
+
if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') {
|
13995 |
+
clone.appendChild(cloneNodeIE9(child, javascriptEnabled));
|
13996 |
+
}
|
13997 |
+
child = child.nextSibling;
|
13998 |
+
}
|
13999 |
+
|
14000 |
+
return clone;
|
14001 |
+
}
|
14002 |
+
|
14003 |
+
|
14004 |
+
|
14005 |
+
function isElementNode(node) {
|
14006 |
+
return node.nodeType === Node.ELEMENT_NODE;
|
14007 |
+
}
|
14008 |
+
|
14009 |
+
module.exports = function(ownerDocument, containerDocument, width, height, options, x ,y) {
|
14010 |
+
labelCanvasElements(ownerDocument);
|
14011 |
+
var documentElement = isIE9() ? cloneNodeIE9(ownerDocument.documentElement, options.javascriptEnabled) : ownerDocument.documentElement.cloneNode(true);
|
14012 |
+
var container = containerDocument.createElement("iframe");
|
14013 |
+
|
14014 |
+
container.className = "html2canvas-container";
|
14015 |
+
container.style.visibility = "hidden";
|
14016 |
+
container.style.position = "fixed";
|
14017 |
+
container.style.left = "-10000px";
|
14018 |
+
container.style.top = "0px";
|
14019 |
+
container.style.border = "0";
|
14020 |
+
container.width = width;
|
14021 |
+
container.height = height;
|
14022 |
+
container.scrolling = "no"; // ios won't scroll without it
|
14023 |
+
containerDocument.body.appendChild(container);
|
14024 |
+
|
14025 |
+
return new Promise(function(resolve) {
|
14026 |
+
var documentClone = container.contentWindow.document;
|
14027 |
+
|
14028 |
+
cloneNodeValues(ownerDocument.documentElement, documentElement, "textarea");
|
14029 |
+
cloneNodeValues(ownerDocument.documentElement, documentElement, "select");
|
14030 |
+
|
14031 |
+
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
14032 |
+
if window url is about:blank, we can assign the url to current by writing onto the document
|
14033 |
+
*/
|
14034 |
+
container.contentWindow.onload = container.onload = function() {
|
14035 |
+
var interval = setInterval(function() {
|
14036 |
+
if (documentClone.body.childNodes.length > 0) {
|
14037 |
+
cloneCanvasContents(ownerDocument, documentClone);
|
14038 |
+
clearInterval(interval);
|
14039 |
+
if (options.type === "view") {
|
14040 |
+
container.contentWindow.scrollTo(x, y);
|
14041 |
+
}
|
14042 |
+
resolve(container);
|
14043 |
+
}
|
14044 |
+
}, 50);
|
14045 |
+
};
|
14046 |
+
|
14047 |
+
documentClone.open();
|
14048 |
+
documentClone.write("<!DOCTYPE html><html></html>");
|
14049 |
+
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
14050 |
+
restoreOwnerScroll(ownerDocument, x, y);
|
14051 |
+
documentClone.replaceChild(options.javascriptEnabled === true ? documentClone.adoptNode(documentElement) : removeScriptNodes(documentClone.adoptNode(documentElement)), documentClone.documentElement);
|
14052 |
+
documentClone.close();
|
14053 |
+
});
|
14054 |
+
};
|
14055 |
+
|
14056 |
+
},{"./log":15,"./promise":18}],5:[function(require,module,exports){
|
14057 |
+
// http://dev.w3.org/csswg/css-color/
|
14058 |
+
|
14059 |
+
function Color(value) {
|
14060 |
+
this.r = 0;
|
14061 |
+
this.g = 0;
|
14062 |
+
this.b = 0;
|
14063 |
+
this.a = null;
|
14064 |
+
var result = this.fromArray(value) ||
|
14065 |
+
this.namedColor(value) ||
|
14066 |
+
this.rgb(value) ||
|
14067 |
+
this.rgba(value) ||
|
14068 |
+
this.hex6(value) ||
|
14069 |
+
this.hex3(value);
|
14070 |
+
}
|
14071 |
+
|
14072 |
+
Color.prototype.darken = function(amount) {
|
14073 |
+
var a = 1 - amount;
|
14074 |
+
return new Color([
|
14075 |
+
Math.round(this.r * a),
|
14076 |
+
Math.round(this.g * a),
|
14077 |
+
Math.round(this.b * a),
|
14078 |
+
this.a
|
14079 |
+
]);
|
14080 |
+
};
|
14081 |
+
|
14082 |
+
Color.prototype.isTransparent = function() {
|
14083 |
+
return this.a === 0;
|
14084 |
+
};
|
14085 |
+
|
14086 |
+
Color.prototype.isBlack = function() {
|
14087 |
+
return this.r === 0 && this.g === 0 && this.b === 0;
|
14088 |
+
};
|
14089 |
+
|
14090 |
+
Color.prototype.fromArray = function(array) {
|
14091 |
+
if (Array.isArray(array)) {
|
14092 |
+
this.r = Math.min(array[0], 255);
|
14093 |
+
this.g = Math.min(array[1], 255);
|
14094 |
+
this.b = Math.min(array[2], 255);
|
14095 |
+
if (array.length > 3) {
|
14096 |
+
this.a = array[3];
|
14097 |
+
}
|
14098 |
+
}
|
14099 |
+
|
14100 |
+
return (Array.isArray(array));
|
14101 |
+
};
|
14102 |
+
|
14103 |
+
var _hex3 = /^#([a-f0-9]{3})$/i;
|
14104 |
+
|
14105 |
+
Color.prototype.hex3 = function(value) {
|
14106 |
+
var match = null;
|
14107 |
+
if ((match = value.match(_hex3)) !== null) {
|
14108 |
+
this.r = parseInt(match[1][0] + match[1][0], 16);
|
14109 |
+
this.g = parseInt(match[1][1] + match[1][1], 16);
|
14110 |
+
this.b = parseInt(match[1][2] + match[1][2], 16);
|
14111 |
+
}
|
14112 |
+
return match !== null;
|
14113 |
+
};
|
14114 |
+
|
14115 |
+
var _hex6 = /^#([a-f0-9]{6})$/i;
|
14116 |
+
|
14117 |
+
Color.prototype.hex6 = function(value) {
|
14118 |
+
var match = null;
|
14119 |
+
if ((match = value.match(_hex6)) !== null) {
|
14120 |
+
this.r = parseInt(match[1].substring(0, 2), 16);
|
14121 |
+
this.g = parseInt(match[1].substring(2, 4), 16);
|
14122 |
+
this.b = parseInt(match[1].substring(4, 6), 16);
|
14123 |
+
}
|
14124 |
+
return match !== null;
|
14125 |
+
};
|
14126 |
+
|
14127 |
+
|
14128 |
+
var _rgb = /^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;
|
14129 |
+
|
14130 |
+
Color.prototype.rgb = function(value) {
|
14131 |
+
var match = null;
|
14132 |
+
if ((match = value.match(_rgb)) !== null) {
|
14133 |
+
this.r = Number(match[1]);
|
14134 |
+
this.g = Number(match[2]);
|
14135 |
+
this.b = Number(match[3]);
|
14136 |
+
}
|
14137 |
+
return match !== null;
|
14138 |
+
};
|
14139 |
+
|
14140 |
+
var _rgba = /^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;
|
14141 |
+
|
14142 |
+
Color.prototype.rgba = function(value) {
|
14143 |
+
var match = null;
|
14144 |
+
if ((match = value.match(_rgba)) !== null) {
|
14145 |
+
this.r = Number(match[1]);
|
14146 |
+
this.g = Number(match[2]);
|
14147 |
+
this.b = Number(match[3]);
|
14148 |
+
this.a = Number(match[4]);
|
14149 |
+
}
|
14150 |
+
return match !== null;
|
14151 |
+
};
|
14152 |
+
|
14153 |
+
Color.prototype.toString = function() {
|
14154 |
+
return this.a !== null && this.a !== 1 ?
|
14155 |
+
"rgba(" + [this.r, this.g, this.b, this.a].join(",") + ")" :
|
14156 |
+
"rgb(" + [this.r, this.g, this.b].join(",") + ")";
|
14157 |
+
};
|
14158 |
+
|
14159 |
+
Color.prototype.namedColor = function(value) {
|
14160 |
+
var color = colors[value.toLowerCase()];
|
14161 |
+
if (color) {
|
14162 |
+
this.r = color[0];
|
14163 |
+
this.g = color[1];
|
14164 |
+
this.b = color[2];
|
14165 |
+
} else if (value.toLowerCase() === "transparent") {
|
14166 |
+
this.r = this.g = this.b = this.a = 0;
|
14167 |
+
return true;
|
14168 |
+
}
|
14169 |
+
|
14170 |
+
return !!color;
|
14171 |
+
};
|
14172 |
+
|
14173 |
+
Color.prototype.isColor = true;
|
14174 |
+
|
14175 |
+
// JSON.stringify([].slice.call($$('.named-color-table tr'), 1).map(function(row) { return [row.childNodes[3].textContent, row.childNodes[5].textContent.trim().split(",").map(Number)] }).reduce(function(data, row) {data[row[0]] = row[1]; return data}, {}))
|
14176 |
+
var colors = {
|
14177 |
+
"aliceblue": [240, 248, 255],
|
14178 |
+
"antiquewhite": [250, 235, 215],
|
14179 |
+
"aqua": [0, 255, 255],
|
14180 |
+
"aquamarine": [127, 255, 212],
|
14181 |
+
"azure": [240, 255, 255],
|
14182 |
+
"beige": [245, 245, 220],
|
14183 |
+
"bisque": [255, 228, 196],
|
14184 |
+
"black": [0, 0, 0],
|
14185 |
+
"blanchedalmond": [255, 235, 205],
|
14186 |
+
"blue": [0, 0, 255],
|
14187 |
+
"blueviolet": [138, 43, 226],
|
14188 |
+
"brown": [165, 42, 42],
|
14189 |
+
"burlywood": [222, 184, 135],
|
14190 |
+
"cadetblue": [95, 158, 160],
|
14191 |
+
"chartreuse": [127, 255, 0],
|
14192 |
+
"chocolate": [210, 105, 30],
|
14193 |
+
"coral": [255, 127, 80],
|
14194 |
+
"cornflowerblue": [100, 149, 237],
|
14195 |
+
"cornsilk": [255, 248, 220],
|
14196 |
+
"crimson": [220, 20, 60],
|
14197 |
+
"cyan": [0, 255, 255],
|
14198 |
+
"darkblue": [0, 0, 139],
|
14199 |
+
"darkcyan": [0, 139, 139],
|
14200 |
+
"darkgoldenrod": [184, 134, 11],
|
14201 |
+
"darkgray": [169, 169, 169],
|
14202 |
+
"darkgreen": [0, 100, 0],
|
14203 |
+
"darkgrey": [169, 169, 169],
|
14204 |
+
"darkkhaki": [189, 183, 107],
|
14205 |
+
"darkmagenta": [139, 0, 139],
|
14206 |
+
"darkolivegreen": [85, 107, 47],
|
14207 |
+
"darkorange": [255, 140, 0],
|
14208 |
+
"darkorchid": [153, 50, 204],
|
14209 |
+
"darkred": [139, 0, 0],
|
14210 |
+
"darksalmon": [233, 150, 122],
|
14211 |
+
"darkseagreen": [143, 188, 143],
|
14212 |
+
"darkslateblue": [72, 61, 139],
|
14213 |
+
"darkslategray": [47, 79, 79],
|
14214 |
+
"darkslategrey": [47, 79, 79],
|
14215 |
+
"darkturquoise": [0, 206, 209],
|
14216 |
+
"darkviolet": [148, 0, 211],
|
14217 |
+
"deeppink": [255, 20, 147],
|
14218 |
+
"deepskyblue": [0, 191, 255],
|
14219 |
+
"dimgray": [105, 105, 105],
|
14220 |
+
"dimgrey": [105, 105, 105],
|
14221 |
+
"dodgerblue": [30, 144, 255],
|
14222 |
+
"firebrick": [178, 34, 34],
|
14223 |
+
"floralwhite": [255, 250, 240],
|
14224 |
+
"forestgreen": [34, 139, 34],
|
14225 |
+
"fuchsia": [255, 0, 255],
|
14226 |
+
"gainsboro": [220, 220, 220],
|
14227 |
+
"ghostwhite": [248, 248, 255],
|
14228 |
+
"gold": [255, 215, 0],
|
14229 |
+
"goldenrod": [218, 165, 32],
|
14230 |
+
"gray": [128, 128, 128],
|
14231 |
+
"green": [0, 128, 0],
|
14232 |
+
"greenyellow": [173, 255, 47],
|
14233 |
+
"grey": [128, 128, 128],
|
14234 |
+
"honeydew": [240, 255, 240],
|
14235 |
+
"hotpink": [255, 105, 180],
|
14236 |
+
"indianred": [205, 92, 92],
|
14237 |
+
"indigo": [75, 0, 130],
|
14238 |
+
"ivory": [255, 255, 240],
|
14239 |
+
"khaki": [240, 230, 140],
|
14240 |
+
"lavender": [230, 230, 250],
|
14241 |
+
"lavenderblush": [255, 240, 245],
|
14242 |
+
"lawngreen": [124, 252, 0],
|
14243 |
+
"lemonchiffon": [255, 250, 205],
|
14244 |
+
"lightblue": [173, 216, 230],
|
14245 |
+
"lightcoral": [240, 128, 128],
|
14246 |
+
"lightcyan": [224, 255, 255],
|
14247 |
+
"lightgoldenrodyellow": [250, 250, 210],
|
14248 |
+
"lightgray": [211, 211, 211],
|
14249 |
+
"lightgreen": [144, 238, 144],
|
14250 |
+
"lightgrey": [211, 211, 211],
|
14251 |
+
"lightpink": [255, 182, 193],
|
14252 |
+
"lightsalmon": [255, 160, 122],
|
14253 |
+
"lightseagreen": [32, 178, 170],
|
14254 |
+
"lightskyblue": [135, 206, 250],
|
14255 |
+
"lightslategray": [119, 136, 153],
|
14256 |
+
"lightslategrey": [119, 136, 153],
|
14257 |
+
"lightsteelblue": [176, 196, 222],
|
14258 |
+
"lightyellow": [255, 255, 224],
|
14259 |
+
"lime": [0, 255, 0],
|
14260 |
+
"limegreen": [50, 205, 50],
|
14261 |
+
"linen": [250, 240, 230],
|
14262 |
+
"magenta": [255, 0, 255],
|
14263 |
+
"maroon": [128, 0, 0],
|
14264 |
+
"mediumaquamarine": [102, 205, 170],
|
14265 |
+
"mediumblue": [0, 0, 205],
|
14266 |
+
"mediumorchid": [186, 85, 211],
|
14267 |
+
"mediumpurple": [147, 112, 219],
|
14268 |
+
"mediumseagreen": [60, 179, 113],
|
14269 |
+
"mediumslateblue": [123, 104, 238],
|
14270 |
+
"mediumspringgreen": [0, 250, 154],
|
14271 |
+
"mediumturquoise": [72, 209, 204],
|
14272 |
+
"mediumvioletred": [199, 21, 133],
|
14273 |
+
"midnightblue": [25, 25, 112],
|
14274 |
+
"mintcream": [245, 255, 250],
|
14275 |
+
"mistyrose": [255, 228, 225],
|
14276 |
+
"moccasin": [255, 228, 181],
|
14277 |
+
"navajowhite": [255, 222, 173],
|
14278 |
+
"navy": [0, 0, 128],
|
14279 |
+
"oldlace": [253, 245, 230],
|
14280 |
+
"olive": [128, 128, 0],
|
14281 |
+
"olivedrab": [107, 142, 35],
|
14282 |
+
"orange": [255, 165, 0],
|
14283 |
+
"orangered": [255, 69, 0],
|
14284 |
+
"orchid": [218, 112, 214],
|
14285 |
+
"palegoldenrod": [238, 232, 170],
|
14286 |
+
"palegreen": [152, 251, 152],
|
14287 |
+
"paleturquoise": [175, 238, 238],
|
14288 |
+
"palevioletred": [219, 112, 147],
|
14289 |
+
"papayawhip": [255, 239, 213],
|
14290 |
+
"peachpuff": [255, 218, 185],
|
14291 |
+
"peru": [205, 133, 63],
|
14292 |
+
"pink": [255, 192, 203],
|
14293 |
+
"plum": [221, 160, 221],
|
14294 |
+
"powderblue": [176, 224, 230],
|
14295 |
+
"purple": [128, 0, 128],
|
14296 |
+
"rebeccapurple": [102, 51, 153],
|
14297 |
+
"red": [255, 0, 0],
|
14298 |
+
"rosybrown": [188, 143, 143],
|
14299 |
+
"royalblue": [65, 105, 225],
|
14300 |
+
"saddlebrown": [139, 69, 19],
|
14301 |
+
"salmon": [250, 128, 114],
|
14302 |
+
"sandybrown": [244, 164, 96],
|
14303 |
+
"seagreen": [46, 139, 87],
|
14304 |
+
"seashell": [255, 245, 238],
|
14305 |
+
"sienna": [160, 82, 45],
|
14306 |
+
"silver": [192, 192, 192],
|
14307 |
+
"skyblue": [135, 206, 235],
|
14308 |
+
"slateblue": [106, 90, 205],
|
14309 |
+
"slategray": [112, 128, 144],
|
14310 |
+
"slategrey": [112, 128, 144],
|
14311 |
+
"snow": [255, 250, 250],
|
14312 |
+
"springgreen": [0, 255, 127],
|
14313 |
+
"steelblue": [70, 130, 180],
|
14314 |
+
"tan": [210, 180, 140],
|
14315 |
+
"teal": [0, 128, 128],
|
14316 |
+
"thistle": [216, 191, 216],
|
14317 |
+
"tomato": [255, 99, 71],
|
14318 |
+
"turquoise": [64, 224, 208],
|
14319 |
+
"violet": [238, 130, 238],
|
14320 |
+
"wheat": [245, 222, 179],
|
14321 |
+
"white": [255, 255, 255],
|
14322 |
+
"whitesmoke": [245, 245, 245],
|
14323 |
+
"yellow": [255, 255, 0],
|
14324 |
+
"yellowgreen": [154, 205, 50]
|
14325 |
+
};
|
14326 |
+
|
14327 |
+
module.exports = Color;
|
14328 |
+
|
14329 |
+
},{}],6:[function(require,module,exports){
|
14330 |
+
var Promise = require('./promise');
|
14331 |
+
var Support = require('./support');
|
14332 |
+
var CanvasRenderer = require('./renderers/canvas');
|
14333 |
+
var ImageLoader = require('./imageloader');
|
14334 |
+
var NodeParser = require('./nodeparser');
|
14335 |
+
var NodeContainer = require('./nodecontainer');
|
14336 |
+
var log = require('./log');
|
14337 |
+
var utils = require('./utils');
|
14338 |
+
var createWindowClone = require('./clone');
|
14339 |
+
var loadUrlDocument = require('./proxy').loadUrlDocument;
|
14340 |
+
var getBounds = utils.getBounds;
|
14341 |
+
|
14342 |
+
var html2canvasNodeAttribute = "data-html2canvas-node";
|
14343 |
+
var html2canvasCloneIndex = 0;
|
14344 |
+
|
14345 |
+
function html2canvas(nodeList, options) {
|
14346 |
+
var index = html2canvasCloneIndex++;
|
14347 |
+
options = options || {};
|
14348 |
+
if (options.logging) {
|
14349 |
+
window.html2canvas.logging = true;
|
14350 |
+
window.html2canvas.start = Date.now();
|
14351 |
+
}
|
14352 |
+
|
14353 |
+
options.async = typeof(options.async) === "undefined" ? true : options.async;
|
14354 |
+
options.allowTaint = typeof(options.allowTaint) === "undefined" ? false : options.allowTaint;
|
14355 |
+
options.removeContainer = typeof(options.removeContainer) === "undefined" ? true : options.removeContainer;
|
14356 |
+
options.javascriptEnabled = typeof(options.javascriptEnabled) === "undefined" ? false : options.javascriptEnabled;
|
14357 |
+
options.imageTimeout = typeof(options.imageTimeout) === "undefined" ? 10000 : options.imageTimeout;
|
14358 |
+
options.renderer = typeof(options.renderer) === "function" ? options.renderer : CanvasRenderer;
|
14359 |
+
options.strict = !!options.strict;
|
14360 |
+
|
14361 |
+
if (typeof(nodeList) === "string") {
|
14362 |
+
if (typeof(options.proxy) !== "string") {
|
14363 |
+
return Promise.reject("Proxy must be used when rendering url");
|
14364 |
+
}
|
14365 |
+
var width = options.width != null ? options.width : window.innerWidth;
|
14366 |
+
var height = options.height != null ? options.height : window.innerHeight;
|
14367 |
+
return loadUrlDocument(absoluteUrl(nodeList), options.proxy, document, width, height, options).then(function(container) {
|
14368 |
+
return renderWindow(container.contentWindow.document.documentElement, container, options, width, height);
|
14369 |
+
});
|
14370 |
+
}
|
14371 |
+
|
14372 |
+
var node = ((nodeList === undefined) ? [document.documentElement] : ((nodeList.length) ? nodeList : [nodeList]))[0];
|
14373 |
+
node.setAttribute(html2canvasNodeAttribute + index, index);
|
14374 |
+
return renderDocument(node.ownerDocument, options, node.ownerDocument.defaultView.innerWidth, node.ownerDocument.defaultView.innerHeight, index).then(function(canvas) {
|
14375 |
+
if (typeof(options.onrendered) === "function") {
|
14376 |
+
log("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas");
|
14377 |
+
options.onrendered(canvas);
|
14378 |
+
}
|
14379 |
+
return canvas;
|
14380 |
+
});
|
14381 |
+
}
|
14382 |
+
|
14383 |
+
html2canvas.Promise = Promise;
|
14384 |
+
html2canvas.CanvasRenderer = CanvasRenderer;
|
14385 |
+
html2canvas.NodeContainer = NodeContainer;
|
14386 |
+
html2canvas.log = log;
|
14387 |
+
html2canvas.utils = utils;
|
14388 |
+
|
14389 |
+
module.exports = (typeof(document) === "undefined" || typeof(Object.create) !== "function" || typeof(document.createElement("canvas").getContext) !== "function") ? function() {
|
14390 |
+
return Promise.reject("No canvas support");
|
14391 |
+
} : html2canvas;
|
14392 |
+
|
14393 |
+
function renderDocument(document, options, windowWidth, windowHeight, html2canvasIndex) {
|
14394 |
+
return createWindowClone(document, document, windowWidth, windowHeight, options, document.defaultView.pageXOffset, document.defaultView.pageYOffset).then(function(container) {
|
14395 |
+
log("Document cloned");
|
14396 |
+
var attributeName = html2canvasNodeAttribute + html2canvasIndex;
|
14397 |
+
var selector = "[" + attributeName + "='" + html2canvasIndex + "']";
|
14398 |
+
document.querySelector(selector).removeAttribute(attributeName);
|
14399 |
+
var clonedWindow = container.contentWindow;
|
14400 |
+
var node = clonedWindow.document.querySelector(selector);
|
14401 |
+
var oncloneHandler = (typeof(options.onclone) === "function") ? Promise.resolve(options.onclone(clonedWindow.document)) : Promise.resolve(true);
|
14402 |
+
return oncloneHandler.then(function() {
|
14403 |
+
return renderWindow(node, container, options, windowWidth, windowHeight);
|
14404 |
+
});
|
14405 |
+
});
|
14406 |
+
}
|
14407 |
+
|
14408 |
+
function renderWindow(node, container, options, windowWidth, windowHeight) {
|
14409 |
+
var clonedWindow = container.contentWindow;
|
14410 |
+
var support = new Support(clonedWindow.document);
|
14411 |
+
var imageLoader = new ImageLoader(options, support);
|
14412 |
+
var bounds = getBounds(node);
|
14413 |
+
var width = options.type === "view" ? windowWidth : documentWidth(clonedWindow.document);
|
14414 |
+
var height = options.type === "view" ? windowHeight : documentHeight(clonedWindow.document);
|
14415 |
+
var renderer = new options.renderer(width, height, imageLoader, options, document);
|
14416 |
+
var parser = new NodeParser(node, renderer, support, imageLoader, options);
|
14417 |
+
return parser.ready.then(function() {
|
14418 |
+
log("Finished rendering");
|
14419 |
+
var canvas;
|
14420 |
+
|
14421 |
+
if (options.type === "view") {
|
14422 |
+
canvas = crop(renderer.canvas, {width: renderer.canvas.width, height: renderer.canvas.height, top: 0, left: 0, x: 0, y: 0});
|
14423 |
+
} else if (node === clonedWindow.document.body || node === clonedWindow.document.documentElement || options.canvas != null) {
|
14424 |
+
canvas = renderer.canvas;
|
14425 |
+
} else {
|
14426 |
+
canvas = crop(renderer.canvas, {width: options.width != null ? options.width : bounds.width, height: options.height != null ? options.height : bounds.height, top: bounds.top, left: bounds.left, x: clonedWindow.pageXOffset, y: clonedWindow.pageYOffset});
|
14427 |
+
}
|
14428 |
+
|
14429 |
+
cleanupContainer(container, options);
|
14430 |
+
return canvas;
|
14431 |
+
});
|
14432 |
+
}
|
14433 |
+
|
14434 |
+
function cleanupContainer(container, options) {
|
14435 |
+
if (options.removeContainer) {
|
14436 |
+
container.parentNode.removeChild(container);
|
14437 |
+
log("Cleaned up container");
|
14438 |
+
}
|
14439 |
+
}
|
14440 |
+
|
14441 |
+
function crop(canvas, bounds) {
|
14442 |
+
var croppedCanvas = document.createElement("canvas");
|
14443 |
+
var x1 = Math.min(canvas.width - 1, Math.max(0, bounds.left));
|
14444 |
+
var x2 = Math.min(canvas.width, Math.max(1, bounds.left + bounds.width));
|
14445 |
+
var y1 = Math.min(canvas.height - 1, Math.max(0, bounds.top));
|
14446 |
+
var y2 = Math.min(canvas.height, Math.max(1, bounds.top + bounds.height));
|
14447 |
+
croppedCanvas.width = bounds.width;
|
14448 |
+
croppedCanvas.height = bounds.height;
|
14449 |
+
log("Cropping canvas at:", "left:", bounds.left, "top:", bounds.top, "width:", (x2-x1), "height:", (y2-y1));
|
14450 |
+
log("Resulting crop with width", bounds.width, "and height", bounds.height, " with x", x1, "and y", y1);
|
14451 |
+
croppedCanvas.getContext("2d").drawImage(canvas, x1, y1, x2-x1, y2-y1, bounds.x, bounds.y, x2-x1, y2-y1);
|
14452 |
+
return croppedCanvas;
|
14453 |
+
}
|
14454 |
+
|
14455 |
+
function documentWidth (doc) {
|
14456 |
+
return Math.max(
|
14457 |
+
Math.max(doc.body.scrollWidth, doc.documentElement.scrollWidth),
|
14458 |
+
Math.max(doc.body.offsetWidth, doc.documentElement.offsetWidth),
|
14459 |
+
Math.max(doc.body.clientWidth, doc.documentElement.clientWidth)
|
14460 |
+
);
|
14461 |
+
}
|
14462 |
+
|
14463 |
+
function documentHeight (doc) {
|
14464 |
+
return Math.max(
|
14465 |
+
Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight),
|
14466 |
+
Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight),
|
14467 |
+
Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
|
14468 |
+
);
|
14469 |
+
}
|
14470 |
+
|
14471 |
+
function absoluteUrl(url) {
|
14472 |
+
var link = document.createElement("a");
|
14473 |
+
link.href = url;
|
14474 |
+
link.href = link.href;
|
14475 |
+
return link;
|
14476 |
+
}
|
14477 |
+
|
14478 |
+
},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(require,module,exports){
|
14479 |
+
var Promise = require('./promise');
|
14480 |
+
var log = require('./log');
|
14481 |
+
var smallImage = require('./utils').smallImage;
|
14482 |
+
|
14483 |
+
function DummyImageContainer(src) {
|
14484 |
+
this.src = src;
|
14485 |
+
log("DummyImageContainer for", src);
|
14486 |
+
if (!this.promise || !this.image) {
|
14487 |
+
log("Initiating DummyImageContainer");
|
14488 |
+
DummyImageContainer.prototype.image = new Image();
|
14489 |
+
var image = this.image;
|
14490 |
+
DummyImageContainer.prototype.promise = new Promise(function(resolve, reject) {
|
14491 |
+
image.onload = resolve;
|
14492 |
+
image.onerror = reject;
|
14493 |
+
image.src = smallImage();
|
14494 |
+
if (image.complete === true) {
|
14495 |
+
resolve(image);
|
14496 |
+
}
|
14497 |
+
});
|
14498 |
+
}
|
14499 |
+
}
|
14500 |
+
|
14501 |
+
module.exports = DummyImageContainer;
|
14502 |
+
|
14503 |
+
},{"./log":15,"./promise":18,"./utils":29}],8:[function(require,module,exports){
|
14504 |
+
var smallImage = require('./utils').smallImage;
|
14505 |
+
|
14506 |
+
function Font(family, size) {
|
14507 |
+
var container = document.createElement('div'),
|
14508 |
+
img = document.createElement('img'),
|
14509 |
+
span = document.createElement('span'),
|
14510 |
+
sampleText = 'Hidden Text',
|
14511 |
+
baseline,
|
14512 |
+
middle;
|
14513 |
+
|
14514 |
+
container.style.visibility = "hidden";
|
14515 |
+
container.style.fontFamily = family;
|
14516 |
+
container.style.fontSize = size;
|
14517 |
+
container.style.margin = 0;
|
14518 |
+
container.style.padding = 0;
|
14519 |
+
|
14520 |
+
document.body.appendChild(container);
|
14521 |
+
|
14522 |
+
img.src = smallImage();
|
14523 |
+
img.width = 1;
|
14524 |
+
img.height = 1;
|
14525 |
+
|
14526 |
+
img.style.margin = 0;
|
14527 |
+
img.style.padding = 0;
|
14528 |
+
img.style.verticalAlign = "baseline";
|
14529 |
+
|
14530 |
+
span.style.fontFamily = family;
|
14531 |
+
span.style.fontSize = size;
|
14532 |
+
span.style.margin = 0;
|
14533 |
+
span.style.padding = 0;
|
14534 |
+
|
14535 |
+
span.appendChild(document.createTextNode(sampleText));
|
14536 |
+
container.appendChild(span);
|
14537 |
+
container.appendChild(img);
|
14538 |
+
baseline = (img.offsetTop - span.offsetTop) + 1;
|
14539 |
+
|
14540 |
+
container.removeChild(span);
|
14541 |
+
container.appendChild(document.createTextNode(sampleText));
|
14542 |
+
|
14543 |
+
container.style.lineHeight = "normal";
|
14544 |
+
img.style.verticalAlign = "super";
|
14545 |
+
|
14546 |
+
middle = (img.offsetTop-container.offsetTop) + 1;
|
14547 |
+
|
14548 |
+
document.body.removeChild(container);
|
14549 |
+
|
14550 |
+
this.baseline = baseline;
|
14551 |
+
this.lineWidth = 1;
|
14552 |
+
this.middle = middle;
|
14553 |
+
}
|
14554 |
+
|
14555 |
+
module.exports = Font;
|
14556 |
+
|
14557 |
+
},{"./utils":29}],9:[function(require,module,exports){
|
14558 |
+
var Font = require('./font');
|
14559 |
+
|
14560 |
+
function FontMetrics() {
|
14561 |
+
this.data = {};
|
14562 |
+
}
|
14563 |
+
|
14564 |
+
FontMetrics.prototype.getMetrics = function(family, size) {
|
14565 |
+
if (this.data[family + "-" + size] === undefined) {
|
14566 |
+
this.data[family + "-" + size] = new Font(family, size);
|
14567 |
+
}
|
14568 |
+
return this.data[family + "-" + size];
|
14569 |
+
};
|
14570 |
+
|
14571 |
+
module.exports = FontMetrics;
|
14572 |
+
|
14573 |
+
},{"./font":8}],10:[function(require,module,exports){
|
14574 |
+
var utils = require('./utils');
|
14575 |
+
var Promise = require('./promise');
|
14576 |
+
var getBounds = utils.getBounds;
|
14577 |
+
var loadUrlDocument = require('./proxy').loadUrlDocument;
|
14578 |
+
|
14579 |
+
function FrameContainer(container, sameOrigin, options) {
|
14580 |
+
this.image = null;
|
14581 |
+
this.src = container;
|
14582 |
+
var self = this;
|
14583 |
+
var bounds = getBounds(container);
|
14584 |
+
this.promise = (!sameOrigin ? this.proxyLoad(options.proxy, bounds, options) : new Promise(function(resolve) {
|
14585 |
+
if (container.contentWindow.document.URL === "about:blank" || container.contentWindow.document.documentElement == null) {
|
14586 |
+
container.contentWindow.onload = container.onload = function() {
|
14587 |
+
resolve(container);
|
14588 |
+
};
|
14589 |
+
} else {
|
14590 |
+
resolve(container);
|
14591 |
+
}
|
14592 |
+
})).then(function(container) {
|
14593 |
+
var html2canvas = require('./core');
|
14594 |
+
return html2canvas(container.contentWindow.document.documentElement, {type: 'view', width: container.width, height: container.height, proxy: options.proxy, javascriptEnabled: options.javascriptEnabled, removeContainer: options.removeContainer, allowTaint: options.allowTaint, imageTimeout: options.imageTimeout / 2});
|
14595 |
+
}).then(function(canvas) {
|
14596 |
+
return self.image = canvas;
|
14597 |
+
});
|
14598 |
+
}
|
14599 |
+
|
14600 |
+
FrameContainer.prototype.proxyLoad = function(proxy, bounds, options) {
|
14601 |
+
var container = this.src;
|
14602 |
+
return loadUrlDocument(container.src, proxy, container.ownerDocument, bounds.width, bounds.height, options);
|
14603 |
+
};
|
14604 |
+
|
14605 |
+
module.exports = FrameContainer;
|
14606 |
+
|
14607 |
+
},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(require,module,exports){
|
14608 |
+
var Promise = require('./promise');
|
14609 |
+
|
14610 |
+
function GradientContainer(imageData) {
|
14611 |
+
this.src = imageData.value;
|
14612 |
+
this.colorStops = [];
|
14613 |
+
this.type = null;
|
14614 |
+
this.x0 = 0.5;
|
14615 |
+
this.y0 = 0.5;
|
14616 |
+
this.x1 = 0.5;
|
14617 |
+
this.y1 = 0.5;
|
14618 |
+
this.promise = Promise.resolve(true);
|
14619 |
+
}
|
14620 |
+
|
14621 |
+
GradientContainer.prototype.TYPES = {
|
14622 |
+
LINEAR: 1,
|
14623 |
+
RADIAL: 2
|
14624 |
+
};
|
14625 |
+
|
14626 |
+
module.exports = GradientContainer;
|
14627 |
+
|
14628 |
+
},{"./promise":18}],12:[function(require,module,exports){
|
14629 |
+
var Promise = require('./promise');
|
14630 |
+
|
14631 |
+
function ImageContainer(src, cors) {
|
14632 |
+
this.src = src;
|
14633 |
+
this.image = new Image();
|
14634 |
+
var self = this;
|
14635 |
+
this.tainted = null;
|
14636 |
+
this.promise = new Promise(function(resolve, reject) {
|
14637 |
+
self.image.onload = resolve;
|
14638 |
+
self.image.onerror = reject;
|
14639 |
+
if (cors) {
|
14640 |
+
self.image.crossOrigin = "anonymous";
|
14641 |
+
}
|
14642 |
+
self.image.src = src;
|
14643 |
+
if (self.image.complete === true) {
|
14644 |
+
resolve(self.image);
|
14645 |
+
}
|
14646 |
+
});
|
14647 |
+
}
|
14648 |
+
|
14649 |
+
module.exports = ImageContainer;
|
14650 |
+
|
14651 |
+
},{"./promise":18}],13:[function(require,module,exports){
|
14652 |
+
var Promise = require('./promise');
|
14653 |
+
var log = require('./log');
|
14654 |
+
var ImageContainer = require('./imagecontainer');
|
14655 |
+
var DummyImageContainer = require('./dummyimagecontainer');
|
14656 |
+
var ProxyImageContainer = require('./proxyimagecontainer');
|
14657 |
+
var FrameContainer = require('./framecontainer');
|
14658 |
+
var SVGContainer = require('./svgcontainer');
|
14659 |
+
var SVGNodeContainer = require('./svgnodecontainer');
|
14660 |
+
var LinearGradientContainer = require('./lineargradientcontainer');
|
14661 |
+
var WebkitGradientContainer = require('./webkitgradientcontainer');
|
14662 |
+
var bind = require('./utils').bind;
|
14663 |
+
|
14664 |
+
function ImageLoader(options, support) {
|
14665 |
+
this.link = null;
|
14666 |
+
this.options = options;
|
14667 |
+
this.support = support;
|
14668 |
+
this.origin = this.getOrigin(window.location.href);
|
14669 |
+
}
|
14670 |
+
|
14671 |
+
ImageLoader.prototype.findImages = function(nodes) {
|
14672 |
+
var images = [];
|
14673 |
+
nodes.reduce(function(imageNodes, container) {
|
14674 |
+
switch(container.node.nodeName) {
|
14675 |
+
case "IMG":
|
14676 |
+
return imageNodes.concat([{
|
14677 |
+
args: [container.node.src],
|
14678 |
+
method: "url"
|
14679 |
+
}]);
|
14680 |
+
case "svg":
|
14681 |
+
case "IFRAME":
|
14682 |
+
return imageNodes.concat([{
|
14683 |
+
args: [container.node],
|
14684 |
+
method: container.node.nodeName
|
14685 |
+
}]);
|
14686 |
+
}
|
14687 |
+
return imageNodes;
|
14688 |
+
}, []).forEach(this.addImage(images, this.loadImage), this);
|
14689 |
+
return images;
|
14690 |
+
};
|
14691 |
+
|
14692 |
+
ImageLoader.prototype.findBackgroundImage = function(images, container) {
|
14693 |
+
container.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(images, this.loadImage), this);
|
14694 |
+
return images;
|
14695 |
+
};
|
14696 |
+
|
14697 |
+
ImageLoader.prototype.addImage = function(images, callback) {
|
14698 |
+
return function(newImage) {
|
14699 |
+
newImage.args.forEach(function(image) {
|
14700 |
+
if (!this.imageExists(images, image)) {
|
14701 |
+
images.splice(0, 0, callback.call(this, newImage));
|
14702 |
+
log('Added image #' + (images.length), typeof(image) === "string" ? image.substring(0, 100) : image);
|
14703 |
+
}
|
14704 |
+
}, this);
|
14705 |
+
};
|
14706 |
+
};
|
14707 |
+
|
14708 |
+
ImageLoader.prototype.hasImageBackground = function(imageData) {
|
14709 |
+
return imageData.method !== "none";
|
14710 |
+
};
|
14711 |
+
|
14712 |
+
ImageLoader.prototype.loadImage = function(imageData) {
|
14713 |
+
if (imageData.method === "url") {
|
14714 |
+
var src = imageData.args[0];
|
14715 |
+
if (this.isSVG(src) && !this.support.svg && !this.options.allowTaint) {
|
14716 |
+
return new SVGContainer(src);
|
14717 |
+
} else if (src.match(/data:image\/.*;base64,/i)) {
|
14718 |
+
return new ImageContainer(src.replace(/url\(['"]{0,}|['"]{0,}\)$/ig, ''), false);
|
14719 |
+
} else if (this.isSameOrigin(src) || this.options.allowTaint === true || this.isSVG(src)) {
|
14720 |
+
return new ImageContainer(src, false);
|
14721 |
+
} else if (this.support.cors && !this.options.allowTaint && this.options.useCORS) {
|
14722 |
+
return new ImageContainer(src, true);
|
14723 |
+
} else if (this.options.proxy) {
|
14724 |
+
return new ProxyImageContainer(src, this.options.proxy);
|
14725 |
+
} else {
|
14726 |
+
return new DummyImageContainer(src);
|
14727 |
+
}
|
14728 |
+
} else if (imageData.method === "linear-gradient") {
|
14729 |
+
return new LinearGradientContainer(imageData);
|
14730 |
+
} else if (imageData.method === "gradient") {
|
14731 |
+
return new WebkitGradientContainer(imageData);
|
14732 |
+
} else if (imageData.method === "svg") {
|
14733 |
+
return new SVGNodeContainer(imageData.args[0], this.support.svg);
|
14734 |
+
} else if (imageData.method === "IFRAME") {
|
14735 |
+
return new FrameContainer(imageData.args[0], this.isSameOrigin(imageData.args[0].src), this.options);
|
14736 |
+
} else {
|
14737 |
+
return new DummyImageContainer(imageData);
|
14738 |
+
}
|
14739 |
+
};
|
14740 |
+
|
14741 |
+
ImageLoader.prototype.isSVG = function(src) {
|
14742 |
+
return src.substring(src.length - 3).toLowerCase() === "svg" || SVGContainer.prototype.isInline(src);
|
14743 |
+
};
|
14744 |
+
|
14745 |
+
ImageLoader.prototype.imageExists = function(images, src) {
|
14746 |
+
return images.some(function(image) {
|
14747 |
+
return image.src === src;
|
14748 |
+
});
|
14749 |
+
};
|
14750 |
+
|
14751 |
+
ImageLoader.prototype.isSameOrigin = function(url) {
|
14752 |
+
return (this.getOrigin(url) === this.origin);
|
14753 |
+
};
|
14754 |
+
|
14755 |
+
ImageLoader.prototype.getOrigin = function(url) {
|
14756 |
+
var link = this.link || (this.link = document.createElement("a"));
|
14757 |
+
link.href = url;
|
14758 |
+
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
14759 |
+
return link.protocol + link.hostname + link.port;
|
14760 |
+
};
|
14761 |
+
|
14762 |
+
ImageLoader.prototype.getPromise = function(container) {
|
14763 |
+
return this.timeout(container, this.options.imageTimeout)['catch'](function() {
|
14764 |
+
var dummy = new DummyImageContainer(container.src);
|
14765 |
+
return dummy.promise.then(function(image) {
|
14766 |
+
container.image = image;
|
14767 |
+
});
|
14768 |
+
});
|
14769 |
+
};
|
14770 |
+
|
14771 |
+
ImageLoader.prototype.get = function(src) {
|
14772 |
+
var found = null;
|
14773 |
+
return this.images.some(function(img) {
|
14774 |
+
return (found = img).src === src;
|
14775 |
+
}) ? found : null;
|
14776 |
+
};
|
14777 |
+
|
14778 |
+
ImageLoader.prototype.fetch = function(nodes) {
|
14779 |
+
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
|
14780 |
+
this.images.forEach(function(image, index) {
|
14781 |
+
image.promise.then(function() {
|
14782 |
+
log("Succesfully loaded image #"+ (index+1), image);
|
14783 |
+
}, function(e) {
|
14784 |
+
log("Failed loading image #"+ (index+1), image, e);
|
14785 |
+
});
|
14786 |
+
});
|
14787 |
+
this.ready = Promise.all(this.images.map(this.getPromise, this));
|
14788 |
+
log("Finished searching images");
|
14789 |
+
return this;
|
14790 |
+
};
|
14791 |
+
|
14792 |
+
ImageLoader.prototype.timeout = function(container, timeout) {
|
14793 |
+
var timer;
|
14794 |
+
var promise = Promise.race([container.promise, new Promise(function(res, reject) {
|
14795 |
+
timer = setTimeout(function() {
|
14796 |
+
log("Timed out loading image", container);
|
14797 |
+
reject(container);
|
14798 |
+
}, timeout);
|
14799 |
+
})]).then(function(container) {
|
14800 |
+
clearTimeout(timer);
|
14801 |
+
return container;
|
14802 |
+
});
|
14803 |
+
promise['catch'](function() {
|
14804 |
+
clearTimeout(timer);
|
14805 |
+
});
|
14806 |
+
return promise;
|
14807 |
+
};
|
14808 |
+
|
14809 |
+
module.exports = ImageLoader;
|
14810 |
+
|
14811 |
+
},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(require,module,exports){
|
14812 |
+
var GradientContainer = require('./gradientcontainer');
|
14813 |
+
var Color = require('./color');
|
14814 |
+
|
14815 |
+
function LinearGradientContainer(imageData) {
|
14816 |
+
GradientContainer.apply(this, arguments);
|
14817 |
+
this.type = this.TYPES.LINEAR;
|
14818 |
+
|
14819 |
+
var hasDirection = imageData.args[0].match(this.stepRegExp) === null;
|
14820 |
+
|
14821 |
+
if (hasDirection) {
|
14822 |
+
imageData.args[0].split(" ").reverse().forEach(function(position) {
|
14823 |
+
switch(position) {
|
14824 |
+
case "left":
|
14825 |
+
this.x0 = 0;
|
14826 |
+
this.x1 = 1;
|
14827 |
+
break;
|
14828 |
+
case "top":
|
14829 |
+
this.y0 = 0;
|
14830 |
+
this.y1 = 1;
|
14831 |
+
break;
|
14832 |
+
case "right":
|
14833 |
+
this.x0 = 1;
|
14834 |
+
this.x1 = 0;
|
14835 |
+
break;
|
14836 |
+
case "bottom":
|
14837 |
+
this.y0 = 1;
|
14838 |
+
this.y1 = 0;
|
14839 |
+
break;
|
14840 |
+
case "to":
|
14841 |
+
var y0 = this.y0;
|
14842 |
+
var x0 = this.x0;
|
14843 |
+
this.y0 = this.y1;
|
14844 |
+
this.x0 = this.x1;
|
14845 |
+
this.x1 = x0;
|
14846 |
+
this.y1 = y0;
|
14847 |
+
break;
|
14848 |
+
}
|
14849 |
+
}, this);
|
14850 |
+
} else {
|
14851 |
+
this.y0 = 0;
|
14852 |
+
this.y1 = 1;
|
14853 |
+
}
|
14854 |
+
|
14855 |
+
this.colorStops = imageData.args.slice(hasDirection ? 1 : 0).map(function(colorStop) {
|
14856 |
+
var colorStopMatch = colorStop.match(this.stepRegExp);
|
14857 |
+
return {
|
14858 |
+
color: new Color(colorStopMatch[1]),
|
14859 |
+
stop: colorStopMatch[3] === "%" ? colorStopMatch[2] / 100 : null
|
14860 |
+
};
|
14861 |
+
}, this);
|
14862 |
+
|
14863 |
+
if (this.colorStops[0].stop === null) {
|
14864 |
+
this.colorStops[0].stop = 0;
|
14865 |
+
}
|
14866 |
+
|
14867 |
+
if (this.colorStops[this.colorStops.length - 1].stop === null) {
|
14868 |
+
this.colorStops[this.colorStops.length - 1].stop = 1;
|
14869 |
+
}
|
14870 |
+
|
14871 |
+
this.colorStops.forEach(function(colorStop, index) {
|
14872 |
+
if (colorStop.stop === null) {
|
14873 |
+
this.colorStops.slice(index).some(function(find, count) {
|
14874 |
+
if (find.stop !== null) {
|
14875 |
+
colorStop.stop = ((find.stop - this.colorStops[index - 1].stop) / (count + 1)) + this.colorStops[index - 1].stop;
|
14876 |
+
return true;
|
14877 |
+
} else {
|
14878 |
+
return false;
|
14879 |
+
}
|
14880 |
+
}, this);
|
14881 |
+
}
|
14882 |
+
}, this);
|
14883 |
+
}
|
14884 |
+
|
14885 |
+
LinearGradientContainer.prototype = Object.create(GradientContainer.prototype);
|
14886 |
+
|
14887 |
+
LinearGradientContainer.prototype.stepRegExp = /((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/;
|
14888 |
+
|
14889 |
+
module.exports = LinearGradientContainer;
|
14890 |
+
|
14891 |
+
},{"./color":5,"./gradientcontainer":11}],15:[function(require,module,exports){
|
14892 |
+
module.exports = function() {
|
14893 |
+
if (window.html2canvas.logging && window.console && window.console.log) {
|
14894 |
+
Function.prototype.bind.call(window.console.log, (window.console)).apply(window.console, [(Date.now() - window.html2canvas.start) + "ms", "html2canvas:"].concat([].slice.call(arguments, 0)));
|
14895 |
+
}
|
14896 |
+
};
|
14897 |
+
|
14898 |
+
},{}],16:[function(require,module,exports){
|
14899 |
+
var Color = require('./color');
|
14900 |
+
var utils = require('./utils');
|
14901 |
+
var getBounds = utils.getBounds;
|
14902 |
+
var parseBackgrounds = utils.parseBackgrounds;
|
14903 |
+
var offsetBounds = utils.offsetBounds;
|
14904 |
+
|
14905 |
+
function NodeContainer(node, parent) {
|
14906 |
+
this.node = node;
|
14907 |
+
this.parent = parent;
|
14908 |
+
this.stack = null;
|
14909 |
+
this.bounds = null;
|
14910 |
+
this.borders = null;
|
14911 |
+
this.clip = [];
|
14912 |
+
this.backgroundClip = [];
|
14913 |
+
this.offsetBounds = null;
|
14914 |
+
this.visible = null;
|
14915 |
+
this.computedStyles = null;
|
14916 |
+
this.colors = {};
|
14917 |
+
this.styles = {};
|
14918 |
+
this.backgroundImages = null;
|
14919 |
+
this.transformData = null;
|
14920 |
+
this.transformMatrix = null;
|
14921 |
+
this.isPseudoElement = false;
|
14922 |
+
this.opacity = null;
|
14923 |
+
}
|
14924 |
+
|
14925 |
+
NodeContainer.prototype.cloneTo = function(stack) {
|
14926 |
+
stack.visible = this.visible;
|
14927 |
+
stack.borders = this.borders;
|
14928 |
+
stack.bounds = this.bounds;
|
14929 |
+
stack.clip = this.clip;
|
14930 |
+
stack.backgroundClip = this.backgroundClip;
|
14931 |
+
stack.computedStyles = this.computedStyles;
|
14932 |
+
stack.styles = this.styles;
|
14933 |
+
stack.backgroundImages = this.backgroundImages;
|
14934 |
+
stack.opacity = this.opacity;
|
14935 |
+
};
|
14936 |
+
|
14937 |
+
NodeContainer.prototype.getOpacity = function() {
|
14938 |
+
return this.opacity === null ? (this.opacity = this.cssFloat('opacity')) : this.opacity;
|
14939 |
+
};
|
14940 |
+
|
14941 |
+
NodeContainer.prototype.assignStack = function(stack) {
|
14942 |
+
this.stack = stack;
|
14943 |
+
stack.children.push(this);
|
14944 |
+
};
|
14945 |
+
|
14946 |
+
NodeContainer.prototype.isElementVisible = function() {
|
14947 |
+
return this.node.nodeType === Node.TEXT_NODE ? this.parent.visible : (
|
14948 |
+
this.css('display') !== "none" &&
|
14949 |
+
this.css('visibility') !== "hidden" &&
|
14950 |
+
!this.node.hasAttribute("data-html2canvas-ignore") &&
|
14951 |
+
(this.node.nodeName !== "INPUT" || this.node.getAttribute("type") !== "hidden")
|
14952 |
+
);
|
14953 |
+
};
|
14954 |
+
|
14955 |
+
NodeContainer.prototype.css = function(attribute) {
|
14956 |
+
if (!this.computedStyles) {
|
14957 |
+
this.computedStyles = this.isPseudoElement ? this.parent.computedStyle(this.before ? ":before" : ":after") : this.computedStyle(null);
|
14958 |
+
}
|
14959 |
+
|
14960 |
+
return this.styles[attribute] || (this.styles[attribute] = this.computedStyles[attribute]);
|
14961 |
+
};
|
14962 |
+
|
14963 |
+
NodeContainer.prototype.prefixedCss = function(attribute) {
|
14964 |
+
var prefixes = ["webkit", "moz", "ms", "o"];
|
14965 |
+
var value = this.css(attribute);
|
14966 |
+
if (value === undefined) {
|
14967 |
+
prefixes.some(function(prefix) {
|
14968 |
+
value = this.css(prefix + attribute.substr(0, 1).toUpperCase() + attribute.substr(1));
|
14969 |
+
return value !== undefined;
|
14970 |
+
}, this);
|
14971 |
+
}
|
14972 |
+
return value === undefined ? null : value;
|
14973 |
+
};
|
14974 |
+
|
14975 |
+
NodeContainer.prototype.computedStyle = function(type) {
|
14976 |
+
return this.node.ownerDocument.defaultView.getComputedStyle(this.node, type);
|
14977 |
+
};
|
14978 |
+
|
14979 |
+
NodeContainer.prototype.cssInt = function(attribute) {
|
14980 |
+
var value = parseInt(this.css(attribute), 10);
|
14981 |
+
return (isNaN(value)) ? 0 : value; // borders in old IE are throwing 'medium' for demo.html
|
14982 |
+
};
|
14983 |
+
|
14984 |
+
NodeContainer.prototype.color = function(attribute) {
|
14985 |
+
return this.colors[attribute] || (this.colors[attribute] = new Color(this.css(attribute)));
|
14986 |
+
};
|
14987 |
+
|
14988 |
+
NodeContainer.prototype.cssFloat = function(attribute) {
|
14989 |
+
var value = parseFloat(this.css(attribute));
|
14990 |
+
return (isNaN(value)) ? 0 : value;
|
14991 |
+
};
|
14992 |
+
|
14993 |
+
NodeContainer.prototype.fontWeight = function() {
|
14994 |
+
var weight = this.css("fontWeight");
|
14995 |
+
switch(parseInt(weight, 10)){
|
14996 |
+
case 401:
|
14997 |
+
weight = "bold";
|
14998 |
+
break;
|
14999 |
+
case 400:
|
15000 |
+
weight = "normal";
|
15001 |
+
break;
|
15002 |
+
}
|
15003 |
+
return weight;
|
15004 |
+
};
|
15005 |
+
|
15006 |
+
NodeContainer.prototype.parseClip = function() {
|
15007 |
+
var matches = this.css('clip').match(this.CLIP);
|
15008 |
+
if (matches) {
|
15009 |
+
return {
|
15010 |
+
top: parseInt(matches[1], 10),
|
15011 |
+
right: parseInt(matches[2], 10),
|
15012 |
+
bottom: parseInt(matches[3], 10),
|
15013 |
+
left: parseInt(matches[4], 10)
|
15014 |
+
};
|
15015 |
+
}
|
15016 |
+
return null;
|
15017 |
+
};
|
15018 |
+
|
15019 |
+
NodeContainer.prototype.parseBackgroundImages = function() {
|
15020 |
+
return this.backgroundImages || (this.backgroundImages = parseBackgrounds(this.css("backgroundImage")));
|
15021 |
+
};
|
15022 |
+
|
15023 |
+
NodeContainer.prototype.cssList = function(property, index) {
|
15024 |
+
var value = (this.css(property) || '').split(',');
|
15025 |
+
value = value[index || 0] || value[0] || 'auto';
|
15026 |
+
value = value.trim().split(' ');
|
15027 |
+
if (value.length === 1) {
|
15028 |
+
value = [value[0], isPercentage(value[0]) ? 'auto' : value[0]];
|
15029 |
+
}
|
15030 |
+
return value;
|
15031 |
+
};
|
15032 |
+
|
15033 |
+
NodeContainer.prototype.parseBackgroundSize = function(bounds, image, index) {
|
15034 |
+
var size = this.cssList("backgroundSize", index);
|
15035 |
+
var width, height;
|
15036 |
+
|
15037 |
+
if (isPercentage(size[0])) {
|
15038 |
+
width = bounds.width * parseFloat(size[0]) / 100;
|
15039 |
+
} else if (/contain|cover/.test(size[0])) {
|
15040 |
+
var targetRatio = bounds.width / bounds.height, currentRatio = image.width / image.height;
|
15041 |
+
return (targetRatio < currentRatio ^ size[0] === 'contain') ? {width: bounds.height * currentRatio, height: bounds.height} : {width: bounds.width, height: bounds.width / currentRatio};
|
15042 |
+
} else {
|
15043 |
+
width = parseInt(size[0], 10);
|
15044 |
+
}
|
15045 |
+
|
15046 |
+
if (size[0] === 'auto' && size[1] === 'auto') {
|
15047 |
+
height = image.height;
|
15048 |
+
} else if (size[1] === 'auto') {
|
15049 |
+
height = width / image.width * image.height;
|
15050 |
+
} else if (isPercentage(size[1])) {
|
15051 |
+
height = bounds.height * parseFloat(size[1]) / 100;
|
15052 |
+
} else {
|
15053 |
+
height = parseInt(size[1], 10);
|
15054 |
+
}
|
15055 |
+
|
15056 |
+
if (size[0] === 'auto') {
|
15057 |
+
width = height / image.height * image.width;
|
15058 |
+
}
|
15059 |
+
|
15060 |
+
return {width: width, height: height};
|
15061 |
+
};
|
15062 |
+
|
15063 |
+
NodeContainer.prototype.parseBackgroundPosition = function(bounds, image, index, backgroundSize) {
|
15064 |
+
var position = this.cssList('backgroundPosition', index);
|
15065 |
+
var left, top;
|
15066 |
+
|
15067 |
+
if (isPercentage(position[0])){
|
15068 |
+
left = (bounds.width - (backgroundSize || image).width) * (parseFloat(position[0]) / 100);
|
15069 |
+
} else {
|
15070 |
+
left = parseInt(position[0], 10);
|
15071 |
+
}
|
15072 |
+
|
15073 |
+
if (position[1] === 'auto') {
|
15074 |
+
top = left / image.width * image.height;
|
15075 |
+
} else if (isPercentage(position[1])){
|
15076 |
+
top = (bounds.height - (backgroundSize || image).height) * parseFloat(position[1]) / 100;
|
15077 |
+
} else {
|
15078 |
+
top = parseInt(position[1], 10);
|
15079 |
+
}
|
15080 |
+
|
15081 |
+
if (position[0] === 'auto') {
|
15082 |
+
left = top / image.height * image.width;
|
15083 |
+
}
|
15084 |
+
|
15085 |
+
return {left: left, top: top};
|
15086 |
+
};
|
15087 |
+
|
15088 |
+
NodeContainer.prototype.parseBackgroundRepeat = function(index) {
|
15089 |
+
return this.cssList("backgroundRepeat", index)[0];
|
15090 |
+
};
|
15091 |
+
|
15092 |
+
NodeContainer.prototype.parseTextShadows = function() {
|
15093 |
+
var textShadow = this.css("textShadow");
|
15094 |
+
var results = [];
|
15095 |
+
|
15096 |
+
if (textShadow && textShadow !== 'none') {
|
15097 |
+
var shadows = textShadow.match(this.TEXT_SHADOW_PROPERTY);
|
15098 |
+
for (var i = 0; shadows && (i < shadows.length); i++) {
|
15099 |
+
var s = shadows[i].match(this.TEXT_SHADOW_VALUES);
|
15100 |
+
results.push({
|
15101 |
+
color: new Color(s[0]),
|
15102 |
+
offsetX: s[1] ? parseFloat(s[1].replace('px', '')) : 0,
|
15103 |
+
offsetY: s[2] ? parseFloat(s[2].replace('px', '')) : 0,
|
15104 |
+
blur: s[3] ? s[3].replace('px', '') : 0
|
15105 |
+
});
|
15106 |
+
}
|
15107 |
+
}
|
15108 |
+
return results;
|
15109 |
+
};
|
15110 |
+
|
15111 |
+
NodeContainer.prototype.parseTransform = function() {
|
15112 |
+
if (!this.transformData) {
|
15113 |
+
if (this.hasTransform()) {
|
15114 |
+
var offset = this.parseBounds();
|
15115 |
+
var origin = this.prefixedCss("transformOrigin").split(" ").map(removePx).map(asFloat);
|
15116 |
+
origin[0] += offset.left;
|
15117 |
+
origin[1] += offset.top;
|
15118 |
+
this.transformData = {
|
15119 |
+
origin: origin,
|
15120 |
+
matrix: this.parseTransformMatrix()
|
15121 |
+
};
|
15122 |
+
} else {
|
15123 |
+
this.transformData = {
|
15124 |
+
origin: [0, 0],
|
15125 |
+
matrix: [1, 0, 0, 1, 0, 0]
|
15126 |
+
};
|
15127 |
+
}
|
15128 |
+
}
|
15129 |
+
return this.transformData;
|
15130 |
+
};
|
15131 |
+
|
15132 |
+
NodeContainer.prototype.parseTransformMatrix = function() {
|
15133 |
+
if (!this.transformMatrix) {
|
15134 |
+
var transform = this.prefixedCss("transform");
|
15135 |
+
var matrix = transform ? parseMatrix(transform.match(this.MATRIX_PROPERTY)) : null;
|
15136 |
+
this.transformMatrix = matrix ? matrix : [1, 0, 0, 1, 0, 0];
|
15137 |
+
}
|
15138 |
+
return this.transformMatrix;
|
15139 |
+
};
|
15140 |
+
|
15141 |
+
NodeContainer.prototype.parseBounds = function() {
|
15142 |
+
return this.bounds || (this.bounds = this.hasTransform() ? offsetBounds(this.node) : getBounds(this.node));
|
15143 |
+
};
|
15144 |
+
|
15145 |
+
NodeContainer.prototype.hasTransform = function() {
|
15146 |
+
return this.parseTransformMatrix().join(",") !== "1,0,0,1,0,0" || (this.parent && this.parent.hasTransform());
|
15147 |
+
};
|
15148 |
+
|
15149 |
+
NodeContainer.prototype.getValue = function() {
|
15150 |
+
var value = this.node.value || "";
|
15151 |
+
if (this.node.tagName === "SELECT") {
|
15152 |
+
value = selectionValue(this.node);
|
15153 |
+
} else if (this.node.type === "password") {
|
15154 |
+
value = Array(value.length + 1).join('\u2022'); // jshint ignore:line
|
15155 |
+
}
|
15156 |
+
return value.length === 0 ? (this.node.placeholder || "") : value;
|
15157 |
+
};
|
15158 |
+
|
15159 |
+
NodeContainer.prototype.MATRIX_PROPERTY = /(matrix)\((.+)\)/;
|
15160 |
+
NodeContainer.prototype.TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;
|
15161 |
+
NodeContainer.prototype.TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;
|
15162 |
+
NodeContainer.prototype.CLIP = /^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/;
|
15163 |
+
|
15164 |
+
function selectionValue(node) {
|
15165 |
+
var option = node.options[node.selectedIndex || 0];
|
15166 |
+
return option ? (option.text || "") : "";
|
15167 |
+
}
|
15168 |
+
|
15169 |
+
function parseMatrix(match) {
|
15170 |
+
if (match && match[1] === "matrix") {
|
15171 |
+
return match[2].split(",").map(function(s) {
|
15172 |
+
return parseFloat(s.trim());
|
15173 |
+
});
|
15174 |
+
}
|
15175 |
+
}
|
15176 |
+
|
15177 |
+
function isPercentage(value) {
|
15178 |
+
return value.toString().indexOf("%") !== -1;
|
15179 |
+
}
|
15180 |
+
|
15181 |
+
function removePx(str) {
|
15182 |
+
return str.replace("px", "");
|
15183 |
+
}
|
15184 |
+
|
15185 |
+
function asFloat(str) {
|
15186 |
+
return parseFloat(str);
|
15187 |
+
}
|
15188 |
+
|
15189 |
+
module.exports = NodeContainer;
|
15190 |
+
|
15191 |
+
},{"./color":5,"./utils":29}],17:[function(require,module,exports){
|
15192 |
+
var log = require('./log');
|
15193 |
+
var punycode = require('punycode');
|
15194 |
+
var NodeContainer = require('./nodecontainer');
|
15195 |
+
var TextContainer = require('./textcontainer');
|
15196 |
+
var PseudoElementContainer = require('./pseudoelementcontainer');
|
15197 |
+
var FontMetrics = require('./fontmetrics');
|
15198 |
+
var Color = require('./color');
|
15199 |
+
var Promise = require('./promise');
|
15200 |
+
var StackingContext = require('./stackingcontext');
|
15201 |
+
var utils = require('./utils');
|
15202 |
+
var bind = utils.bind;
|
15203 |
+
var getBounds = utils.getBounds;
|
15204 |
+
var parseBackgrounds = utils.parseBackgrounds;
|
15205 |
+
var offsetBounds = utils.offsetBounds;
|
15206 |
+
|
15207 |
+
function NodeParser(element, renderer, support, imageLoader, options) {
|
15208 |
+
log("Starting NodeParser");
|
15209 |
+
this.renderer = renderer;
|
15210 |
+
this.options = options;
|
15211 |
+
this.range = null;
|
15212 |
+
this.support = support;
|
15213 |
+
this.renderQueue = [];
|
15214 |
+
this.stack = new StackingContext(true, 1, element.ownerDocument, null);
|
15215 |
+
var parent = new NodeContainer(element, null);
|
15216 |
+
if (options.background) {
|
15217 |
+
renderer.rectangle(0, 0, renderer.width, renderer.height, new Color(options.background));
|
15218 |
+
}
|
15219 |
+
if (element === element.ownerDocument.documentElement) {
|
15220 |
+
// http://www.w3.org/TR/css3-background/#special-backgrounds
|
15221 |
+
var canvasBackground = new NodeContainer(parent.color('backgroundColor').isTransparent() ? element.ownerDocument.body : element.ownerDocument.documentElement, null);
|
15222 |
+
renderer.rectangle(0, 0, renderer.width, renderer.height, canvasBackground.color('backgroundColor'));
|
15223 |
+
}
|
15224 |
+
parent.visibile = parent.isElementVisible();
|
15225 |
+
this.createPseudoHideStyles(element.ownerDocument);
|
15226 |
+
this.disableAnimations(element.ownerDocument);
|
15227 |
+
this.nodes = flatten([parent].concat(this.getChildren(parent)).filter(function(container) {
|
15228 |
+
return container.visible = container.isElementVisible();
|
15229 |
+
}).map(this.getPseudoElements, this));
|
15230 |
+
this.fontMetrics = new FontMetrics();
|
15231 |
+
log("Fetched nodes, total:", this.nodes.length);
|
15232 |
+
log("Calculate overflow clips");
|
15233 |
+
this.calculateOverflowClips();
|
15234 |
+
log("Start fetching images");
|
15235 |
+
this.images = imageLoader.fetch(this.nodes.filter(isElement));
|
15236 |
+
this.ready = this.images.ready.then(bind(function() {
|
15237 |
+
log("Images loaded, starting parsing");
|
15238 |
+
log("Creating stacking contexts");
|
15239 |
+
this.createStackingContexts();
|
15240 |
+
log("Sorting stacking contexts");
|
15241 |
+
this.sortStackingContexts(this.stack);
|
15242 |
+
this.parse(this.stack);
|
15243 |
+
log("Render queue created with " + this.renderQueue.length + " items");
|
15244 |
+
return new Promise(bind(function(resolve) {
|
15245 |
+
if (!options.async) {
|
15246 |
+
this.renderQueue.forEach(this.paint, this);
|
15247 |
+
resolve();
|
15248 |
+
} else if (typeof(options.async) === "function") {
|
15249 |
+
options.async.call(this, this.renderQueue, resolve);
|
15250 |
+
} else if (this.renderQueue.length > 0){
|
15251 |
+
this.renderIndex = 0;
|
15252 |
+
this.asyncRenderer(this.renderQueue, resolve);
|
15253 |
+
} else {
|
15254 |
+
resolve();
|
15255 |
+
}
|
15256 |
+
}, this));
|
15257 |
+
}, this));
|
15258 |
+
}
|
15259 |
+
|
15260 |
+
NodeParser.prototype.calculateOverflowClips = function() {
|
15261 |
+
this.nodes.forEach(function(container) {
|
15262 |
+
if (isElement(container)) {
|
15263 |
+
if (isPseudoElement(container)) {
|
15264 |
+
container.appendToDOM();
|
15265 |
+
}
|
15266 |
+
container.borders = this.parseBorders(container);
|
15267 |
+
var clip = (container.css('overflow') === "hidden") ? [container.borders.clip] : [];
|
15268 |
+
var cssClip = container.parseClip();
|
15269 |
+
if (cssClip && ["absolute", "fixed"].indexOf(container.css('position')) !== -1) {
|
15270 |
+
clip.push([["rect",
|
15271 |
+
container.bounds.left + cssClip.left,
|
15272 |
+
container.bounds.top + cssClip.top,
|
15273 |
+
cssClip.right - cssClip.left,
|
15274 |
+
cssClip.bottom - cssClip.top
|
15275 |
+
]]);
|
15276 |
+
}
|
15277 |
+
container.clip = hasParentClip(container) ? container.parent.clip.concat(clip) : clip;
|
15278 |
+
container.backgroundClip = (container.css('overflow') !== "hidden") ? container.clip.concat([container.borders.clip]) : container.clip;
|
15279 |
+
if (isPseudoElement(container)) {
|
15280 |
+
container.cleanDOM();
|
15281 |
+
}
|
15282 |
+
} else if (isTextNode(container)) {
|
15283 |
+
container.clip = hasParentClip(container) ? container.parent.clip : [];
|
15284 |
+
}
|
15285 |
+
if (!isPseudoElement(container)) {
|
15286 |
+
container.bounds = null;
|
15287 |
+
}
|
15288 |
+
}, this);
|
15289 |
+
};
|
15290 |
+
|
15291 |
+
function hasParentClip(container) {
|
15292 |
+
return container.parent && container.parent.clip.length;
|
15293 |
+
}
|
15294 |
+
|
15295 |
+
NodeParser.prototype.asyncRenderer = function(queue, resolve, asyncTimer) {
|
15296 |
+
asyncTimer = asyncTimer || Date.now();
|
15297 |
+
this.paint(queue[this.renderIndex++]);
|
15298 |
+
if (queue.length === this.renderIndex) {
|
15299 |
+
resolve();
|
15300 |
+
} else if (asyncTimer + 20 > Date.now()) {
|
15301 |
+
this.asyncRenderer(queue, resolve, asyncTimer);
|
15302 |
+
} else {
|
15303 |
+
setTimeout(bind(function() {
|
15304 |
+
this.asyncRenderer(queue, resolve);
|
15305 |
+
}, this), 0);
|
15306 |
+
}
|
15307 |
+
};
|
15308 |
+
|
15309 |
+
NodeParser.prototype.createPseudoHideStyles = function(document) {
|
15310 |
+
this.createStyles(document, '.' + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ':before { content: "" !important; display: none !important; }' +
|
15311 |
+
'.' + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER + ':after { content: "" !important; display: none !important; }');
|
15312 |
+
};
|
15313 |
+
|
15314 |
+
NodeParser.prototype.disableAnimations = function(document) {
|
15315 |
+
this.createStyles(document, '* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; ' +
|
15316 |
+
'-webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}');
|
15317 |
+
};
|
15318 |
+
|
15319 |
+
NodeParser.prototype.createStyles = function(document, styles) {
|
15320 |
+
var hidePseudoElements = document.createElement('style');
|
15321 |
+
hidePseudoElements.innerHTML = styles;
|
15322 |
+
document.body.appendChild(hidePseudoElements);
|
15323 |
+
};
|
15324 |
+
|
15325 |
+
NodeParser.prototype.getPseudoElements = function(container) {
|
15326 |
+
var nodes = [[container]];
|
15327 |
+
if (container.node.nodeType === Node.ELEMENT_NODE) {
|
15328 |
+
var before = this.getPseudoElement(container, ":before");
|
15329 |
+
var after = this.getPseudoElement(container, ":after");
|
15330 |
+
|
15331 |
+
if (before) {
|
15332 |
+
nodes.push(before);
|
15333 |
+
}
|
15334 |
+
|
15335 |
+
if (after) {
|
15336 |
+
nodes.push(after);
|
15337 |
+
}
|
15338 |
+
}
|
15339 |
+
return flatten(nodes);
|
15340 |
+
};
|
15341 |
+
|
15342 |
+
function toCamelCase(str) {
|
15343 |
+
return str.replace(/(\-[a-z])/g, function(match){
|
15344 |
+
return match.toUpperCase().replace('-','');
|
15345 |
+
});
|
15346 |
+
}
|
15347 |
+
|
15348 |
+
NodeParser.prototype.getPseudoElement = function(container, type) {
|
15349 |
+
var style = container.computedStyle(type);
|
15350 |
+
if(!style || !style.content || style.content === "none" || style.content === "-moz-alt-content" || style.display === "none") {
|
15351 |
+
return null;
|
15352 |
+
}
|
15353 |
+
|
15354 |
+
var content = stripQuotes(style.content);
|
15355 |
+
var isImage = content.substr(0, 3) === 'url';
|
15356 |
+
var pseudoNode = document.createElement(isImage ? 'img' : 'html2canvaspseudoelement');
|
15357 |
+
var pseudoContainer = new PseudoElementContainer(pseudoNode, container, type);
|
15358 |
+
|
15359 |
+
for (var i = style.length-1; i >= 0; i--) {
|
15360 |
+
var property = toCamelCase(style.item(i));
|
15361 |
+
pseudoNode.style[property] = style[property];
|
15362 |
+
}
|
15363 |
+
|
15364 |
+
pseudoNode.className = PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
15365 |
+
|
15366 |
+
if (isImage) {
|
15367 |
+
pseudoNode.src = parseBackgrounds(content)[0].args[0];
|
15368 |
+
return [pseudoContainer];
|
15369 |
+
} else {
|
15370 |
+
var text = document.createTextNode(content);
|
15371 |
+
pseudoNode.appendChild(text);
|
15372 |
+
return [pseudoContainer, new TextContainer(text, pseudoContainer)];
|
15373 |
+
}
|
15374 |
+
};
|
15375 |
+
|
15376 |
+
|
15377 |
+
NodeParser.prototype.getChildren = function(parentContainer) {
|
15378 |
+
return flatten([].filter.call(parentContainer.node.childNodes, renderableNode).map(function(node) {
|
15379 |
+
var container = [node.nodeType === Node.TEXT_NODE ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
|
15380 |
+
return node.nodeType === Node.ELEMENT_NODE && container.length && node.tagName !== "TEXTAREA" ? (container[0].isElementVisible() ? container.concat(this.getChildren(container[0])) : []) : container;
|
15381 |
+
}, this));
|
15382 |
+
};
|
15383 |
+
|
15384 |
+
NodeParser.prototype.newStackingContext = function(container, hasOwnStacking) {
|
15385 |
+
var stack = new StackingContext(hasOwnStacking, container.getOpacity(), container.node, container.parent);
|
15386 |
+
container.cloneTo(stack);
|
15387 |
+
var parentStack = hasOwnStacking ? stack.getParentStack(this) : stack.parent.stack;
|
15388 |
+
parentStack.contexts.push(stack);
|
15389 |
+
container.stack = stack;
|
15390 |
+
};
|
15391 |
+
|
15392 |
+
NodeParser.prototype.createStackingContexts = function() {
|
15393 |
+
this.nodes.forEach(function(container) {
|
15394 |
+
if (isElement(container) && (this.isRootElement(container) || hasOpacity(container) || isPositionedForStacking(container) || this.isBodyWithTransparentRoot(container) || container.hasTransform())) {
|
15395 |
+
this.newStackingContext(container, true);
|
15396 |
+
} else if (isElement(container) && ((isPositioned(container) && zIndex0(container)) || isInlineBlock(container) || isFloating(container))) {
|
15397 |
+
this.newStackingContext(container, false);
|
15398 |
+
} else {
|
15399 |
+
container.assignStack(container.parent.stack);
|
15400 |
+
}
|
15401 |
+
}, this);
|
15402 |
+
};
|
15403 |
+
|
15404 |
+
NodeParser.prototype.isBodyWithTransparentRoot = function(container) {
|
15405 |
+
return container.node.nodeName === "BODY" && container.parent.color('backgroundColor').isTransparent();
|
15406 |
+
};
|
15407 |
+
|
15408 |
+
NodeParser.prototype.isRootElement = function(container) {
|
15409 |
+
return container.parent === null;
|
15410 |
+
};
|
15411 |
+
|
15412 |
+
NodeParser.prototype.sortStackingContexts = function(stack) {
|
15413 |
+
stack.contexts.sort(zIndexSort(stack.contexts.slice(0)));
|
15414 |
+
stack.contexts.forEach(this.sortStackingContexts, this);
|
15415 |
+
};
|
15416 |
+
|
15417 |
+
NodeParser.prototype.parseTextBounds = function(container) {
|
15418 |
+
return function(text, index, textList) {
|
15419 |
+
if (container.parent.css("textDecoration").substr(0, 4) !== "none" || text.trim().length !== 0) {
|
15420 |
+
if (this.support.rangeBounds && !container.parent.hasTransform()) {
|
15421 |
+
var offset = textList.slice(0, index).join("").length;
|
15422 |
+
return this.getRangeBounds(container.node, offset, text.length);
|
15423 |
+
} else if (container.node && typeof(container.node.data) === "string") {
|
15424 |
+
var replacementNode = container.node.splitText(text.length);
|
15425 |
+
var bounds = this.getWrapperBounds(container.node, container.parent.hasTransform());
|
15426 |
+
container.node = replacementNode;
|
15427 |
+
return bounds;
|
15428 |
+
}
|
15429 |
+
} else if(!this.support.rangeBounds || container.parent.hasTransform()){
|
15430 |
+
container.node = container.node.splitText(text.length);
|
15431 |
+
}
|
15432 |
+
return {};
|
15433 |
+
};
|
15434 |
+
};
|
15435 |
+
|
15436 |
+
NodeParser.prototype.getWrapperBounds = function(node, transform) {
|
15437 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
15438 |
+
var parent = node.parentNode,
|
15439 |
+
backupText = node.cloneNode(true);
|
15440 |
+
|
15441 |
+
wrapper.appendChild(node.cloneNode(true));
|
15442 |
+
parent.replaceChild(wrapper, node);
|
15443 |
+
var bounds = transform ? offsetBounds(wrapper) : getBounds(wrapper);
|
15444 |
+
parent.replaceChild(backupText, wrapper);
|
15445 |
+
return bounds;
|
15446 |
+
};
|
15447 |
+
|
15448 |
+
NodeParser.prototype.getRangeBounds = function(node, offset, length) {
|
15449 |
+
var range = this.range || (this.range = node.ownerDocument.createRange());
|
15450 |
+
range.setStart(node, offset);
|
15451 |
+
range.setEnd(node, offset + length);
|
15452 |
+
return range.getBoundingClientRect();
|
15453 |
+
};
|
15454 |
+
|
15455 |
+
function ClearTransform() {}
|
15456 |
+
|
15457 |
+
NodeParser.prototype.parse = function(stack) {
|
15458 |
+
// http://www.w3.org/TR/CSS21/visuren.html#z-index
|
15459 |
+
var negativeZindex = stack.contexts.filter(negativeZIndex); // 2. the child stacking contexts with negative stack levels (most negative first).
|
15460 |
+
var descendantElements = stack.children.filter(isElement);
|
15461 |
+
var descendantNonFloats = descendantElements.filter(not(isFloating));
|
15462 |
+
var nonInlineNonPositionedDescendants = descendantNonFloats.filter(not(isPositioned)).filter(not(inlineLevel)); // 3 the in-flow, non-inline-level, non-positioned descendants.
|
15463 |
+
var nonPositionedFloats = descendantElements.filter(not(isPositioned)).filter(isFloating); // 4. the non-positioned floats.
|
15464 |
+
var inFlow = descendantNonFloats.filter(not(isPositioned)).filter(inlineLevel); // 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
15465 |
+
var stackLevel0 = stack.contexts.concat(descendantNonFloats.filter(isPositioned)).filter(zIndex0); // 6. the child stacking contexts with stack level 0 and the positioned descendants with stack level 0.
|
15466 |
+
var text = stack.children.filter(isTextNode).filter(hasText);
|
15467 |
+
var positiveZindex = stack.contexts.filter(positiveZIndex); // 7. the child stacking contexts with positive stack levels (least positive first).
|
15468 |
+
negativeZindex.concat(nonInlineNonPositionedDescendants).concat(nonPositionedFloats)
|
15469 |
+
.concat(inFlow).concat(stackLevel0).concat(text).concat(positiveZindex).forEach(function(container) {
|
15470 |
+
this.renderQueue.push(container);
|
15471 |
+
if (isStackingContext(container)) {
|
15472 |
+
this.parse(container);
|
15473 |
+
this.renderQueue.push(new ClearTransform());
|
15474 |
+
}
|
15475 |
+
}, this);
|
15476 |
+
};
|
15477 |
+
|
15478 |
+
NodeParser.prototype.paint = function(container) {
|
15479 |
+
try {
|
15480 |
+
if (container instanceof ClearTransform) {
|
15481 |
+
this.renderer.ctx.restore();
|
15482 |
+
} else if (isTextNode(container)) {
|
15483 |
+
if (isPseudoElement(container.parent)) {
|
15484 |
+
container.parent.appendToDOM();
|
15485 |
+
}
|
15486 |
+
this.paintText(container);
|
15487 |
+
if (isPseudoElement(container.parent)) {
|
15488 |
+
container.parent.cleanDOM();
|
15489 |
+
}
|
15490 |
+
} else {
|
15491 |
+
this.paintNode(container);
|
15492 |
+
}
|
15493 |
+
} catch(e) {
|
15494 |
+
log(e);
|
15495 |
+
if (this.options.strict) {
|
15496 |
+
throw e;
|
15497 |
+
}
|
15498 |
+
}
|
15499 |
+
};
|
15500 |
+
|
15501 |
+
NodeParser.prototype.paintNode = function(container) {
|
15502 |
+
if (isStackingContext(container)) {
|
15503 |
+
this.renderer.setOpacity(container.opacity);
|
15504 |
+
this.renderer.ctx.save();
|
15505 |
+
if (container.hasTransform()) {
|
15506 |
+
this.renderer.setTransform(container.parseTransform());
|
15507 |
+
}
|
15508 |
+
}
|
15509 |
+
|
15510 |
+
if (container.node.nodeName === "INPUT" && container.node.type === "checkbox") {
|
15511 |
+
this.paintCheckbox(container);
|
15512 |
+
} else if (container.node.nodeName === "INPUT" && container.node.type === "radio") {
|
15513 |
+
this.paintRadio(container);
|
15514 |
+
} else {
|
15515 |
+
this.paintElement(container);
|
15516 |
+
}
|
15517 |
+
};
|
15518 |
+
|
15519 |
+
NodeParser.prototype.paintElement = function(container) {
|
15520 |
+
var bounds = container.parseBounds();
|
15521 |
+
this.renderer.clip(container.backgroundClip, function() {
|
15522 |
+
this.renderer.renderBackground(container, bounds, container.borders.borders.map(getWidth));
|
15523 |
+
}, this);
|
15524 |
+
|
15525 |
+
this.renderer.clip(container.clip, function() {
|
15526 |
+
this.renderer.renderBorders(container.borders.borders);
|
15527 |
+
}, this);
|
15528 |
+
|
15529 |
+
this.renderer.clip(container.backgroundClip, function() {
|
15530 |
+
switch (container.node.nodeName) {
|
15531 |
+
case "svg":
|
15532 |
+
case "IFRAME":
|
15533 |
+
var imgContainer = this.images.get(container.node);
|
15534 |
+
if (imgContainer) {
|
15535 |
+
this.renderer.renderImage(container, bounds, container.borders, imgContainer);
|
15536 |
+
} else {
|
15537 |
+
log("Error loading <" + container.node.nodeName + ">", container.node);
|
15538 |
+
}
|
15539 |
+
break;
|
15540 |
+
case "IMG":
|
15541 |
+
var imageContainer = this.images.get(container.node.src);
|
15542 |
+
if (imageContainer) {
|
15543 |
+
this.renderer.renderImage(container, bounds, container.borders, imageContainer);
|
15544 |
+
} else {
|
15545 |
+
log("Error loading <img>", container.node.src);
|
15546 |
+
}
|
15547 |
+
break;
|
15548 |
+
case "CANVAS":
|
15549 |
+
this.renderer.renderImage(container, bounds, container.borders, {image: container.node});
|
15550 |
+
break;
|
15551 |
+
case "SELECT":
|
15552 |
+
case "INPUT":
|
15553 |
+
case "TEXTAREA":
|
15554 |
+
this.paintFormValue(container);
|
15555 |
+
break;
|
15556 |
+
}
|
15557 |
+
}, this);
|
15558 |
+
};
|
15559 |
+
|
15560 |
+
NodeParser.prototype.paintCheckbox = function(container) {
|
15561 |
+
var b = container.parseBounds();
|
15562 |
+
|
15563 |
+
var size = Math.min(b.width, b.height);
|
15564 |
+
var bounds = {width: size - 1, height: size - 1, top: b.top, left: b.left};
|
15565 |
+
var r = [3, 3];
|
15566 |
+
var radius = [r, r, r, r];
|
15567 |
+
var borders = [1,1,1,1].map(function(w) {
|
15568 |
+
return {color: new Color('#A5A5A5'), width: w};
|
15569 |
+
});
|
15570 |
+
|
15571 |
+
var borderPoints = calculateCurvePoints(bounds, radius, borders);
|
15572 |
+
|
15573 |
+
this.renderer.clip(container.backgroundClip, function() {
|
15574 |
+
this.renderer.rectangle(bounds.left + 1, bounds.top + 1, bounds.width - 2, bounds.height - 2, new Color("#DEDEDE"));
|
15575 |
+
this.renderer.renderBorders(calculateBorders(borders, bounds, borderPoints, radius));
|
15576 |
+
if (container.node.checked) {
|
15577 |
+
this.renderer.font(new Color('#424242'), 'normal', 'normal', 'bold', (size - 3) + "px", 'arial');
|
15578 |
+
this.renderer.text("\u2714", bounds.left + size / 6, bounds.top + size - 1);
|
15579 |
+
}
|
15580 |
+
}, this);
|
15581 |
+
};
|
15582 |
+
|
15583 |
+
NodeParser.prototype.paintRadio = function(container) {
|
15584 |
+
var bounds = container.parseBounds();
|
15585 |
+
|
15586 |
+
var size = Math.min(bounds.width, bounds.height) - 2;
|
15587 |
+
|
15588 |
+
this.renderer.clip(container.backgroundClip, function() {
|
15589 |
+
this.renderer.circleStroke(bounds.left + 1, bounds.top + 1, size, new Color('#DEDEDE'), 1, new Color('#A5A5A5'));
|
15590 |
+
if (container.node.checked) {
|
15591 |
+
this.renderer.circle(Math.ceil(bounds.left + size / 4) + 1, Math.ceil(bounds.top + size / 4) + 1, Math.floor(size / 2), new Color('#424242'));
|
15592 |
+
}
|
15593 |
+
}, this);
|
15594 |
+
};
|
15595 |
+
|
15596 |
+
NodeParser.prototype.paintFormValue = function(container) {
|
15597 |
+
var value = container.getValue();
|
15598 |
+
if (value.length > 0) {
|
15599 |
+
var document = container.node.ownerDocument;
|
15600 |
+
var wrapper = document.createElement('html2canvaswrapper');
|
15601 |
+
var properties = ['lineHeight', 'textAlign', 'fontFamily', 'fontWeight', 'fontSize', 'color',
|
15602 |
+
'paddingLeft', 'paddingTop', 'paddingRight', 'paddingBottom',
|
15603 |
+
'width', 'height', 'borderLeftStyle', 'borderTopStyle', 'borderLeftWidth', 'borderTopWidth',
|
15604 |
+
'boxSizing', 'whiteSpace', 'wordWrap'];
|
15605 |
+
|
15606 |
+
properties.forEach(function(property) {
|
15607 |
+
try {
|
15608 |
+
wrapper.style[property] = container.css(property);
|
15609 |
+
} catch(e) {
|
15610 |
+
// Older IE has issues with "border"
|
15611 |
+
log("html2canvas: Parse: Exception caught in renderFormValue: " + e.message);
|
15612 |
+
}
|
15613 |
+
});
|
15614 |
+
var bounds = container.parseBounds();
|
15615 |
+
wrapper.style.position = "fixed";
|
15616 |
+
wrapper.style.left = bounds.left + "px";
|
15617 |
+
wrapper.style.top = bounds.top + "px";
|
15618 |
+
wrapper.textContent = value;
|
15619 |
+
document.body.appendChild(wrapper);
|
15620 |
+
this.paintText(new TextContainer(wrapper.firstChild, container));
|
15621 |
+
document.body.removeChild(wrapper);
|
15622 |
+
}
|
15623 |
+
};
|
15624 |
+
|
15625 |
+
NodeParser.prototype.paintText = function(container) {
|
15626 |
+
container.applyTextTransform();
|
15627 |
+
var characters = punycode.ucs2.decode(container.node.data);
|
15628 |
+
var textList = (!this.options.letterRendering || noLetterSpacing(container)) && !hasUnicode(container.node.data) ? getWords(characters) : characters.map(function(character) {
|
15629 |
+
return punycode.ucs2.encode([character]);
|
15630 |
+
});
|
15631 |
+
|
15632 |
+
var weight = container.parent.fontWeight();
|
15633 |
+
var size = container.parent.css('fontSize');
|
15634 |
+
var family = container.parent.css('fontFamily');
|
15635 |
+
var shadows = container.parent.parseTextShadows();
|
15636 |
+
|
15637 |
+
this.renderer.font(container.parent.color('color'), container.parent.css('fontStyle'), container.parent.css('fontVariant'), weight, size, family);
|
15638 |
+
if (shadows.length) {
|
15639 |
+
// TODO: support multiple text shadows
|
15640 |
+
this.renderer.fontShadow(shadows[0].color, shadows[0].offsetX, shadows[0].offsetY, shadows[0].blur);
|
15641 |
+
} else {
|
15642 |
+
this.renderer.clearShadow();
|
15643 |
+
}
|
15644 |
+
|
15645 |
+
this.renderer.clip(container.parent.clip, function() {
|
15646 |
+
textList.map(this.parseTextBounds(container), this).forEach(function(bounds, index) {
|
15647 |
+
if (bounds) {
|
15648 |
+
this.renderer.text(textList[index], bounds.left, bounds.bottom);
|
15649 |
+
this.renderTextDecoration(container.parent, bounds, this.fontMetrics.getMetrics(family, size));
|
15650 |
+
}
|
15651 |
+
}, this);
|
15652 |
+
}, this);
|
15653 |
+
};
|
15654 |
+
|
15655 |
+
NodeParser.prototype.renderTextDecoration = function(container, bounds, metrics) {
|
15656 |
+
switch(container.css("textDecoration").split(" ")[0]) {
|
15657 |
+
case "underline":
|
15658 |
+
// Draws a line at the baseline of the font
|
15659 |
+
// TODO As some browsers display the line as more than 1px if the font-size is big, need to take that into account both in position and size
|
15660 |
+
this.renderer.rectangle(bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, container.color("color"));
|
15661 |
+
break;
|
15662 |
+
case "overline":
|
15663 |
+
this.renderer.rectangle(bounds.left, Math.round(bounds.top), bounds.width, 1, container.color("color"));
|
15664 |
+
break;
|
15665 |
+
case "line-through":
|
15666 |
+
// TODO try and find exact position for line-through
|
15667 |
+
this.renderer.rectangle(bounds.left, Math.ceil(bounds.top + metrics.middle + metrics.lineWidth), bounds.width, 1, container.color("color"));
|
15668 |
+
break;
|
15669 |
+
}
|
15670 |
+
};
|
15671 |
+
|
15672 |
+
var borderColorTransforms = {
|
15673 |
+
inset: [
|
15674 |
+
["darken", 0.60],
|
15675 |
+
["darken", 0.10],
|
15676 |
+
["darken", 0.10],
|
15677 |
+
["darken", 0.60]
|
15678 |
+
]
|
15679 |
+
};
|
15680 |
+
|
15681 |
+
NodeParser.prototype.parseBorders = function(container) {
|
15682 |
+
var nodeBounds = container.parseBounds();
|
15683 |
+
var radius = getBorderRadiusData(container);
|
15684 |
+
var borders = ["Top", "Right", "Bottom", "Left"].map(function(side, index) {
|
15685 |
+
var style = container.css('border' + side + 'Style');
|
15686 |
+
var color = container.color('border' + side + 'Color');
|
15687 |
+
if (style === "inset" && color.isBlack()) {
|
15688 |
+
color = new Color([255, 255, 255, color.a]); // this is wrong, but
|
15689 |
+
}
|
15690 |
+
var colorTransform = borderColorTransforms[style] ? borderColorTransforms[style][index] : null;
|
15691 |
+
return {
|
15692 |
+
width: container.cssInt('border' + side + 'Width'),
|
15693 |
+
color: colorTransform ? color[colorTransform[0]](colorTransform[1]) : color,
|
15694 |
+
args: null
|
15695 |
+
};
|
15696 |
+
});
|
15697 |
+
var borderPoints = calculateCurvePoints(nodeBounds, radius, borders);
|
15698 |
+
|
15699 |
+
return {
|
15700 |
+
clip: this.parseBackgroundClip(container, borderPoints, borders, radius, nodeBounds),
|
15701 |
+
borders: calculateBorders(borders, nodeBounds, borderPoints, radius)
|
15702 |
+
};
|
15703 |
+
};
|
15704 |
+
|
15705 |
+
function calculateBorders(borders, nodeBounds, borderPoints, radius) {
|
15706 |
+
return borders.map(function(border, borderSide) {
|
15707 |
+
if (border.width > 0) {
|
15708 |
+
var bx = nodeBounds.left;
|
15709 |
+
var by = nodeBounds.top;
|
15710 |
+
var bw = nodeBounds.width;
|
15711 |
+
var bh = nodeBounds.height - (borders[2].width);
|
15712 |
+
|
15713 |
+
switch(borderSide) {
|
15714 |
+
case 0:
|
15715 |
+
// top border
|
15716 |
+
bh = borders[0].width;
|
15717 |
+
border.args = drawSide({
|
15718 |
+
c1: [bx, by],
|
15719 |
+
c2: [bx + bw, by],
|
15720 |
+
c3: [bx + bw - borders[1].width, by + bh],
|
15721 |
+
c4: [bx + borders[3].width, by + bh]
|
15722 |
+
}, radius[0], radius[1],
|
15723 |
+
borderPoints.topLeftOuter, borderPoints.topLeftInner, borderPoints.topRightOuter, borderPoints.topRightInner);
|
15724 |
+
break;
|
15725 |
+
case 1:
|
15726 |
+
// right border
|
15727 |
+
bx = nodeBounds.left + nodeBounds.width - (borders[1].width);
|
15728 |
+
bw = borders[1].width;
|
15729 |
+
|
15730 |
+
border.args = drawSide({
|
15731 |
+
c1: [bx + bw, by],
|
15732 |
+
c2: [bx + bw, by + bh + borders[2].width],
|
15733 |
+
c3: [bx, by + bh],
|
15734 |
+
c4: [bx, by + borders[0].width]
|
15735 |
+
}, radius[1], radius[2],
|
15736 |
+
borderPoints.topRightOuter, borderPoints.topRightInner, borderPoints.bottomRightOuter, borderPoints.bottomRightInner);
|
15737 |
+
break;
|
15738 |
+
case 2:
|
15739 |
+
// bottom border
|
15740 |
+
by = (by + nodeBounds.height) - (borders[2].width);
|
15741 |
+
bh = borders[2].width;
|
15742 |
+
border.args = drawSide({
|
15743 |
+
c1: [bx + bw, by + bh],
|
15744 |
+
c2: [bx, by + bh],
|
15745 |
+
c3: [bx + borders[3].width, by],
|
15746 |
+
c4: [bx + bw - borders[3].width, by]
|
15747 |
+
}, radius[2], radius[3],
|
15748 |
+
borderPoints.bottomRightOuter, borderPoints.bottomRightInner, borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner);
|
15749 |
+
break;
|
15750 |
+
case 3:
|
15751 |
+
// left border
|
15752 |
+
bw = borders[3].width;
|
15753 |
+
border.args = drawSide({
|
15754 |
+
c1: [bx, by + bh + borders[2].width],
|
15755 |
+
c2: [bx, by],
|
15756 |
+
c3: [bx + bw, by + borders[0].width],
|
15757 |
+
c4: [bx + bw, by + bh]
|
15758 |
+
}, radius[3], radius[0],
|
15759 |
+
borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner, borderPoints.topLeftOuter, borderPoints.topLeftInner);
|
15760 |
+
break;
|
15761 |
+
}
|
15762 |
+
}
|
15763 |
+
return border;
|
15764 |
+
});
|
15765 |
+
}
|
15766 |
+
|
15767 |
+
NodeParser.prototype.parseBackgroundClip = function(container, borderPoints, borders, radius, bounds) {
|
15768 |
+
var backgroundClip = container.css('backgroundClip'),
|
15769 |
+
borderArgs = [];
|
15770 |
+
|
15771 |
+
switch(backgroundClip) {
|
15772 |
+
case "content-box":
|
15773 |
+
case "padding-box":
|
15774 |
+
parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftInner, borderPoints.topRightInner, bounds.left + borders[3].width, bounds.top + borders[0].width);
|
15775 |
+
parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightInner, borderPoints.bottomRightInner, bounds.left + bounds.width - borders[1].width, bounds.top + borders[0].width);
|
15776 |
+
parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightInner, borderPoints.bottomLeftInner, bounds.left + bounds.width - borders[1].width, bounds.top + bounds.height - borders[2].width);
|
15777 |
+
parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftInner, borderPoints.topLeftInner, bounds.left + borders[3].width, bounds.top + bounds.height - borders[2].width);
|
15778 |
+
break;
|
15779 |
+
|
15780 |
+
default:
|
15781 |
+
parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftOuter, borderPoints.topRightOuter, bounds.left, bounds.top);
|
15782 |
+
parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightOuter, borderPoints.bottomRightOuter, bounds.left + bounds.width, bounds.top);
|
15783 |
+
parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightOuter, borderPoints.bottomLeftOuter, bounds.left + bounds.width, bounds.top + bounds.height);
|
15784 |
+
parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftOuter, borderPoints.topLeftOuter, bounds.left, bounds.top + bounds.height);
|
15785 |
+
break;
|
15786 |
+
}
|
15787 |
+
|
15788 |
+
return borderArgs;
|
15789 |
+
};
|
15790 |
+
|
15791 |
+
function getCurvePoints(x, y, r1, r2) {
|
15792 |
+
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
15793 |
+
var ox = (r1) * kappa, // control point offset horizontal
|
15794 |
+
oy = (r2) * kappa, // control point offset vertical
|
15795 |
+
xm = x + r1, // x-middle
|
15796 |
+
ym = y + r2; // y-middle
|
15797 |
+
return {
|
15798 |
+
topLeft: bezierCurve({x: x, y: ym}, {x: x, y: ym - oy}, {x: xm - ox, y: y}, {x: xm, y: y}),
|
15799 |
+
topRight: bezierCurve({x: x, y: y}, {x: x + ox,y: y}, {x: xm, y: ym - oy}, {x: xm, y: ym}),
|
15800 |
+
bottomRight: bezierCurve({x: xm, y: y}, {x: xm, y: y + oy}, {x: x + ox, y: ym}, {x: x, y: ym}),
|
15801 |
+
bottomLeft: bezierCurve({x: xm, y: ym}, {x: xm - ox, y: ym}, {x: x, y: y + oy}, {x: x, y:y})
|
15802 |
+
};
|
15803 |
+
}
|
15804 |
+
|
15805 |
+
function calculateCurvePoints(bounds, borderRadius, borders) {
|
15806 |
+
var x = bounds.left,
|
15807 |
+
y = bounds.top,
|
15808 |
+
width = bounds.width,
|
15809 |
+
height = bounds.height,
|
15810 |
+
|
15811 |
+
tlh = borderRadius[0][0],
|
15812 |
+
tlv = borderRadius[0][1],
|
15813 |
+
trh = borderRadius[1][0],
|
15814 |
+
trv = borderRadius[1][1],
|
15815 |
+
brh = borderRadius[2][0],
|
15816 |
+
brv = borderRadius[2][1],
|
15817 |
+
blh = borderRadius[3][0],
|
15818 |
+
blv = borderRadius[3][1];
|
15819 |
+
|
15820 |
+
var topWidth = width - trh,
|
15821 |
+
rightHeight = height - brv,
|
15822 |
+
bottomWidth = width - brh,
|
15823 |
+
leftHeight = height - blv;
|
15824 |
+
|
15825 |
+
return {
|
15826 |
+
topLeftOuter: getCurvePoints(x, y, tlh, tlv).topLeft.subdivide(0.5),
|
15827 |
+
topLeftInner: getCurvePoints(x + borders[3].width, y + borders[0].width, Math.max(0, tlh - borders[3].width), Math.max(0, tlv - borders[0].width)).topLeft.subdivide(0.5),
|
15828 |
+
topRightOuter: getCurvePoints(x + topWidth, y, trh, trv).topRight.subdivide(0.5),
|
15829 |
+
topRightInner: getCurvePoints(x + Math.min(topWidth, width + borders[3].width), y + borders[0].width, (topWidth > width + borders[3].width) ? 0 :trh - borders[3].width, trv - borders[0].width).topRight.subdivide(0.5),
|
15830 |
+
bottomRightOuter: getCurvePoints(x + bottomWidth, y + rightHeight, brh, brv).bottomRight.subdivide(0.5),
|
15831 |
+
bottomRightInner: getCurvePoints(x + Math.min(bottomWidth, width - borders[3].width), y + Math.min(rightHeight, height + borders[0].width), Math.max(0, brh - borders[1].width), brv - borders[2].width).bottomRight.subdivide(0.5),
|
15832 |
+
bottomLeftOuter: getCurvePoints(x, y + leftHeight, blh, blv).bottomLeft.subdivide(0.5),
|
15833 |
+
bottomLeftInner: getCurvePoints(x + borders[3].width, y + leftHeight, Math.max(0, blh - borders[3].width), blv - borders[2].width).bottomLeft.subdivide(0.5)
|
15834 |
+
};
|
15835 |
+
}
|
15836 |
+
|
15837 |
+
function bezierCurve(start, startControl, endControl, end) {
|
15838 |
+
var lerp = function (a, b, t) {
|
15839 |
+
return {
|
15840 |
+
x: a.x + (b.x - a.x) * t,
|
15841 |
+
y: a.y + (b.y - a.y) * t
|
15842 |
+
};
|
15843 |
+
};
|
15844 |
+
|
15845 |
+
return {
|
15846 |
+
start: start,
|
15847 |
+
startControl: startControl,
|
15848 |
+
endControl: endControl,
|
15849 |
+
end: end,
|
15850 |
+
subdivide: function(t) {
|
15851 |
+
var ab = lerp(start, startControl, t),
|
15852 |
+
bc = lerp(startControl, endControl, t),
|
15853 |
+
cd = lerp(endControl, end, t),
|
15854 |
+
abbc = lerp(ab, bc, t),
|
15855 |
+
bccd = lerp(bc, cd, t),
|
15856 |
+
dest = lerp(abbc, bccd, t);
|
15857 |
+
return [bezierCurve(start, ab, abbc, dest), bezierCurve(dest, bccd, cd, end)];
|
15858 |
+
},
|
15859 |
+
curveTo: function(borderArgs) {
|
15860 |
+
borderArgs.push(["bezierCurve", startControl.x, startControl.y, endControl.x, endControl.y, end.x, end.y]);
|
15861 |
+
},
|
15862 |
+
curveToReversed: function(borderArgs) {
|
15863 |
+
borderArgs.push(["bezierCurve", endControl.x, endControl.y, startControl.x, startControl.y, start.x, start.y]);
|
15864 |
+
}
|
15865 |
+
};
|
15866 |
+
}
|
15867 |
+
|
15868 |
+
function drawSide(borderData, radius1, radius2, outer1, inner1, outer2, inner2) {
|
15869 |
+
var borderArgs = [];
|
15870 |
+
|
15871 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
15872 |
+
borderArgs.push(["line", outer1[1].start.x, outer1[1].start.y]);
|
15873 |
+
outer1[1].curveTo(borderArgs);
|
15874 |
+
} else {
|
15875 |
+
borderArgs.push([ "line", borderData.c1[0], borderData.c1[1]]);
|
15876 |
+
}
|
15877 |
+
|
15878 |
+
if (radius2[0] > 0 || radius2[1] > 0) {
|
15879 |
+
borderArgs.push(["line", outer2[0].start.x, outer2[0].start.y]);
|
15880 |
+
outer2[0].curveTo(borderArgs);
|
15881 |
+
borderArgs.push(["line", inner2[0].end.x, inner2[0].end.y]);
|
15882 |
+
inner2[0].curveToReversed(borderArgs);
|
15883 |
+
} else {
|
15884 |
+
borderArgs.push(["line", borderData.c2[0], borderData.c2[1]]);
|
15885 |
+
borderArgs.push(["line", borderData.c3[0], borderData.c3[1]]);
|
15886 |
+
}
|
15887 |
+
|
15888 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
15889 |
+
borderArgs.push(["line", inner1[1].end.x, inner1[1].end.y]);
|
15890 |
+
inner1[1].curveToReversed(borderArgs);
|
15891 |
+
} else {
|
15892 |
+
borderArgs.push(["line", borderData.c4[0], borderData.c4[1]]);
|
15893 |
+
}
|
15894 |
+
|
15895 |
+
return borderArgs;
|
15896 |
+
}
|
15897 |
+
|
15898 |
+
function parseCorner(borderArgs, radius1, radius2, corner1, corner2, x, y) {
|
15899 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
15900 |
+
borderArgs.push(["line", corner1[0].start.x, corner1[0].start.y]);
|
15901 |
+
corner1[0].curveTo(borderArgs);
|
15902 |
+
corner1[1].curveTo(borderArgs);
|
15903 |
+
} else {
|
15904 |
+
borderArgs.push(["line", x, y]);
|
15905 |
+
}
|
15906 |
+
|
15907 |
+
if (radius2[0] > 0 || radius2[1] > 0) {
|
15908 |
+
borderArgs.push(["line", corner2[0].start.x, corner2[0].start.y]);
|
15909 |
+
}
|
15910 |
+
}
|
15911 |
+
|
15912 |
+
function negativeZIndex(container) {
|
15913 |
+
return container.cssInt("zIndex") < 0;
|
15914 |
+
}
|
15915 |
+
|
15916 |
+
function positiveZIndex(container) {
|
15917 |
+
return container.cssInt("zIndex") > 0;
|
15918 |
+
}
|
15919 |
+
|
15920 |
+
function zIndex0(container) {
|
15921 |
+
return container.cssInt("zIndex") === 0;
|
15922 |
+
}
|
15923 |
+
|
15924 |
+
function inlineLevel(container) {
|
15925 |
+
return ["inline", "inline-block", "inline-table"].indexOf(container.css("display")) !== -1;
|
15926 |
+
}
|
15927 |
+
|
15928 |
+
function isStackingContext(container) {
|
15929 |
+
return (container instanceof StackingContext);
|
15930 |
+
}
|
15931 |
+
|
15932 |
+
function hasText(container) {
|
15933 |
+
return container.node.data.trim().length > 0;
|
15934 |
+
}
|
15935 |
+
|
15936 |
+
function noLetterSpacing(container) {
|
15937 |
+
return (/^(normal|none|0px)$/.test(container.parent.css("letterSpacing")));
|
15938 |
+
}
|
15939 |
+
|
15940 |
+
function getBorderRadiusData(container) {
|
15941 |
+
return ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map(function(side) {
|
15942 |
+
var value = container.css('border' + side + 'Radius');
|
15943 |
+
var arr = value.split(" ");
|
15944 |
+
if (arr.length <= 1) {
|
15945 |
+
arr[1] = arr[0];
|
15946 |
+
}
|
15947 |
+
return arr.map(asInt);
|
15948 |
+
});
|
15949 |
+
}
|
15950 |
+
|
15951 |
+
function renderableNode(node) {
|
15952 |
+
return (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE);
|
15953 |
+
}
|
15954 |
+
|
15955 |
+
function isPositionedForStacking(container) {
|
15956 |
+
var position = container.css("position");
|
15957 |
+
var zIndex = (["absolute", "relative", "fixed"].indexOf(position) !== -1) ? container.css("zIndex") : "auto";
|
15958 |
+
return zIndex !== "auto";
|
15959 |
+
}
|
15960 |
+
|
15961 |
+
function isPositioned(container) {
|
15962 |
+
return container.css("position") !== "static";
|
15963 |
+
}
|
15964 |
+
|
15965 |
+
function isFloating(container) {
|
15966 |
+
return container.css("float") !== "none";
|
15967 |
+
}
|
15968 |
+
|
15969 |
+
function isInlineBlock(container) {
|
15970 |
+
return ["inline-block", "inline-table"].indexOf(container.css("display")) !== -1;
|
15971 |
+
}
|
15972 |
+
|
15973 |
+
function not(callback) {
|
15974 |
+
var context = this;
|
15975 |
+
return function() {
|
15976 |
+
return !callback.apply(context, arguments);
|
15977 |
+
};
|
15978 |
+
}
|
15979 |
+
|
15980 |
+
function isElement(container) {
|
15981 |
+
return container.node.nodeType === Node.ELEMENT_NODE;
|
15982 |
+
}
|
15983 |
+
|
15984 |
+
function isPseudoElement(container) {
|
15985 |
+
return container.isPseudoElement === true;
|
15986 |
+
}
|
15987 |
+
|
15988 |
+
function isTextNode(container) {
|
15989 |
+
return container.node.nodeType === Node.TEXT_NODE;
|
15990 |
+
}
|
15991 |
+
|
15992 |
+
function zIndexSort(contexts) {
|
15993 |
+
return function(a, b) {
|
15994 |
+
return (a.cssInt("zIndex") + (contexts.indexOf(a) / contexts.length)) - (b.cssInt("zIndex") + (contexts.indexOf(b) / contexts.length));
|
15995 |
+
};
|
15996 |
+
}
|
15997 |
+
|
15998 |
+
function hasOpacity(container) {
|
15999 |
+
return container.getOpacity() < 1;
|
16000 |
+
}
|
16001 |
+
|
16002 |
+
function asInt(value) {
|
16003 |
+
return parseInt(value, 10);
|
16004 |
+
}
|
16005 |
+
|
16006 |
+
function getWidth(border) {
|
16007 |
+
return border.width;
|
16008 |
+
}
|
16009 |
+
|
16010 |
+
function nonIgnoredElement(nodeContainer) {
|
16011 |
+
return (nodeContainer.node.nodeType !== Node.ELEMENT_NODE || ["SCRIPT", "HEAD", "TITLE", "OBJECT", "BR", "OPTION"].indexOf(nodeContainer.node.nodeName) === -1);
|
16012 |
+
}
|
16013 |
+
|
16014 |
+
function flatten(arrays) {
|
16015 |
+
return [].concat.apply([], arrays);
|
16016 |
+
}
|
16017 |
+
|
16018 |
+
function stripQuotes(content) {
|
16019 |
+
var first = content.substr(0, 1);
|
16020 |
+
return (first === content.substr(content.length - 1) && first.match(/'|"/)) ? content.substr(1, content.length - 2) : content;
|
16021 |
+
}
|
16022 |
+
|
16023 |
+
function getWords(characters) {
|
16024 |
+
var words = [], i = 0, onWordBoundary = false, word;
|
16025 |
+
while(characters.length) {
|
16026 |
+
if (isWordBoundary(characters[i]) === onWordBoundary) {
|
16027 |
+
word = characters.splice(0, i);
|
16028 |
+
if (word.length) {
|
16029 |
+
words.push(punycode.ucs2.encode(word));
|
16030 |
+
}
|
16031 |
+
onWordBoundary =! onWordBoundary;
|
16032 |
+
i = 0;
|
16033 |
+
} else {
|
16034 |
+
i++;
|
16035 |
+
}
|
16036 |
+
|
16037 |
+
if (i >= characters.length) {
|
16038 |
+
word = characters.splice(0, i);
|
16039 |
+
if (word.length) {
|
16040 |
+
words.push(punycode.ucs2.encode(word));
|
16041 |
+
}
|
16042 |
+
}
|
16043 |
+
}
|
16044 |
+
return words;
|
16045 |
+
}
|
16046 |
+
|
16047 |
+
function isWordBoundary(characterCode) {
|
16048 |
+
return [
|
16049 |
+
32, // <space>
|
16050 |
+
13, // \r
|
16051 |
+
10, // \n
|
16052 |
+
9, // \t
|
16053 |
+
45 // -
|
16054 |
+
].indexOf(characterCode) !== -1;
|
16055 |
+
}
|
16056 |
+
|
16057 |
+
function hasUnicode(string) {
|
16058 |
+
return (/[^\u0000-\u00ff]/).test(string);
|
16059 |
+
}
|
16060 |
+
|
16061 |
+
module.exports = NodeParser;
|
16062 |
+
|
16063 |
+
},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,"punycode":3}],18:[function(require,module,exports){
|
16064 |
+
module.exports = require('es6-promise').Promise;
|
16065 |
+
|
16066 |
+
},{"es6-promise":1}],19:[function(require,module,exports){
|
16067 |
+
var Promise = require('./promise');
|
16068 |
+
var XHR = require('./xhr');
|
16069 |
+
var utils = require('./utils');
|
16070 |
+
var log = require('./log');
|
16071 |
+
var createWindowClone = require('./clone');
|
16072 |
+
var decode64 = utils.decode64;
|
16073 |
+
|
16074 |
+
function Proxy(src, proxyUrl, document) {
|
16075 |
+
var supportsCORS = ('withCredentials' in new XMLHttpRequest());
|
16076 |
+
if (!proxyUrl) {
|
16077 |
+
return Promise.reject("No proxy configured");
|
16078 |
+
}
|
16079 |
+
var callback = createCallback(supportsCORS);
|
16080 |
+
var url = createProxyUrl(proxyUrl, src, callback);
|
16081 |
+
|
16082 |
+
return supportsCORS ? XHR(url) : (jsonp(document, url, callback).then(function(response) {
|
16083 |
+
return decode64(response.content);
|
16084 |
+
}));
|
16085 |
+
}
|
16086 |
+
var proxyCount = 0;
|
16087 |
+
|
16088 |
+
function ProxyURL(src, proxyUrl, document) {
|
16089 |
+
var supportsCORSImage = ('crossOrigin' in new Image());
|
16090 |
+
var callback = createCallback(supportsCORSImage);
|
16091 |
+
var url = createProxyUrl(proxyUrl, src, callback);
|
16092 |
+
return (supportsCORSImage ? Promise.resolve(url) : jsonp(document, url, callback).then(function(response) {
|
16093 |
+
return "data:" + response.type + ";base64," + response.content;
|
16094 |
+
}));
|
16095 |
+
}
|
16096 |
+
|
16097 |
+
function jsonp(document, url, callback) {
|
16098 |
+
return new Promise(function(resolve, reject) {
|
16099 |
+
var s = document.createElement("script");
|
16100 |
+
var cleanup = function() {
|
16101 |
+
delete window.html2canvas.proxy[callback];
|
16102 |
+
document.body.removeChild(s);
|
16103 |
+
};
|
16104 |
+
window.html2canvas.proxy[callback] = function(response) {
|
16105 |
+
cleanup();
|
16106 |
+
resolve(response);
|
16107 |
+
};
|
16108 |
+
s.src = url;
|
16109 |
+
s.onerror = function(e) {
|
16110 |
+
cleanup();
|
16111 |
+
reject(e);
|
16112 |
+
};
|
16113 |
+
document.body.appendChild(s);
|
16114 |
+
});
|
16115 |
+
}
|
16116 |
+
|
16117 |
+
function createCallback(useCORS) {
|
16118 |
+
return !useCORS ? "html2canvas_" + Date.now() + "_" + (++proxyCount) + "_" + Math.round(Math.random() * 100000) : "";
|
16119 |
+
}
|
16120 |
+
|
16121 |
+
function createProxyUrl(proxyUrl, src, callback) {
|
16122 |
+
return proxyUrl + "?url=" + encodeURIComponent(src) + (callback.length ? "&callback=html2canvas.proxy." + callback : "");
|
16123 |
+
}
|
16124 |
+
|
16125 |
+
function documentFromHTML(src) {
|
16126 |
+
return function(html) {
|
16127 |
+
var parser = new DOMParser(), doc;
|
16128 |
+
try {
|
16129 |
+
doc = parser.parseFromString(html, "text/html");
|
16130 |
+
} catch(e) {
|
16131 |
+
log("DOMParser not supported, falling back to createHTMLDocument");
|
16132 |
+
doc = document.implementation.createHTMLDocument("");
|
16133 |
+
try {
|
16134 |
+
doc.open();
|
16135 |
+
doc.write(html);
|
16136 |
+
doc.close();
|
16137 |
+
} catch(ee) {
|
16138 |
+
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
|
16139 |
+
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
|
16140 |
+
}
|
16141 |
+
}
|
16142 |
+
|
16143 |
+
var b = doc.querySelector("base");
|
16144 |
+
if (!b || !b.href.host) {
|
16145 |
+
var base = doc.createElement("base");
|
16146 |
+
base.href = src;
|
16147 |
+
doc.head.insertBefore(base, doc.head.firstChild);
|
16148 |
+
}
|
16149 |
+
|
16150 |
+
return doc;
|
16151 |
+
};
|
16152 |
+
}
|
16153 |
+
|
16154 |
+
function loadUrlDocument(src, proxy, document, width, height, options) {
|
16155 |
+
return new Proxy(src, proxy, window.document).then(documentFromHTML(src)).then(function(doc) {
|
16156 |
+
return createWindowClone(doc, document, width, height, options, 0, 0);
|
16157 |
+
});
|
16158 |
+
}
|
16159 |
+
|
16160 |
+
exports.Proxy = Proxy;
|
16161 |
+
exports.ProxyURL = ProxyURL;
|
16162 |
+
exports.loadUrlDocument = loadUrlDocument;
|
16163 |
+
|
16164 |
+
},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(require,module,exports){
|
16165 |
+
var ProxyURL = require('./proxy').ProxyURL;
|
16166 |
+
var Promise = require('./promise');
|
16167 |
+
|
16168 |
+
function ProxyImageContainer(src, proxy) {
|
16169 |
+
var link = document.createElement("a");
|
16170 |
+
link.href = src;
|
16171 |
+
src = link.href;
|
16172 |
+
this.src = src;
|
16173 |
+
this.image = new Image();
|
16174 |
+
var self = this;
|
16175 |
+
this.promise = new Promise(function(resolve, reject) {
|
16176 |
+
self.image.crossOrigin = "Anonymous";
|
16177 |
+
self.image.onload = resolve;
|
16178 |
+
self.image.onerror = reject;
|
16179 |
+
|
16180 |
+
new ProxyURL(src, proxy, document).then(function(url) {
|
16181 |
+
self.image.src = url;
|
16182 |
+
})['catch'](reject);
|
16183 |
+
});
|
16184 |
+
}
|
16185 |
+
|
16186 |
+
module.exports = ProxyImageContainer;
|
16187 |
+
|
16188 |
+
},{"./promise":18,"./proxy":19}],21:[function(require,module,exports){
|
16189 |
+
var NodeContainer = require('./nodecontainer');
|
16190 |
+
|
16191 |
+
function PseudoElementContainer(node, parent, type) {
|
16192 |
+
NodeContainer.call(this, node, parent);
|
16193 |
+
this.isPseudoElement = true;
|
16194 |
+
this.before = type === ":before";
|
16195 |
+
}
|
16196 |
+
|
16197 |
+
PseudoElementContainer.prototype.cloneTo = function(stack) {
|
16198 |
+
PseudoElementContainer.prototype.cloneTo.call(this, stack);
|
16199 |
+
stack.isPseudoElement = true;
|
16200 |
+
stack.before = this.before;
|
16201 |
+
};
|
16202 |
+
|
16203 |
+
PseudoElementContainer.prototype = Object.create(NodeContainer.prototype);
|
16204 |
+
|
16205 |
+
PseudoElementContainer.prototype.appendToDOM = function() {
|
16206 |
+
if (this.before) {
|
16207 |
+
this.parent.node.insertBefore(this.node, this.parent.node.firstChild);
|
16208 |
+
} else {
|
16209 |
+
this.parent.node.appendChild(this.node);
|
16210 |
+
}
|
16211 |
+
this.parent.node.className += " " + this.getHideClass();
|
16212 |
+
};
|
16213 |
+
|
16214 |
+
PseudoElementContainer.prototype.cleanDOM = function() {
|
16215 |
+
this.node.parentNode.removeChild(this.node);
|
16216 |
+
this.parent.node.className = this.parent.node.className.replace(this.getHideClass(), "");
|
16217 |
+
};
|
16218 |
+
|
16219 |
+
PseudoElementContainer.prototype.getHideClass = function() {
|
16220 |
+
return this["PSEUDO_HIDE_ELEMENT_CLASS_" + (this.before ? "BEFORE" : "AFTER")];
|
16221 |
+
};
|
16222 |
+
|
16223 |
+
PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = "___html2canvas___pseudoelement_before";
|
16224 |
+
PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER = "___html2canvas___pseudoelement_after";
|
16225 |
+
|
16226 |
+
module.exports = PseudoElementContainer;
|
16227 |
+
|
16228 |
+
},{"./nodecontainer":16}],22:[function(require,module,exports){
|
16229 |
+
var log = require('./log');
|
16230 |
+
|
16231 |
+
function Renderer(width, height, images, options, document) {
|
16232 |
+
this.width = width;
|
16233 |
+
this.height = height;
|
16234 |
+
this.images = images;
|
16235 |
+
this.options = options;
|
16236 |
+
this.document = document;
|
16237 |
+
}
|
16238 |
+
|
16239 |
+
Renderer.prototype.renderImage = function(container, bounds, borderData, imageContainer) {
|
16240 |
+
var paddingLeft = container.cssInt('paddingLeft'),
|
16241 |
+
paddingTop = container.cssInt('paddingTop'),
|
16242 |
+
paddingRight = container.cssInt('paddingRight'),
|
16243 |
+
paddingBottom = container.cssInt('paddingBottom'),
|
16244 |
+
borders = borderData.borders;
|
16245 |
+
|
16246 |
+
var width = bounds.width - (borders[1].width + borders[3].width + paddingLeft + paddingRight);
|
16247 |
+
var height = bounds.height - (borders[0].width + borders[2].width + paddingTop + paddingBottom);
|
16248 |
+
this.drawImage(
|
16249 |
+
imageContainer,
|
16250 |
+
0,
|
16251 |
+
0,
|
16252 |
+
imageContainer.image.width || width,
|
16253 |
+
imageContainer.image.height || height,
|
16254 |
+
bounds.left + paddingLeft + borders[3].width,
|
16255 |
+
bounds.top + paddingTop + borders[0].width,
|
16256 |
+
width,
|
16257 |
+
height
|
16258 |
+
);
|
16259 |
+
};
|
16260 |
+
|
16261 |
+
Renderer.prototype.renderBackground = function(container, bounds, borderData) {
|
16262 |
+
if (bounds.height > 0 && bounds.width > 0) {
|
16263 |
+
this.renderBackgroundColor(container, bounds);
|
16264 |
+
this.renderBackgroundImage(container, bounds, borderData);
|
16265 |
+
}
|
16266 |
+
};
|
16267 |
+
|
16268 |
+
Renderer.prototype.renderBackgroundColor = function(container, bounds) {
|
16269 |
+
var color = container.color("backgroundColor");
|
16270 |
+
if (!color.isTransparent()) {
|
16271 |
+
this.rectangle(bounds.left, bounds.top, bounds.width, bounds.height, color);
|
16272 |
+
}
|
16273 |
+
};
|
16274 |
+
|
16275 |
+
Renderer.prototype.renderBorders = function(borders) {
|
16276 |
+
borders.forEach(this.renderBorder, this);
|
16277 |
+
};
|
16278 |
+
|
16279 |
+
Renderer.prototype.renderBorder = function(data) {
|
16280 |
+
if (!data.color.isTransparent() && data.args !== null) {
|
16281 |
+
this.drawShape(data.args, data.color);
|
16282 |
+
}
|
16283 |
+
};
|
16284 |
+
|
16285 |
+
Renderer.prototype.renderBackgroundImage = function(container, bounds, borderData) {
|
16286 |
+
var backgroundImages = container.parseBackgroundImages();
|
16287 |
+
backgroundImages.reverse().forEach(function(backgroundImage, index, arr) {
|
16288 |
+
switch(backgroundImage.method) {
|
16289 |
+
case "url":
|
16290 |
+
var image = this.images.get(backgroundImage.args[0]);
|
16291 |
+
if (image) {
|
16292 |
+
this.renderBackgroundRepeating(container, bounds, image, arr.length - (index+1), borderData);
|
16293 |
+
} else {
|
16294 |
+
log("Error loading background-image", backgroundImage.args[0]);
|
16295 |
+
}
|
16296 |
+
break;
|
16297 |
+
case "linear-gradient":
|
16298 |
+
case "gradient":
|
16299 |
+
var gradientImage = this.images.get(backgroundImage.value);
|
16300 |
+
if (gradientImage) {
|
16301 |
+
this.renderBackgroundGradient(gradientImage, bounds, borderData);
|
16302 |
+
} else {
|
16303 |
+
log("Error loading background-image", backgroundImage.args[0]);
|
16304 |
+
}
|
16305 |
+
break;
|
16306 |
+
case "none":
|
16307 |
+
break;
|
16308 |
+
default:
|
16309 |
+
log("Unknown background-image type", backgroundImage.args[0]);
|
16310 |
+
}
|
16311 |
+
}, this);
|
16312 |
+
};
|
16313 |
+
|
16314 |
+
Renderer.prototype.renderBackgroundRepeating = function(container, bounds, imageContainer, index, borderData) {
|
16315 |
+
var size = container.parseBackgroundSize(bounds, imageContainer.image, index);
|
16316 |
+
var position = container.parseBackgroundPosition(bounds, imageContainer.image, index, size);
|
16317 |
+
var repeat = container.parseBackgroundRepeat(index);
|
16318 |
+
switch (repeat) {
|
16319 |
+
case "repeat-x":
|
16320 |
+
case "repeat no-repeat":
|
16321 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + borderData[3], bounds.top + position.top + borderData[0], 99999, size.height, borderData);
|
16322 |
+
break;
|
16323 |
+
case "repeat-y":
|
16324 |
+
case "no-repeat repeat":
|
16325 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + position.left + borderData[3], bounds.top + borderData[0], size.width, 99999, borderData);
|
16326 |
+
break;
|
16327 |
+
case "no-repeat":
|
16328 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + position.left + borderData[3], bounds.top + position.top + borderData[0], size.width, size.height, borderData);
|
16329 |
+
break;
|
16330 |
+
default:
|
16331 |
+
this.renderBackgroundRepeat(imageContainer, position, size, {top: bounds.top, left: bounds.left}, borderData[3], borderData[0]);
|
16332 |
+
break;
|
16333 |
+
}
|
16334 |
+
};
|
16335 |
+
|
16336 |
+
module.exports = Renderer;
|
16337 |
+
|
16338 |
+
},{"./log":15}],23:[function(require,module,exports){
|
16339 |
+
var Renderer = require('../renderer');
|
16340 |
+
var LinearGradientContainer = require('../lineargradientcontainer');
|
16341 |
+
var log = require('../log');
|
16342 |
+
|
16343 |
+
function CanvasRenderer(width, height) {
|
16344 |
+
Renderer.apply(this, arguments);
|
16345 |
+
this.canvas = this.options.canvas || this.document.createElement("canvas");
|
16346 |
+
if (!this.options.canvas) {
|
16347 |
+
this.canvas.width = width;
|
16348 |
+
this.canvas.height = height;
|
16349 |
+
}
|
16350 |
+
this.ctx = this.canvas.getContext("2d");
|
16351 |
+
this.taintCtx = this.document.createElement("canvas").getContext("2d");
|
16352 |
+
this.ctx.textBaseline = "bottom";
|
16353 |
+
this.variables = {};
|
16354 |
+
log("Initialized CanvasRenderer with size", width, "x", height);
|
16355 |
+
}
|
16356 |
+
|
16357 |
+
CanvasRenderer.prototype = Object.create(Renderer.prototype);
|
16358 |
+
|
16359 |
+
CanvasRenderer.prototype.setFillStyle = function(fillStyle) {
|
16360 |
+
this.ctx.fillStyle = typeof(fillStyle) === "object" && !!fillStyle.isColor ? fillStyle.toString() : fillStyle;
|
16361 |
+
return this.ctx;
|
16362 |
+
};
|
16363 |
+
|
16364 |
+
CanvasRenderer.prototype.rectangle = function(left, top, width, height, color) {
|
16365 |
+
this.setFillStyle(color).fillRect(left, top, width, height);
|
16366 |
+
};
|
16367 |
+
|
16368 |
+
CanvasRenderer.prototype.circle = function(left, top, size, color) {
|
16369 |
+
this.setFillStyle(color);
|
16370 |
+
this.ctx.beginPath();
|
16371 |
+
this.ctx.arc(left + size / 2, top + size / 2, size / 2, 0, Math.PI*2, true);
|
16372 |
+
this.ctx.closePath();
|
16373 |
+
this.ctx.fill();
|
16374 |
+
};
|
16375 |
+
|
16376 |
+
CanvasRenderer.prototype.circleStroke = function(left, top, size, color, stroke, strokeColor) {
|
16377 |
+
this.circle(left, top, size, color);
|
16378 |
+
this.ctx.strokeStyle = strokeColor.toString();
|
16379 |
+
this.ctx.stroke();
|
16380 |
+
};
|
16381 |
+
|
16382 |
+
CanvasRenderer.prototype.drawShape = function(shape, color) {
|
16383 |
+
this.shape(shape);
|
16384 |
+
this.setFillStyle(color).fill();
|
16385 |
+
};
|
16386 |
+
|
16387 |
+
CanvasRenderer.prototype.taints = function(imageContainer) {
|
16388 |
+
if (imageContainer.tainted === null) {
|
16389 |
+
this.taintCtx.drawImage(imageContainer.image, 0, 0);
|
16390 |
+
try {
|
16391 |
+
this.taintCtx.getImageData(0, 0, 1, 1);
|
16392 |
+
imageContainer.tainted = false;
|
16393 |
+
} catch(e) {
|
16394 |
+
this.taintCtx = document.createElement("canvas").getContext("2d");
|
16395 |
+
imageContainer.tainted = true;
|
16396 |
+
}
|
16397 |
+
}
|
16398 |
+
|
16399 |
+
return imageContainer.tainted;
|
16400 |
+
};
|
16401 |
+
|
16402 |
+
CanvasRenderer.prototype.drawImage = function(imageContainer, sx, sy, sw, sh, dx, dy, dw, dh) {
|
16403 |
+
if (!this.taints(imageContainer) || this.options.allowTaint) {
|
16404 |
+
this.ctx.drawImage(imageContainer.image, sx, sy, sw, sh, dx, dy, dw, dh);
|
16405 |
+
}
|
16406 |
+
};
|
16407 |
+
|
16408 |
+
CanvasRenderer.prototype.clip = function(shapes, callback, context) {
|
16409 |
+
this.ctx.save();
|
16410 |
+
shapes.filter(hasEntries).forEach(function(shape) {
|
16411 |
+
this.shape(shape).clip();
|
16412 |
+
}, this);
|
16413 |
+
callback.call(context);
|
16414 |
+
this.ctx.restore();
|
16415 |
+
};
|
16416 |
+
|
16417 |
+
CanvasRenderer.prototype.shape = function(shape) {
|
16418 |
+
this.ctx.beginPath();
|
16419 |
+
shape.forEach(function(point, index) {
|
16420 |
+
if (point[0] === "rect") {
|
16421 |
+
this.ctx.rect.apply(this.ctx, point.slice(1));
|
16422 |
+
} else {
|
16423 |
+
this.ctx[(index === 0) ? "moveTo" : point[0] + "To" ].apply(this.ctx, point.slice(1));
|
16424 |
+
}
|
16425 |
+
}, this);
|
16426 |
+
this.ctx.closePath();
|
16427 |
+
return this.ctx;
|
16428 |
+
};
|
16429 |
+
|
16430 |
+
CanvasRenderer.prototype.font = function(color, style, variant, weight, size, family) {
|
16431 |
+
this.setFillStyle(color).font = [style, variant, weight, size, family].join(" ").split(",")[0];
|
16432 |
+
};
|
16433 |
+
|
16434 |
+
CanvasRenderer.prototype.fontShadow = function(color, offsetX, offsetY, blur) {
|
16435 |
+
this.setVariable("shadowColor", color.toString())
|
16436 |
+
.setVariable("shadowOffsetY", offsetX)
|
16437 |
+
.setVariable("shadowOffsetX", offsetY)
|
16438 |
+
.setVariable("shadowBlur", blur);
|
16439 |
+
};
|
16440 |
+
|
16441 |
+
CanvasRenderer.prototype.clearShadow = function() {
|
16442 |
+
this.setVariable("shadowColor", "rgba(0,0,0,0)");
|
16443 |
+
};
|
16444 |
+
|
16445 |
+
CanvasRenderer.prototype.setOpacity = function(opacity) {
|
16446 |
+
this.ctx.globalAlpha = opacity;
|
16447 |
+
};
|
16448 |
+
|
16449 |
+
CanvasRenderer.prototype.setTransform = function(transform) {
|
16450 |
+
this.ctx.translate(transform.origin[0], transform.origin[1]);
|
16451 |
+
this.ctx.transform.apply(this.ctx, transform.matrix);
|
16452 |
+
this.ctx.translate(-transform.origin[0], -transform.origin[1]);
|
16453 |
+
};
|
16454 |
+
|
16455 |
+
CanvasRenderer.prototype.setVariable = function(property, value) {
|
16456 |
+
if (this.variables[property] !== value) {
|
16457 |
+
this.variables[property] = this.ctx[property] = value;
|
16458 |
+
}
|
16459 |
+
|
16460 |
+
return this;
|
16461 |
+
};
|
16462 |
+
|
16463 |
+
CanvasRenderer.prototype.text = function(text, left, bottom) {
|
16464 |
+
this.ctx.fillText(text, left, bottom);
|
16465 |
+
};
|
16466 |
+
|
16467 |
+
CanvasRenderer.prototype.backgroundRepeatShape = function(imageContainer, backgroundPosition, size, bounds, left, top, width, height, borderData) {
|
16468 |
+
var shape = [
|
16469 |
+
["line", Math.round(left), Math.round(top)],
|
16470 |
+
["line", Math.round(left + width), Math.round(top)],
|
16471 |
+
["line", Math.round(left + width), Math.round(height + top)],
|
16472 |
+
["line", Math.round(left), Math.round(height + top)]
|
16473 |
+
];
|
16474 |
+
this.clip([shape], function() {
|
16475 |
+
this.renderBackgroundRepeat(imageContainer, backgroundPosition, size, bounds, borderData[3], borderData[0]);
|
16476 |
+
}, this);
|
16477 |
+
};
|
16478 |
+
|
16479 |
+
CanvasRenderer.prototype.renderBackgroundRepeat = function(imageContainer, backgroundPosition, size, bounds, borderLeft, borderTop) {
|
16480 |
+
var offsetX = Math.round(bounds.left + backgroundPosition.left + borderLeft), offsetY = Math.round(bounds.top + backgroundPosition.top + borderTop);
|
16481 |
+
this.setFillStyle(this.ctx.createPattern(this.resizeImage(imageContainer, size), "repeat"));
|
16482 |
+
this.ctx.translate(offsetX, offsetY);
|
16483 |
+
this.ctx.fill();
|
16484 |
+
this.ctx.translate(-offsetX, -offsetY);
|
16485 |
+
};
|
16486 |
+
|
16487 |
+
CanvasRenderer.prototype.renderBackgroundGradient = function(gradientImage, bounds) {
|
16488 |
+
if (gradientImage instanceof LinearGradientContainer) {
|
16489 |
+
var gradient = this.ctx.createLinearGradient(
|
16490 |
+
bounds.left + bounds.width * gradientImage.x0,
|
16491 |
+
bounds.top + bounds.height * gradientImage.y0,
|
16492 |
+
bounds.left + bounds.width * gradientImage.x1,
|
16493 |
+
bounds.top + bounds.height * gradientImage.y1);
|
16494 |
+
gradientImage.colorStops.forEach(function(colorStop) {
|
16495 |
+
gradient.addColorStop(colorStop.stop, colorStop.color.toString());
|
16496 |
+
});
|
16497 |
+
this.rectangle(bounds.left, bounds.top, bounds.width, bounds.height, gradient);
|
16498 |
+
}
|
16499 |
+
};
|
16500 |
+
|
16501 |
+
CanvasRenderer.prototype.resizeImage = function(imageContainer, size) {
|
16502 |
+
var image = imageContainer.image;
|
16503 |
+
if(image.width === size.width && image.height === size.height) {
|
16504 |
+
return image;
|
16505 |
+
}
|
16506 |
+
|
16507 |
+
var ctx, canvas = document.createElement('canvas');
|
16508 |
+
canvas.width = size.width;
|
16509 |
+
canvas.height = size.height;
|
16510 |
+
ctx = canvas.getContext("2d");
|
16511 |
+
ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, size.width, size.height );
|
16512 |
+
return canvas;
|
16513 |
+
};
|
16514 |
+
|
16515 |
+
function hasEntries(array) {
|
16516 |
+
return array.length > 0;
|
16517 |
+
}
|
16518 |
+
|
16519 |
+
module.exports = CanvasRenderer;
|
16520 |
+
|
16521 |
+
},{"../lineargradientcontainer":14,"../log":15,"../renderer":22}],24:[function(require,module,exports){
|
16522 |
+
var NodeContainer = require('./nodecontainer');
|
16523 |
+
|
16524 |
+
function StackingContext(hasOwnStacking, opacity, element, parent) {
|
16525 |
+
NodeContainer.call(this, element, parent);
|
16526 |
+
this.ownStacking = hasOwnStacking;
|
16527 |
+
this.contexts = [];
|
16528 |
+
this.children = [];
|
16529 |
+
this.opacity = (this.parent ? this.parent.stack.opacity : 1) * opacity;
|
16530 |
+
}
|
16531 |
+
|
16532 |
+
StackingContext.prototype = Object.create(NodeContainer.prototype);
|
16533 |
+
|
16534 |
+
StackingContext.prototype.getParentStack = function(context) {
|
16535 |
+
var parentStack = (this.parent) ? this.parent.stack : null;
|
16536 |
+
return parentStack ? (parentStack.ownStacking ? parentStack : parentStack.getParentStack(context)) : context.stack;
|
16537 |
+
};
|
16538 |
+
|
16539 |
+
module.exports = StackingContext;
|
16540 |
+
|
16541 |
+
},{"./nodecontainer":16}],25:[function(require,module,exports){
|
16542 |
+
function Support(document) {
|
16543 |
+
this.rangeBounds = this.testRangeBounds(document);
|
16544 |
+
this.cors = this.testCORS();
|
16545 |
+
this.svg = this.testSVG();
|
16546 |
+
}
|
16547 |
+
|
16548 |
+
Support.prototype.testRangeBounds = function(document) {
|
16549 |
+
var range, testElement, rangeBounds, rangeHeight, support = false;
|
16550 |
+
|
16551 |
+
if (document.createRange) {
|
16552 |
+
range = document.createRange();
|
16553 |
+
if (range.getBoundingClientRect) {
|
16554 |
+
testElement = document.createElement('boundtest');
|
16555 |
+
testElement.style.height = "123px";
|
16556 |
+
testElement.style.display = "block";
|
16557 |
+
document.body.appendChild(testElement);
|
16558 |
+
|
16559 |
+
range.selectNode(testElement);
|
16560 |
+
rangeBounds = range.getBoundingClientRect();
|
16561 |
+
rangeHeight = rangeBounds.height;
|
16562 |
+
|
16563 |
+
if (rangeHeight === 123) {
|
16564 |
+
support = true;
|
16565 |
+
}
|
16566 |
+
document.body.removeChild(testElement);
|
16567 |
+
}
|
16568 |
+
}
|
16569 |
+
|
16570 |
+
return support;
|
16571 |
+
};
|
16572 |
+
|
16573 |
+
Support.prototype.testCORS = function() {
|
16574 |
+
return typeof((new Image()).crossOrigin) !== "undefined";
|
16575 |
+
};
|
16576 |
+
|
16577 |
+
Support.prototype.testSVG = function() {
|
16578 |
+
var img = new Image();
|
16579 |
+
var canvas = document.createElement("canvas");
|
16580 |
+
var ctx = canvas.getContext("2d");
|
16581 |
+
img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
|
16582 |
+
|
16583 |
+
try {
|
16584 |
+
ctx.drawImage(img, 0, 0);
|
16585 |
+
canvas.toDataURL();
|
16586 |
+
} catch(e) {
|
16587 |
+
return false;
|
16588 |
+
}
|
16589 |
+
return true;
|
16590 |
+
};
|
16591 |
+
|
16592 |
+
module.exports = Support;
|
16593 |
+
|
16594 |
+
},{}],26:[function(require,module,exports){
|
16595 |
+
var Promise = require('./promise');
|
16596 |
+
var XHR = require('./xhr');
|
16597 |
+
var decode64 = require('./utils').decode64;
|
16598 |
+
|
16599 |
+
function SVGContainer(src) {
|
16600 |
+
this.src = src;
|
16601 |
+
this.image = null;
|
16602 |
+
var self = this;
|
16603 |
+
|
16604 |
+
this.promise = this.hasFabric().then(function() {
|
16605 |
+
return (self.isInline(src) ? Promise.resolve(self.inlineFormatting(src)) : XHR(src));
|
16606 |
+
}).then(function(svg) {
|
16607 |
+
return new Promise(function(resolve) {
|
16608 |
+
window.html2canvas.svg.fabric.loadSVGFromString(svg, self.createCanvas.call(self, resolve));
|
16609 |
+
});
|
16610 |
+
});
|
16611 |
+
}
|
16612 |
+
|
16613 |
+
SVGContainer.prototype.hasFabric = function() {
|
16614 |
+
return !window.html2canvas.svg || !window.html2canvas.svg.fabric ? Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg")) : Promise.resolve();
|
16615 |
+
};
|
16616 |
+
|
16617 |
+
SVGContainer.prototype.inlineFormatting = function(src) {
|
16618 |
+
return (/^data:image\/svg\+xml;base64,/.test(src)) ? this.decode64(this.removeContentType(src)) : this.removeContentType(src);
|
16619 |
+
};
|
16620 |
+
|
16621 |
+
SVGContainer.prototype.removeContentType = function(src) {
|
16622 |
+
return src.replace(/^data:image\/svg\+xml(;base64)?,/,'');
|
16623 |
+
};
|
16624 |
+
|
16625 |
+
SVGContainer.prototype.isInline = function(src) {
|
16626 |
+
return (/^data:image\/svg\+xml/i.test(src));
|
16627 |
+
};
|
16628 |
+
|
16629 |
+
SVGContainer.prototype.createCanvas = function(resolve) {
|
16630 |
+
var self = this;
|
16631 |
+
return function (objects, options) {
|
16632 |
+
var canvas = new window.html2canvas.svg.fabric.StaticCanvas('c');
|
16633 |
+
self.image = canvas.lowerCanvasEl;
|
16634 |
+
canvas
|
16635 |
+
.setWidth(options.width)
|
16636 |
+
.setHeight(options.height)
|
16637 |
+
.add(window.html2canvas.svg.fabric.util.groupSVGElements(objects, options))
|
16638 |
+
.renderAll();
|
16639 |
+
resolve(canvas.lowerCanvasEl);
|
16640 |
+
};
|
16641 |
+
};
|
16642 |
+
|
16643 |
+
SVGContainer.prototype.decode64 = function(str) {
|
16644 |
+
return (typeof(window.atob) === "function") ? window.atob(str) : decode64(str);
|
16645 |
+
};
|
16646 |
+
|
16647 |
+
module.exports = SVGContainer;
|
16648 |
+
|
16649 |
+
},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(require,module,exports){
|
16650 |
+
var SVGContainer = require('./svgcontainer');
|
16651 |
+
var Promise = require('./promise');
|
16652 |
+
|
16653 |
+
function SVGNodeContainer(node, _native) {
|
16654 |
+
this.src = node;
|
16655 |
+
this.image = null;
|
16656 |
+
var self = this;
|
16657 |
+
|
16658 |
+
this.promise = _native ? new Promise(function(resolve, reject) {
|
16659 |
+
self.image = new Image();
|
16660 |
+
self.image.onload = resolve;
|
16661 |
+
self.image.onerror = reject;
|
16662 |
+
self.image.src = "data:image/svg+xml," + (new XMLSerializer()).serializeToString(node);
|
16663 |
+
if (self.image.complete === true) {
|
16664 |
+
resolve(self.image);
|
16665 |
+
}
|
16666 |
+
}) : this.hasFabric().then(function() {
|
16667 |
+
return new Promise(function(resolve) {
|
16668 |
+
window.html2canvas.svg.fabric.parseSVGDocument(node, self.createCanvas.call(self, resolve));
|
16669 |
+
});
|
16670 |
+
});
|
16671 |
+
}
|
16672 |
+
|
16673 |
+
SVGNodeContainer.prototype = Object.create(SVGContainer.prototype);
|
16674 |
+
|
16675 |
+
module.exports = SVGNodeContainer;
|
16676 |
+
|
16677 |
+
},{"./promise":18,"./svgcontainer":26}],28:[function(require,module,exports){
|
16678 |
+
var NodeContainer = require('./nodecontainer');
|
16679 |
+
|
16680 |
+
function TextContainer(node, parent) {
|
16681 |
+
NodeContainer.call(this, node, parent);
|
16682 |
+
}
|
16683 |
+
|
16684 |
+
TextContainer.prototype = Object.create(NodeContainer.prototype);
|
16685 |
+
|
16686 |
+
TextContainer.prototype.applyTextTransform = function() {
|
16687 |
+
this.node.data = this.transform(this.parent.css("textTransform"));
|
16688 |
+
};
|
16689 |
+
|
16690 |
+
TextContainer.prototype.transform = function(transform) {
|
16691 |
+
var text = this.node.data;
|
16692 |
+
switch(transform){
|
16693 |
+
case "lowercase":
|
16694 |
+
return text.toLowerCase();
|
16695 |
+
case "capitalize":
|
16696 |
+
return text.replace(/(^|\s|:|-|\(|\))([a-z])/g, capitalize);
|
16697 |
+
case "uppercase":
|
16698 |
+
return text.toUpperCase();
|
16699 |
+
default:
|
16700 |
+
return text;
|
16701 |
+
}
|
16702 |
+
};
|
16703 |
+
|
16704 |
+
function capitalize(m, p1, p2) {
|
16705 |
+
if (m.length > 0) {
|
16706 |
+
return p1 + p2.toUpperCase();
|
16707 |
+
}
|
16708 |
+
}
|
16709 |
+
|
16710 |
+
module.exports = TextContainer;
|
16711 |
+
|
16712 |
+
},{"./nodecontainer":16}],29:[function(require,module,exports){
|
16713 |
+
exports.smallImage = function smallImage() {
|
16714 |
+
return "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
16715 |
+
};
|
16716 |
+
|
16717 |
+
exports.bind = function(callback, context) {
|
16718 |
+
return function() {
|
16719 |
+
return callback.apply(context, arguments);
|
16720 |
+
};
|
16721 |
+
};
|
16722 |
+
|
16723 |
+
/*
|
16724 |
+
* base64-arraybuffer
|
16725 |
+
* https://github.com/niklasvh/base64-arraybuffer
|
16726 |
+
*
|
16727 |
+
* Copyright (c) 2012 Niklas von Hertzen
|
16728 |
+
* Licensed under the MIT license.
|
16729 |
+
*/
|
16730 |
+
|
16731 |
+
exports.decode64 = function(base64) {
|
16732 |
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
16733 |
+
var len = base64.length, i, encoded1, encoded2, encoded3, encoded4, byte1, byte2, byte3;
|
16734 |
+
|
16735 |
+
var output = "";
|
16736 |
+
|
16737 |
+
for (i = 0; i < len; i+=4) {
|
16738 |
+
encoded1 = chars.indexOf(base64[i]);
|
16739 |
+
encoded2 = chars.indexOf(base64[i+1]);
|
16740 |
+
encoded3 = chars.indexOf(base64[i+2]);
|
16741 |
+
encoded4 = chars.indexOf(base64[i+3]);
|
16742 |
+
|
16743 |
+
byte1 = (encoded1 << 2) | (encoded2 >> 4);
|
16744 |
+
byte2 = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
16745 |
+
byte3 = ((encoded3 & 3) << 6) | encoded4;
|
16746 |
+
if (encoded3 === 64) {
|
16747 |
+
output += String.fromCharCode(byte1);
|
16748 |
+
} else if (encoded4 === 64 || encoded4 === -1) {
|
16749 |
+
output += String.fromCharCode(byte1, byte2);
|
16750 |
+
} else{
|
16751 |
+
output += String.fromCharCode(byte1, byte2, byte3);
|
16752 |
+
}
|
16753 |
+
}
|
16754 |
+
|
16755 |
+
return output;
|
16756 |
+
};
|
16757 |
+
|
16758 |
+
exports.getBounds = function(node) {
|
16759 |
+
if (node.getBoundingClientRect) {
|
16760 |
+
var clientRect = node.getBoundingClientRect();
|
16761 |
+
var width = node.offsetWidth == null ? clientRect.width : node.offsetWidth;
|
16762 |
+
return {
|
16763 |
+
top: clientRect.top,
|
16764 |
+
bottom: clientRect.bottom || (clientRect.top + clientRect.height),
|
16765 |
+
right: clientRect.left + width,
|
16766 |
+
left: clientRect.left,
|
16767 |
+
width: width,
|
16768 |
+
height: node.offsetHeight == null ? clientRect.height : node.offsetHeight
|
16769 |
+
};
|
16770 |
+
}
|
16771 |
+
return {};
|
16772 |
+
};
|
16773 |
+
|
16774 |
+
exports.offsetBounds = function(node) {
|
16775 |
+
var parent = node.offsetParent ? exports.offsetBounds(node.offsetParent) : {top: 0, left: 0};
|
16776 |
+
|
16777 |
+
return {
|
16778 |
+
top: node.offsetTop + parent.top,
|
16779 |
+
bottom: node.offsetTop + node.offsetHeight + parent.top,
|
16780 |
+
right: node.offsetLeft + parent.left + node.offsetWidth,
|
16781 |
+
left: node.offsetLeft + parent.left,
|
16782 |
+
width: node.offsetWidth,
|
16783 |
+
height: node.offsetHeight
|
16784 |
+
};
|
16785 |
+
};
|
16786 |
+
|
16787 |
+
exports.parseBackgrounds = function(backgroundImage) {
|
16788 |
+
var whitespace = ' \r\n\t',
|
16789 |
+
method, definition, prefix, prefix_i, block, results = [],
|
16790 |
+
mode = 0, numParen = 0, quote, args;
|
16791 |
+
var appendResult = function() {
|
16792 |
+
if(method) {
|
16793 |
+
if (definition.substr(0, 1) === '"') {
|
16794 |
+
definition = definition.substr(1, definition.length - 2);
|
16795 |
+
}
|
16796 |
+
if (definition) {
|
16797 |
+
args.push(definition);
|
16798 |
+
}
|
16799 |
+
if (method.substr(0, 1) === '-' && (prefix_i = method.indexOf('-', 1 ) + 1) > 0) {
|
16800 |
+
prefix = method.substr(0, prefix_i);
|
16801 |
+
method = method.substr(prefix_i);
|
16802 |
+
}
|
16803 |
+
results.push({
|
16804 |
+
prefix: prefix,
|
16805 |
+
method: method.toLowerCase(),
|
16806 |
+
value: block,
|
16807 |
+
args: args,
|
16808 |
+
image: null
|
16809 |
+
});
|
16810 |
+
}
|
16811 |
+
args = [];
|
16812 |
+
method = prefix = definition = block = '';
|
16813 |
+
};
|
16814 |
+
args = [];
|
16815 |
+
method = prefix = definition = block = '';
|
16816 |
+
backgroundImage.split("").forEach(function(c) {
|
16817 |
+
if (mode === 0 && whitespace.indexOf(c) > -1) {
|
16818 |
+
return;
|
16819 |
+
}
|
16820 |
+
switch(c) {
|
16821 |
+
case '"':
|
16822 |
+
if(!quote) {
|
16823 |
+
quote = c;
|
16824 |
+
} else if(quote === c) {
|
16825 |
+
quote = null;
|
16826 |
+
}
|
16827 |
+
break;
|
16828 |
+
case '(':
|
16829 |
+
if(quote) {
|
16830 |
+
break;
|
16831 |
+
} else if(mode === 0) {
|
16832 |
+
mode = 1;
|
16833 |
+
block += c;
|
16834 |
+
return;
|
16835 |
+
} else {
|
16836 |
+
numParen++;
|
16837 |
+
}
|
16838 |
+
break;
|
16839 |
+
case ')':
|
16840 |
+
if (quote) {
|
16841 |
+
break;
|
16842 |
+
} else if(mode === 1) {
|
16843 |
+
if(numParen === 0) {
|
16844 |
+
mode = 0;
|
16845 |
+
block += c;
|
16846 |
+
appendResult();
|
16847 |
+
return;
|
16848 |
+
} else {
|
16849 |
+
numParen--;
|
16850 |
+
}
|
16851 |
+
}
|
16852 |
+
break;
|
16853 |
+
|
16854 |
+
case ',':
|
16855 |
+
if (quote) {
|
16856 |
+
break;
|
16857 |
+
} else if(mode === 0) {
|
16858 |
+
appendResult();
|
16859 |
+
return;
|
16860 |
+
} else if (mode === 1) {
|
16861 |
+
if (numParen === 0 && !method.match(/^url$/i)) {
|
16862 |
+
args.push(definition);
|
16863 |
+
definition = '';
|
16864 |
+
block += c;
|
16865 |
+
return;
|
16866 |
+
}
|
16867 |
+
}
|
16868 |
+
break;
|
16869 |
+
}
|
16870 |
+
|
16871 |
+
block += c;
|
16872 |
+
if (mode === 0) {
|
16873 |
+
method += c;
|
16874 |
+
} else {
|
16875 |
+
definition += c;
|
16876 |
+
}
|
16877 |
+
});
|
16878 |
+
|
16879 |
+
appendResult();
|
16880 |
+
return results;
|
16881 |
+
};
|
16882 |
+
|
16883 |
+
},{}],30:[function(require,module,exports){
|
16884 |
+
var GradientContainer = require('./gradientcontainer');
|
16885 |
+
|
16886 |
+
function WebkitGradientContainer(imageData) {
|
16887 |
+
GradientContainer.apply(this, arguments);
|
16888 |
+
this.type = (imageData.args[0] === "linear") ? this.TYPES.LINEAR : this.TYPES.RADIAL;
|
16889 |
+
}
|
16890 |
+
|
16891 |
+
WebkitGradientContainer.prototype = Object.create(GradientContainer.prototype);
|
16892 |
+
|
16893 |
+
module.exports = WebkitGradientContainer;
|
16894 |
+
|
16895 |
+
},{"./gradientcontainer":11}],31:[function(require,module,exports){
|
16896 |
+
var Promise = require('./promise');
|
16897 |
+
|
16898 |
+
function XHR(url) {
|
16899 |
+
return new Promise(function(resolve, reject) {
|
16900 |
+
var xhr = new XMLHttpRequest();
|
16901 |
+
xhr.open('GET', url);
|
16902 |
+
|
16903 |
+
xhr.onload = function() {
|
16904 |
+
if (xhr.status === 200) {
|
16905 |
+
resolve(xhr.responseText);
|
16906 |
+
} else {
|
16907 |
+
reject(new Error(xhr.statusText));
|
16908 |
+
}
|
16909 |
+
};
|
16910 |
+
|
16911 |
+
xhr.onerror = function() {
|
16912 |
+
reject(new Error("Network Error"));
|
16913 |
+
};
|
16914 |
+
|
16915 |
+
xhr.send();
|
16916 |
+
});
|
16917 |
+
}
|
16918 |
+
|
16919 |
+
module.exports = XHR;
|
16920 |
+
|
16921 |
+
},{"./promise":18}]},{},[6])(6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16922 |
});
|
16923 |
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
16924 |
|
16925 |
/***/ },
|
16926 |
/* 537 */
|
assets/js/{admin_vendor.b76a91ce.js → admin_vendor.bf69b320.js}
RENAMED
File without changes
|
assets/js/lib/mailpoet_shortcodes/plugin.js
CHANGED
@@ -8,35 +8,33 @@
|
|
8 |
* its placeholder into editor text.
|
9 |
*/
|
10 |
|
11 |
-
/*
|
12 |
-
/*
|
13 |
-
tinymce.PluginManager.add('mailpoet_shortcodes', function
|
14 |
-
var appendLabelAndClose = function
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
21 |
};
|
22 |
-
};
|
23 |
|
24 |
editor.addButton('mailpoet_shortcodes', {
|
25 |
icon: 'mailpoet_shortcodes',
|
26 |
-
onclick: function
|
27 |
-
var shortcodes = []
|
28 |
-
|
29 |
-
var segment;
|
30 |
-
var i;
|
31 |
|
32 |
-
for (segment in configShortcodes) {
|
33 |
if (configShortcodes.hasOwnProperty(segment)) {
|
34 |
shortcodes.push({
|
35 |
type: 'label',
|
36 |
text: segment
|
37 |
});
|
38 |
|
39 |
-
for (i = 0; i < configShortcodes[segment].length; i += 1) {
|
40 |
shortcodes.push({
|
41 |
type: 'button',
|
42 |
text: configShortcodes[segment][i].text,
|
8 |
* its placeholder into editor text.
|
9 |
*/
|
10 |
|
11 |
+
/*jshint unused:false */
|
12 |
+
/*global tinymce:true */
|
13 |
+
tinymce.PluginManager.add('mailpoet_shortcodes', function(editor, url) {
|
14 |
+
var appendLabelAndClose = function(shortcode) {
|
15 |
+
editor.insertContent(shortcode);
|
16 |
+
editor.windowManager.close();
|
17 |
+
},
|
18 |
+
generateOnClickFunc = function(shortcode) {
|
19 |
+
return function() {
|
20 |
+
appendLabelAndClose(shortcode);
|
21 |
+
};
|
22 |
};
|
|
|
23 |
|
24 |
editor.addButton('mailpoet_shortcodes', {
|
25 |
icon: 'mailpoet_shortcodes',
|
26 |
+
onclick: function() {
|
27 |
+
var shortcodes = [],
|
28 |
+
configShortcodes = editor.settings.mailpoet_shortcodes;
|
|
|
|
|
29 |
|
30 |
+
for (var segment in configShortcodes) {
|
31 |
if (configShortcodes.hasOwnProperty(segment)) {
|
32 |
shortcodes.push({
|
33 |
type: 'label',
|
34 |
text: segment
|
35 |
});
|
36 |
|
37 |
+
for (var i = 0; i < configShortcodes[segment].length; i += 1) {
|
38 |
shortcodes.push({
|
39 |
type: 'button',
|
40 |
text: configShortcodes[segment][i].text,
|
assets/js/manifest.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{
|
2 |
"mp2migrator.js": "mp2migrator.d90426c2.js",
|
3 |
"public.js": "public.ec1bce32.js",
|
4 |
-
"admin.js": "admin.
|
5 |
-
"admin_vendor.js": "admin_vendor.
|
6 |
"form_editor.js": "form_editor.20737db0.js",
|
7 |
"mailpoet.js": "mailpoet.4267d9a6.js",
|
8 |
-
"newsletter_editor.js": "newsletter_editor.
|
9 |
-
"vendor.js": "vendor.
|
10 |
}
|
1 |
{
|
2 |
"mp2migrator.js": "mp2migrator.d90426c2.js",
|
3 |
"public.js": "public.ec1bce32.js",
|
4 |
+
"admin.js": "admin.1d02af45.js",
|
5 |
+
"admin_vendor.js": "admin_vendor.bf69b320.js",
|
6 |
"form_editor.js": "form_editor.20737db0.js",
|
7 |
"mailpoet.js": "mailpoet.4267d9a6.js",
|
8 |
+
"newsletter_editor.js": "newsletter_editor.0b7c23bb.js",
|
9 |
+
"vendor.js": "vendor.98a3aa8c.js"
|
10 |
}
|
assets/js/{newsletter_editor.c65261cf.js → newsletter_editor.0b7c23bb.js}
RENAMED
@@ -7595,7256 +7595,4541 @@ webpackJsonp([4],{
|
|
7595 |
/***/ 536:
|
7596 |
/***/ function(module, exports, __webpack_require__) {
|
7597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7598 |
/*!
|
7599 |
-
*
|
7600 |
-
* Copyright (c)
|
7601 |
-
*
|
|
|
|
|
7602 |
*/
|
7603 |
-
(function webpackUniversalModuleDefinition(root, factory) {
|
7604 |
-
if(true)
|
7605 |
-
module.exports = factory();
|
7606 |
-
else if(typeof define === 'function' && define.amd)
|
7607 |
-
define([], factory);
|
7608 |
-
else if(typeof exports === 'object')
|
7609 |
-
exports["html2canvas"] = factory();
|
7610 |
-
else
|
7611 |
-
root["html2canvas"] = factory();
|
7612 |
-
})(this, function() {
|
7613 |
-
return /******/ (function(modules) { // webpackBootstrap
|
7614 |
-
/******/ // The module cache
|
7615 |
-
/******/ var installedModules = {};
|
7616 |
-
/******/
|
7617 |
-
/******/ // The require function
|
7618 |
-
/******/ function __webpack_require__(moduleId) {
|
7619 |
-
/******/
|
7620 |
-
/******/ // Check if module is in cache
|
7621 |
-
/******/ if(installedModules[moduleId]) {
|
7622 |
-
/******/ return installedModules[moduleId].exports;
|
7623 |
-
/******/ }
|
7624 |
-
/******/ // Create a new module (and put it into the cache)
|
7625 |
-
/******/ var module = installedModules[moduleId] = {
|
7626 |
-
/******/ i: moduleId,
|
7627 |
-
/******/ l: false,
|
7628 |
-
/******/ exports: {}
|
7629 |
-
/******/ };
|
7630 |
-
/******/
|
7631 |
-
/******/ // Execute the module function
|
7632 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
7633 |
-
/******/
|
7634 |
-
/******/ // Flag the module as loaded
|
7635 |
-
/******/ module.l = true;
|
7636 |
-
/******/
|
7637 |
-
/******/ // Return the exports of the module
|
7638 |
-
/******/ return module.exports;
|
7639 |
-
/******/ }
|
7640 |
-
/******/
|
7641 |
-
/******/
|
7642 |
-
/******/ // expose the modules object (__webpack_modules__)
|
7643 |
-
/******/ __webpack_require__.m = modules;
|
7644 |
-
/******/
|
7645 |
-
/******/ // expose the module cache
|
7646 |
-
/******/ __webpack_require__.c = installedModules;
|
7647 |
-
/******/
|
7648 |
-
/******/ // define getter function for harmony exports
|
7649 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
7650 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
7651 |
-
/******/ Object.defineProperty(exports, name, {
|
7652 |
-
/******/ configurable: false,
|
7653 |
-
/******/ enumerable: true,
|
7654 |
-
/******/ get: getter
|
7655 |
-
/******/ });
|
7656 |
-
/******/ }
|
7657 |
-
/******/ };
|
7658 |
-
/******/
|
7659 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
7660 |
-
/******/ __webpack_require__.n = function(module) {
|
7661 |
-
/******/ var getter = module && module.__esModule ?
|
7662 |
-
/******/ function getDefault() { return module['default']; } :
|
7663 |
-
/******/ function getModuleExports() { return module; };
|
7664 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
7665 |
-
/******/ return getter;
|
7666 |
-
/******/ };
|
7667 |
-
/******/
|
7668 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
7669 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
7670 |
-
/******/
|
7671 |
-
/******/ // __webpack_public_path__
|
7672 |
-
/******/ __webpack_require__.p = "";
|
7673 |
-
/******/
|
7674 |
-
/******/ // Load entry module and return exports
|
7675 |
-
/******/ return __webpack_require__(__webpack_require__.s = 27);
|
7676 |
-
/******/ })
|
7677 |
-
/************************************************************************/
|
7678 |
-
/******/ ([
|
7679 |
-
/* 0 */
|
7680 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7681 |
-
|
7682 |
-
"use strict";
|
7683 |
-
|
7684 |
-
|
7685 |
-
// http://dev.w3.org/csswg/css-color/
|
7686 |
-
|
7687 |
-
Object.defineProperty(exports, "__esModule", {
|
7688 |
-
value: true
|
7689 |
-
});
|
7690 |
-
|
7691 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
7692 |
-
|
7693 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
7694 |
-
|
7695 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7696 |
|
7697 |
-
|
7698 |
-
|
7699 |
-
var match = value.match(HEX3);
|
7700 |
-
if (match) {
|
7701 |
-
return [parseInt(match[1][0] + match[1][0], 16), parseInt(match[1][1] + match[1][1], 16), parseInt(match[1][2] + match[1][2], 16), null];
|
7702 |
-
}
|
7703 |
-
return false;
|
7704 |
-
};
|
7705 |
|
7706 |
-
|
7707 |
-
|
7708 |
-
var match = value.match(HEX6);
|
7709 |
-
if (match) {
|
7710 |
-
return [parseInt(match[1].substring(0, 2), 16), parseInt(match[1].substring(2, 4), 16), parseInt(match[1].substring(4, 6), 16), null];
|
7711 |
}
|
7712 |
-
return false;
|
7713 |
-
};
|
7714 |
|
7715 |
-
|
7716 |
-
|
7717 |
-
var match = value.match(RGB);
|
7718 |
-
if (match) {
|
7719 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), null];
|
7720 |
}
|
7721 |
-
return false;
|
7722 |
-
};
|
7723 |
|
7724 |
-
|
7725 |
-
|
7726 |
-
var match = value.match(RGBA);
|
7727 |
-
if (match && match.length > 4) {
|
7728 |
-
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
7729 |
}
|
7730 |
-
return false;
|
7731 |
-
};
|
7732 |
-
|
7733 |
-
var fromArray = function fromArray(array) {
|
7734 |
-
return [Math.min(array[0], 255), Math.min(array[1], 255), Math.min(array[2], 255), array.length > 3 ? array[3] : null];
|
7735 |
-
};
|
7736 |
|
7737 |
-
|
7738 |
-
var color = NAMED_COLORS[name.toLowerCase()];
|
7739 |
-
return color ? color : false;
|
7740 |
-
};
|
7741 |
|
7742 |
-
|
7743 |
-
|
7744 |
-
|
7745 |
-
|
7746 |
-
|
7747 |
-
|
7748 |
-
|
7749 |
-
g = _ref2[1],
|
7750 |
-
b = _ref2[2],
|
7751 |
-
a = _ref2[3];
|
7752 |
-
|
7753 |
-
this.r = r;
|
7754 |
-
this.g = g;
|
7755 |
-
this.b = b;
|
7756 |
-
this.a = a;
|
7757 |
-
}
|
7758 |
-
|
7759 |
-
_createClass(Color, [{
|
7760 |
-
key: 'isTransparent',
|
7761 |
-
value: function isTransparent() {
|
7762 |
-
return this.a === 0;
|
7763 |
-
}
|
7764 |
-
}, {
|
7765 |
-
key: 'toString',
|
7766 |
-
value: function toString() {
|
7767 |
-
return this.a !== null && this.a !== 1 ? 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')' : 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
|
7768 |
-
}
|
7769 |
-
}]);
|
7770 |
-
|
7771 |
-
return Color;
|
7772 |
-
}();
|
7773 |
-
|
7774 |
-
exports.default = Color;
|
7775 |
-
|
7776 |
-
|
7777 |
-
var NAMED_COLORS = {
|
7778 |
-
transparent: [0, 0, 0, 0],
|
7779 |
-
aliceblue: [240, 248, 255, null],
|
7780 |
-
antiquewhite: [250, 235, 215, null],
|
7781 |
-
aqua: [0, 255, 255, null],
|
7782 |
-
aquamarine: [127, 255, 212, null],
|
7783 |
-
azure: [240, 255, 255, null],
|
7784 |
-
beige: [245, 245, 220, null],
|
7785 |
-
bisque: [255, 228, 196, null],
|
7786 |
-
black: [0, 0, 0, null],
|
7787 |
-
blanchedalmond: [255, 235, 205, null],
|
7788 |
-
blue: [0, 0, 255, null],
|
7789 |
-
blueviolet: [138, 43, 226, null],
|
7790 |
-
brown: [165, 42, 42, null],
|
7791 |
-
burlywood: [222, 184, 135, null],
|
7792 |
-
cadetblue: [95, 158, 160, null],
|
7793 |
-
chartreuse: [127, 255, 0, null],
|
7794 |
-
chocolate: [210, 105, 30, null],
|
7795 |
-
coral: [255, 127, 80, null],
|
7796 |
-
cornflowerblue: [100, 149, 237, null],
|
7797 |
-
cornsilk: [255, 248, 220, null],
|
7798 |
-
crimson: [220, 20, 60, null],
|
7799 |
-
cyan: [0, 255, 255, null],
|
7800 |
-
darkblue: [0, 0, 139, null],
|
7801 |
-
darkcyan: [0, 139, 139, null],
|
7802 |
-
darkgoldenrod: [184, 134, 11, null],
|
7803 |
-
darkgray: [169, 169, 169, null],
|
7804 |
-
darkgreen: [0, 100, 0, null],
|
7805 |
-
darkgrey: [169, 169, 169, null],
|
7806 |
-
darkkhaki: [189, 183, 107, null],
|
7807 |
-
darkmagenta: [139, 0, 139, null],
|
7808 |
-
darkolivegreen: [85, 107, 47, null],
|
7809 |
-
darkorange: [255, 140, 0, null],
|
7810 |
-
darkorchid: [153, 50, 204, null],
|
7811 |
-
darkred: [139, 0, 0, null],
|
7812 |
-
darksalmon: [233, 150, 122, null],
|
7813 |
-
darkseagreen: [143, 188, 143, null],
|
7814 |
-
darkslateblue: [72, 61, 139, null],
|
7815 |
-
darkslategray: [47, 79, 79, null],
|
7816 |
-
darkslategrey: [47, 79, 79, null],
|
7817 |
-
darkturquoise: [0, 206, 209, null],
|
7818 |
-
darkviolet: [148, 0, 211, null],
|
7819 |
-
deeppink: [255, 20, 147, null],
|
7820 |
-
deepskyblue: [0, 191, 255, null],
|
7821 |
-
dimgray: [105, 105, 105, null],
|
7822 |
-
dimgrey: [105, 105, 105, null],
|
7823 |
-
dodgerblue: [30, 144, 255, null],
|
7824 |
-
firebrick: [178, 34, 34, null],
|
7825 |
-
floralwhite: [255, 250, 240, null],
|
7826 |
-
forestgreen: [34, 139, 34, null],
|
7827 |
-
fuchsia: [255, 0, 255, null],
|
7828 |
-
gainsboro: [220, 220, 220, null],
|
7829 |
-
ghostwhite: [248, 248, 255, null],
|
7830 |
-
gold: [255, 215, 0, null],
|
7831 |
-
goldenrod: [218, 165, 32, null],
|
7832 |
-
gray: [128, 128, 128, null],
|
7833 |
-
green: [0, 128, 0, null],
|
7834 |
-
greenyellow: [173, 255, 47, null],
|
7835 |
-
grey: [128, 128, 128, null],
|
7836 |
-
honeydew: [240, 255, 240, null],
|
7837 |
-
hotpink: [255, 105, 180, null],
|
7838 |
-
indianred: [205, 92, 92, null],
|
7839 |
-
indigo: [75, 0, 130, null],
|
7840 |
-
ivory: [255, 255, 240, null],
|
7841 |
-
khaki: [240, 230, 140, null],
|
7842 |
-
lavender: [230, 230, 250, null],
|
7843 |
-
lavenderblush: [255, 240, 245, null],
|
7844 |
-
lawngreen: [124, 252, 0, null],
|
7845 |
-
lemonchiffon: [255, 250, 205, null],
|
7846 |
-
lightblue: [173, 216, 230, null],
|
7847 |
-
lightcoral: [240, 128, 128, null],
|
7848 |
-
lightcyan: [224, 255, 255, null],
|
7849 |
-
lightgoldenrodyellow: [250, 250, 210, null],
|
7850 |
-
lightgray: [211, 211, 211, null],
|
7851 |
-
lightgreen: [144, 238, 144, null],
|
7852 |
-
lightgrey: [211, 211, 211, null],
|
7853 |
-
lightpink: [255, 182, 193, null],
|
7854 |
-
lightsalmon: [255, 160, 122, null],
|
7855 |
-
lightseagreen: [32, 178, 170, null],
|
7856 |
-
lightskyblue: [135, 206, 250, null],
|
7857 |
-
lightslategray: [119, 136, 153, null],
|
7858 |
-
lightslategrey: [119, 136, 153, null],
|
7859 |
-
lightsteelblue: [176, 196, 222, null],
|
7860 |
-
lightyellow: [255, 255, 224, null],
|
7861 |
-
lime: [0, 255, 0, null],
|
7862 |
-
limegreen: [50, 205, 50, null],
|
7863 |
-
linen: [250, 240, 230, null],
|
7864 |
-
magenta: [255, 0, 255, null],
|
7865 |
-
maroon: [128, 0, 0, null],
|
7866 |
-
mediumaquamarine: [102, 205, 170, null],
|
7867 |
-
mediumblue: [0, 0, 205, null],
|
7868 |
-
mediumorchid: [186, 85, 211, null],
|
7869 |
-
mediumpurple: [147, 112, 219, null],
|
7870 |
-
mediumseagreen: [60, 179, 113, null],
|
7871 |
-
mediumslateblue: [123, 104, 238, null],
|
7872 |
-
mediumspringgreen: [0, 250, 154, null],
|
7873 |
-
mediumturquoise: [72, 209, 204, null],
|
7874 |
-
mediumvioletred: [199, 21, 133, null],
|
7875 |
-
midnightblue: [25, 25, 112, null],
|
7876 |
-
mintcream: [245, 255, 250, null],
|
7877 |
-
mistyrose: [255, 228, 225, null],
|
7878 |
-
moccasin: [255, 228, 181, null],
|
7879 |
-
navajowhite: [255, 222, 173, null],
|
7880 |
-
navy: [0, 0, 128, null],
|
7881 |
-
oldlace: [253, 245, 230, null],
|
7882 |
-
olive: [128, 128, 0, null],
|
7883 |
-
olivedrab: [107, 142, 35, null],
|
7884 |
-
orange: [255, 165, 0, null],
|
7885 |
-
orangered: [255, 69, 0, null],
|
7886 |
-
orchid: [218, 112, 214, null],
|
7887 |
-
palegoldenrod: [238, 232, 170, null],
|
7888 |
-
palegreen: [152, 251, 152, null],
|
7889 |
-
paleturquoise: [175, 238, 238, null],
|
7890 |
-
palevioletred: [219, 112, 147, null],
|
7891 |
-
papayawhip: [255, 239, 213, null],
|
7892 |
-
peachpuff: [255, 218, 185, null],
|
7893 |
-
peru: [205, 133, 63, null],
|
7894 |
-
pink: [255, 192, 203, null],
|
7895 |
-
plum: [221, 160, 221, null],
|
7896 |
-
powderblue: [176, 224, 230, null],
|
7897 |
-
purple: [128, 0, 128, null],
|
7898 |
-
rebeccapurple: [102, 51, 153, null],
|
7899 |
-
red: [255, 0, 0, null],
|
7900 |
-
rosybrown: [188, 143, 143, null],
|
7901 |
-
royalblue: [65, 105, 225, null],
|
7902 |
-
saddlebrown: [139, 69, 19, null],
|
7903 |
-
salmon: [250, 128, 114, null],
|
7904 |
-
sandybrown: [244, 164, 96, null],
|
7905 |
-
seagreen: [46, 139, 87, null],
|
7906 |
-
seashell: [255, 245, 238, null],
|
7907 |
-
sienna: [160, 82, 45, null],
|
7908 |
-
silver: [192, 192, 192, null],
|
7909 |
-
skyblue: [135, 206, 235, null],
|
7910 |
-
slateblue: [106, 90, 205, null],
|
7911 |
-
slategray: [112, 128, 144, null],
|
7912 |
-
slategrey: [112, 128, 144, null],
|
7913 |
-
snow: [255, 250, 250, null],
|
7914 |
-
springgreen: [0, 255, 127, null],
|
7915 |
-
steelblue: [70, 130, 180, null],
|
7916 |
-
tan: [210, 180, 140, null],
|
7917 |
-
teal: [0, 128, 128, null],
|
7918 |
-
thistle: [216, 191, 216, null],
|
7919 |
-
tomato: [255, 99, 71, null],
|
7920 |
-
turquoise: [64, 224, 208, null],
|
7921 |
-
violet: [238, 130, 238, null],
|
7922 |
-
wheat: [245, 222, 179, null],
|
7923 |
-
white: [255, 255, 255, null],
|
7924 |
-
whitesmoke: [245, 245, 245, null],
|
7925 |
-
yellow: [255, 255, 0, null],
|
7926 |
-
yellowgreen: [154, 205, 50, null]
|
7927 |
-
};
|
7928 |
|
7929 |
-
|
|
|
|
|
7930 |
|
7931 |
-
|
7932 |
-
|
7933 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7934 |
|
7935 |
-
|
7936 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7937 |
|
7938 |
-
|
7939 |
-
|
7940 |
-
});
|
7941 |
-
exports.parseBoundCurves = exports.calculatePaddingBoxPath = exports.calculateBorderBoxPath = exports.parsePathForBorder = exports.parseDocumentSize = exports.calculateContentBox = exports.calculatePaddingBox = exports.parseBounds = exports.Bounds = undefined;
|
7942 |
|
7943 |
-
|
|
|
|
|
|
|
7944 |
|
7945 |
-
|
|
|
|
|
|
|
|
|
|
|
7946 |
|
7947 |
-
|
|
|
|
|
|
|
|
|
7948 |
|
7949 |
-
|
|
|
|
|
|
|
7950 |
|
7951 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7952 |
|
7953 |
-
|
|
|
|
|
|
|
|
|
7954 |
|
7955 |
-
|
7956 |
|
7957 |
-
|
7958 |
-
|
7959 |
-
|
7960 |
-
|
7961 |
|
7962 |
-
|
7963 |
-
var V = 1;
|
7964 |
|
7965 |
-
|
7966 |
-
|
7967 |
-
|
7968 |
|
7969 |
-
|
7970 |
-
this.top = y;
|
7971 |
-
this.width = w;
|
7972 |
-
this.height = h;
|
7973 |
}
|
7974 |
|
7975 |
-
|
7976 |
-
key: 'fromClientRect',
|
7977 |
-
value: function fromClientRect(clientRect, scrollX, scrollY) {
|
7978 |
-
return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
|
7979 |
-
}
|
7980 |
-
}]);
|
7981 |
-
|
7982 |
-
return Bounds;
|
7983 |
-
}();
|
7984 |
|
7985 |
-
|
7986 |
-
|
7987 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7988 |
|
7989 |
-
|
7990 |
-
|
7991 |
-
|
|
|
|
|
7992 |
|
7993 |
-
|
7994 |
-
|
7995 |
-
|
7996 |
-
var paddingRight = padding[RIGHT].value;
|
7997 |
-
var paddingBottom = padding[BOTTOM].value;
|
7998 |
-
var paddingLeft = padding[LEFT].value;
|
7999 |
|
8000 |
-
|
8001 |
-
|
|
|
8002 |
|
8003 |
-
|
8004 |
-
|
8005 |
-
|
|
|
|
|
|
|
|
|
|
|
8006 |
|
8007 |
-
|
8008 |
-
|
|
|
|
|
|
|
|
|
8009 |
}
|
8010 |
-
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
8011 |
|
8012 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8013 |
|
8014 |
-
|
8015 |
-
|
8016 |
|
8017 |
-
|
8018 |
-
|
8019 |
-
|
8020 |
-
|
8021 |
-
|
8022 |
-
return createPathFromCurves(curves.topRightOuter, curves.topRightInner, curves.bottomRightOuter, curves.bottomRightInner);
|
8023 |
-
case BOTTOM:
|
8024 |
-
return createPathFromCurves(curves.bottomRightOuter, curves.bottomRightInner, curves.bottomLeftOuter, curves.bottomLeftInner);
|
8025 |
-
case LEFT:
|
8026 |
-
default:
|
8027 |
-
return createPathFromCurves(curves.bottomLeftOuter, curves.bottomLeftInner, curves.topLeftOuter, curves.topLeftInner);
|
8028 |
}
|
8029 |
-
};
|
8030 |
|
8031 |
-
|
8032 |
-
|
8033 |
-
|
8034 |
-
|
8035 |
-
|
8036 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8037 |
}
|
8038 |
|
8039 |
-
|
8040 |
-
|
8041 |
-
|
8042 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8043 |
}
|
8044 |
|
8045 |
-
|
8046 |
-
|
8047 |
-
|
8048 |
-
|
|
|
|
|
|
|
|
|
8049 |
}
|
8050 |
|
8051 |
-
|
8052 |
-
|
8053 |
-
|
8054 |
-
|
|
|
|
|
8055 |
}
|
8056 |
|
8057 |
-
|
8058 |
-
|
8059 |
|
8060 |
-
|
8061 |
-
|
8062 |
-
};
|
8063 |
|
8064 |
-
|
8065 |
-
|
8066 |
-
|
|
|
|
|
8067 |
|
8068 |
-
|
8069 |
-
|
8070 |
-
|
8071 |
-
|
8072 |
-
var trv = borderRadius[CORNER.TOP_RIGHT][V].getAbsoluteValue(bounds.height);
|
8073 |
-
var brh = borderRadius[CORNER.BOTTOM_RIGHT][H].getAbsoluteValue(bounds.width);
|
8074 |
-
var brv = borderRadius[CORNER.BOTTOM_RIGHT][V].getAbsoluteValue(bounds.height);
|
8075 |
-
var blh = borderRadius[CORNER.BOTTOM_LEFT][H].getAbsoluteValue(bounds.width);
|
8076 |
-
var blv = borderRadius[CORNER.BOTTOM_LEFT][V].getAbsoluteValue(bounds.height);
|
8077 |
-
|
8078 |
-
var factors = [];
|
8079 |
-
factors.push((tlh + trh) / bounds.width);
|
8080 |
-
factors.push((blh + brh) / bounds.width);
|
8081 |
-
factors.push((tlv + blv) / bounds.height);
|
8082 |
-
factors.push((trv + brv) / bounds.height);
|
8083 |
-
var maxFactor = Math.max.apply(Math, factors);
|
8084 |
-
|
8085 |
-
if (maxFactor > 1) {
|
8086 |
-
tlh /= maxFactor;
|
8087 |
-
tlv /= maxFactor;
|
8088 |
-
trh /= maxFactor;
|
8089 |
-
trv /= maxFactor;
|
8090 |
-
brh /= maxFactor;
|
8091 |
-
brv /= maxFactor;
|
8092 |
-
blh /= maxFactor;
|
8093 |
-
blv /= maxFactor;
|
8094 |
-
}
|
8095 |
-
|
8096 |
-
var topWidth = bounds.width - trh;
|
8097 |
-
var rightHeight = bounds.height - brv;
|
8098 |
-
var bottomWidth = bounds.width - brh;
|
8099 |
-
var leftHeight = bounds.height - blv;
|
8100 |
|
8101 |
-
|
8102 |
-
|
8103 |
-
topLeftInner: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, Math.max(0, tlh - borders[LEFT].borderWidth), Math.max(0, tlv - borders[TOP].borderWidth), CORNER.TOP_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
8104 |
-
topRightOuter: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top),
|
8105 |
-
topRightInner: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borders[LEFT].borderWidth), bounds.top + borders[TOP].borderWidth, topWidth > bounds.width + borders[LEFT].borderWidth ? 0 : trh - borders[LEFT].borderWidth, trv - borders[TOP].borderWidth, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
8106 |
-
bottomRightOuter: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top + bounds.height),
|
8107 |
-
bottomRightInner: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borders[LEFT].borderWidth), bounds.top + Math.min(rightHeight, bounds.height + borders[TOP].borderWidth), Math.max(0, brh - borders[RIGHT].borderWidth), brv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth),
|
8108 |
-
bottomLeftOuter: blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left, bounds.top + bounds.height),
|
8109 |
-
bottomLeftInner: blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + leftHeight, Math.max(0, blh - borders[LEFT].borderWidth), blv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth)
|
8110 |
-
};
|
8111 |
-
};
|
8112 |
|
8113 |
-
|
8114 |
-
|
8115 |
-
|
8116 |
-
BOTTOM_RIGHT: 2,
|
8117 |
-
BOTTOM_LEFT: 3
|
8118 |
-
};
|
8119 |
|
8120 |
-
|
8121 |
-
|
8122 |
-
|
8123 |
-
|
8124 |
-
|
8125 |
-
|
8126 |
-
|
8127 |
-
|
8128 |
-
|
8129 |
-
return new _BezierCurve2.default(new _Vector2.default(x, ym), new _Vector2.default(x, ym - oy), new _Vector2.default(xm - ox, y), new _Vector2.default(xm, y));
|
8130 |
-
case CORNER.TOP_RIGHT:
|
8131 |
-
return new _BezierCurve2.default(new _Vector2.default(x, y), new _Vector2.default(x + ox, y), new _Vector2.default(xm, ym - oy), new _Vector2.default(xm, ym));
|
8132 |
-
case CORNER.BOTTOM_RIGHT:
|
8133 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, y), new _Vector2.default(xm, y + oy), new _Vector2.default(x + ox, ym), new _Vector2.default(x, ym));
|
8134 |
-
case CORNER.BOTTOM_LEFT:
|
8135 |
-
default:
|
8136 |
-
return new _BezierCurve2.default(new _Vector2.default(xm, ym), new _Vector2.default(xm - ox, ym), new _Vector2.default(x, y + oy), new _Vector2.default(x, y));
|
8137 |
}
|
8138 |
-
};
|
8139 |
|
8140 |
-
|
8141 |
-
|
8142 |
-
|
8143 |
|
8144 |
-
|
8145 |
|
|
|
8146 |
|
8147 |
-
|
8148 |
-
|
8149 |
-
|
8150 |
-
exports.calculateLengthFromValueWithUnit = exports.LENGTH_TYPE = undefined;
|
8151 |
|
8152 |
-
|
|
|
|
|
|
|
|
|
|
|
8153 |
|
8154 |
-
|
|
|
8155 |
|
8156 |
-
|
|
|
|
|
8157 |
|
8158 |
-
|
8159 |
|
8160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8161 |
|
8162 |
-
|
|
|
|
|
8163 |
|
8164 |
-
|
8165 |
-
|
8166 |
-
PERCENTAGE: 1
|
8167 |
-
};
|
8168 |
|
8169 |
-
|
8170 |
-
|
8171 |
-
|
|
|
|
|
|
|
|
|
8172 |
|
8173 |
-
|
8174 |
-
|
8175 |
-
|
8176 |
-
console.error('Invalid value given for Length: "' + value + '"');
|
8177 |
}
|
8178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8179 |
}
|
8180 |
|
8181 |
-
|
8182 |
-
|
8183 |
-
|
8184 |
-
|
8185 |
-
}
|
8186 |
-
|
8187 |
-
|
8188 |
-
|
8189 |
-
|
8190 |
-
|
8191 |
-
}
|
8192 |
-
key: 'create',
|
8193 |
-
value: function create(v) {
|
8194 |
-
return new Length(v);
|
8195 |
-
}
|
8196 |
-
}]);
|
8197 |
|
8198 |
-
|
8199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8200 |
|
8201 |
-
|
|
|
|
|
|
|
8202 |
|
|
|
|
|
|
|
|
|
8203 |
|
8204 |
-
|
8205 |
-
var parent = container.parent;
|
8206 |
-
return parent ? getRootFontSize(parent) : parseFloat(container.style.font.fontSize);
|
8207 |
-
};
|
8208 |
|
8209 |
-
|
8210 |
-
|
8211 |
-
|
8212 |
-
|
8213 |
-
|
8214 |
-
|
8215 |
-
|
8216 |
-
|
8217 |
-
|
8218 |
-
|
8219 |
-
|
8220 |
-
|
8221 |
-
return new Length('0');
|
8222 |
}
|
8223 |
-
};
|
8224 |
|
8225 |
-
|
8226 |
-
|
8227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8228 |
|
8229 |
-
|
8230 |
|
|
|
|
|
|
|
|
|
8231 |
|
8232 |
-
|
8233 |
-
|
8234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8235 |
|
8236 |
-
|
|
|
8237 |
|
8238 |
-
|
|
|
8239 |
|
8240 |
-
|
|
|
|
|
|
|
|
|
|
|
8241 |
|
8242 |
-
|
|
|
|
|
|
|
8243 |
|
8244 |
-
|
|
|
|
|
8245 |
|
8246 |
-
|
|
|
8247 |
|
8248 |
-
|
|
|
|
|
|
|
|
|
|
|
8249 |
|
8250 |
-
|
|
|
|
|
8251 |
|
8252 |
-
|
|
|
|
|
8253 |
|
8254 |
-
|
8255 |
|
8256 |
-
|
|
|
|
|
|
|
8257 |
|
8258 |
-
|
8259 |
|
8260 |
-
|
|
|
|
|
8261 |
|
8262 |
-
|
|
|
|
|
8263 |
|
8264 |
-
|
|
|
|
|
8265 |
|
8266 |
-
|
|
|
8267 |
|
8268 |
-
|
|
|
|
|
8269 |
|
8270 |
-
|
|
|
|
|
8271 |
|
8272 |
-
|
|
|
|
|
|
|
8273 |
|
8274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8275 |
|
8276 |
-
|
8277 |
|
8278 |
-
|
|
|
|
|
8279 |
|
8280 |
-
|
|
|
|
|
8281 |
|
8282 |
-
|
8283 |
|
8284 |
-
|
|
|
|
|
|
|
|
|
8285 |
|
8286 |
-
|
|
|
8287 |
|
8288 |
-
|
|
|
|
|
|
|
|
|
|
|
8289 |
|
8290 |
-
|
8291 |
|
8292 |
-
|
|
|
|
|
8293 |
|
8294 |
-
|
|
|
|
|
|
|
|
|
8295 |
|
8296 |
-
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
|
8297 |
|
8298 |
-
|
8299 |
-
|
8300 |
-
var _this = this;
|
8301 |
|
8302 |
-
|
|
|
|
|
|
|
8303 |
|
8304 |
-
|
8305 |
-
|
8306 |
-
|
8307 |
-
this.childNodes = [];
|
8308 |
-
this.listItems = [];
|
8309 |
-
if (typeof node.start === 'number') {
|
8310 |
-
this.listStart = node.start;
|
8311 |
-
}
|
8312 |
-
var defaultView = node.ownerDocument.defaultView;
|
8313 |
-
var scrollX = defaultView.pageXOffset;
|
8314 |
-
var scrollY = defaultView.pageYOffset;
|
8315 |
-
var style = defaultView.getComputedStyle(node, null);
|
8316 |
-
var display = (0, _display.parseDisplay)(style.display);
|
8317 |
|
8318 |
-
|
|
|
|
|
|
|
|
|
|
|
8319 |
|
8320 |
-
|
|
|
8321 |
|
8322 |
-
|
8323 |
-
|
8324 |
-
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
|
8325 |
-
borderRadius: (node instanceof defaultView.HTMLInputElement || node instanceof HTMLInputElement) && IS_INPUT ? (0, _Input.getInputBorderRadius)(node) : (0, _borderRadius.parseBorderRadius)(style),
|
8326 |
-
color: IS_INPUT ? _Input.INPUT_COLOR : new _Color2.default(style.color),
|
8327 |
-
display: display,
|
8328 |
-
float: (0, _float.parseCSSFloat)(style.float),
|
8329 |
-
font: (0, _font.parseFont)(style),
|
8330 |
-
letterSpacing: (0, _letterSpacing.parseLetterSpacing)(style.letterSpacing),
|
8331 |
-
listStyle: display === _display.DISPLAY.LIST_ITEM ? (0, _listStyle.parseListStyle)(style) : null,
|
8332 |
-
lineBreak: (0, _lineBreak.parseLineBreak)(style.lineBreak),
|
8333 |
-
margin: (0, _margin.parseMargin)(style),
|
8334 |
-
opacity: parseFloat(style.opacity),
|
8335 |
-
overflow: INPUT_TAGS.indexOf(node.tagName) === -1 ? (0, _overflow.parseOverflow)(style.overflow) : _overflow.OVERFLOW.HIDDEN,
|
8336 |
-
overflowWrap: (0, _overflowWrap.parseOverflowWrap)(style.overflowWrap ? style.overflowWrap : style.wordWrap),
|
8337 |
-
padding: (0, _padding.parsePadding)(style),
|
8338 |
-
position: position,
|
8339 |
-
textDecoration: (0, _textDecoration.parseTextDecoration)(style),
|
8340 |
-
textShadow: (0, _textShadow.parseTextShadow)(style.textShadow),
|
8341 |
-
textTransform: (0, _textTransform.parseTextTransform)(style.textTransform),
|
8342 |
-
transform: (0, _transform.parseTransform)(style),
|
8343 |
-
visibility: (0, _visibility.parseVisibility)(style.visibility),
|
8344 |
-
wordBreak: (0, _wordBreak.parseWordBreak)(style.wordBreak),
|
8345 |
-
zIndex: (0, _zIndex.parseZIndex)(position !== _position.POSITION.STATIC ? style.zIndex : 'auto')
|
8346 |
-
};
|
8347 |
|
8348 |
-
|
8349 |
-
|
8350 |
-
|
8351 |
-
|
8352 |
|
8353 |
-
|
8354 |
-
|
8355 |
-
|
8356 |
-
|
8357 |
-
|
8358 |
-
this.listIndex = node.hasAttribute('value') && typeof node.value === 'number' ? node.value : listIndex === 0 ? typeof listOwner.listStart === 'number' ? listOwner.listStart : 1 : listOwner.listItems[listIndex - 1].listIndex + 1;
|
8359 |
-
}
|
8360 |
-
}
|
8361 |
|
8362 |
-
|
8363 |
-
|
8364 |
-
|
8365 |
-
|
8366 |
-
|
8367 |
-
|
8368 |
-
|
8369 |
-
this.image = getImage(node, resourceLoader);
|
8370 |
-
this.bounds = IS_INPUT ? (0, _Input.reformatInputBounds)((0, _Bounds.parseBounds)(node, scrollX, scrollY)) : (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
8371 |
-
this.curvedBounds = (0, _Bounds.parseBoundCurves)(this.bounds, this.style.border, this.style.borderRadius);
|
8372 |
-
|
8373 |
-
if (true) {
|
8374 |
-
this.name = '' + node.tagName.toLowerCase() + (node.id ? '#' + node.id : '') + node.className.toString().split(' ').map(function (s) {
|
8375 |
-
return s.length ? '.' + s : '';
|
8376 |
-
}).join('');
|
8377 |
-
}
|
8378 |
-
}
|
8379 |
-
|
8380 |
-
_createClass(NodeContainer, [{
|
8381 |
-
key: 'getClipPaths',
|
8382 |
-
value: function getClipPaths() {
|
8383 |
-
var parentClips = this.parent ? this.parent.getClipPaths() : [];
|
8384 |
-
var isClipped = this.style.overflow !== _overflow.OVERFLOW.VISIBLE;
|
8385 |
-
|
8386 |
-
return isClipped ? parentClips.concat([(0, _Bounds.calculatePaddingBoxPath)(this.curvedBounds)]) : parentClips;
|
8387 |
-
}
|
8388 |
-
}, {
|
8389 |
-
key: 'isInFlow',
|
8390 |
-
value: function isInFlow() {
|
8391 |
-
return this.isRootElement() && !this.isFloating() && !this.isAbsolutelyPositioned();
|
8392 |
-
}
|
8393 |
-
}, {
|
8394 |
-
key: 'isVisible',
|
8395 |
-
value: function isVisible() {
|
8396 |
-
return !(0, _Util.contains)(this.style.display, _display.DISPLAY.NONE) && this.style.opacity > 0 && this.style.visibility === _visibility.VISIBILITY.VISIBLE;
|
8397 |
-
}
|
8398 |
-
}, {
|
8399 |
-
key: 'isAbsolutelyPositioned',
|
8400 |
-
value: function isAbsolutelyPositioned() {
|
8401 |
-
return this.style.position !== _position.POSITION.STATIC && this.style.position !== _position.POSITION.RELATIVE;
|
8402 |
-
}
|
8403 |
-
}, {
|
8404 |
-
key: 'isPositioned',
|
8405 |
-
value: function isPositioned() {
|
8406 |
-
return this.style.position !== _position.POSITION.STATIC;
|
8407 |
-
}
|
8408 |
-
}, {
|
8409 |
-
key: 'isFloating',
|
8410 |
-
value: function isFloating() {
|
8411 |
-
return this.style.float !== _float.FLOAT.NONE;
|
8412 |
-
}
|
8413 |
-
}, {
|
8414 |
-
key: 'isRootElement',
|
8415 |
-
value: function isRootElement() {
|
8416 |
-
return this.parent === null;
|
8417 |
-
}
|
8418 |
-
}, {
|
8419 |
-
key: 'isTransformed',
|
8420 |
-
value: function isTransformed() {
|
8421 |
-
return this.style.transform !== null;
|
8422 |
-
}
|
8423 |
-
}, {
|
8424 |
-
key: 'isPositionedWithZIndex',
|
8425 |
-
value: function isPositionedWithZIndex() {
|
8426 |
-
return this.isPositioned() && !this.style.zIndex.auto;
|
8427 |
-
}
|
8428 |
-
}, {
|
8429 |
-
key: 'isInlineLevel',
|
8430 |
-
value: function isInlineLevel() {
|
8431 |
-
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_FLEX) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_GRID) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_LIST_ITEM) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
8432 |
-
}
|
8433 |
-
}, {
|
8434 |
-
key: 'isInlineBlockOrInlineTable',
|
8435 |
-
value: function isInlineBlockOrInlineTable() {
|
8436 |
-
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
8437 |
-
}
|
8438 |
-
}]);
|
8439 |
-
|
8440 |
-
return NodeContainer;
|
8441 |
-
}();
|
8442 |
-
|
8443 |
-
exports.default = NodeContainer;
|
8444 |
-
|
8445 |
-
|
8446 |
-
var getImage = function getImage(node, resourceLoader) {
|
8447 |
-
if (node instanceof node.ownerDocument.defaultView.SVGSVGElement || node instanceof SVGSVGElement) {
|
8448 |
-
var s = new XMLSerializer();
|
8449 |
-
return resourceLoader.loadImage('data:image/svg+xml,' + encodeURIComponent(s.serializeToString(node)));
|
8450 |
-
}
|
8451 |
-
switch (node.tagName) {
|
8452 |
-
case 'IMG':
|
8453 |
-
// $FlowFixMe
|
8454 |
-
var img = node;
|
8455 |
-
return resourceLoader.loadImage(img.currentSrc || img.src);
|
8456 |
-
case 'CANVAS':
|
8457 |
-
// $FlowFixMe
|
8458 |
-
var canvas = node;
|
8459 |
-
return resourceLoader.loadCanvas(canvas);
|
8460 |
-
case 'IFRAME':
|
8461 |
-
var iframeKey = node.getAttribute('data-html2canvas-internal-iframe-key');
|
8462 |
-
if (iframeKey) {
|
8463 |
-
return iframeKey;
|
8464 |
}
|
8465 |
-
|
8466 |
-
|
|
|
8467 |
|
8468 |
-
|
8469 |
-
|
|
|
|
|
|
|
|
|
8470 |
|
8471 |
-
|
8472 |
-
/* 4 */
|
8473 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8474 |
|
8475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8476 |
|
|
|
|
|
|
|
8477 |
|
8478 |
-
|
8479 |
-
|
8480 |
-
|
8481 |
-
|
8482 |
-
|
8483 |
-
|
|
|
|
|
|
|
|
|
8484 |
|
8485 |
-
|
8486 |
-
|
8487 |
-
|
|
|
8488 |
|
8489 |
-
|
8490 |
-
|
8491 |
-
for (var i = style.length - 1; i >= 0; i--) {
|
8492 |
-
var property = style.item(i);
|
8493 |
-
// Safari shows pseudoelements if content is set
|
8494 |
-
if (property !== 'content') {
|
8495 |
-
target.style.setProperty(property, style.getPropertyValue(property));
|
8496 |
}
|
|
|
|
|
|
|
8497 |
}
|
8498 |
-
return target;
|
8499 |
-
};
|
8500 |
|
8501 |
-
|
|
|
|
|
|
|
8502 |
|
8503 |
-
|
8504 |
-
|
8505 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8506 |
|
8507 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8509 |
|
8510 |
-
|
8511 |
-
|
8512 |
-
});
|
8513 |
-
exports.parseBackgroundImage = exports.parseBackground = exports.calculateBackgroundRepeatPath = exports.calculateBackgroundPosition = exports.calculateBackgroungPositioningArea = exports.calculateBackgroungPaintingArea = exports.calculateGradientBackgroundSize = exports.calculateBackgroundSize = exports.BACKGROUND_ORIGIN = exports.BACKGROUND_CLIP = exports.BACKGROUND_SIZE = exports.BACKGROUND_REPEAT = undefined;
|
8514 |
|
8515 |
-
|
|
|
|
|
|
|
8516 |
|
8517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8518 |
|
8519 |
-
|
8520 |
|
8521 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8522 |
|
8523 |
-
|
|
|
8524 |
|
8525 |
-
|
8526 |
|
8527 |
-
|
|
|
8528 |
|
8529 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8530 |
|
8531 |
-
|
8532 |
|
8533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8534 |
|
8535 |
-
|
8536 |
|
8537 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8538 |
|
8539 |
-
|
8540 |
-
|
8541 |
-
NO_REPEAT: 1,
|
8542 |
-
REPEAT_X: 2,
|
8543 |
-
REPEAT_Y: 3
|
8544 |
-
};
|
8545 |
|
8546 |
-
|
8547 |
-
AUTO: 0,
|
8548 |
-
CONTAIN: 1,
|
8549 |
-
COVER: 2,
|
8550 |
-
LENGTH: 3
|
8551 |
-
};
|
8552 |
|
8553 |
-
|
8554 |
-
|
8555 |
-
PADDING_BOX: 1,
|
8556 |
-
CONTENT_BOX: 2
|
8557 |
-
};
|
8558 |
|
8559 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8560 |
|
8561 |
-
|
8562 |
|
8563 |
-
|
8564 |
-
_classCallCheck(this, BackgroundSize);
|
8565 |
|
8566 |
-
|
8567 |
-
case 'contain':
|
8568 |
-
this.size = BACKGROUND_SIZE.CONTAIN;
|
8569 |
-
break;
|
8570 |
-
case 'cover':
|
8571 |
-
this.size = BACKGROUND_SIZE.COVER;
|
8572 |
-
break;
|
8573 |
-
case 'auto':
|
8574 |
-
this.size = BACKGROUND_SIZE.AUTO;
|
8575 |
-
break;
|
8576 |
-
default:
|
8577 |
-
this.value = new _Length2.default(size);
|
8578 |
-
}
|
8579 |
-
};
|
8580 |
|
8581 |
-
|
8582 |
-
var width = 0;
|
8583 |
-
var height = 0;
|
8584 |
-
var size = backgroundImage.size;
|
8585 |
-
if (size[0].size === BACKGROUND_SIZE.CONTAIN || size[0].size === BACKGROUND_SIZE.COVER) {
|
8586 |
-
var targetRatio = bounds.width / bounds.height;
|
8587 |
-
var currentRatio = image.width / image.height;
|
8588 |
-
return targetRatio < currentRatio !== (size[0].size === BACKGROUND_SIZE.COVER) ? new _Size2.default(bounds.width, bounds.width / currentRatio) : new _Size2.default(bounds.height * currentRatio, bounds.height);
|
8589 |
-
}
|
8590 |
|
8591 |
-
|
8592 |
-
width = size[0].value.getAbsoluteValue(bounds.width);
|
8593 |
-
}
|
8594 |
|
8595 |
-
|
8596 |
-
height = image.height;
|
8597 |
-
} else if (size[1].size === BACKGROUND_SIZE.AUTO) {
|
8598 |
-
height = width / image.width * image.height;
|
8599 |
-
} else if (size[1].value) {
|
8600 |
-
height = size[1].value.getAbsoluteValue(bounds.height);
|
8601 |
-
}
|
8602 |
|
8603 |
-
|
8604 |
-
|
8605 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8606 |
|
8607 |
-
|
8608 |
-
};
|
8609 |
|
8610 |
-
|
8611 |
-
|
8612 |
-
|
8613 |
-
|
|
|
|
|
|
|
|
|
|
|
8614 |
|
8615 |
-
|
8616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8617 |
|
8618 |
-
|
|
|
|
|
8619 |
|
8620 |
-
|
8621 |
-
|
8622 |
-
case BACKGROUND_CLIP.BORDER_BOX:
|
8623 |
-
return (0, _Bounds.calculateBorderBoxPath)(curves);
|
8624 |
-
case BACKGROUND_CLIP.PADDING_BOX:
|
8625 |
-
default:
|
8626 |
-
return (0, _Bounds.calculatePaddingBoxPath)(curves);
|
8627 |
-
}
|
8628 |
-
};
|
8629 |
|
8630 |
-
|
8631 |
-
|
8632 |
-
|
8633 |
-
|
8634 |
-
|
8635 |
-
|
8636 |
-
|
8637 |
-
|
8638 |
-
var paddingRight = padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width);
|
8639 |
-
var paddingTop = padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width);
|
8640 |
-
var paddingBottom = padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);
|
8641 |
-
return new _Bounds.Bounds(paddingBox.left + paddingLeft, paddingBox.top + paddingTop, paddingBox.width - paddingLeft - paddingRight, paddingBox.height - paddingTop - paddingBottom);
|
8642 |
-
case BACKGROUND_ORIGIN.PADDING_BOX:
|
8643 |
-
default:
|
8644 |
-
return paddingBox;
|
8645 |
-
}
|
8646 |
-
};
|
8647 |
|
8648 |
-
|
8649 |
-
|
8650 |
-
};
|
8651 |
|
8652 |
-
|
8653 |
-
|
8654 |
-
|
8655 |
-
case BACKGROUND_REPEAT.REPEAT_X:
|
8656 |
-
return [new _Vector2.default(Math.round(bounds.left), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(size.height + backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left), Math.round(size.height + backgroundPositioningArea.top + position.y))];
|
8657 |
-
case BACKGROUND_REPEAT.REPEAT_Y:
|
8658 |
-
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.height + bounds.top))];
|
8659 |
-
case BACKGROUND_REPEAT.NO_REPEAT:
|
8660 |
-
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y + size.height)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y + size.height))];
|
8661 |
-
default:
|
8662 |
-
return [new _Vector2.default(Math.round(bounds.left), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(bounds.left), Math.round(bounds.height + bounds.top))];
|
8663 |
-
}
|
8664 |
-
};
|
8665 |
|
8666 |
-
|
8667 |
-
|
8668 |
-
|
8669 |
-
|
8670 |
-
backgroundClip: parseBackgroundClip(style.backgroundClip),
|
8671 |
-
backgroundOrigin: parseBackgroundOrigin(style.backgroundOrigin)
|
8672 |
-
};
|
8673 |
-
};
|
8674 |
|
8675 |
-
|
8676 |
-
|
8677 |
-
|
8678 |
-
|
8679 |
-
|
8680 |
-
|
8681 |
-
}
|
8682 |
-
return BACKGROUND_CLIP.BORDER_BOX;
|
8683 |
-
};
|
8684 |
-
|
8685 |
-
var parseBackgroundOrigin = function parseBackgroundOrigin(backgroundOrigin) {
|
8686 |
-
switch (backgroundOrigin) {
|
8687 |
-
case 'padding-box':
|
8688 |
-
return BACKGROUND_ORIGIN.PADDING_BOX;
|
8689 |
-
case 'content-box':
|
8690 |
-
return BACKGROUND_ORIGIN.CONTENT_BOX;
|
8691 |
-
}
|
8692 |
-
return BACKGROUND_ORIGIN.BORDER_BOX;
|
8693 |
-
};
|
8694 |
-
|
8695 |
-
var parseBackgroundRepeat = function parseBackgroundRepeat(backgroundRepeat) {
|
8696 |
-
switch (backgroundRepeat.trim()) {
|
8697 |
-
case 'no-repeat':
|
8698 |
-
return BACKGROUND_REPEAT.NO_REPEAT;
|
8699 |
-
case 'repeat-x':
|
8700 |
-
case 'repeat no-repeat':
|
8701 |
-
return BACKGROUND_REPEAT.REPEAT_X;
|
8702 |
-
case 'repeat-y':
|
8703 |
-
case 'no-repeat repeat':
|
8704 |
-
return BACKGROUND_REPEAT.REPEAT_Y;
|
8705 |
-
case 'repeat':
|
8706 |
-
return BACKGROUND_REPEAT.REPEAT;
|
8707 |
-
}
|
8708 |
-
|
8709 |
-
if (true) {
|
8710 |
-
console.error('Invalid background-repeat value "' + backgroundRepeat + '"');
|
8711 |
-
}
|
8712 |
-
|
8713 |
-
return BACKGROUND_REPEAT.REPEAT;
|
8714 |
-
};
|
8715 |
-
|
8716 |
-
var parseBackgroundImages = function parseBackgroundImages(style, resourceLoader) {
|
8717 |
-
var sources = parseBackgroundImage(style.backgroundImage).map(function (backgroundImage) {
|
8718 |
-
if (backgroundImage.method === 'url') {
|
8719 |
-
var key = resourceLoader.loadImage(backgroundImage.args[0]);
|
8720 |
-
backgroundImage.args = key ? [key] : [];
|
8721 |
-
}
|
8722 |
-
return backgroundImage;
|
8723 |
-
});
|
8724 |
-
var positions = style.backgroundPosition.split(',');
|
8725 |
-
var repeats = style.backgroundRepeat.split(',');
|
8726 |
-
var sizes = style.backgroundSize.split(',');
|
8727 |
-
|
8728 |
-
return sources.map(function (source, index) {
|
8729 |
-
var size = (sizes[index] || AUTO).trim().split(' ').map(parseBackgroundSize);
|
8730 |
-
var position = (positions[index] || AUTO).trim().split(' ').map(parseBackgoundPosition);
|
8731 |
-
|
8732 |
-
return {
|
8733 |
-
source: source,
|
8734 |
-
repeat: parseBackgroundRepeat(typeof repeats[index] === 'string' ? repeats[index] : repeats[0]),
|
8735 |
-
size: size.length < 2 ? [size[0], AUTO_SIZE] : [size[0], size[1]],
|
8736 |
-
position: position.length < 2 ? [position[0], position[0]] : [position[0], position[1]]
|
8737 |
-
};
|
8738 |
-
});
|
8739 |
-
};
|
8740 |
-
|
8741 |
-
var parseBackgroundSize = function parseBackgroundSize(size) {
|
8742 |
-
return size === 'auto' ? AUTO_SIZE : new BackgroundSize(size);
|
8743 |
-
};
|
8744 |
-
|
8745 |
-
var parseBackgoundPosition = function parseBackgoundPosition(position) {
|
8746 |
-
switch (position) {
|
8747 |
-
case 'bottom':
|
8748 |
-
case 'right':
|
8749 |
-
return new _Length2.default('100%');
|
8750 |
-
case 'left':
|
8751 |
-
case 'top':
|
8752 |
-
return new _Length2.default('0%');
|
8753 |
-
case 'auto':
|
8754 |
-
return new _Length2.default('0');
|
8755 |
-
}
|
8756 |
-
return new _Length2.default(position);
|
8757 |
-
};
|
8758 |
-
|
8759 |
-
var parseBackgroundImage = exports.parseBackgroundImage = function parseBackgroundImage(image) {
|
8760 |
-
var whitespace = /^\s$/;
|
8761 |
-
var results = [];
|
8762 |
-
|
8763 |
-
var args = [];
|
8764 |
-
var method = '';
|
8765 |
-
var quote = null;
|
8766 |
-
var definition = '';
|
8767 |
-
var mode = 0;
|
8768 |
-
var numParen = 0;
|
8769 |
-
|
8770 |
-
var appendResult = function appendResult() {
|
8771 |
-
var prefix = '';
|
8772 |
-
if (method) {
|
8773 |
-
if (definition.substr(0, 1) === '"') {
|
8774 |
-
definition = definition.substr(1, definition.length - 2);
|
8775 |
-
}
|
8776 |
|
8777 |
-
|
8778 |
-
|
8779 |
-
|
|
|
|
|
8780 |
|
8781 |
-
|
8782 |
-
|
8783 |
-
|
8784 |
-
|
8785 |
-
|
8786 |
-
|
8787 |
-
|
8788 |
-
|
8789 |
-
prefix: prefix,
|
8790 |
-
method: method,
|
8791 |
-
args: args
|
8792 |
-
});
|
8793 |
-
}
|
8794 |
-
}
|
8795 |
-
args = [];
|
8796 |
-
method = definition = '';
|
8797 |
};
|
8798 |
|
8799 |
-
|
8800 |
-
|
8801 |
-
return;
|
8802 |
-
}
|
8803 |
-
switch (c) {
|
8804 |
-
case '"':
|
8805 |
-
if (!quote) {
|
8806 |
-
quote = c;
|
8807 |
-
} else if (quote === c) {
|
8808 |
-
quote = null;
|
8809 |
-
}
|
8810 |
-
break;
|
8811 |
-
case '(':
|
8812 |
-
if (quote) {
|
8813 |
-
break;
|
8814 |
-
} else if (mode === 0) {
|
8815 |
-
mode = 1;
|
8816 |
-
return;
|
8817 |
-
} else {
|
8818 |
-
numParen++;
|
8819 |
-
}
|
8820 |
-
break;
|
8821 |
-
case ')':
|
8822 |
-
if (quote) {
|
8823 |
-
break;
|
8824 |
-
} else if (mode === 1) {
|
8825 |
-
if (numParen === 0) {
|
8826 |
-
mode = 0;
|
8827 |
-
appendResult();
|
8828 |
-
return;
|
8829 |
-
} else {
|
8830 |
-
numParen--;
|
8831 |
-
}
|
8832 |
-
}
|
8833 |
-
break;
|
8834 |
-
|
8835 |
-
case ',':
|
8836 |
-
if (quote) {
|
8837 |
-
break;
|
8838 |
-
} else if (mode === 0) {
|
8839 |
-
appendResult();
|
8840 |
-
return;
|
8841 |
-
} else if (mode === 1) {
|
8842 |
-
if (numParen === 0 && !method.match(/^url$/i)) {
|
8843 |
-
args.push(definition.trim());
|
8844 |
-
definition = '';
|
8845 |
-
return;
|
8846 |
-
}
|
8847 |
-
}
|
8848 |
-
break;
|
8849 |
-
}
|
8850 |
-
|
8851 |
-
if (mode === 0) {
|
8852 |
-
method += c;
|
8853 |
-
} else {
|
8854 |
-
definition += c;
|
8855 |
-
}
|
8856 |
-
});
|
8857 |
-
|
8858 |
-
appendResult();
|
8859 |
-
return results;
|
8860 |
-
};
|
8861 |
-
|
8862 |
-
/***/ }),
|
8863 |
-
/* 6 */
|
8864 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8865 |
-
|
8866 |
-
"use strict";
|
8867 |
-
|
8868 |
-
|
8869 |
-
Object.defineProperty(exports, "__esModule", {
|
8870 |
-
value: true
|
8871 |
-
});
|
8872 |
-
var PATH = exports.PATH = {
|
8873 |
-
VECTOR: 0,
|
8874 |
-
BEZIER_CURVE: 1,
|
8875 |
-
CIRCLE: 2
|
8876 |
-
};
|
8877 |
-
|
8878 |
-
/***/ }),
|
8879 |
-
/* 7 */
|
8880 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8881 |
-
|
8882 |
-
"use strict";
|
8883 |
-
|
8884 |
-
|
8885 |
-
Object.defineProperty(exports, "__esModule", {
|
8886 |
-
value: true
|
8887 |
-
});
|
8888 |
-
|
8889 |
-
var _Path = __webpack_require__(6);
|
8890 |
-
|
8891 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
8892 |
-
|
8893 |
-
var Vector = function Vector(x, y) {
|
8894 |
-
_classCallCheck(this, Vector);
|
8895 |
-
|
8896 |
-
this.type = _Path.PATH.VECTOR;
|
8897 |
-
this.x = x;
|
8898 |
-
this.y = y;
|
8899 |
-
if (true) {
|
8900 |
-
if (isNaN(x)) {
|
8901 |
-
console.error('Invalid x value given for Vector');
|
8902 |
-
}
|
8903 |
-
if (isNaN(y)) {
|
8904 |
-
console.error('Invalid y value given for Vector');
|
8905 |
-
}
|
8906 |
-
}
|
8907 |
-
};
|
8908 |
-
|
8909 |
-
exports.default = Vector;
|
8910 |
-
|
8911 |
-
/***/ }),
|
8912 |
-
/* 8 */
|
8913 |
-
/***/ (function(module, exports, __webpack_require__) {
|
8914 |
-
|
8915 |
-
"use strict";
|
8916 |
-
|
8917 |
-
|
8918 |
-
Object.defineProperty(exports, "__esModule", {
|
8919 |
-
value: true
|
8920 |
-
});
|
8921 |
-
exports.parseListStyle = exports.parseListStyleType = exports.LIST_STYLE_TYPE = exports.LIST_STYLE_POSITION = undefined;
|
8922 |
-
|
8923 |
-
var _background = __webpack_require__(5);
|
8924 |
-
|
8925 |
-
var LIST_STYLE_POSITION = exports.LIST_STYLE_POSITION = {
|
8926 |
-
INSIDE: 0,
|
8927 |
-
OUTSIDE: 1
|
8928 |
-
};
|
8929 |
|
8930 |
-
|
8931 |
-
|
8932 |
-
|
8933 |
-
|
8934 |
-
|
8935 |
-
|
8936 |
-
|
8937 |
-
|
8938 |
-
|
8939 |
-
|
8940 |
-
|
8941 |
-
|
8942 |
-
|
8943 |
-
|
8944 |
-
|
8945 |
-
|
8946 |
-
|
8947 |
-
|
8948 |
-
|
8949 |
-
|
8950 |
-
|
8951 |
-
|
8952 |
-
|
8953 |
-
GUJARATI: 21,
|
8954 |
-
GURMUKHI: 22,
|
8955 |
-
HEBREW: 22,
|
8956 |
-
HIRAGANA: 23,
|
8957 |
-
HIRAGANA_IROHA: 24,
|
8958 |
-
JAPANESE_FORMAL: 25,
|
8959 |
-
JAPANESE_INFORMAL: 26,
|
8960 |
-
KANNADA: 27,
|
8961 |
-
KATAKANA: 28,
|
8962 |
-
KATAKANA_IROHA: 29,
|
8963 |
-
KHMER: 30,
|
8964 |
-
KOREAN_HANGUL_FORMAL: 31,
|
8965 |
-
KOREAN_HANJA_FORMAL: 32,
|
8966 |
-
KOREAN_HANJA_INFORMAL: 33,
|
8967 |
-
LAO: 34,
|
8968 |
-
LOWER_ARMENIAN: 35,
|
8969 |
-
MALAYALAM: 36,
|
8970 |
-
MONGOLIAN: 37,
|
8971 |
-
MYANMAR: 38,
|
8972 |
-
ORIYA: 39,
|
8973 |
-
PERSIAN: 40,
|
8974 |
-
SIMP_CHINESE_FORMAL: 41,
|
8975 |
-
SIMP_CHINESE_INFORMAL: 42,
|
8976 |
-
TAMIL: 43,
|
8977 |
-
TELUGU: 44,
|
8978 |
-
THAI: 45,
|
8979 |
-
TIBETAN: 46,
|
8980 |
-
TRAD_CHINESE_FORMAL: 47,
|
8981 |
-
TRAD_CHINESE_INFORMAL: 48,
|
8982 |
-
UPPER_ARMENIAN: 49,
|
8983 |
-
DISCLOSURE_OPEN: 50,
|
8984 |
-
DISCLOSURE_CLOSED: 51
|
8985 |
-
};
|
8986 |
|
8987 |
-
|
8988 |
-
|
8989 |
-
|
8990 |
-
|
8991 |
-
case 'circle':
|
8992 |
-
return LIST_STYLE_TYPE.CIRCLE;
|
8993 |
-
case 'square':
|
8994 |
-
return LIST_STYLE_TYPE.SQUARE;
|
8995 |
-
case 'decimal':
|
8996 |
-
return LIST_STYLE_TYPE.DECIMAL;
|
8997 |
-
case 'cjk-decimal':
|
8998 |
-
return LIST_STYLE_TYPE.CJK_DECIMAL;
|
8999 |
-
case 'decimal-leading-zero':
|
9000 |
-
return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;
|
9001 |
-
case 'lower-roman':
|
9002 |
-
return LIST_STYLE_TYPE.LOWER_ROMAN;
|
9003 |
-
case 'upper-roman':
|
9004 |
-
return LIST_STYLE_TYPE.UPPER_ROMAN;
|
9005 |
-
case 'lower-greek':
|
9006 |
-
return LIST_STYLE_TYPE.LOWER_GREEK;
|
9007 |
-
case 'lower-alpha':
|
9008 |
-
return LIST_STYLE_TYPE.LOWER_ALPHA;
|
9009 |
-
case 'upper-alpha':
|
9010 |
-
return LIST_STYLE_TYPE.UPPER_ALPHA;
|
9011 |
-
case 'arabic-indic':
|
9012 |
-
return LIST_STYLE_TYPE.ARABIC_INDIC;
|
9013 |
-
case 'armenian':
|
9014 |
-
return LIST_STYLE_TYPE.ARMENIAN;
|
9015 |
-
case 'bengali':
|
9016 |
-
return LIST_STYLE_TYPE.BENGALI;
|
9017 |
-
case 'cambodian':
|
9018 |
-
return LIST_STYLE_TYPE.CAMBODIAN;
|
9019 |
-
case 'cjk-earthly-branch':
|
9020 |
-
return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;
|
9021 |
-
case 'cjk-heavenly-stem':
|
9022 |
-
return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;
|
9023 |
-
case 'cjk-ideographic':
|
9024 |
-
return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;
|
9025 |
-
case 'devanagari':
|
9026 |
-
return LIST_STYLE_TYPE.DEVANAGARI;
|
9027 |
-
case 'ethiopic-numeric':
|
9028 |
-
return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;
|
9029 |
-
case 'georgian':
|
9030 |
-
return LIST_STYLE_TYPE.GEORGIAN;
|
9031 |
-
case 'gujarati':
|
9032 |
-
return LIST_STYLE_TYPE.GUJARATI;
|
9033 |
-
case 'gurmukhi':
|
9034 |
-
return LIST_STYLE_TYPE.GURMUKHI;
|
9035 |
-
case 'hebrew':
|
9036 |
-
return LIST_STYLE_TYPE.HEBREW;
|
9037 |
-
case 'hiragana':
|
9038 |
-
return LIST_STYLE_TYPE.HIRAGANA;
|
9039 |
-
case 'hiragana-iroha':
|
9040 |
-
return LIST_STYLE_TYPE.HIRAGANA_IROHA;
|
9041 |
-
case 'japanese-formal':
|
9042 |
-
return LIST_STYLE_TYPE.JAPANESE_FORMAL;
|
9043 |
-
case 'japanese-informal':
|
9044 |
-
return LIST_STYLE_TYPE.JAPANESE_INFORMAL;
|
9045 |
-
case 'kannada':
|
9046 |
-
return LIST_STYLE_TYPE.KANNADA;
|
9047 |
-
case 'katakana':
|
9048 |
-
return LIST_STYLE_TYPE.KATAKANA;
|
9049 |
-
case 'katakana-iroha':
|
9050 |
-
return LIST_STYLE_TYPE.KATAKANA_IROHA;
|
9051 |
-
case 'khmer':
|
9052 |
-
return LIST_STYLE_TYPE.KHMER;
|
9053 |
-
case 'korean-hangul-formal':
|
9054 |
-
return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;
|
9055 |
-
case 'korean-hanja-formal':
|
9056 |
-
return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;
|
9057 |
-
case 'korean-hanja-informal':
|
9058 |
-
return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;
|
9059 |
-
case 'lao':
|
9060 |
-
return LIST_STYLE_TYPE.LAO;
|
9061 |
-
case 'lower-armenian':
|
9062 |
-
return LIST_STYLE_TYPE.LOWER_ARMENIAN;
|
9063 |
-
case 'malayalam':
|
9064 |
-
return LIST_STYLE_TYPE.MALAYALAM;
|
9065 |
-
case 'mongolian':
|
9066 |
-
return LIST_STYLE_TYPE.MONGOLIAN;
|
9067 |
-
case 'myanmar':
|
9068 |
-
return LIST_STYLE_TYPE.MYANMAR;
|
9069 |
-
case 'oriya':
|
9070 |
-
return LIST_STYLE_TYPE.ORIYA;
|
9071 |
-
case 'persian':
|
9072 |
-
return LIST_STYLE_TYPE.PERSIAN;
|
9073 |
-
case 'simp-chinese-formal':
|
9074 |
-
return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;
|
9075 |
-
case 'simp-chinese-informal':
|
9076 |
-
return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;
|
9077 |
-
case 'tamil':
|
9078 |
-
return LIST_STYLE_TYPE.TAMIL;
|
9079 |
-
case 'telugu':
|
9080 |
-
return LIST_STYLE_TYPE.TELUGU;
|
9081 |
-
case 'thai':
|
9082 |
-
return LIST_STYLE_TYPE.THAI;
|
9083 |
-
case 'tibetan':
|
9084 |
-
return LIST_STYLE_TYPE.TIBETAN;
|
9085 |
-
case 'trad-chinese-formal':
|
9086 |
-
return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;
|
9087 |
-
case 'trad-chinese-informal':
|
9088 |
-
return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;
|
9089 |
-
case 'upper-armenian':
|
9090 |
-
return LIST_STYLE_TYPE.UPPER_ARMENIAN;
|
9091 |
-
case 'disclosure-open':
|
9092 |
-
return LIST_STYLE_TYPE.DISCLOSURE_OPEN;
|
9093 |
-
case 'disclosure-closed':
|
9094 |
-
return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;
|
9095 |
-
case 'none':
|
9096 |
-
default:
|
9097 |
-
return LIST_STYLE_TYPE.NONE;
|
9098 |
-
}
|
9099 |
-
};
|
9100 |
|
9101 |
-
|
9102 |
-
|
9103 |
-
|
9104 |
-
listStyleType: parseListStyleType(style.getPropertyValue('list-style-type')),
|
9105 |
-
listStyleImage: listStyleImage.length ? listStyleImage[0] : null,
|
9106 |
-
listStylePosition: parseListStylePosition(style.getPropertyValue('list-style-position'))
|
9107 |
};
|
9108 |
-
};
|
9109 |
|
9110 |
-
|
9111 |
-
|
9112 |
-
|
9113 |
-
|
9114 |
-
|
9115 |
-
|
9116 |
-
|
9117 |
}
|
9118 |
-
};
|
9119 |
-
|
9120 |
-
|
9121 |
-
|
9122 |
-
/***/ (function(module, exports, __webpack_require__) {
|
9123 |
-
|
9124 |
-
"use strict";
|
9125 |
-
|
9126 |
-
|
9127 |
-
Object.defineProperty(exports, "__esModule", {
|
9128 |
-
value: true
|
9129 |
-
});
|
9130 |
-
|
9131 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9132 |
-
|
9133 |
-
var _textTransform = __webpack_require__(20);
|
9134 |
-
|
9135 |
-
var _TextBounds = __webpack_require__(22);
|
9136 |
-
|
9137 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9138 |
|
9139 |
-
var
|
9140 |
-
|
9141 |
-
|
9142 |
|
9143 |
-
|
9144 |
-
|
9145 |
-
|
9146 |
}
|
9147 |
-
|
9148 |
-
|
9149 |
-
|
9150 |
-
|
9151 |
-
|
9152 |
-
|
|
|
|
|
|
|
9153 |
}
|
9154 |
-
|
9155 |
-
|
9156 |
-
return TextContainer;
|
9157 |
-
}();
|
9158 |
-
|
9159 |
-
exports.default = TextContainer;
|
9160 |
-
|
9161 |
-
|
9162 |
-
var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
|
9163 |
-
|
9164 |
-
var transform = function transform(text, _transform) {
|
9165 |
-
switch (_transform) {
|
9166 |
-
case _textTransform.TEXT_TRANSFORM.LOWERCASE:
|
9167 |
-
return text.toLowerCase();
|
9168 |
-
case _textTransform.TEXT_TRANSFORM.CAPITALIZE:
|
9169 |
-
return text.replace(CAPITALIZE, capitalize);
|
9170 |
-
case _textTransform.TEXT_TRANSFORM.UPPERCASE:
|
9171 |
-
return text.toUpperCase();
|
9172 |
-
default:
|
9173 |
-
return text;
|
9174 |
-
}
|
9175 |
-
};
|
9176 |
-
|
9177 |
-
function capitalize(m, p1, p2) {
|
9178 |
-
if (m.length > 0) {
|
9179 |
-
return p1 + p2.toUpperCase();
|
9180 |
}
|
9181 |
-
|
9182 |
-
return m;
|
9183 |
}
|
9184 |
-
|
9185 |
-
|
9186 |
-
|
9187 |
-
|
9188 |
-
|
9189 |
-
"use strict";
|
9190 |
-
|
9191 |
-
|
9192 |
-
Object.defineProperty(exports, "__esModule", {
|
9193 |
-
value: true
|
9194 |
-
});
|
9195 |
-
|
9196 |
-
var _ForeignObjectRenderer = __webpack_require__(23);
|
9197 |
-
|
9198 |
-
var testRangeBounds = function testRangeBounds(document) {
|
9199 |
-
var TEST_HEIGHT = 123;
|
9200 |
-
|
9201 |
-
if (document.createRange) {
|
9202 |
-
var range = document.createRange();
|
9203 |
-
if (range.getBoundingClientRect) {
|
9204 |
-
var testElement = document.createElement('boundtest');
|
9205 |
-
testElement.style.height = TEST_HEIGHT + 'px';
|
9206 |
-
testElement.style.display = 'block';
|
9207 |
-
document.body.appendChild(testElement);
|
9208 |
-
|
9209 |
-
range.selectNode(testElement);
|
9210 |
-
var rangeBounds = range.getBoundingClientRect();
|
9211 |
-
var rangeHeight = Math.round(rangeBounds.height);
|
9212 |
-
document.body.removeChild(testElement);
|
9213 |
-
if (rangeHeight === TEST_HEIGHT) {
|
9214 |
-
return true;
|
9215 |
-
}
|
9216 |
-
}
|
9217 |
}
|
9218 |
-
|
9219 |
-
return false;
|
9220 |
};
|
9221 |
|
9222 |
-
|
9223 |
-
|
9224 |
-
|
9225 |
-
|
9226 |
-
|
9227 |
|
9228 |
-
|
9229 |
-
// Single pixel base64 image renders fine on iOS 10.3???
|
9230 |
-
img.src = src;
|
9231 |
|
9232 |
-
|
9233 |
-
|
9234 |
-
|
9235 |
-
|
9236 |
-
|
9237 |
-
|
9238 |
-
|
9239 |
-
|
9240 |
-
return resolve(true);
|
9241 |
-
};
|
9242 |
-
|
9243 |
-
img.onload = onload;
|
9244 |
-
img.onerror = function () {
|
9245 |
-
return resolve(false);
|
9246 |
-
};
|
9247 |
-
|
9248 |
-
if (img.complete === true) {
|
9249 |
-
setTimeout(function () {
|
9250 |
-
onload();
|
9251 |
-
}, 500);
|
9252 |
-
}
|
9253 |
-
});
|
9254 |
-
};
|
9255 |
|
9256 |
-
|
9257 |
-
|
9258 |
};
|
9259 |
|
9260 |
-
|
9261 |
-
|
|
|
|
|
9262 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9263 |
|
9264 |
-
|
9265 |
-
|
9266 |
-
|
9267 |
-
|
9268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9269 |
|
9270 |
-
|
9271 |
-
|
9272 |
-
|
9273 |
-
|
9274 |
-
|
9275 |
-
|
9276 |
-
|
9277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9278 |
|
9279 |
-
|
9280 |
-
|
9281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9282 |
|
9283 |
-
|
9284 |
-
|
9285 |
-
|
9286 |
-
|
9287 |
-
|
9288 |
-
|
9289 |
-
|
9290 |
-
|
9291 |
-
|
9292 |
-
|
9293 |
-
|
9294 |
-
|
9295 |
-
|
9296 |
-
|
9297 |
-
|
9298 |
-
|
9299 |
-
|
9300 |
-
|
9301 |
-
|
9302 |
-
|
9303 |
-
|
9304 |
-
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
9308 |
-
|
9309 |
-
|
9310 |
-
|
9311 |
-
|
9312 |
-
|
9313 |
-
|
9314 |
-
|
9315 |
-
|
9316 |
-
|
9317 |
-
|
|
|
|
|
|
|
9318 |
|
9319 |
-
|
9320 |
-
|
9321 |
-
|
9322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9323 |
|
9324 |
-
|
9325 |
-
|
9326 |
-
|
9327 |
-
|
9328 |
-
|
9329 |
-
|
9330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9331 |
|
9332 |
-
|
9333 |
-
|
9334 |
-
|
9335 |
-
|
9336 |
-
|
9337 |
-
|
9338 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9339 |
|
9340 |
-
|
9341 |
-
|
9342 |
-
|
9343 |
-
|
9344 |
-
|
9345 |
-
|
9346 |
-
|
9347 |
-
|
9348 |
-
|
9349 |
-
|
9350 |
-
|
|
|
|
|
|
|
9351 |
|
9352 |
-
|
9353 |
-
|
9354 |
-
|
9355 |
-
|
9356 |
-
|
9357 |
-
|
9358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9359 |
|
9360 |
-
|
9361 |
-
|
9362 |
-
|
9363 |
-
|
9364 |
-
|
9365 |
-
|
9366 |
-
|
9367 |
|
9368 |
-
|
9369 |
-
|
9370 |
-
return value;
|
9371 |
-
},
|
9372 |
-
// $FlowFixMe - get/set properties not yet supported
|
9373 |
-
get SUPPORT_CORS_XHR() {
|
9374 |
-
'use strict';
|
9375 |
|
9376 |
-
|
9377 |
-
Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });
|
9378 |
-
return value;
|
9379 |
-
}
|
9380 |
-
};
|
9381 |
|
9382 |
-
|
|
|
|
|
|
|
|
|
|
|
9383 |
|
9384 |
-
|
9385 |
-
|
9386 |
-
|
9387 |
|
9388 |
-
|
9389 |
|
|
|
|
|
|
|
9390 |
|
9391 |
-
|
9392 |
-
|
9393 |
-
});
|
9394 |
-
exports.parseTextDecoration = exports.TEXT_DECORATION_LINE = exports.TEXT_DECORATION = exports.TEXT_DECORATION_STYLE = undefined;
|
9395 |
|
9396 |
-
|
|
|
|
|
9397 |
|
9398 |
-
|
|
|
|
|
|
|
9399 |
|
9400 |
-
|
9401 |
|
9402 |
-
|
9403 |
-
SOLID: 0,
|
9404 |
-
DOUBLE: 1,
|
9405 |
-
DOTTED: 2,
|
9406 |
-
DASHED: 3,
|
9407 |
-
WAVY: 4
|
9408 |
-
};
|
9409 |
|
9410 |
-
|
9411 |
-
|
9412 |
-
};
|
9413 |
|
9414 |
-
|
9415 |
-
|
9416 |
-
|
9417 |
-
|
9418 |
-
|
9419 |
-
};
|
9420 |
|
9421 |
-
|
9422 |
-
|
9423 |
-
case 'underline':
|
9424 |
-
return TEXT_DECORATION_LINE.UNDERLINE;
|
9425 |
-
case 'overline':
|
9426 |
-
return TEXT_DECORATION_LINE.OVERLINE;
|
9427 |
-
case 'line-through':
|
9428 |
-
return TEXT_DECORATION_LINE.LINE_THROUGH;
|
9429 |
-
}
|
9430 |
-
return TEXT_DECORATION_LINE.BLINK;
|
9431 |
-
};
|
9432 |
|
9433 |
-
|
9434 |
-
|
9435 |
-
return null;
|
9436 |
-
}
|
9437 |
|
9438 |
-
|
9439 |
-
};
|
9440 |
|
9441 |
-
|
9442 |
-
|
9443 |
-
case 'double':
|
9444 |
-
return TEXT_DECORATION_STYLE.DOUBLE;
|
9445 |
-
case 'dotted':
|
9446 |
-
return TEXT_DECORATION_STYLE.DOTTED;
|
9447 |
-
case 'dashed':
|
9448 |
-
return TEXT_DECORATION_STYLE.DASHED;
|
9449 |
-
case 'wavy':
|
9450 |
-
return TEXT_DECORATION_STYLE.WAVY;
|
9451 |
-
}
|
9452 |
-
return TEXT_DECORATION_STYLE.SOLID;
|
9453 |
-
};
|
9454 |
|
9455 |
-
|
9456 |
-
|
9457 |
-
|
9458 |
-
|
9459 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9460 |
|
9461 |
-
|
9462 |
-
var textDecorationStyle = parseTextDecorationStyle(style.textDecorationStyle);
|
9463 |
|
9464 |
-
|
9465 |
-
|
9466 |
-
textDecorationColor: textDecorationColor,
|
9467 |
-
textDecorationStyle: textDecorationStyle
|
9468 |
-
};
|
9469 |
-
};
|
9470 |
|
9471 |
-
|
9472 |
-
|
9473 |
-
|
|
|
9474 |
|
9475 |
-
|
|
|
9476 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9477 |
|
9478 |
-
|
9479 |
-
|
9480 |
-
|
9481 |
-
|
|
|
|
|
9482 |
|
9483 |
-
|
|
|
9484 |
|
9485 |
-
|
|
|
9486 |
|
9487 |
-
|
|
|
|
|
9488 |
|
9489 |
-
|
9490 |
-
|
9491 |
-
|
9492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9493 |
|
9494 |
-
|
9495 |
-
|
9496 |
-
|
9497 |
-
|
9498 |
-
|
9499 |
-
|
9500 |
|
9501 |
-
|
9502 |
-
|
9503 |
-
});
|
9504 |
|
9505 |
-
|
9506 |
-
|
9507 |
-
|
9508 |
-
return BORDER_STYLE.NONE;
|
9509 |
-
}
|
9510 |
-
return BORDER_STYLE.SOLID;
|
9511 |
-
};
|
9512 |
|
9513 |
-
|
9514 |
-
|
9515 |
-
|
9516 |
-
|
9517 |
-
|
9518 |
-
|
9519 |
-
|
9520 |
-
|
9521 |
-
|
9522 |
-
|
9523 |
-
|
9524 |
-
|
|
|
|
|
|
|
|
|
|
|
9525 |
|
9526 |
-
|
9527 |
-
|
9528 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9529 |
|
9530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9532 |
|
9533 |
-
|
9534 |
-
|
9535 |
-
})
|
9536 |
-
|
9537 |
-
|
9538 |
-
|
9539 |
-
|
9540 |
-
|
9541 |
-
|
9542 |
-
|
9543 |
-
|
9544 |
-
|
9545 |
-
|
9546 |
-
|
9547 |
-
|
9548 |
-
|
9549 |
-
|
9550 |
-
|
9551 |
-
|
9552 |
-
|
9553 |
-
|
9554 |
-
|
9555 |
-
|
9556 |
-
|
9557 |
-
|
9558 |
-
|
9559 |
-
|
9560 |
-
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
-
|
9565 |
-
|
9566 |
-
|
9567 |
-
|
9568 |
-
|
9569 |
-
|
9570 |
-
|
9571 |
-
|
9572 |
-
|
9573 |
-
|
9574 |
-
|
9575 |
-
}
|
9576 |
-
|
9577 |
-
|
9578 |
-
|
9579 |
-
|
9580 |
-
|
9581 |
-
|
9582 |
-
|
9583 |
-
|
9584 |
-
|
9585 |
-
|
9586 |
-
|
9587 |
-
|
9588 |
-
|
9589 |
-
|
9590 |
-
|
9591 |
-
|
9592 |
-
|
9593 |
-
}
|
9594 |
-
|
9595 |
-
|
9596 |
-
|
9597 |
-
|
9598 |
-
|
9599 |
-
|
9600 |
-
|
9601 |
-
|
9602 |
-
|
9603 |
-
|
9604 |
-
|
9605 |
-
|
9606 |
-
|
9607 |
-
|
9608 |
-
|
9609 |
-
|
9610 |
-
|
9611 |
-
|
9612 |
-
|
9613 |
-
|
9614 |
-
|
9615 |
-
|
9616 |
-
|
9617 |
-
|
9618 |
-
|
9619 |
-
|
9620 |
-
|
9621 |
-
|
9622 |
-
|
9623 |
-
|
9624 |
-
|
9625 |
-
|
9626 |
-
|
9627 |
-
|
9628 |
-
|
9629 |
-
|
9630 |
-
|
9631 |
-
|
9632 |
-
|
9633 |
-
|
9634 |
-
|
9635 |
-
|
9636 |
-
|
9637 |
-
|
9638 |
-
|
9639 |
-
|
9640 |
-
|
9641 |
-
|
9642 |
-
|
9643 |
-
|
9644 |
-
|
9645 |
-
|
9646 |
-
|
9647 |
-
|
9648 |
-
|
9649 |
-
|
9650 |
-
|
9651 |
-
|
9652 |
-
|
9653 |
-
|
9654 |
-
|
9655 |
-
|
9656 |
-
|
9657 |
-
|
9658 |
-
|
9659 |
-
|
9660 |
-
|
9661 |
-
|
9662 |
-
|
9663 |
-
|
9664 |
-
|
9665 |
-
|
9666 |
-
|
9667 |
-
|
9668 |
-
|
9669 |
-
|
9670 |
-
|
9671 |
-
|
9672 |
-
|
9673 |
-
|
9674 |
-
|
9675 |
-
|
9676 |
-
|
9677 |
-
|
9678 |
-
|
9679 |
-
|
9680 |
-
|
9681 |
-
|
9682 |
-
|
9683 |
-
|
9684 |
-
|
9685 |
-
|
9686 |
-
|
9687 |
-
|
9688 |
-
|
9689 |
-
|
9690 |
-
|
9691 |
-
|
9692 |
-
|
9693 |
-
|
9694 |
-
return
|
9695 |
-
};
|
9696 |
-
|
9697 |
-
|
9698 |
-
|
9699 |
-
|
9700 |
-
|
9701 |
-
|
9702 |
-
|
9703 |
-
|
9704 |
-
|
9705 |
-
|
9706 |
-
|
9707 |
-
|
9708 |
-
|
9709 |
-
|
9710 |
-
|
9711 |
-
|
9712 |
-
|
9713 |
-
|
9714 |
-
|
9715 |
-
|
9716 |
-
|
9717 |
-
|
9718 |
-
|
9719 |
-
|
9720 |
-
|
9721 |
-
|
9722 |
-
|
9723 |
-
|
9724 |
-
|
9725 |
-
|
9726 |
-
|
9727 |
-
|
9728 |
-
|
9729 |
-
|
9730 |
-
|
9731 |
-
|
9732 |
-
|
9733 |
-
|
9734 |
-
|
9735 |
-
|
9736 |
-
|
9737 |
-
|
9738 |
-
|
9739 |
-
|
9740 |
-
|
9741 |
-
|
9742 |
-
|
9743 |
-
|
9744 |
-
|
9745 |
-
|
9746 |
-
|
9747 |
-
|
9748 |
-
|
9749 |
-
|
9750 |
-
|
9751 |
-
|
9752 |
-
|
9753 |
-
|
9754 |
-
|
9755 |
-
|
9756 |
-
|
9757 |
-
|
9758 |
-
|
9759 |
-
|
9760 |
-
|
9761 |
-
|
9762 |
-
|
9763 |
-
|
9764 |
-
|
9765 |
-
|
9766 |
-
|
9767 |
-
|
9768 |
-
|
9769 |
-
|
9770 |
-
|
9771 |
-
|
9772 |
-
|
9773 |
-
|
9774 |
-
|
9775 |
-
|
9776 |
-
|
9777 |
-
|
9778 |
-
|
9779 |
-
|
9780 |
-
|
9781 |
-
|
9782 |
-
|
9783 |
-
var
|
9784 |
-
|
9785 |
-
|
9786 |
-
|
9787 |
-
|
9788 |
-
|
9789 |
-
|
9790 |
-
|
9791 |
-
|
9792 |
-
|
9793 |
-
|
9794 |
-
|
9795 |
-
|
9796 |
-
|
9797 |
-
|
9798 |
-
|
9799 |
-
|
9800 |
-
|
9801 |
-
|
9802 |
-
|
9803 |
-
|
9804 |
-
|
9805 |
-
|
9806 |
-
|
9807 |
-
|
9808 |
-
|
9809 |
-
|
9810 |
-
|
9811 |
-
|
9812 |
-
|
9813 |
-
|
9814 |
-
|
9815 |
-
|
9816 |
-
|
9817 |
-
|
9818 |
-
|
9819 |
-
|
9820 |
-
|
9821 |
-
|
9822 |
-
|
9823 |
-
|
9824 |
-
|
9825 |
-
|
9826 |
-
|
9827 |
-
|
9828 |
-
|
9829 |
-
|
9830 |
-
|
9831 |
-
|
9832 |
-
|
9833 |
-
|
9834 |
-
|
9835 |
-
|
9836 |
-
|
9837 |
-
|
9838 |
-
|
9839 |
-
|
9840 |
-
|
9841 |
-
|
9842 |
-
|
9843 |
-
|
9844 |
-
|
9845 |
-
|
9846 |
-
|
9847 |
-
|
9848 |
-
|
9849 |
-
|
9850 |
-
|
9851 |
-
|
9852 |
-
|
9853 |
-
|
9854 |
-
|
9855 |
-
|
9856 |
-
|
9857 |
-
|
9858 |
-
|
9859 |
-
|
9860 |
-
|
9861 |
-
|
9862 |
-
|
9863 |
-
|
9864 |
-
|
9865 |
-
|
9866 |
-
|
9867 |
-
|
9868 |
-
|
9869 |
-
|
9870 |
-
|
9871 |
-
|
9872 |
-
|
9873 |
-
|
9874 |
-
|
9875 |
-
|
9876 |
-
|
9877 |
-
|
9878 |
-
|
9879 |
-
|
9880 |
-
|
9881 |
-
|
9882 |
-
|
9883 |
-
|
9884 |
-
|
9885 |
-
|
9886 |
-
|
9887 |
-
|
9888 |
-
|
9889 |
-
|
9890 |
-
|
9891 |
-
|
9892 |
-
|
9893 |
-
|
9894 |
-
|
9895 |
-
|
9896 |
-
|
9897 |
-
|
9898 |
-
|
9899 |
-
|
9900 |
-
|
9901 |
-
|
9902 |
-
|
9903 |
-
|
9904 |
-
|
9905 |
-
|
9906 |
-
|
9907 |
-
|
9908 |
-
|
9909 |
-
|
9910 |
-
|
9911 |
-
|
9912 |
-
|
9913 |
-
|
9914 |
-
|
9915 |
-
|
9916 |
-
|
9917 |
-
|
9918 |
-
|
9919 |
-
|
9920 |
-
|
9921 |
-
|
9922 |
-
|
9923 |
-
|
9924 |
-
|
9925 |
-
|
9926 |
-
|
9927 |
-
|
9928 |
-
|
9929 |
-
|
9930 |
-
|
9931 |
-
|
9932 |
-
|
9933 |
-
|
9934 |
-
|
9935 |
-
|
9936 |
-
|
9937 |
-
|
9938 |
-
|
9939 |
-
|
9940 |
-
|
9941 |
-
|
9942 |
-
|
9943 |
-
|
9944 |
-
|
9945 |
-
|
9946 |
-
|
9947 |
-
|
9948 |
-
|
9949 |
-
|
9950 |
-
|
9951 |
-
|
9952 |
-
|
9953 |
-
|
9954 |
-
|
9955 |
-
|
9956 |
-
|
9957 |
-
|
9958 |
-
|
9959 |
-
|
9960 |
-
|
9961 |
-
|
9962 |
-
|
9963 |
-
|
9964 |
-
|
9965 |
-
|
9966 |
-
|
9967 |
-
|
9968 |
-
|
9969 |
-
|
9970 |
-
|
9971 |
-
|
9972 |
-
|
9973 |
-
|
9974 |
-
|
9975 |
-
|
9976 |
-
|
9977 |
-
|
9978 |
-
|
9979 |
-
|
9980 |
-
|
9981 |
-
|
9982 |
-
|
9983 |
-
|
9984 |
-
|
9985 |
-
|
9986 |
-
|
9987 |
-
|
9988 |
-
|
9989 |
-
|
9990 |
-
|
9991 |
-
|
9992 |
-
|
9993 |
-
|
9994 |
-
|
9995 |
-
|
9996 |
-
|
9997 |
-
|
9998 |
-
|
9999 |
-
|
10000 |
-
|
10001 |
-
|
10002 |
-
|
10003 |
-
|
10004 |
-
|
10005 |
-
|
10006 |
-
|
10007 |
-
|
10008 |
-
|
10009 |
-
|
10010 |
-
|
10011 |
-
|
10012 |
-
|
10013 |
-
|
10014 |
-
|
10015 |
-
|
10016 |
-
|
10017 |
-
|
10018 |
-
|
10019 |
-
|
10020 |
-
|
10021 |
-
|
10022 |
-
|
10023 |
-
|
10024 |
-
|
10025 |
-
|
10026 |
-
|
10027 |
-
|
10028 |
-
|
10029 |
-
|
10030 |
-
|
10031 |
-
|
10032 |
-
|
10033 |
-
|
10034 |
-
|
10035 |
-
|
10036 |
-
|
10037 |
-
|
10038 |
-
|
10039 |
-
|
10040 |
-
|
10041 |
-
|
10042 |
-
|
10043 |
-
|
10044 |
-
|
10045 |
-
}
|
10046 |
-
|
10047 |
-
|
10048 |
-
|
10049 |
-
|
10050 |
-
|
10051 |
-
|
10052 |
-
|
10053 |
-
|
10054 |
-
|
10055 |
-
|
10056 |
-
|
10057 |
-
|
10058 |
-
|
10059 |
-
|
10060 |
-
|
10061 |
-
|
10062 |
-
|
10063 |
-
|
10064 |
-
|
10065 |
-
|
10066 |
-
|
10067 |
-
|
10068 |
-
|
10069 |
-
|
10070 |
-
|
10071 |
-
|
10072 |
-
|
10073 |
-
|
10074 |
-
|
10075 |
-
|
10076 |
-
|
10077 |
-
|
10078 |
-
|
10079 |
-
|
10080 |
-
|
10081 |
-
|
10082 |
-
|
10083 |
-
|
10084 |
-
|
10085 |
-
|
10086 |
-
|
10087 |
-
|
10088 |
-
|
10089 |
-
|
10090 |
-
|
10091 |
-
|
10092 |
-
|
10093 |
-
|
10094 |
-
|
10095 |
-
|
10096 |
-
|
10097 |
-
|
10098 |
-
|
10099 |
-
|
10100 |
-
|
10101 |
-
|
10102 |
-
|
10103 |
-
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
|
10108 |
-
|
10109 |
-
|
10110 |
-
|
10111 |
-
|
10112 |
-
|
10113 |
-
|
10114 |
-
|
10115 |
-
|
10116 |
-
|
10117 |
-
|
10118 |
-
|
10119 |
-
|
10120 |
-
|
10121 |
-
|
10122 |
-
|
10123 |
-
|
10124 |
-
|
10125 |
-
|
10126 |
-
|
10127 |
-
|
10128 |
-
|
10129 |
-
|
10130 |
-
|
10131 |
-
|
10132 |
-
|
10133 |
-
|
10134 |
-
|
10135 |
-
|
10136 |
-
|
10137 |
-
|
10138 |
-
|
10139 |
-
|
10140 |
-
|
10141 |
-
|
10142 |
-
|
10143 |
-
|
10144 |
-
|
10145 |
-
|
10146 |
-
|
10147 |
-
|
10148 |
-
|
10149 |
-
|
10150 |
-
|
10151 |
-
|
10152 |
-
|
10153 |
-
|
10154 |
-
|
10155 |
-
|
10156 |
-
|
10157 |
-
|
10158 |
-
|
10159 |
-
|
10160 |
-
|
10161 |
-
|
10162 |
-
|
10163 |
-
|
10164 |
-
|
10165 |
-
|
10166 |
-
|
10167 |
-
|
10168 |
-
|
10169 |
-
|
10170 |
-
|
10171 |
-
|
10172 |
-
|
10173 |
-
|
10174 |
-
|
10175 |
-
|
10176 |
-
|
10177 |
-
|
10178 |
-
|
10179 |
-
|
10180 |
-
|
10181 |
-
|
10182 |
-
|
10183 |
-
|
10184 |
-
|
10185 |
-
|
10186 |
-
|
10187 |
-
|
10188 |
-
|
10189 |
-
|
10190 |
-
|
10191 |
-
|
10192 |
-
|
10193 |
-
|
10194 |
-
|
10195 |
-
|
10196 |
-
|
10197 |
-
|
10198 |
-
|
10199 |
-
|
10200 |
-
|
10201 |
-
|
10202 |
-
|
10203 |
-
|
10204 |
-
|
10205 |
-
|
10206 |
-
|
10207 |
-
|
10208 |
-
|
10209 |
-
|
10210 |
-
|
10211 |
-
|
10212 |
-
|
10213 |
-
|
10214 |
-
|
10215 |
-
|
10216 |
-
|
10217 |
-
|
10218 |
-
|
10219 |
-
|
10220 |
-
|
10221 |
-
|
10222 |
-
|
10223 |
-
|
10224 |
-
|
10225 |
-
|
10226 |
-
}
|
10227 |
-
|
10228 |
-
|
10229 |
-
|
10230 |
-
|
10231 |
-
|
10232 |
-
|
10233 |
-
|
10234 |
-
|
10235 |
-
|
10236 |
-
|
10237 |
-
|
10238 |
-
|
10239 |
-
|
10240 |
-
|
10241 |
-
|
10242 |
-
|
10243 |
-
|
10244 |
-
|
10245 |
-
|
10246 |
-
|
10247 |
-
|
10248 |
-
|
10249 |
-
|
10250 |
-
|
10251 |
-
|
10252 |
-
|
10253 |
-
|
10254 |
-
|
10255 |
-
|
10256 |
-
|
10257 |
-
|
10258 |
-
|
10259 |
-
|
10260 |
-
|
10261 |
-
|
10262 |
-
|
10263 |
-
|
10264 |
-
|
10265 |
-
|
10266 |
-
|
10267 |
-
|
10268 |
-
|
10269 |
-
|
10270 |
-
|
10271 |
-
|
10272 |
-
|
10273 |
-
|
10274 |
-
|
10275 |
-
|
10276 |
-
|
10277 |
-
|
10278 |
-
|
10279 |
-
|
10280 |
-
|
10281 |
-
|
10282 |
-
|
10283 |
-
|
10284 |
-
|
10285 |
-
|
10286 |
-
|
10287 |
-
|
10288 |
-
|
10289 |
-
|
10290 |
-
|
10291 |
-
|
10292 |
-
|
10293 |
-
|
10294 |
-
|
10295 |
-
|
10296 |
-
|
10297 |
-
|
10298 |
-
|
10299 |
-
|
10300 |
-
|
10301 |
-
|
10302 |
-
|
10303 |
-
|
10304 |
-
|
10305 |
-
|
10306 |
-
|
10307 |
-
|
10308 |
-
|
10309 |
-
|
10310 |
-
|
10311 |
-
|
10312 |
-
|
10313 |
-
|
10314 |
-
|
10315 |
-
|
10316 |
-
|
10317 |
-
};
|
10318 |
-
|
10319 |
-
|
10320 |
-
|
10321 |
-
|
10322 |
-
|
10323 |
-
|
10324 |
-
|
10325 |
-
|
10326 |
-
|
10327 |
-
|
10328 |
-
|
10329 |
-
|
10330 |
-
|
10331 |
-
|
10332 |
-
|
10333 |
-
|
10334 |
-
|
10335 |
-
|
10336 |
-
|
10337 |
-
|
10338 |
-
|
10339 |
-
|
10340 |
-
|
10341 |
-
|
10342 |
-
|
10343 |
-
|
10344 |
-
|
10345 |
-
|
10346 |
-
|
10347 |
-
|
10348 |
-
|
10349 |
-
|
10350 |
-
};
|
10351 |
-
|
10352 |
-
|
10353 |
-
|
10354 |
-
|
10355 |
-
|
10356 |
-
|
10357 |
-
|
10358 |
-
|
10359 |
-
|
10360 |
-
|
10361 |
-
|
10362 |
-
|
10363 |
-
|
10364 |
-
|
10365 |
-
|
10366 |
-
|
10367 |
-
|
10368 |
-
|
10369 |
-
|
10370 |
-
|
10371 |
-
|
10372 |
-
|
10373 |
-
|
10374 |
-
|
10375 |
-
|
10376 |
-
|
10377 |
-
|
10378 |
-
|
10379 |
-
|
10380 |
-
|
10381 |
-
|
10382 |
-
|
10383 |
-
};
|
10384 |
-
|
10385 |
-
|
10386 |
-
|
10387 |
-
|
10388 |
-
|
10389 |
-
|
10390 |
-
|
10391 |
-
|
10392 |
-
|
10393 |
-
|
10394 |
-
|
10395 |
-
|
10396 |
-
|
10397 |
-
|
10398 |
-
|
10399 |
-
|
10400 |
-
|
10401 |
-
|
10402 |
-
|
10403 |
-
|
10404 |
-
|
10405 |
-
|
10406 |
-
|
10407 |
-
|
10408 |
-
|
10409 |
-
|
10410 |
-
|
10411 |
-
|
10412 |
-
|
10413 |
-
|
10414 |
-
|
10415 |
-
|
10416 |
-
|
10417 |
-
|
10418 |
-
|
10419 |
-
|
10420 |
-
|
10421 |
-
|
10422 |
-
|
10423 |
-
|
10424 |
-
|
10425 |
-
|
10426 |
-
|
10427 |
-
|
10428 |
-
|
10429 |
-
|
10430 |
-
|
10431 |
-
|
10432 |
-
|
10433 |
-
|
10434 |
-
|
10435 |
-
|
10436 |
-
|
10437 |
-
|
10438 |
-
|
10439 |
-
|
10440 |
-
|
10441 |
-
|
10442 |
-
|
10443 |
-
|
10444 |
-
|
10445 |
-
|
10446 |
-
|
10447 |
-
|
10448 |
-
|
10449 |
-
|
10450 |
-
|
10451 |
-
|
10452 |
-
|
10453 |
-
|
10454 |
-
|
10455 |
-
|
10456 |
-
|
10457 |
-
|
10458 |
-
|
10459 |
-
|
10460 |
-
|
10461 |
-
|
10462 |
-
|
10463 |
-
|
10464 |
-
|
10465 |
-
|
10466 |
-
|
10467 |
-
|
10468 |
-
|
10469 |
-
|
10470 |
-
|
10471 |
-
|
10472 |
-
|
10473 |
-
|
10474 |
-
|
10475 |
-
|
10476 |
-
|
10477 |
-
|
10478 |
-
|
10479 |
-
|
10480 |
-
|
10481 |
-
|
10482 |
-
|
10483 |
-
|
10484 |
-
|
10485 |
-
|
10486 |
-
|
10487 |
-
|
10488 |
-
|
10489 |
-
|
10490 |
-
|
10491 |
-
|
10492 |
-
|
10493 |
-
|
10494 |
-
|
10495 |
-
|
10496 |
-
|
10497 |
-
|
10498 |
-
|
10499 |
-
|
10500 |
-
|
10501 |
-
|
10502 |
-
|
10503 |
-
|
10504 |
-
|
10505 |
-
}
|
10506 |
-
|
10507 |
-
var
|
10508 |
-
|
10509 |
-
|
10510 |
-
|
10511 |
-
|
10512 |
-
|
10513 |
-
|
10514 |
-
|
10515 |
-
|
10516 |
-
|
10517 |
-
|
10518 |
-
|
10519 |
-
|
10520 |
-
|
10521 |
-
|
10522 |
-
|
10523 |
-
|
10524 |
-
|
10525 |
-
|
10526 |
-
|
10527 |
-
|
10528 |
-
|
10529 |
-
|
10530 |
-
|
10531 |
-
|
10532 |
-
|
10533 |
-
|
10534 |
-
|
10535 |
-
|
10536 |
-
|
10537 |
-
|
10538 |
-
|
10539 |
-
|
10540 |
-
|
10541 |
-
|
10542 |
-
|
10543 |
-
|
10544 |
-
|
10545 |
-
|
10546 |
-
|
10547 |
-
|
10548 |
-
|
10549 |
-
|
10550 |
-
|
10551 |
-
|
10552 |
-
|
10553 |
-
|
10554 |
-
|
10555 |
-
|
10556 |
-
|
10557 |
-
|
10558 |
-
|
10559 |
-
|
10560 |
-
|
10561 |
-
|
10562 |
-
|
10563 |
-
|
10564 |
-
|
10565 |
-
|
10566 |
-
|
10567 |
-
|
10568 |
-
|
10569 |
-
|
10570 |
-
|
10571 |
-
|
10572 |
-
|
10573 |
-
|
10574 |
-
|
10575 |
-
|
10576 |
-
|
10577 |
-
|
10578 |
-
|
10579 |
-
|
10580 |
-
|
10581 |
-
|
10582 |
-
|
10583 |
-
|
10584 |
-
|
10585 |
-
|
10586 |
-
|
10587 |
-
|
10588 |
-
|
10589 |
-
|
10590 |
-
|
10591 |
-
|
10592 |
-
|
10593 |
-
|
10594 |
-
|
10595 |
-
|
10596 |
-
|
10597 |
-
|
10598 |
-
|
10599 |
-
|
10600 |
-
|
10601 |
-
|
10602 |
-
|
10603 |
-
|
10604 |
-
|
10605 |
-
|
10606 |
-
|
10607 |
-
|
10608 |
-
|
10609 |
-
|
10610 |
-
|
10611 |
-
|
10612 |
-
|
10613 |
-
|
10614 |
-
|
10615 |
-
|
10616 |
-
|
10617 |
-
|
10618 |
-
|
10619 |
-
|
10620 |
-
|
10621 |
-
|
10622 |
-
|
10623 |
-
|
10624 |
-
|
10625 |
-
|
10626 |
-
|
10627 |
-
|
10628 |
-
|
10629 |
-
|
10630 |
-
|
10631 |
-
|
10632 |
-
|
10633 |
-
|
10634 |
-
|
10635 |
-
|
10636 |
-
|
10637 |
-
|
10638 |
-
|
10639 |
-
|
10640 |
-
function
|
10641 |
-
|
10642 |
-
|
10643 |
-
|
10644 |
-
|
10645 |
-
|
10646 |
-
|
10647 |
-
|
10648 |
-
|
10649 |
-
|
10650 |
-
|
10651 |
-
|
10652 |
-
|
10653 |
-
|
10654 |
-
|
10655 |
-
|
10656 |
-
|
10657 |
-
|
10658 |
-
|
10659 |
-
|
10660 |
-
|
10661 |
-
|
10662 |
-
|
10663 |
-
|
10664 |
-
|
10665 |
-
|
10666 |
-
|
10667 |
-
|
10668 |
-
|
10669 |
-
|
10670 |
-
|
10671 |
-
|
10672 |
-
|
10673 |
-
|
10674 |
-
|
10675 |
-
|
10676 |
-
|
10677 |
-
|
10678 |
-
|
10679 |
-
|
10680 |
-
|
10681 |
-
|
10682 |
-
|
10683 |
-
|
10684 |
-
|
10685 |
-
|
10686 |
-
|
10687 |
-
|
10688 |
-
|
10689 |
-
|
10690 |
-
|
10691 |
-
|
10692 |
-
|
10693 |
-
|
10694 |
-
|
10695 |
-
|
10696 |
-
|
10697 |
-
|
10698 |
-
|
10699 |
-
|
10700 |
-
|
10701 |
-
|
10702 |
-
|
10703 |
-
|
10704 |
-
|
10705 |
-
|
10706 |
-
|
10707 |
-
|
10708 |
-
|
10709 |
-
|
10710 |
-
|
10711 |
-
|
10712 |
-
|
10713 |
-
|
10714 |
-
|
10715 |
-
|
10716 |
-
|
10717 |
-
|
10718 |
-
|
10719 |
-
|
10720 |
-
|
10721 |
-
|
10722 |
-
|
10723 |
-
|
10724 |
-
|
10725 |
-
|
10726 |
-
|
10727 |
-
|
10728 |
-
|
10729 |
-
|
10730 |
-
|
10731 |
-
|
10732 |
-
|
10733 |
-
|
10734 |
-
|
10735 |
-
|
10736 |
-
|
10737 |
-
}
|
10738 |
-
|
10739 |
-
|
10740 |
-
|
10741 |
-
|
10742 |
-
|
10743 |
-
|
10744 |
-
|
10745 |
-
|
10746 |
-
|
10747 |
-
|
10748 |
-
|
10749 |
-
|
10750 |
-
|
10751 |
-
|
10752 |
-
|
10753 |
-
|
10754 |
-
|
10755 |
-
|
10756 |
-
|
10757 |
-
|
10758 |
-
|
10759 |
-
|
10760 |
-
|
10761 |
-
|
10762 |
-
|
10763 |
-
|
10764 |
-
|
10765 |
-
|
10766 |
-
|
10767 |
-
|
10768 |
-
|
10769 |
-
|
10770 |
-
|
10771 |
-
|
10772 |
-
|
10773 |
-
|
10774 |
-
|
10775 |
-
|
10776 |
-
|
10777 |
-
|
10778 |
-
|
10779 |
-
|
10780 |
-
|
10781 |
-
|
10782 |
-
|
10783 |
-
|
10784 |
-
|
10785 |
-
|
10786 |
-
|
10787 |
-
|
10788 |
-
|
10789 |
-
|
10790 |
-
|
10791 |
-
|
10792 |
-
|
10793 |
-
|
10794 |
-
|
10795 |
-
|
10796 |
-
|
10797 |
-
|
10798 |
-
|
10799 |
-
|
10800 |
-
|
10801 |
-
|
10802 |
-
|
10803 |
-
|
10804 |
-
|
10805 |
-
|
10806 |
-
|
10807 |
-
|
10808 |
-
|
10809 |
-
|
10810 |
-
|
10811 |
-
|
10812 |
-
|
10813 |
-
|
10814 |
-
|
10815 |
-
|
10816 |
-
|
10817 |
-
|
10818 |
-
|
10819 |
-
|
10820 |
-
|
10821 |
-
|
10822 |
-
|
10823 |
-
|
10824 |
-
|
10825 |
-
|
10826 |
-
|
10827 |
-
|
10828 |
-
|
10829 |
-
|
10830 |
-
|
10831 |
-
|
10832 |
-
|
10833 |
-
|
10834 |
-
|
10835 |
-
|
10836 |
-
|
10837 |
-
|
10838 |
-
|
10839 |
-
|
10840 |
-
|
10841 |
-
|
10842 |
-
|
10843 |
-
|
10844 |
-
|
10845 |
-
|
10846 |
-
|
10847 |
-
|
10848 |
-
|
10849 |
-
|
10850 |
-
|
10851 |
-
|
10852 |
-
|
10853 |
-
|
10854 |
-
|
10855 |
-
|
10856 |
-
|
10857 |
-
|
10858 |
-
|
10859 |
-
|
10860 |
-
|
10861 |
-
|
10862 |
-
|
10863 |
-
|
10864 |
-
|
10865 |
-
}
|
10866 |
-
|
10867 |
-
|
10868 |
-
|
10869 |
-
|
10870 |
-
|
10871 |
-
|
10872 |
-
|
10873 |
-
|
10874 |
-
|
10875 |
-
|
10876 |
-
|
10877 |
-
|
10878 |
-
|
10879 |
-
|
10880 |
-
|
10881 |
-
|
10882 |
-
|
10883 |
-
|
10884 |
-
|
10885 |
-
|
10886 |
-
|
10887 |
-
|
10888 |
-
|
10889 |
-
|
10890 |
-
|
10891 |
-
|
10892 |
-
|
10893 |
-
|
10894 |
-
|
10895 |
-
|
10896 |
-
|
10897 |
-
|
10898 |
-
|
10899 |
-
|
10900 |
-
|
10901 |
-
|
10902 |
-
|
10903 |
-
|
10904 |
-
|
10905 |
-
|
10906 |
-
|
10907 |
-
|
10908 |
-
|
10909 |
-
|
10910 |
-
|
10911 |
-
|
10912 |
-
|
10913 |
-
|
10914 |
-
|
10915 |
-
|
10916 |
-
|
10917 |
-
|
10918 |
-
|
10919 |
-
|
10920 |
-
|
10921 |
-
|
10922 |
-
|
10923 |
-
|
10924 |
-
|
10925 |
-
|
10926 |
-
|
10927 |
-
|
10928 |
-
|
10929 |
-
|
10930 |
-
|
10931 |
-
|
10932 |
-
|
10933 |
-
|
10934 |
-
|
10935 |
-
|
10936 |
-
|
10937 |
-
|
10938 |
-
|
10939 |
-
|
10940 |
-
|
10941 |
-
|
10942 |
-
|
10943 |
-
|
10944 |
-
|
10945 |
-
|
10946 |
-
|
10947 |
-
|
10948 |
-
|
10949 |
-
|
10950 |
-
|
10951 |
-
|
10952 |
-
|
10953 |
-
|
10954 |
-
|
10955 |
-
|
10956 |
-
|
10957 |
-
|
10958 |
-
|
10959 |
-
|
10960 |
-
|
10961 |
-
|
10962 |
-
|
10963 |
-
var
|
10964 |
-
|
10965 |
-
|
10966 |
-
var
|
10967 |
-
|
10968 |
-
|
10969 |
-
|
10970 |
-
|
10971 |
-
|
10972 |
-
|
10973 |
-
|
10974 |
-
|
10975 |
-
|
10976 |
-
|
10977 |
-
|
10978 |
-
|
10979 |
-
|
10980 |
-
|
10981 |
-
|
10982 |
-
|
10983 |
-
|
10984 |
-
|
10985 |
-
|
10986 |
-
|
10987 |
-
|
10988 |
-
|
10989 |
-
|
10990 |
-
|
10991 |
-
|
10992 |
-
|
10993 |
-
|
10994 |
-
|
10995 |
-
|
10996 |
-
|
10997 |
-
|
10998 |
-
|
10999 |
-
|
11000 |
-
|
11001 |
-
|
11002 |
-
|
11003 |
-
|
11004 |
-
|
11005 |
-
|
11006 |
-
|
11007 |
-
|
11008 |
-
|
11009 |
-
|
11010 |
-
|
11011 |
-
|
11012 |
-
|
11013 |
-
|
11014 |
-
|
11015 |
-
|
11016 |
-
|
11017 |
-
|
11018 |
-
|
11019 |
-
|
11020 |
-
|
11021 |
-
|
11022 |
-
}
|
11023 |
-
|
11024 |
-
|
11025 |
-
|
11026 |
-
|
11027 |
-
|
11028 |
-
|
11029 |
-
|
11030 |
-
|
11031 |
-
|
11032 |
-
|
11033 |
-
|
11034 |
-
|
11035 |
-
|
11036 |
-
|
11037 |
-
|
11038 |
-
|
11039 |
-
|
11040 |
-
|
11041 |
-
|
11042 |
-
|
11043 |
-
|
11044 |
-
|
11045 |
-
|
11046 |
-
|
11047 |
-
|
11048 |
-
|
11049 |
-
|
11050 |
-
|
11051 |
-
|
11052 |
-
|
11053 |
-
|
11054 |
-
|
11055 |
-
function
|
11056 |
-
|
11057 |
-
|
11058 |
-
|
11059 |
-
|
11060 |
-
|
11061 |
-
|
11062 |
-
|
11063 |
-
|
11064 |
-
|
11065 |
-
|
11066 |
-
var
|
11067 |
-
|
11068 |
-
|
11069 |
-
|
11070 |
-
|
11071 |
-
|
11072 |
-
|
11073 |
-
|
11074 |
-
|
11075 |
-
|
11076 |
-
|
11077 |
-
|
11078 |
-
|
11079 |
-
|
11080 |
-
|
11081 |
-
|
11082 |
-
|
11083 |
-
|
11084 |
-
|
11085 |
-
|
11086 |
-
|
11087 |
-
|
11088 |
-
|
11089 |
-
|
11090 |
-
|
11091 |
-
|
11092 |
-
}
|
11093 |
-
|
11094 |
-
|
11095 |
-
container
|
11096 |
-
|
11097 |
-
|
11098 |
-
|
11099 |
-
|
11100 |
-
|
11101 |
-
|
11102 |
-
|
11103 |
-
|
11104 |
-
|
11105 |
-
|
11106 |
-
|
11107 |
-
|
11108 |
-
|
11109 |
-
|
11110 |
-
|
11111 |
-
|
11112 |
-
|
11113 |
-
|
11114 |
-
|
11115 |
-
|
11116 |
-
|
11117 |
-
|
11118 |
-
|
11119 |
-
|
11120 |
-
|
11121 |
-
|
11122 |
-
|
11123 |
-
|
11124 |
-
|
11125 |
-
|
11126 |
-
|
11127 |
-
|
11128 |
-
|
11129 |
-
|
11130 |
-
|
11131 |
-
|
11132 |
-
|
11133 |
-
|
11134 |
-
|
11135 |
-
|
11136 |
-
|
11137 |
-
|
11138 |
-
|
11139 |
-
|
11140 |
-
|
11141 |
-
|
11142 |
-
|
11143 |
-
|
11144 |
-
|
11145 |
-
|
11146 |
-
|
11147 |
-
|
11148 |
-
|
11149 |
-
|
11150 |
-
|
11151 |
-
|
11152 |
-
|
11153 |
-
|
11154 |
-
|
11155 |
-
|
11156 |
-
|
11157 |
-
|
11158 |
-
|
11159 |
-
|
11160 |
-
|
11161 |
-
|
11162 |
-
|
11163 |
-
|
11164 |
-
|
11165 |
-
|
11166 |
-
|
11167 |
-
|
11168 |
-
|
11169 |
-
|
11170 |
-
|
11171 |
-
|
11172 |
-
|
11173 |
-
|
11174 |
-
|
11175 |
-
|
11176 |
-
|
11177 |
-
|
11178 |
-
|
11179 |
-
|
11180 |
-
|
11181 |
-
|
11182 |
-
|
11183 |
-
|
11184 |
-
|
11185 |
-
|
11186 |
-
|
11187 |
-
|
11188 |
-
|
11189 |
-
|
11190 |
-
|
11191 |
-
var
|
11192 |
-
|
11193 |
-
|
11194 |
-
|
11195 |
-
|
11196 |
-
|
11197 |
-
|
11198 |
-
|
11199 |
-
|
11200 |
-
|
11201 |
-
|
11202 |
-
|
11203 |
-
|
11204 |
-
|
11205 |
-
if (
|
11206 |
-
|
11207 |
-
|
11208 |
-
|
11209 |
-
|
11210 |
-
|
11211 |
-
|
11212 |
-
|
11213 |
-
|
11214 |
-
|
11215 |
-
|
11216 |
-
|
11217 |
-
|
11218 |
-
|
11219 |
-
|
11220 |
-
|
11221 |
-
|
11222 |
-
|
11223 |
-
|
11224 |
-
|
11225 |
-
|
11226 |
-
|
11227 |
-
|
11228 |
-
|
11229 |
-
|
11230 |
-
|
11231 |
-
|
11232 |
-
|
11233 |
-
|
11234 |
-
|
11235 |
-
|
11236 |
-
|
11237 |
-
|
11238 |
-
|
11239 |
-
|
11240 |
-
|
11241 |
-
|
11242 |
-
|
11243 |
-
|
11244 |
-
|
11245 |
-
|
11246 |
-
|
11247 |
-
|
11248 |
-
|
11249 |
-
|
11250 |
-
|
11251 |
-
|
11252 |
-
|
11253 |
-
|
11254 |
-
|
11255 |
-
|
11256 |
-
|
11257 |
-
|
11258 |
-
|
11259 |
-
|
11260 |
-
|
11261 |
-
|
11262 |
-
|
11263 |
-
|
11264 |
-
|
11265 |
-
|
11266 |
-
|
11267 |
-
|
11268 |
-
|
11269 |
-
|
11270 |
-
|
11271 |
-
|
11272 |
-
|
11273 |
-
|
11274 |
-
|
11275 |
-
|
11276 |
-
|
11277 |
-
|
11278 |
-
|
11279 |
-
|
11280 |
-
|
11281 |
-
|
11282 |
-
|
11283 |
-
|
11284 |
-
|
11285 |
-
|
11286 |
-
|
11287 |
-
|
11288 |
-
|
11289 |
-
|
11290 |
-
|
11291 |
-
|
11292 |
-
|
11293 |
-
|
11294 |
-
|
11295 |
-
|
11296 |
-
|
11297 |
-
|
11298 |
-
|
11299 |
-
|
11300 |
-
|
11301 |
-
|
11302 |
-
|
11303 |
-
|
11304 |
-
|
11305 |
-
|
11306 |
-
|
11307 |
-
this.container
|
11308 |
-
|
11309 |
-
|
11310 |
-
|
11311 |
-
|
11312 |
-
|
11313 |
-
|
11314 |
-
|
11315 |
-
|
11316 |
-
|
11317 |
-
|
11318 |
-
|
11319 |
-
|
11320 |
-
|
11321 |
-
|
11322 |
-
|
11323 |
-
|
11324 |
-
|
11325 |
-
|
11326 |
-
|
11327 |
-
|
11328 |
-
|
11329 |
-
|
11330 |
-
|
11331 |
-
|
11332 |
-
|
11333 |
-
|
11334 |
-
|
11335 |
-
|
11336 |
-
|
11337 |
-
|
11338 |
-
|
11339 |
-
|
11340 |
-
|
11341 |
-
|
11342 |
-
|
11343 |
-
|
11344 |
-
|
11345 |
-
|
11346 |
-
|
11347 |
-
|
11348 |
-
|
11349 |
-
|
11350 |
-
|
11351 |
-
|
11352 |
-
|
11353 |
-
|
11354 |
-
|
11355 |
-
|
11356 |
-
|
11357 |
-
|
11358 |
-
|
11359 |
-
|
11360 |
-
|
11361 |
-
|
11362 |
-
|
11363 |
-
|
11364 |
-
|
11365 |
-
|
11366 |
-
|
11367 |
-
|
11368 |
-
|
11369 |
-
|
11370 |
-
|
11371 |
-
|
11372 |
-
|
11373 |
-
|
11374 |
-
function
|
11375 |
-
|
11376 |
-
|
11377 |
-
|
11378 |
-
|
11379 |
-
|
11380 |
-
|
11381 |
-
|
11382 |
-
|
11383 |
-
|
11384 |
-
|
11385 |
-
|
11386 |
-
|
11387 |
-
|
11388 |
-
|
11389 |
-
|
11390 |
-
|
11391 |
-
|
11392 |
-
|
11393 |
-
|
11394 |
-
|
11395 |
-
|
11396 |
-
|
11397 |
-
|
11398 |
-
|
11399 |
-
|
11400 |
-
|
11401 |
-
|
11402 |
-
|
11403 |
-
|
11404 |
-
|
11405 |
-
|
11406 |
-
}
|
11407 |
-
|
11408 |
-
|
11409 |
-
|
11410 |
-
}
|
11411 |
-
|
11412 |
-
|
11413 |
-
|
11414 |
-
|
11415 |
-
|
11416 |
-
|
11417 |
-
|
11418 |
-
|
11419 |
-
|
11420 |
-
|
11421 |
-
|
11422 |
-
|
11423 |
-
|
11424 |
-
|
11425 |
-
|
11426 |
-
|
11427 |
-
|
11428 |
-
|
11429 |
-
|
11430 |
-
|
11431 |
-
|
11432 |
-
|
11433 |
-
|
11434 |
-
|
11435 |
-
|
11436 |
-
|
11437 |
-
|
11438 |
-
|
11439 |
-
|
11440 |
-
|
11441 |
-
|
11442 |
-
|
11443 |
-
|
11444 |
-
|
11445 |
-
|
11446 |
-
|
11447 |
-
|
11448 |
-
|
11449 |
-
|
11450 |
-
|
11451 |
-
|
11452 |
-
|
11453 |
-
|
11454 |
-
|
11455 |
-
|
11456 |
-
|
11457 |
-
|
11458 |
-
|
11459 |
-
|
11460 |
-
|
11461 |
-
|
11462 |
-
|
11463 |
-
|
11464 |
-
|
11465 |
-
|
11466 |
-
|
11467 |
-
|
11468 |
-
|
11469 |
-
|
11470 |
-
|
11471 |
-
|
11472 |
-
|
11473 |
-
|
11474 |
-
|
11475 |
-
|
11476 |
-
|
11477 |
-
|
11478 |
-
|
11479 |
-
|
11480 |
-
|
11481 |
-
|
11482 |
-
|
11483 |
-
|
11484 |
-
|
11485 |
-
|
11486 |
-
|
11487 |
-
|
11488 |
-
|
11489 |
-
|
11490 |
-
|
11491 |
-
|
11492 |
-
|
11493 |
-
|
11494 |
-
|
11495 |
-
|
11496 |
-
|
11497 |
-
|
11498 |
-
|
11499 |
-
|
11500 |
-
|
11501 |
-
|
11502 |
-
|
11503 |
-
|
11504 |
-
|
11505 |
-
|
11506 |
-
|
11507 |
-
|
11508 |
-
|
11509 |
-
|
11510 |
-
|
11511 |
-
|
11512 |
-
|
11513 |
-
|
11514 |
-
|
11515 |
-
|
11516 |
-
|
11517 |
-
|
11518 |
-
|
11519 |
-
|
11520 |
-
|
11521 |
-
|
11522 |
-
|
11523 |
-
|
11524 |
-
|
11525 |
-
|
11526 |
-
|
11527 |
-
|
11528 |
-
|
11529 |
-
|
11530 |
-
|
11531 |
-
|
11532 |
-
|
11533 |
-
|
11534 |
-
|
11535 |
-
|
11536 |
-
|
11537 |
-
|
11538 |
-
|
11539 |
-
|
11540 |
-
|
11541 |
-
|
11542 |
-
|
11543 |
-
|
11544 |
-
|
11545 |
-
|
11546 |
-
|
11547 |
-
|
11548 |
-
|
11549 |
-
|
11550 |
-
|
11551 |
-
|
11552 |
-
|
11553 |
-
|
11554 |
-
|
11555 |
-
|
11556 |
-
|
11557 |
-
|
11558 |
-
|
11559 |
-
|
11560 |
-
|
11561 |
-
|
11562 |
-
|
11563 |
-
|
11564 |
-
|
11565 |
-
|
11566 |
-
|
11567 |
-
|
11568 |
-
|
11569 |
-
|
11570 |
-
|
11571 |
-
|
11572 |
-
|
11573 |
-
|
11574 |
-
}
|
11575 |
-
|
11576 |
-
|
11577 |
-
|
11578 |
-
|
11579 |
-
|
11580 |
-
|
11581 |
-
|
11582 |
-
|
11583 |
-
|
11584 |
-
|
11585 |
-
|
11586 |
-
|
11587 |
-
|
11588 |
-
|
11589 |
-
|
11590 |
-
|
11591 |
-
|
11592 |
-
|
11593 |
-
|
11594 |
-
|
11595 |
-
|
11596 |
-
|
11597 |
-
|
11598 |
-
|
11599 |
-
|
11600 |
-
|
11601 |
-
|
11602 |
-
|
11603 |
-
|
11604 |
-
|
11605 |
-
|
11606 |
-
|
11607 |
-
|
11608 |
-
|
11609 |
-
|
11610 |
-
|
11611 |
-
|
11612 |
-
|
11613 |
-
|
11614 |
-
|
11615 |
-
|
11616 |
-
|
11617 |
-
|
11618 |
-
return
|
11619 |
-
}
|
11620 |
-
|
11621 |
-
|
11622 |
-
|
11623 |
-
|
11624 |
-
|
11625 |
-
|
11626 |
-
var
|
11627 |
-
|
11628 |
-
|
11629 |
-
|
11630 |
-
|
11631 |
-
|
11632 |
-
|
11633 |
-
|
11634 |
-
|
11635 |
-
|
11636 |
-
|
11637 |
-
|
11638 |
-
|
11639 |
-
|
11640 |
-
|
11641 |
-
|
11642 |
-
|
11643 |
-
|
11644 |
-
|
11645 |
-
|
11646 |
-
|
11647 |
-
|
11648 |
-
|
11649 |
-
|
11650 |
-
}
|
11651 |
-
|
11652 |
-
|
11653 |
-
|
11654 |
-
|
11655 |
-
|
11656 |
-
|
11657 |
-
|
11658 |
-
|
11659 |
-
|
11660 |
-
|
11661 |
-
|
11662 |
-
|
11663 |
-
|
11664 |
-
|
11665 |
-
|
11666 |
-
|
11667 |
-
|
11668 |
-
|
11669 |
-
|
11670 |
-
|
11671 |
-
|
11672 |
-
|
11673 |
-
|
11674 |
-
|
11675 |
-
|
11676 |
-
|
11677 |
-
|
11678 |
-
|
11679 |
-
|
11680 |
-
|
11681 |
-
|
11682 |
-
|
11683 |
-
|
11684 |
-
|
11685 |
-
|
11686 |
-
|
11687 |
-
|
11688 |
-
|
11689 |
-
|
11690 |
-
|
11691 |
-
|
11692 |
-
|
11693 |
-
|
11694 |
-
|
11695 |
-
|
11696 |
-
|
11697 |
-
|
11698 |
-
|
11699 |
-
|
11700 |
-
|
11701 |
-
|
11702 |
-
|
11703 |
-
|
11704 |
-
|
11705 |
-
|
11706 |
-
|
11707 |
-
|
11708 |
-
|
11709 |
-
|
11710 |
-
|
11711 |
-
|
11712 |
-
|
11713 |
-
|
11714 |
-
|
11715 |
-
|
11716 |
-
|
11717 |
-
|
11718 |
-
|
11719 |
-
|
11720 |
-
|
11721 |
-
|
11722 |
-
|
11723 |
-
|
11724 |
-
|
11725 |
-
|
11726 |
-
|
11727 |
-
|
11728 |
-
|
11729 |
-
|
11730 |
-
|
11731 |
-
|
11732 |
-
|
11733 |
-
|
11734 |
-
|
11735 |
-
|
11736 |
-
|
11737 |
-
|
11738 |
-
|
11739 |
-
|
11740 |
-
|
11741 |
-
|
11742 |
-
|
11743 |
-
|
11744 |
-
|
11745 |
-
|
11746 |
-
|
11747 |
-
|
11748 |
-
|
11749 |
-
|
11750 |
-
|
11751 |
-
|
11752 |
-
|
11753 |
-
|
11754 |
-
|
11755 |
-
|
11756 |
-
|
11757 |
-
|
11758 |
-
|
11759 |
-
|
11760 |
-
|
11761 |
-
|
11762 |
-
|
11763 |
-
|
11764 |
-
|
11765 |
-
|
11766 |
-
|
11767 |
-
|
11768 |
-
|
11769 |
-
|
11770 |
-
|
11771 |
-
|
11772 |
-
|
11773 |
-
|
11774 |
-
|
11775 |
-
|
11776 |
-
|
11777 |
-
|
11778 |
-
|
11779 |
-
|
11780 |
-
|
11781 |
-
var
|
11782 |
-
|
11783 |
-
|
11784 |
-
|
11785 |
-
|
11786 |
-
|
11787 |
-
|
11788 |
-
|
11789 |
-
}
|
11790 |
-
|
11791 |
-
|
11792 |
-
|
11793 |
-
|
11794 |
-
|
11795 |
-
|
11796 |
-
|
11797 |
-
|
11798 |
-
|
11799 |
-
|
11800 |
-
|
11801 |
-
|
11802 |
-
|
11803 |
-
|
11804 |
-
|
11805 |
-
|
11806 |
-
|
11807 |
-
|
11808 |
-
|
11809 |
-
|
11810 |
-
|
11811 |
-
|
11812 |
-
|
11813 |
-
|
11814 |
-
|
11815 |
-
|
11816 |
-
|
11817 |
-
|
11818 |
-
|
11819 |
-
|
11820 |
-
|
11821 |
-
|
11822 |
-
|
11823 |
-
|
11824 |
-
|
11825 |
-
|
11826 |
-
|
11827 |
-
|
11828 |
-
|
11829 |
-
|
11830 |
-
|
11831 |
-
|
11832 |
-
|
11833 |
-
|
11834 |
-
|
11835 |
-
|
11836 |
-
|
11837 |
-
|
11838 |
-
|
11839 |
-
|
11840 |
-
|
11841 |
-
|
11842 |
-
|
11843 |
-
|
11844 |
-
|
11845 |
-
|
11846 |
-
|
11847 |
-
|
11848 |
-
|
11849 |
-
|
11850 |
-
|
11851 |
-
|
11852 |
-
|
11853 |
-
|
11854 |
-
|
11855 |
-
|
11856 |
-
|
11857 |
-
|
11858 |
-
|
11859 |
-
|
11860 |
-
|
11861 |
-
|
11862 |
-
|
11863 |
-
|
11864 |
-
|
11865 |
-
|
11866 |
-
|
11867 |
-
|
11868 |
-
|
11869 |
-
|
11870 |
-
|
11871 |
-
|
11872 |
-
|
11873 |
-
|
11874 |
-
|
11875 |
-
|
11876 |
-
|
11877 |
-
|
11878 |
-
|
11879 |
-
}
|
11880 |
-
};
|
11881 |
-
|
11882 |
-
|
11883 |
-
|
11884 |
-
|
11885 |
-
|
11886 |
-
|
11887 |
-
|
11888 |
-
|
11889 |
-
|
11890 |
-
};
|
11891 |
-
|
11892 |
-
|
11893 |
-
|
11894 |
-
|
11895 |
-
|
11896 |
-
|
11897 |
-
|
11898 |
-
|
11899 |
-
|
11900 |
-
|
11901 |
-
|
11902 |
-
|
11903 |
-
|
11904 |
-
|
11905 |
-
|
11906 |
-
|
11907 |
-
|
11908 |
-
|
11909 |
-
|
11910 |
-
|
11911 |
-
|
11912 |
-
|
11913 |
-
|
11914 |
-
|
11915 |
-
|
11916 |
-
|
11917 |
-
|
11918 |
-
|
11919 |
-
|
11920 |
-
|
11921 |
-
|
11922 |
-
|
11923 |
-
|
11924 |
-
|
11925 |
-
|
11926 |
-
|
11927 |
-
|
11928 |
-
|
11929 |
-
|
11930 |
-
|
11931 |
-
|
11932 |
-
|
11933 |
-
|
11934 |
-
|
11935 |
-
|
11936 |
-
|
11937 |
-
|
11938 |
-
|
11939 |
-
|
11940 |
-
|
11941 |
-
|
11942 |
-
|
11943 |
-
|
11944 |
-
|
11945 |
-
|
11946 |
-
|
11947 |
-
|
11948 |
-
|
11949 |
-
|
11950 |
-
|
11951 |
-
|
11952 |
-
|
11953 |
-
|
11954 |
-
|
11955 |
-
|
11956 |
-
|
11957 |
-
|
11958 |
-
|
11959 |
-
|
11960 |
-
|
11961 |
-
|
11962 |
-
|
11963 |
-
|
11964 |
-
|
11965 |
-
|
11966 |
-
|
11967 |
-
|
11968 |
-
|
11969 |
-
|
11970 |
-
|
11971 |
-
|
11972 |
-
|
11973 |
-
|
11974 |
-
|
11975 |
-
|
11976 |
-
|
11977 |
-
|
11978 |
-
|
11979 |
-
|
11980 |
-
|
11981 |
-
|
11982 |
-
|
11983 |
-
|
11984 |
-
|
11985 |
-
|
11986 |
-
|
11987 |
-
|
11988 |
-
|
11989 |
-
|
11990 |
-
|
11991 |
-
|
11992 |
-
|
11993 |
-
|
11994 |
-
|
11995 |
-
|
11996 |
-
|
11997 |
-
|
11998 |
-
|
11999 |
-
|
12000 |
-
|
12001 |
-
|
12002 |
-
|
12003 |
-
|
12004 |
-
|
12005 |
-
|
12006 |
-
|
12007 |
-
|
12008 |
-
|
12009 |
-
|
12010 |
-
|
12011 |
-
|
12012 |
-
|
12013 |
-
|
12014 |
-
|
12015 |
-
|
12016 |
-
|
12017 |
-
|
12018 |
-
|
12019 |
-
|
12020 |
-
|
12021 |
-
|
12022 |
-
|
12023 |
-
|
12024 |
-
|
12025 |
-
|
12026 |
-
|
12027 |
-
|
12028 |
-
|
12029 |
-
|
12030 |
-
|
12031 |
-
|
12032 |
-
|
12033 |
-
|
12034 |
-
|
12035 |
-
|
12036 |
-
|
12037 |
-
|
12038 |
-
|
12039 |
-
|
12040 |
-
|
12041 |
-
|
12042 |
-
|
12043 |
-
|
12044 |
-
|
12045 |
-
|
12046 |
-
|
12047 |
-
|
12048 |
-
|
12049 |
-
|
12050 |
-
|
12051 |
-
|
12052 |
-
|
12053 |
-
|
12054 |
-
|
12055 |
-
|
12056 |
-
|
12057 |
-
|
12058 |
-
|
12059 |
-
|
12060 |
-
|
12061 |
-
|
12062 |
-
|
12063 |
-
|
12064 |
-
|
12065 |
-
|
12066 |
-
|
12067 |
-
|
12068 |
-
|
12069 |
-
|
12070 |
-
|
12071 |
-
|
12072 |
-
|
12073 |
-
|
12074 |
-
|
12075 |
-
|
12076 |
-
|
12077 |
-
|
12078 |
-
|
12079 |
-
|
12080 |
-
|
12081 |
-
|
12082 |
-
|
12083 |
-
|
12084 |
-
|
12085 |
-
|
12086 |
-
|
12087 |
-
|
12088 |
-
|
12089 |
-
|
12090 |
-
|
12091 |
-
|
12092 |
-
|
12093 |
-
|
12094 |
-
|
12095 |
-
|
12096 |
-
|
12097 |
-
|
12098 |
-
|
12099 |
-
|
12100 |
-
|
12101 |
-
|
12102 |
-
|
12103 |
-
|
12104 |
-
|
12105 |
-
|
12106 |
-
|
12107 |
-
|
12108 |
-
|
12109 |
-
|
12110 |
-
|
12111 |
-
|
12112 |
-
|
12113 |
-
|
12114 |
-
|
12115 |
-
|
12116 |
-
|
12117 |
-
|
12118 |
-
|
12119 |
-
|
12120 |
-
|
12121 |
-
|
12122 |
-
|
12123 |
-
|
12124 |
-
|
12125 |
-
|
12126 |
-
|
12127 |
-
|
12128 |
-
|
12129 |
-
|
12130 |
-
|
12131 |
-
|
12132 |
-
|
12133 |
-
|
12134 |
-
|
12135 |
-
|
12136 |
-
|
12137 |
-
|
12138 |
-
|
12139 |
-
|
12140 |
-
|
12141 |
-
|
12142 |
-
|
12143 |
-
|
12144 |
-
|
12145 |
-
|
12146 |
-
|
12147 |
-
|
12148 |
-
|
12149 |
-
|
12150 |
-
|
12151 |
-
|
12152 |
-
|
12153 |
-
|
12154 |
-
|
12155 |
-
|
12156 |
-
|
12157 |
-
|
12158 |
-
|
12159 |
-
|
12160 |
-
|
12161 |
-
|
12162 |
-
|
12163 |
-
|
12164 |
-
|
12165 |
-
|
12166 |
-
|
12167 |
-
|
12168 |
-
|
12169 |
-
|
12170 |
-
|
12171 |
-
|
12172 |
-
|
12173 |
-
|
12174 |
-
|
12175 |
-
|
12176 |
-
|
12177 |
-
|
12178 |
-
|
12179 |
-
|
12180 |
-
|
12181 |
-
|
12182 |
-
|
12183 |
-
|
12184 |
-
|
12185 |
-
|
12186 |
-
|
12187 |
-
|
12188 |
-
|
12189 |
-
|
12190 |
-
|
12191 |
-
|
12192 |
-
|
12193 |
-
|
12194 |
-
|
12195 |
-
|
12196 |
-
|
12197 |
-
|
12198 |
-
|
12199 |
-
|
12200 |
-
|
12201 |
-
|
12202 |
-
|
12203 |
-
|
12204 |
-
|
12205 |
-
|
12206 |
-
|
12207 |
-
|
12208 |
-
|
12209 |
-
|
12210 |
-
|
12211 |
-
|
12212 |
-
|
12213 |
-
|
12214 |
-
|
12215 |
-
|
12216 |
-
|
12217 |
-
|
12218 |
-
|
12219 |
-
|
12220 |
-
|
12221 |
-
|
12222 |
-
|
12223 |
-
|
12224 |
-
|
12225 |
-
|
12226 |
-
|
12227 |
-
|
12228 |
-
|
12229 |
-
return
|
12230 |
-
};
|
12231 |
-
|
12232 |
-
|
12233 |
-
|
12234 |
-
|
12235 |
-
|
12236 |
-
|
12237 |
-
|
12238 |
-
|
12239 |
-
|
12240 |
-
|
12241 |
-
|
12242 |
-
|
12243 |
-
|
12244 |
-
|
12245 |
-
|
12246 |
-
|
12247 |
-
|
12248 |
-
|
12249 |
-
|
12250 |
-
|
12251 |
-
|
12252 |
-
|
12253 |
-
|
12254 |
-
|
12255 |
-
|
12256 |
-
|
12257 |
-
|
12258 |
-
|
12259 |
-
|
12260 |
-
|
12261 |
-
|
12262 |
-
|
12263 |
-
|
12264 |
-
|
12265 |
-
|
12266 |
-
|
12267 |
-
|
12268 |
-
|
12269 |
-
|
12270 |
-
|
12271 |
-
|
12272 |
-
|
12273 |
-
|
12274 |
-
|
12275 |
-
|
12276 |
-
}
|
12277 |
-
}
|
12278 |
-
|
12279 |
-
|
12280 |
-
|
12281 |
-
|
12282 |
-
|
12283 |
-
|
12284 |
-
|
12285 |
-
|
12286 |
-
|
12287 |
-
|
12288 |
-
|
12289 |
-
|
12290 |
-
|
12291 |
-
|
12292 |
-
|
12293 |
-
|
12294 |
-
|
12295 |
-
|
12296 |
-
|
12297 |
-
|
12298 |
-
|
12299 |
-
|
12300 |
-
|
12301 |
-
|
12302 |
-
|
12303 |
-
|
12304 |
-
|
12305 |
-
|
12306 |
-
|
12307 |
-
|
12308 |
-
|
12309 |
-
|
12310 |
-
|
12311 |
-
|
12312 |
-
|
12313 |
-
|
12314 |
-
|
12315 |
-
|
12316 |
-
|
12317 |
-
|
12318 |
-
|
12319 |
-
|
12320 |
-
|
12321 |
-
|
12322 |
-
|
12323 |
-
|
12324 |
-
|
12325 |
-
|
12326 |
-
|
12327 |
-
|
12328 |
-
|
12329 |
-
|
12330 |
-
|
12331 |
-
|
12332 |
-
|
12333 |
-
|
12334 |
-
|
12335 |
-
|
12336 |
-
|
12337 |
-
|
12338 |
-
|
12339 |
-
|
12340 |
-
|
12341 |
-
|
12342 |
-
|
12343 |
-
|
12344 |
-
|
12345 |
-
|
12346 |
-
|
12347 |
-
|
12348 |
-
|
12349 |
-
|
12350 |
-
|
12351 |
-
|
12352 |
-
|
12353 |
-
|
12354 |
-
|
12355 |
-
|
12356 |
-
|
12357 |
-
|
12358 |
-
|
12359 |
-
|
12360 |
-
|
12361 |
-
|
12362 |
-
|
12363 |
-
|
12364 |
-
|
12365 |
-
|
12366 |
-
|
12367 |
-
|
12368 |
-
|
12369 |
-
|
12370 |
-
|
12371 |
-
|
12372 |
-
|
12373 |
-
|
12374 |
-
|
12375 |
-
|
12376 |
-
|
12377 |
-
|
12378 |
-
|
12379 |
-
|
12380 |
-
|
12381 |
-
|
12382 |
-
|
12383 |
-
|
12384 |
-
|
12385 |
-
|
12386 |
-
|
12387 |
-
|
12388 |
-
|
12389 |
-
|
12390 |
-
|
12391 |
-
|
12392 |
-
|
12393 |
-
|
12394 |
-
|
12395 |
-
|
12396 |
-
|
12397 |
-
|
12398 |
-
|
12399 |
-
|
12400 |
-
|
12401 |
-
|
12402 |
-
|
12403 |
-
|
12404 |
-
|
12405 |
-
|
12406 |
-
|
12407 |
-
|
12408 |
-
|
12409 |
-
|
12410 |
-
|
12411 |
-
|
12412 |
-
|
12413 |
-
|
12414 |
-
|
12415 |
-
|
12416 |
-
|
12417 |
-
|
12418 |
-
|
12419 |
-
|
12420 |
-
|
12421 |
-
|
12422 |
-
|
12423 |
-
|
12424 |
-
|
12425 |
-
|
12426 |
-
|
12427 |
-
|
12428 |
-
|
12429 |
-
|
12430 |
-
|
12431 |
-
|
12432 |
-
|
12433 |
-
|
12434 |
-
|
12435 |
-
|
12436 |
-
|
12437 |
-
|
12438 |
-
|
12439 |
-
|
12440 |
-
|
12441 |
-
|
12442 |
-
|
12443 |
-
|
12444 |
-
|
12445 |
-
|
12446 |
-
|
12447 |
-
if (
|
12448 |
-
|
12449 |
-
} else if
|
12450 |
-
|
12451 |
-
|
12452 |
-
|
12453 |
-
|
12454 |
-
|
12455 |
-
|
12456 |
-
|
12457 |
-
|
12458 |
-
|
12459 |
-
|
12460 |
-
|
12461 |
-
|
12462 |
-
if (
|
12463 |
-
|
12464 |
-
} else if
|
12465 |
-
|
12466 |
-
|
12467 |
-
|
12468 |
-
|
12469 |
-
|
12470 |
-
|
12471 |
-
|
12472 |
-
|
12473 |
-
|
12474 |
-
|
12475 |
-
|
12476 |
-
|
12477 |
-
|
12478 |
-
|
12479 |
-
|
12480 |
-
|
12481 |
-
|
12482 |
-
|
12483 |
-
|
12484 |
-
|
12485 |
-
|
12486 |
-
|
12487 |
-
|
12488 |
-
|
12489 |
-
|
12490 |
-
|
12491 |
-
|
12492 |
-
|
12493 |
-
|
12494 |
-
|
12495 |
-
|
12496 |
-
|
12497 |
-
|
12498 |
-
|
12499 |
-
|
12500 |
-
|
12501 |
-
|
12502 |
-
|
12503 |
-
|
12504 |
-
|
12505 |
-
|
12506 |
-
|
12507 |
-
|
12508 |
-
|
12509 |
-
|
12510 |
-
|
12511 |
-
|
12512 |
-
|
12513 |
-
|
12514 |
-
|
12515 |
-
|
12516 |
-
|
12517 |
-
|
12518 |
-
|
12519 |
-
|
12520 |
-
|
12521 |
-
|
12522 |
-
|
12523 |
-
|
12524 |
-
|
12525 |
-
|
12526 |
-
|
12527 |
-
|
12528 |
-
|
12529 |
-
// LB3 Always break at the end of text.
|
12530 |
-
if (index >= codePoints.length) {
|
12531 |
-
return BREAK_MANDATORY;
|
12532 |
-
}
|
12533 |
-
|
12534 |
-
var _codePointsToCharacte = codePointsToCharacterClasses(codePoints),
|
12535 |
-
_codePointsToCharacte2 = _slicedToArray(_codePointsToCharacte, 2),
|
12536 |
-
indicies = _codePointsToCharacte2[0],
|
12537 |
-
classTypes = _codePointsToCharacte2[1];
|
12538 |
-
|
12539 |
-
return _lineBreakAtIndex(codePoints, classTypes, indicies, index);
|
12540 |
-
};
|
12541 |
-
|
12542 |
-
var cssFormattedClasses = function cssFormattedClasses(codePoints, options) {
|
12543 |
-
if (!options) {
|
12544 |
-
options = { lineBreak: 'normal', wordBreak: 'normal' };
|
12545 |
-
}
|
12546 |
-
|
12547 |
-
var _codePointsToCharacte3 = codePointsToCharacterClasses(codePoints, options.lineBreak),
|
12548 |
-
_codePointsToCharacte4 = _slicedToArray(_codePointsToCharacte3, 3),
|
12549 |
-
indicies = _codePointsToCharacte4[0],
|
12550 |
-
classTypes = _codePointsToCharacte4[1],
|
12551 |
-
isLetterNumber = _codePointsToCharacte4[2];
|
12552 |
-
|
12553 |
-
if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
|
12554 |
-
classTypes = classTypes.map(function (type) {
|
12555 |
-
return [NU, AL, SA].indexOf(type) !== -1 ? ID : type;
|
12556 |
-
});
|
12557 |
-
}
|
12558 |
-
|
12559 |
-
var forbiddenBreakpoints = options.wordBreak === 'keep-all' ? isLetterNumber.map(function (isLetterNumber, i) {
|
12560 |
-
return isLetterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
|
12561 |
-
}) : null;
|
12562 |
-
|
12563 |
-
return [indicies, classTypes, forbiddenBreakpoints];
|
12564 |
-
};
|
12565 |
-
|
12566 |
-
var inlineBreakOpportunities = exports.inlineBreakOpportunities = function inlineBreakOpportunities(str, options) {
|
12567 |
-
var codePoints = (0, _Util.toCodePoints)(str);
|
12568 |
-
var output = BREAK_NOT_ALLOWED;
|
12569 |
-
|
12570 |
-
var _cssFormattedClasses = cssFormattedClasses(codePoints, options),
|
12571 |
-
_cssFormattedClasses2 = _slicedToArray(_cssFormattedClasses, 3),
|
12572 |
-
indicies = _cssFormattedClasses2[0],
|
12573 |
-
classTypes = _cssFormattedClasses2[1],
|
12574 |
-
forbiddenBreakpoints = _cssFormattedClasses2[2];
|
12575 |
-
|
12576 |
-
codePoints.forEach(function (codePoint, i) {
|
12577 |
-
output += (0, _Util.fromCodePoint)(codePoint) + (i >= codePoints.length - 1 ? BREAK_MANDATORY : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));
|
12578 |
-
});
|
12579 |
-
|
12580 |
-
return output;
|
12581 |
-
};
|
12582 |
-
|
12583 |
-
var Break = function () {
|
12584 |
-
function Break(codePoints, lineBreak, start, end) {
|
12585 |
-
_classCallCheck(this, Break);
|
12586 |
-
|
12587 |
-
this._codePoints = codePoints;
|
12588 |
-
this.required = lineBreak === BREAK_MANDATORY;
|
12589 |
-
this.start = start;
|
12590 |
-
this.end = end;
|
12591 |
-
}
|
12592 |
-
|
12593 |
-
_createClass(Break, [{
|
12594 |
-
key: 'slice',
|
12595 |
-
value: function slice() {
|
12596 |
-
return _Util.fromCodePoint.apply(undefined, _toConsumableArray(this._codePoints.slice(this.start, this.end)));
|
12597 |
-
}
|
12598 |
-
}]);
|
12599 |
-
|
12600 |
-
return Break;
|
12601 |
-
}();
|
12602 |
-
|
12603 |
-
var LineBreaker = exports.LineBreaker = function LineBreaker(str, options) {
|
12604 |
-
var codePoints = (0, _Util.toCodePoints)(str);
|
12605 |
-
|
12606 |
-
var _cssFormattedClasses3 = cssFormattedClasses(codePoints, options),
|
12607 |
-
_cssFormattedClasses4 = _slicedToArray(_cssFormattedClasses3, 3),
|
12608 |
-
indicies = _cssFormattedClasses4[0],
|
12609 |
-
classTypes = _cssFormattedClasses4[1],
|
12610 |
-
forbiddenBreakpoints = _cssFormattedClasses4[2];
|
12611 |
-
|
12612 |
-
var length = codePoints.length;
|
12613 |
-
var lastEnd = 0;
|
12614 |
-
var nextIndex = 0;
|
12615 |
-
|
12616 |
-
return {
|
12617 |
-
next: function next() {
|
12618 |
-
if (nextIndex >= length) {
|
12619 |
-
return { done: true };
|
12620 |
-
}
|
12621 |
-
var lineBreak = BREAK_NOT_ALLOWED;
|
12622 |
-
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED) {}
|
12623 |
-
|
12624 |
-
if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {
|
12625 |
-
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
12626 |
-
lastEnd = nextIndex;
|
12627 |
-
return { value: value, done: false };
|
12628 |
-
}
|
12629 |
-
|
12630 |
-
return { done: true };
|
12631 |
-
}
|
12632 |
-
};
|
12633 |
-
};
|
12634 |
-
|
12635 |
-
/***/ }),
|
12636 |
-
/* 48 */
|
12637 |
-
/***/ (function(module, exports, __webpack_require__) {
|
12638 |
-
|
12639 |
-
"use strict";
|
12640 |
-
|
12641 |
-
|
12642 |
-
Object.defineProperty(exports, "__esModule", {
|
12643 |
-
value: true
|
12644 |
-
});
|
12645 |
-
exports.Trie = exports.createTrieFromBase64 = exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_INDEX_SHIFT = exports.UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_2 = undefined;
|
12646 |
-
|
12647 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12648 |
-
|
12649 |
-
var _Util = __webpack_require__(13);
|
12650 |
-
|
12651 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12652 |
-
|
12653 |
-
/** Shift size for getting the index-2 table offset. */
|
12654 |
-
var UTRIE2_SHIFT_2 = exports.UTRIE2_SHIFT_2 = 5;
|
12655 |
-
|
12656 |
-
/** Shift size for getting the index-1 table offset. */
|
12657 |
-
var UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_1 = 6 + 5;
|
12658 |
-
|
12659 |
-
/**
|
12660 |
-
* Shift size for shifting left the index array values.
|
12661 |
-
* Increases possible data size with 16-bit index values at the cost
|
12662 |
-
* of compactability.
|
12663 |
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
12664 |
-
*/
|
12665 |
-
var UTRIE2_INDEX_SHIFT = exports.UTRIE2_INDEX_SHIFT = 2;
|
12666 |
-
|
12667 |
-
/**
|
12668 |
-
* Difference between the two shift sizes,
|
12669 |
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
12670 |
-
*/
|
12671 |
-
var UTRIE2_SHIFT_1_2 = exports.UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
12672 |
-
|
12673 |
-
/**
|
12674 |
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
12675 |
-
* lead surrogate code _units_ not code _points_.
|
12676 |
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
12677 |
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
12678 |
-
*/
|
12679 |
-
var UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
|
12680 |
-
|
12681 |
-
/** Number of entries in a data block. 32=0x20 */
|
12682 |
-
var UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
|
12683 |
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
12684 |
-
var UTRIE2_DATA_MASK = exports.UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
|
12685 |
-
|
12686 |
-
var UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
|
12687 |
-
/** Count the lengths of both BMP pieces. 2080=0x820 */
|
12688 |
-
var UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
|
12689 |
-
/**
|
12690 |
-
* The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
|
12691 |
-
* Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
|
12692 |
-
*/
|
12693 |
-
var UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
|
12694 |
-
var UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
|
12695 |
-
/**
|
12696 |
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
12697 |
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
12698 |
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
12699 |
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
12700 |
-
*
|
12701 |
-
* The part of the index-2 table for supplementary code points starts
|
12702 |
-
* after this index-1 table.
|
12703 |
-
*
|
12704 |
-
* Both the index-1 table and the following part of the index-2 table
|
12705 |
-
* are omitted completely if there is only BMP data.
|
12706 |
-
*/
|
12707 |
-
var UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
|
12708 |
-
|
12709 |
-
/**
|
12710 |
-
* Number of index-1 entries for the BMP. 32=0x20
|
12711 |
-
* This part of the index-1 table is omitted from the serialized form.
|
12712 |
-
*/
|
12713 |
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
|
12714 |
-
|
12715 |
-
/** Number of entries in an index-2 block. 64=0x40 */
|
12716 |
-
var UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
|
12717 |
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
12718 |
-
var UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
|
12719 |
-
|
12720 |
-
var createTrieFromBase64 = exports.createTrieFromBase64 = function createTrieFromBase64(base64) {
|
12721 |
-
var buffer = (0, _Util.decode)(base64);
|
12722 |
-
var view32 = Array.isArray(buffer) ? (0, _Util.polyUint32Array)(buffer) : new Uint32Array(buffer);
|
12723 |
-
var view16 = Array.isArray(buffer) ? (0, _Util.polyUint16Array)(buffer) : new Uint16Array(buffer);
|
12724 |
-
var headerLength = 24;
|
12725 |
-
|
12726 |
-
var index = view16.slice(headerLength / 2, view32[4] / 2);
|
12727 |
-
var data = view32[5] === 2 ? view16.slice((headerLength + view32[4]) / 2) : view32.slice(Math.ceil((headerLength + view32[4]) / 4));
|
12728 |
-
|
12729 |
-
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
12730 |
-
};
|
12731 |
-
|
12732 |
-
var Trie = exports.Trie = function () {
|
12733 |
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
12734 |
-
_classCallCheck(this, Trie);
|
12735 |
-
|
12736 |
-
this.initialValue = initialValue;
|
12737 |
-
this.errorValue = errorValue;
|
12738 |
-
this.highStart = highStart;
|
12739 |
-
this.highValueIndex = highValueIndex;
|
12740 |
-
this.index = index;
|
12741 |
-
this.data = data;
|
12742 |
-
}
|
12743 |
-
|
12744 |
-
/**
|
12745 |
-
* Get the value for a code point as stored in the Trie.
|
12746 |
-
*
|
12747 |
-
* @param codePoint the code point
|
12748 |
-
* @return the value
|
12749 |
-
*/
|
12750 |
-
|
12751 |
-
|
12752 |
-
_createClass(Trie, [{
|
12753 |
-
key: 'get',
|
12754 |
-
value: function get(codePoint) {
|
12755 |
-
var ix = void 0;
|
12756 |
-
if (codePoint >= 0) {
|
12757 |
-
if (codePoint < 0x0d800 || codePoint > 0x0dbff && codePoint <= 0x0ffff) {
|
12758 |
-
// Ordinary BMP code point, excluding leading surrogates.
|
12759 |
-
// BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.
|
12760 |
-
// 16 bit data is stored in the index array itself.
|
12761 |
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
12762 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12763 |
-
return this.data[ix];
|
12764 |
-
}
|
12765 |
-
|
12766 |
-
if (codePoint <= 0xffff) {
|
12767 |
-
// Lead Surrogate Code Point. A Separate index section is stored for
|
12768 |
-
// lead surrogate code units and code points.
|
12769 |
-
// The main index has the code unit data.
|
12770 |
-
// For this function, we need the code point data.
|
12771 |
-
// Note: this expression could be refactored for slightly improved efficiency, but
|
12772 |
-
// surrogate code points will be so rare in practice that it's not worth it.
|
12773 |
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> UTRIE2_SHIFT_2)];
|
12774 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12775 |
-
return this.data[ix];
|
12776 |
-
}
|
12777 |
-
|
12778 |
-
if (codePoint < this.highStart) {
|
12779 |
-
// Supplemental code point, use two-level lookup.
|
12780 |
-
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
12781 |
-
ix = this.index[ix];
|
12782 |
-
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
12783 |
-
ix = this.index[ix];
|
12784 |
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12785 |
-
return this.data[ix];
|
12786 |
-
}
|
12787 |
-
if (codePoint <= 0x10ffff) {
|
12788 |
-
return this.data[this.highValueIndex];
|
12789 |
-
}
|
12790 |
-
}
|
12791 |
-
|
12792 |
-
// Fall through. The code point is outside of the legal range of 0..0x10ffff.
|
12793 |
-
return this.errorValue;
|
12794 |
-
}
|
12795 |
-
}]);
|
12796 |
-
|
12797 |
-
return Trie;
|
12798 |
-
}();
|
12799 |
-
|
12800 |
-
/***/ }),
|
12801 |
-
/* 49 */
|
12802 |
-
/***/ (function(module, exports, __webpack_require__) {
|
12803 |
-
|
12804 |
-
"use strict";
|
12805 |
-
|
12806 |
-
|
12807 |
-
module.exports = 'KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA';
|
12808 |
-
|
12809 |
-
/***/ }),
|
12810 |
-
/* 50 */
|
12811 |
-
/***/ (function(module, exports, __webpack_require__) {
|
12812 |
-
|
12813 |
-
"use strict";
|
12814 |
-
|
12815 |
-
|
12816 |
-
Object.defineProperty(exports, "__esModule", {
|
12817 |
-
value: true
|
12818 |
-
});
|
12819 |
-
|
12820 |
-
var _Path = __webpack_require__(6);
|
12821 |
-
|
12822 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12823 |
-
|
12824 |
-
var Circle = function Circle(x, y, radius) {
|
12825 |
-
_classCallCheck(this, Circle);
|
12826 |
-
|
12827 |
-
this.type = _Path.PATH.CIRCLE;
|
12828 |
-
this.x = x;
|
12829 |
-
this.y = y;
|
12830 |
-
this.radius = radius;
|
12831 |
-
if (true) {
|
12832 |
-
if (isNaN(x)) {
|
12833 |
-
console.error('Invalid x value given for Circle');
|
12834 |
-
}
|
12835 |
-
if (isNaN(y)) {
|
12836 |
-
console.error('Invalid y value given for Circle');
|
12837 |
-
}
|
12838 |
-
if (isNaN(radius)) {
|
12839 |
-
console.error('Invalid radius value given for Circle');
|
12840 |
-
}
|
12841 |
-
}
|
12842 |
-
};
|
12843 |
-
|
12844 |
-
exports.default = Circle;
|
12845 |
-
|
12846 |
-
/***/ }),
|
12847 |
-
/* 51 */
|
12848 |
-
/***/ (function(module, exports, __webpack_require__) {
|
12849 |
-
|
12850 |
-
"use strict";
|
12851 |
-
|
12852 |
-
|
12853 |
-
Object.defineProperty(exports, "__esModule", {
|
12854 |
-
value: true
|
12855 |
-
});
|
12856 |
-
|
12857 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
12858 |
-
|
12859 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12860 |
-
|
12861 |
-
var _Bounds = __webpack_require__(1);
|
12862 |
-
|
12863 |
-
var _Font = __webpack_require__(25);
|
12864 |
-
|
12865 |
-
var _Gradient = __webpack_require__(52);
|
12866 |
-
|
12867 |
-
var _TextContainer = __webpack_require__(9);
|
12868 |
-
|
12869 |
-
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
12870 |
-
|
12871 |
-
var _background = __webpack_require__(5);
|
12872 |
-
|
12873 |
-
var _border = __webpack_require__(12);
|
12874 |
-
|
12875 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12876 |
-
|
12877 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12878 |
-
|
12879 |
-
var Renderer = function () {
|
12880 |
-
function Renderer(target, options) {
|
12881 |
-
_classCallCheck(this, Renderer);
|
12882 |
-
|
12883 |
-
this.target = target;
|
12884 |
-
this.options = options;
|
12885 |
-
target.render(options);
|
12886 |
-
}
|
12887 |
-
|
12888 |
-
_createClass(Renderer, [{
|
12889 |
-
key: 'renderNode',
|
12890 |
-
value: function renderNode(container) {
|
12891 |
-
if (container.isVisible()) {
|
12892 |
-
this.renderNodeBackgroundAndBorders(container);
|
12893 |
-
this.renderNodeContent(container);
|
12894 |
-
}
|
12895 |
-
}
|
12896 |
-
}, {
|
12897 |
-
key: 'renderNodeContent',
|
12898 |
-
value: function renderNodeContent(container) {
|
12899 |
-
var _this = this;
|
12900 |
-
|
12901 |
-
var callback = function callback() {
|
12902 |
-
if (container.childNodes.length) {
|
12903 |
-
container.childNodes.forEach(function (child) {
|
12904 |
-
if (child instanceof _TextContainer2.default) {
|
12905 |
-
var style = child.parent.style;
|
12906 |
-
_this.target.renderTextNode(child.bounds, style.color, style.font, style.textDecoration, style.textShadow);
|
12907 |
-
} else {
|
12908 |
-
_this.target.drawShape(child, container.style.color);
|
12909 |
-
}
|
12910 |
-
});
|
12911 |
-
}
|
12912 |
-
|
12913 |
-
if (container.image) {
|
12914 |
-
var _image = _this.options.imageStore.get(container.image);
|
12915 |
-
if (_image) {
|
12916 |
-
var contentBox = (0, _Bounds.calculateContentBox)(container.bounds, container.style.padding, container.style.border);
|
12917 |
-
var _width = typeof _image.width === 'number' && _image.width > 0 ? _image.width : contentBox.width;
|
12918 |
-
var _height = typeof _image.height === 'number' && _image.height > 0 ? _image.height : contentBox.height;
|
12919 |
-
if (_width > 0 && _height > 0) {
|
12920 |
-
_this.target.clip([(0, _Bounds.calculatePaddingBoxPath)(container.curvedBounds)], function () {
|
12921 |
-
_this.target.drawImage(_image, new _Bounds.Bounds(0, 0, _width, _height), contentBox);
|
12922 |
-
});
|
12923 |
-
}
|
12924 |
-
}
|
12925 |
-
}
|
12926 |
-
};
|
12927 |
-
var paths = container.getClipPaths();
|
12928 |
-
if (paths.length) {
|
12929 |
-
this.target.clip(paths, callback);
|
12930 |
-
} else {
|
12931 |
-
callback();
|
12932 |
-
}
|
12933 |
-
}
|
12934 |
-
}, {
|
12935 |
-
key: 'renderNodeBackgroundAndBorders',
|
12936 |
-
value: function renderNodeBackgroundAndBorders(container) {
|
12937 |
-
var _this2 = this;
|
12938 |
-
|
12939 |
-
var HAS_BACKGROUND = !container.style.background.backgroundColor.isTransparent() || container.style.background.backgroundImage.length;
|
12940 |
-
|
12941 |
-
var hasRenderableBorders = container.style.border.some(function (border) {
|
12942 |
-
return border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent();
|
12943 |
-
});
|
12944 |
-
|
12945 |
-
var callback = function callback() {
|
12946 |
-
var backgroundPaintingArea = (0, _background.calculateBackgroungPaintingArea)(container.curvedBounds, container.style.background.backgroundClip);
|
12947 |
-
|
12948 |
-
if (HAS_BACKGROUND) {
|
12949 |
-
_this2.target.clip([backgroundPaintingArea], function () {
|
12950 |
-
if (!container.style.background.backgroundColor.isTransparent()) {
|
12951 |
-
_this2.target.fill(container.style.background.backgroundColor);
|
12952 |
-
}
|
12953 |
-
|
12954 |
-
_this2.renderBackgroundImage(container);
|
12955 |
-
});
|
12956 |
-
}
|
12957 |
-
|
12958 |
-
container.style.border.forEach(function (border, side) {
|
12959 |
-
if (border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent()) {
|
12960 |
-
_this2.renderBorder(border, side, container.curvedBounds);
|
12961 |
-
}
|
12962 |
-
});
|
12963 |
-
};
|
12964 |
-
|
12965 |
-
if (HAS_BACKGROUND || hasRenderableBorders) {
|
12966 |
-
var paths = container.parent ? container.parent.getClipPaths() : [];
|
12967 |
-
if (paths.length) {
|
12968 |
-
this.target.clip(paths, callback);
|
12969 |
-
} else {
|
12970 |
-
callback();
|
12971 |
-
}
|
12972 |
-
}
|
12973 |
-
}
|
12974 |
-
}, {
|
12975 |
-
key: 'renderBackgroundImage',
|
12976 |
-
value: function renderBackgroundImage(container) {
|
12977 |
-
var _this3 = this;
|
12978 |
-
|
12979 |
-
container.style.background.backgroundImage.slice(0).reverse().forEach(function (backgroundImage) {
|
12980 |
-
if (backgroundImage.source.method === 'url' && backgroundImage.source.args.length) {
|
12981 |
-
_this3.renderBackgroundRepeat(container, backgroundImage);
|
12982 |
-
} else if (/gradient/i.test(backgroundImage.source.method)) {
|
12983 |
-
_this3.renderBackgroundGradient(container, backgroundImage);
|
12984 |
-
}
|
12985 |
-
});
|
12986 |
-
}
|
12987 |
-
}, {
|
12988 |
-
key: 'renderBackgroundRepeat',
|
12989 |
-
value: function renderBackgroundRepeat(container, background) {
|
12990 |
-
var image = this.options.imageStore.get(background.source.args[0]);
|
12991 |
-
if (image) {
|
12992 |
-
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
12993 |
-
var backgroundImageSize = (0, _background.calculateBackgroundSize)(background, image, backgroundPositioningArea);
|
12994 |
-
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
12995 |
-
var _path = (0, _background.calculateBackgroundRepeatPath)(background, position, backgroundImageSize, backgroundPositioningArea, container.bounds);
|
12996 |
-
|
12997 |
-
var _offsetX = Math.round(backgroundPositioningArea.left + position.x);
|
12998 |
-
var _offsetY = Math.round(backgroundPositioningArea.top + position.y);
|
12999 |
-
this.target.renderRepeat(_path, image, backgroundImageSize, _offsetX, _offsetY);
|
13000 |
-
}
|
13001 |
-
}
|
13002 |
-
}, {
|
13003 |
-
key: 'renderBackgroundGradient',
|
13004 |
-
value: function renderBackgroundGradient(container, background) {
|
13005 |
-
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
13006 |
-
var backgroundImageSize = (0, _background.calculateGradientBackgroundSize)(background, backgroundPositioningArea);
|
13007 |
-
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
13008 |
-
var gradientBounds = new _Bounds.Bounds(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y), backgroundImageSize.width, backgroundImageSize.height);
|
13009 |
-
|
13010 |
-
var gradient = (0, _Gradient.parseGradient)(container, background.source, gradientBounds);
|
13011 |
-
if (gradient) {
|
13012 |
-
switch (gradient.type) {
|
13013 |
-
case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:
|
13014 |
-
// $FlowFixMe
|
13015 |
-
this.target.renderLinearGradient(gradientBounds, gradient);
|
13016 |
-
break;
|
13017 |
-
case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:
|
13018 |
-
// $FlowFixMe
|
13019 |
-
this.target.renderRadialGradient(gradientBounds, gradient);
|
13020 |
-
break;
|
13021 |
-
}
|
13022 |
-
}
|
13023 |
-
}
|
13024 |
-
}, {
|
13025 |
-
key: 'renderBorder',
|
13026 |
-
value: function renderBorder(border, side, curvePoints) {
|
13027 |
-
this.target.drawShape((0, _Bounds.parsePathForBorder)(curvePoints, side), border.borderColor);
|
13028 |
-
}
|
13029 |
-
}, {
|
13030 |
-
key: 'renderStack',
|
13031 |
-
value: function renderStack(stack) {
|
13032 |
-
var _this4 = this;
|
13033 |
-
|
13034 |
-
if (stack.container.isVisible()) {
|
13035 |
-
var _opacity = stack.getOpacity();
|
13036 |
-
if (_opacity !== this._opacity) {
|
13037 |
-
this.target.setOpacity(stack.getOpacity());
|
13038 |
-
this._opacity = _opacity;
|
13039 |
-
}
|
13040 |
-
|
13041 |
-
var _transform = stack.container.style.transform;
|
13042 |
-
if (_transform !== null) {
|
13043 |
-
this.target.transform(stack.container.bounds.left + _transform.transformOrigin[0].value, stack.container.bounds.top + _transform.transformOrigin[1].value, _transform.transform, function () {
|
13044 |
-
return _this4.renderStackContent(stack);
|
13045 |
-
});
|
13046 |
-
} else {
|
13047 |
-
this.renderStackContent(stack);
|
13048 |
-
}
|
13049 |
-
}
|
13050 |
-
}
|
13051 |
-
}, {
|
13052 |
-
key: 'renderStackContent',
|
13053 |
-
value: function renderStackContent(stack) {
|
13054 |
-
var _splitStackingContext = splitStackingContexts(stack),
|
13055 |
-
_splitStackingContext2 = _slicedToArray(_splitStackingContext, 5),
|
13056 |
-
negativeZIndex = _splitStackingContext2[0],
|
13057 |
-
zeroOrAutoZIndexOrTransformedOrOpacity = _splitStackingContext2[1],
|
13058 |
-
positiveZIndex = _splitStackingContext2[2],
|
13059 |
-
nonPositionedFloats = _splitStackingContext2[3],
|
13060 |
-
nonPositionedInlineLevel = _splitStackingContext2[4];
|
13061 |
-
|
13062 |
-
var _splitDescendants = splitDescendants(stack),
|
13063 |
-
_splitDescendants2 = _slicedToArray(_splitDescendants, 2),
|
13064 |
-
inlineLevel = _splitDescendants2[0],
|
13065 |
-
nonInlineLevel = _splitDescendants2[1];
|
13066 |
-
|
13067 |
-
// https://www.w3.org/TR/css-position-3/#painting-order
|
13068 |
-
// 1. the background and borders of the element forming the stacking context.
|
13069 |
-
|
13070 |
-
|
13071 |
-
this.renderNodeBackgroundAndBorders(stack.container);
|
13072 |
-
// 2. the child stacking contexts with negative stack levels (most negative first).
|
13073 |
-
negativeZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
13074 |
-
// 3. For all its in-flow, non-positioned, block-level descendants in tree order:
|
13075 |
-
this.renderNodeContent(stack.container);
|
13076 |
-
nonInlineLevel.forEach(this.renderNode, this);
|
13077 |
-
// 4. All non-positioned floating descendants, in tree order. For each one of these,
|
13078 |
-
// treat the element as if it created a new stacking context, but any positioned descendants and descendants
|
13079 |
-
// which actually create a new stacking context should be considered part of the parent stacking context,
|
13080 |
-
// not this new one.
|
13081 |
-
nonPositionedFloats.forEach(this.renderStack, this);
|
13082 |
-
// 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
13083 |
-
nonPositionedInlineLevel.forEach(this.renderStack, this);
|
13084 |
-
inlineLevel.forEach(this.renderNode, this);
|
13085 |
-
// 6. All positioned, opacity or transform descendants, in tree order that fall into the following categories:
|
13086 |
-
// All positioned descendants with 'z-index: auto' or 'z-index: 0', in tree order.
|
13087 |
-
// For those with 'z-index: auto', treat the element as if it created a new stacking context,
|
13088 |
-
// but any positioned descendants and descendants which actually create a new stacking context should be
|
13089 |
-
// considered part of the parent stacking context, not this new one. For those with 'z-index: 0',
|
13090 |
-
// treat the stacking context generated atomically.
|
13091 |
-
//
|
13092 |
-
// All opacity descendants with opacity less than 1
|
13093 |
-
//
|
13094 |
-
// All transform descendants with transform other than none
|
13095 |
-
zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack, this);
|
13096 |
-
// 7. Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index
|
13097 |
-
// order (smallest first) then tree order.
|
13098 |
-
positiveZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
13099 |
-
}
|
13100 |
-
}, {
|
13101 |
-
key: 'render',
|
13102 |
-
value: function render(stack) {
|
13103 |
-
var _this5 = this;
|
13104 |
-
|
13105 |
-
if (this.options.backgroundColor) {
|
13106 |
-
this.target.rectangle(this.options.x, this.options.y, this.options.width, this.options.height, this.options.backgroundColor);
|
13107 |
-
}
|
13108 |
-
this.renderStack(stack);
|
13109 |
-
var target = this.target.getTarget();
|
13110 |
-
if (true) {
|
13111 |
-
return target.then(function (output) {
|
13112 |
-
_this5.options.logger.log('Render completed');
|
13113 |
-
return output;
|
13114 |
-
});
|
13115 |
-
}
|
13116 |
-
return target;
|
13117 |
-
}
|
13118 |
-
}]);
|
13119 |
-
|
13120 |
-
return Renderer;
|
13121 |
-
}();
|
13122 |
-
|
13123 |
-
exports.default = Renderer;
|
13124 |
-
|
13125 |
-
|
13126 |
-
var splitDescendants = function splitDescendants(stack) {
|
13127 |
-
var inlineLevel = [];
|
13128 |
-
var nonInlineLevel = [];
|
13129 |
-
|
13130 |
-
var length = stack.children.length;
|
13131 |
-
for (var i = 0; i < length; i++) {
|
13132 |
-
var child = stack.children[i];
|
13133 |
-
if (child.isInlineLevel()) {
|
13134 |
-
inlineLevel.push(child);
|
13135 |
-
} else {
|
13136 |
-
nonInlineLevel.push(child);
|
13137 |
-
}
|
13138 |
-
}
|
13139 |
-
return [inlineLevel, nonInlineLevel];
|
13140 |
-
};
|
13141 |
-
|
13142 |
-
var splitStackingContexts = function splitStackingContexts(stack) {
|
13143 |
-
var negativeZIndex = [];
|
13144 |
-
var zeroOrAutoZIndexOrTransformedOrOpacity = [];
|
13145 |
-
var positiveZIndex = [];
|
13146 |
-
var nonPositionedFloats = [];
|
13147 |
-
var nonPositionedInlineLevel = [];
|
13148 |
-
var length = stack.contexts.length;
|
13149 |
-
for (var i = 0; i < length; i++) {
|
13150 |
-
var child = stack.contexts[i];
|
13151 |
-
if (child.container.isPositioned() || child.container.style.opacity < 1 || child.container.isTransformed()) {
|
13152 |
-
if (child.container.style.zIndex.order < 0) {
|
13153 |
-
negativeZIndex.push(child);
|
13154 |
-
} else if (child.container.style.zIndex.order > 0) {
|
13155 |
-
positiveZIndex.push(child);
|
13156 |
-
} else {
|
13157 |
-
zeroOrAutoZIndexOrTransformedOrOpacity.push(child);
|
13158 |
-
}
|
13159 |
-
} else {
|
13160 |
-
if (child.container.isFloating()) {
|
13161 |
-
nonPositionedFloats.push(child);
|
13162 |
-
} else {
|
13163 |
-
nonPositionedInlineLevel.push(child);
|
13164 |
-
}
|
13165 |
-
}
|
13166 |
-
}
|
13167 |
-
return [negativeZIndex, zeroOrAutoZIndexOrTransformedOrOpacity, positiveZIndex, nonPositionedFloats, nonPositionedInlineLevel];
|
13168 |
-
};
|
13169 |
-
|
13170 |
-
var sortByZIndex = function sortByZIndex(a, b) {
|
13171 |
-
if (a.container.style.zIndex.order > b.container.style.zIndex.order) {
|
13172 |
-
return 1;
|
13173 |
-
} else if (a.container.style.zIndex.order < b.container.style.zIndex.order) {
|
13174 |
-
return -1;
|
13175 |
-
}
|
13176 |
-
|
13177 |
-
return a.container.index > b.container.index ? 1 : -1;
|
13178 |
-
};
|
13179 |
-
|
13180 |
-
/***/ }),
|
13181 |
-
/* 52 */
|
13182 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13183 |
-
|
13184 |
-
"use strict";
|
13185 |
-
|
13186 |
-
|
13187 |
-
Object.defineProperty(exports, "__esModule", {
|
13188 |
-
value: true
|
13189 |
-
});
|
13190 |
-
exports.transformWebkitRadialGradientArgs = exports.parseGradient = exports.RadialGradient = exports.LinearGradient = exports.RADIAL_GRADIENT_SHAPE = exports.GRADIENT_TYPE = undefined;
|
13191 |
-
|
13192 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
13193 |
-
|
13194 |
-
var _NodeContainer = __webpack_require__(3);
|
13195 |
-
|
13196 |
-
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
13197 |
-
|
13198 |
-
var _Angle = __webpack_require__(53);
|
13199 |
-
|
13200 |
-
var _Color = __webpack_require__(0);
|
13201 |
-
|
13202 |
-
var _Color2 = _interopRequireDefault(_Color);
|
13203 |
-
|
13204 |
-
var _Length = __webpack_require__(2);
|
13205 |
-
|
13206 |
-
var _Length2 = _interopRequireDefault(_Length);
|
13207 |
-
|
13208 |
-
var _Util = __webpack_require__(4);
|
13209 |
-
|
13210 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13211 |
-
|
13212 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13213 |
-
|
13214 |
-
var SIDE_OR_CORNER = /^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i;
|
13215 |
-
var PERCENTAGE_ANGLES = /^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i;
|
13216 |
-
var ENDS_WITH_LENGTH = /(px)|%|( 0)$/i;
|
13217 |
-
var FROM_TO_COLORSTOP = /^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i;
|
13218 |
-
var RADIAL_SHAPE_DEFINITION = /^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i;
|
13219 |
-
|
13220 |
-
var GRADIENT_TYPE = exports.GRADIENT_TYPE = {
|
13221 |
-
LINEAR_GRADIENT: 0,
|
13222 |
-
RADIAL_GRADIENT: 1
|
13223 |
-
};
|
13224 |
-
|
13225 |
-
var RADIAL_GRADIENT_SHAPE = exports.RADIAL_GRADIENT_SHAPE = {
|
13226 |
-
CIRCLE: 0,
|
13227 |
-
ELLIPSE: 1
|
13228 |
-
};
|
13229 |
-
|
13230 |
-
var LENGTH_FOR_POSITION = {
|
13231 |
-
left: new _Length2.default('0%'),
|
13232 |
-
top: new _Length2.default('0%'),
|
13233 |
-
center: new _Length2.default('50%'),
|
13234 |
-
right: new _Length2.default('100%'),
|
13235 |
-
bottom: new _Length2.default('100%')
|
13236 |
-
};
|
13237 |
-
|
13238 |
-
var LinearGradient = exports.LinearGradient = function LinearGradient(colorStops, direction) {
|
13239 |
-
_classCallCheck(this, LinearGradient);
|
13240 |
-
|
13241 |
-
this.type = GRADIENT_TYPE.LINEAR_GRADIENT;
|
13242 |
-
this.colorStops = colorStops;
|
13243 |
-
this.direction = direction;
|
13244 |
-
};
|
13245 |
-
|
13246 |
-
var RadialGradient = exports.RadialGradient = function RadialGradient(colorStops, shape, center, radius) {
|
13247 |
-
_classCallCheck(this, RadialGradient);
|
13248 |
-
|
13249 |
-
this.type = GRADIENT_TYPE.RADIAL_GRADIENT;
|
13250 |
-
this.colorStops = colorStops;
|
13251 |
-
this.shape = shape;
|
13252 |
-
this.center = center;
|
13253 |
-
this.radius = radius;
|
13254 |
-
};
|
13255 |
-
|
13256 |
-
var parseGradient = exports.parseGradient = function parseGradient(container, _ref, bounds) {
|
13257 |
-
var args = _ref.args,
|
13258 |
-
method = _ref.method,
|
13259 |
-
prefix = _ref.prefix;
|
13260 |
-
|
13261 |
-
if (method === 'linear-gradient') {
|
13262 |
-
return parseLinearGradient(args, bounds, !!prefix);
|
13263 |
-
} else if (method === 'gradient' && args[0] === 'linear') {
|
13264 |
-
// TODO handle correct angle
|
13265 |
-
return parseLinearGradient(['to bottom'].concat(transformObsoleteColorStops(args.slice(3))), bounds, !!prefix);
|
13266 |
-
} else if (method === 'radial-gradient') {
|
13267 |
-
return parseRadialGradient(container, prefix === '-webkit-' ? transformWebkitRadialGradientArgs(args) : args, bounds);
|
13268 |
-
} else if (method === 'gradient' && args[0] === 'radial') {
|
13269 |
-
return parseRadialGradient(container, transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))), bounds);
|
13270 |
-
}
|
13271 |
-
};
|
13272 |
-
|
13273 |
-
var parseColorStops = function parseColorStops(args, firstColorStopIndex, lineLength) {
|
13274 |
-
var colorStops = [];
|
13275 |
-
|
13276 |
-
for (var i = firstColorStopIndex; i < args.length; i++) {
|
13277 |
-
var value = args[i];
|
13278 |
-
var HAS_LENGTH = ENDS_WITH_LENGTH.test(value);
|
13279 |
-
var lastSpaceIndex = value.lastIndexOf(' ');
|
13280 |
-
var _color = new _Color2.default(HAS_LENGTH ? value.substring(0, lastSpaceIndex) : value);
|
13281 |
-
var _stop = HAS_LENGTH ? new _Length2.default(value.substring(lastSpaceIndex + 1)) : i === firstColorStopIndex ? new _Length2.default('0%') : i === args.length - 1 ? new _Length2.default('100%') : null;
|
13282 |
-
colorStops.push({ color: _color, stop: _stop });
|
13283 |
-
}
|
13284 |
-
|
13285 |
-
var absoluteValuedColorStops = colorStops.map(function (_ref2) {
|
13286 |
-
var color = _ref2.color,
|
13287 |
-
stop = _ref2.stop;
|
13288 |
-
|
13289 |
-
var absoluteStop = lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null;
|
13290 |
-
|
13291 |
-
return {
|
13292 |
-
color: color,
|
13293 |
-
// $FlowFixMe
|
13294 |
-
stop: absoluteStop
|
13295 |
-
};
|
13296 |
-
});
|
13297 |
-
|
13298 |
-
var previousColorStop = absoluteValuedColorStops[0].stop;
|
13299 |
-
for (var _i = 0; _i < absoluteValuedColorStops.length; _i++) {
|
13300 |
-
if (previousColorStop !== null) {
|
13301 |
-
var _stop2 = absoluteValuedColorStops[_i].stop;
|
13302 |
-
if (_stop2 === null) {
|
13303 |
-
var n = _i;
|
13304 |
-
while (absoluteValuedColorStops[n].stop === null) {
|
13305 |
-
n++;
|
13306 |
-
}
|
13307 |
-
var steps = n - _i + 1;
|
13308 |
-
var nextColorStep = absoluteValuedColorStops[n].stop;
|
13309 |
-
var stepSize = (nextColorStep - previousColorStop) / steps;
|
13310 |
-
for (; _i < n; _i++) {
|
13311 |
-
previousColorStop = absoluteValuedColorStops[_i].stop = previousColorStop + stepSize;
|
13312 |
-
}
|
13313 |
-
} else {
|
13314 |
-
previousColorStop = _stop2;
|
13315 |
-
}
|
13316 |
-
}
|
13317 |
-
}
|
13318 |
-
|
13319 |
-
return absoluteValuedColorStops;
|
13320 |
-
};
|
13321 |
-
|
13322 |
-
var parseLinearGradient = function parseLinearGradient(args, bounds, hasPrefix) {
|
13323 |
-
var angle = (0, _Angle.parseAngle)(args[0]);
|
13324 |
-
var HAS_SIDE_OR_CORNER = SIDE_OR_CORNER.test(args[0]);
|
13325 |
-
var HAS_DIRECTION = HAS_SIDE_OR_CORNER || angle !== null || PERCENTAGE_ANGLES.test(args[0]);
|
13326 |
-
var direction = HAS_DIRECTION ? angle !== null ? calculateGradientDirection(
|
13327 |
-
// if there is a prefix, the 0° angle points due East (instead of North per W3C)
|
13328 |
-
hasPrefix ? angle - Math.PI * 0.5 : angle, bounds) : HAS_SIDE_OR_CORNER ? parseSideOrCorner(args[0], bounds) : parsePercentageAngle(args[0], bounds) : calculateGradientDirection(Math.PI, bounds);
|
13329 |
-
var firstColorStopIndex = HAS_DIRECTION ? 1 : 0;
|
13330 |
-
|
13331 |
-
// TODO: Fix some inaccuracy with color stops with px values
|
13332 |
-
var lineLength = Math.min((0, _Util.distance)(Math.abs(direction.x0) + Math.abs(direction.x1), Math.abs(direction.y0) + Math.abs(direction.y1)), bounds.width * 2, bounds.height * 2);
|
13333 |
-
|
13334 |
-
return new LinearGradient(parseColorStops(args, firstColorStopIndex, lineLength), direction);
|
13335 |
-
};
|
13336 |
-
|
13337 |
-
var parseRadialGradient = function parseRadialGradient(container, args, bounds) {
|
13338 |
-
var m = args[0].match(RADIAL_SHAPE_DEFINITION);
|
13339 |
-
var shape = m && (m[1] === 'circle' || // explicit shape specification
|
13340 |
-
m[3] !== undefined && m[5] === undefined) // only one radius coordinate
|
13341 |
-
? RADIAL_GRADIENT_SHAPE.CIRCLE : RADIAL_GRADIENT_SHAPE.ELLIPSE;
|
13342 |
-
var radius = {};
|
13343 |
-
var center = {};
|
13344 |
-
|
13345 |
-
if (m) {
|
13346 |
-
// Radius
|
13347 |
-
if (m[3] !== undefined) {
|
13348 |
-
radius.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[3], m[4]).getAbsoluteValue(bounds.width);
|
13349 |
-
}
|
13350 |
-
|
13351 |
-
if (m[5] !== undefined) {
|
13352 |
-
radius.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[5], m[6]).getAbsoluteValue(bounds.height);
|
13353 |
-
}
|
13354 |
-
|
13355 |
-
// Position
|
13356 |
-
if (m[7]) {
|
13357 |
-
center.x = LENGTH_FOR_POSITION[m[7].toLowerCase()];
|
13358 |
-
} else if (m[8] !== undefined) {
|
13359 |
-
center.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[8], m[9]);
|
13360 |
-
}
|
13361 |
-
|
13362 |
-
if (m[10]) {
|
13363 |
-
center.y = LENGTH_FOR_POSITION[m[10].toLowerCase()];
|
13364 |
-
} else if (m[11] !== undefined) {
|
13365 |
-
center.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[11], m[12]);
|
13366 |
-
}
|
13367 |
-
}
|
13368 |
-
|
13369 |
-
var gradientCenter = {
|
13370 |
-
x: center.x === undefined ? bounds.width / 2 : center.x.getAbsoluteValue(bounds.width),
|
13371 |
-
y: center.y === undefined ? bounds.height / 2 : center.y.getAbsoluteValue(bounds.height)
|
13372 |
-
};
|
13373 |
-
var gradientRadius = calculateRadius(m && m[2] || 'farthest-corner', shape, gradientCenter, radius, bounds);
|
13374 |
-
|
13375 |
-
return new RadialGradient(parseColorStops(args, m ? 1 : 0, Math.min(gradientRadius.x, gradientRadius.y)), shape, gradientCenter, gradientRadius);
|
13376 |
-
};
|
13377 |
-
|
13378 |
-
var calculateGradientDirection = function calculateGradientDirection(radian, bounds) {
|
13379 |
-
var width = bounds.width;
|
13380 |
-
var height = bounds.height;
|
13381 |
-
var HALF_WIDTH = width * 0.5;
|
13382 |
-
var HALF_HEIGHT = height * 0.5;
|
13383 |
-
var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));
|
13384 |
-
var HALF_LINE_LENGTH = lineLength / 2;
|
13385 |
-
|
13386 |
-
var x0 = HALF_WIDTH + Math.sin(radian) * HALF_LINE_LENGTH;
|
13387 |
-
var y0 = HALF_HEIGHT - Math.cos(radian) * HALF_LINE_LENGTH;
|
13388 |
-
var x1 = width - x0;
|
13389 |
-
var y1 = height - y0;
|
13390 |
-
|
13391 |
-
return { x0: x0, x1: x1, y0: y0, y1: y1 };
|
13392 |
-
};
|
13393 |
-
|
13394 |
-
var parseTopRight = function parseTopRight(bounds) {
|
13395 |
-
return Math.acos(bounds.width / 2 / ((0, _Util.distance)(bounds.width, bounds.height) / 2));
|
13396 |
-
};
|
13397 |
-
|
13398 |
-
var parseSideOrCorner = function parseSideOrCorner(side, bounds) {
|
13399 |
-
switch (side) {
|
13400 |
-
case 'bottom':
|
13401 |
-
case 'to top':
|
13402 |
-
return calculateGradientDirection(0, bounds);
|
13403 |
-
case 'left':
|
13404 |
-
case 'to right':
|
13405 |
-
return calculateGradientDirection(Math.PI / 2, bounds);
|
13406 |
-
case 'right':
|
13407 |
-
case 'to left':
|
13408 |
-
return calculateGradientDirection(3 * Math.PI / 2, bounds);
|
13409 |
-
case 'top right':
|
13410 |
-
case 'right top':
|
13411 |
-
case 'to bottom left':
|
13412 |
-
case 'to left bottom':
|
13413 |
-
return calculateGradientDirection(Math.PI + parseTopRight(bounds), bounds);
|
13414 |
-
case 'top left':
|
13415 |
-
case 'left top':
|
13416 |
-
case 'to bottom right':
|
13417 |
-
case 'to right bottom':
|
13418 |
-
return calculateGradientDirection(Math.PI - parseTopRight(bounds), bounds);
|
13419 |
-
case 'bottom left':
|
13420 |
-
case 'left bottom':
|
13421 |
-
case 'to top right':
|
13422 |
-
case 'to right top':
|
13423 |
-
return calculateGradientDirection(parseTopRight(bounds), bounds);
|
13424 |
-
case 'bottom right':
|
13425 |
-
case 'right bottom':
|
13426 |
-
case 'to top left':
|
13427 |
-
case 'to left top':
|
13428 |
-
return calculateGradientDirection(2 * Math.PI - parseTopRight(bounds), bounds);
|
13429 |
-
case 'top':
|
13430 |
-
case 'to bottom':
|
13431 |
-
default:
|
13432 |
-
return calculateGradientDirection(Math.PI, bounds);
|
13433 |
-
}
|
13434 |
-
};
|
13435 |
-
|
13436 |
-
var parsePercentageAngle = function parsePercentageAngle(angle, bounds) {
|
13437 |
-
var _angle$split$map = angle.split(' ').map(parseFloat),
|
13438 |
-
_angle$split$map2 = _slicedToArray(_angle$split$map, 2),
|
13439 |
-
left = _angle$split$map2[0],
|
13440 |
-
top = _angle$split$map2[1];
|
13441 |
-
|
13442 |
-
var ratio = left / 100 * bounds.width / (top / 100 * bounds.height);
|
13443 |
-
|
13444 |
-
return calculateGradientDirection(Math.atan(isNaN(ratio) ? 1 : ratio) + Math.PI / 2, bounds);
|
13445 |
-
};
|
13446 |
-
|
13447 |
-
var findCorner = function findCorner(bounds, x, y, closest) {
|
13448 |
-
var corners = [{ x: 0, y: 0 }, { x: 0, y: bounds.height }, { x: bounds.width, y: 0 }, { x: bounds.width, y: bounds.height }];
|
13449 |
-
|
13450 |
-
// $FlowFixMe
|
13451 |
-
return corners.reduce(function (stat, corner) {
|
13452 |
-
var d = (0, _Util.distance)(x - corner.x, y - corner.y);
|
13453 |
-
if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {
|
13454 |
-
return {
|
13455 |
-
optimumCorner: corner,
|
13456 |
-
optimumDistance: d
|
13457 |
-
};
|
13458 |
-
}
|
13459 |
-
|
13460 |
-
return stat;
|
13461 |
-
}, {
|
13462 |
-
optimumDistance: closest ? Infinity : -Infinity,
|
13463 |
-
optimumCorner: null
|
13464 |
-
}).optimumCorner;
|
13465 |
-
};
|
13466 |
-
|
13467 |
-
var calculateRadius = function calculateRadius(extent, shape, center, radius, bounds) {
|
13468 |
-
var x = center.x;
|
13469 |
-
var y = center.y;
|
13470 |
-
var rx = 0;
|
13471 |
-
var ry = 0;
|
13472 |
-
|
13473 |
-
switch (extent) {
|
13474 |
-
case 'closest-side':
|
13475 |
-
// The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.
|
13476 |
-
// If the shape is an ellipse, it exactly meets the closest side in each dimension.
|
13477 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13478 |
-
rx = ry = Math.min(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
13479 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13480 |
-
rx = Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
13481 |
-
ry = Math.min(Math.abs(y), Math.abs(y - bounds.height));
|
13482 |
-
}
|
13483 |
-
break;
|
13484 |
-
|
13485 |
-
case 'closest-corner':
|
13486 |
-
// The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.
|
13487 |
-
// If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.
|
13488 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13489 |
-
rx = ry = Math.min((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
13490 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13491 |
-
// Compute the ratio ry/rx (which is to be the same as for "closest-side")
|
13492 |
-
var c = Math.min(Math.abs(y), Math.abs(y - bounds.height)) / Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
13493 |
-
var corner = findCorner(bounds, x, y, true);
|
13494 |
-
rx = (0, _Util.distance)(corner.x - x, (corner.y - y) / c);
|
13495 |
-
ry = c * rx;
|
13496 |
-
}
|
13497 |
-
break;
|
13498 |
-
|
13499 |
-
case 'farthest-side':
|
13500 |
-
// Same as closest-side, except the ending shape is sized based on the farthest side(s)
|
13501 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13502 |
-
rx = ry = Math.max(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
13503 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13504 |
-
rx = Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
13505 |
-
ry = Math.max(Math.abs(y), Math.abs(y - bounds.height));
|
13506 |
-
}
|
13507 |
-
break;
|
13508 |
-
|
13509 |
-
case 'farthest-corner':
|
13510 |
-
// Same as closest-corner, except the ending shape is sized based on the farthest corner.
|
13511 |
-
// If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.
|
13512 |
-
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13513 |
-
rx = ry = Math.max((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
13514 |
-
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13515 |
-
// Compute the ratio ry/rx (which is to be the same as for "farthest-side")
|
13516 |
-
var _c = Math.max(Math.abs(y), Math.abs(y - bounds.height)) / Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
13517 |
-
var _corner = findCorner(bounds, x, y, false);
|
13518 |
-
rx = (0, _Util.distance)(_corner.x - x, (_corner.y - y) / _c);
|
13519 |
-
ry = _c * rx;
|
13520 |
-
}
|
13521 |
-
break;
|
13522 |
-
|
13523 |
-
default:
|
13524 |
-
// pixel or percentage values
|
13525 |
-
rx = radius.x || 0;
|
13526 |
-
ry = radius.y !== undefined ? radius.y : rx;
|
13527 |
-
break;
|
13528 |
-
}
|
13529 |
-
|
13530 |
-
return {
|
13531 |
-
x: rx,
|
13532 |
-
y: ry
|
13533 |
-
};
|
13534 |
-
};
|
13535 |
-
|
13536 |
-
var transformWebkitRadialGradientArgs = exports.transformWebkitRadialGradientArgs = function transformWebkitRadialGradientArgs(args) {
|
13537 |
-
var shape = '';
|
13538 |
-
var radius = '';
|
13539 |
-
var extent = '';
|
13540 |
-
var position = '';
|
13541 |
-
var idx = 0;
|
13542 |
-
|
13543 |
-
var POSITION = /^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i;
|
13544 |
-
var SHAPE_AND_EXTENT = /^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i;
|
13545 |
-
var RADIUS = /^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i;
|
13546 |
-
|
13547 |
-
var matchStartPosition = args[idx].match(POSITION);
|
13548 |
-
if (matchStartPosition) {
|
13549 |
-
idx++;
|
13550 |
-
}
|
13551 |
-
|
13552 |
-
var matchShapeExtent = args[idx].match(SHAPE_AND_EXTENT);
|
13553 |
-
if (matchShapeExtent) {
|
13554 |
-
shape = matchShapeExtent[1] || '';
|
13555 |
-
extent = matchShapeExtent[2] || '';
|
13556 |
-
if (extent === 'contain') {
|
13557 |
-
extent = 'closest-side';
|
13558 |
-
} else if (extent === 'cover') {
|
13559 |
-
extent = 'farthest-corner';
|
13560 |
-
}
|
13561 |
-
idx++;
|
13562 |
-
}
|
13563 |
-
|
13564 |
-
var matchStartRadius = args[idx].match(RADIUS);
|
13565 |
-
if (matchStartRadius) {
|
13566 |
-
idx++;
|
13567 |
-
}
|
13568 |
-
|
13569 |
-
var matchEndPosition = args[idx].match(POSITION);
|
13570 |
-
if (matchEndPosition) {
|
13571 |
-
idx++;
|
13572 |
-
}
|
13573 |
-
|
13574 |
-
var matchEndRadius = args[idx].match(RADIUS);
|
13575 |
-
if (matchEndRadius) {
|
13576 |
-
idx++;
|
13577 |
-
}
|
13578 |
-
|
13579 |
-
var matchPosition = matchEndPosition || matchStartPosition;
|
13580 |
-
if (matchPosition && matchPosition[1]) {
|
13581 |
-
position = matchPosition[1] + (/^\d+$/.test(matchPosition[1]) ? 'px' : '');
|
13582 |
-
if (matchPosition[2]) {
|
13583 |
-
position += ' ' + matchPosition[2] + (/^\d+$/.test(matchPosition[2]) ? 'px' : '');
|
13584 |
-
}
|
13585 |
-
}
|
13586 |
-
|
13587 |
-
var matchRadius = matchEndRadius || matchStartRadius;
|
13588 |
-
if (matchRadius) {
|
13589 |
-
radius = matchRadius[0];
|
13590 |
-
if (!matchRadius[1]) {
|
13591 |
-
radius += 'px';
|
13592 |
-
}
|
13593 |
-
}
|
13594 |
-
|
13595 |
-
if (position && !shape && !radius && !extent) {
|
13596 |
-
radius = position;
|
13597 |
-
position = '';
|
13598 |
-
}
|
13599 |
-
|
13600 |
-
if (position) {
|
13601 |
-
position = 'at ' + position;
|
13602 |
-
}
|
13603 |
-
|
13604 |
-
return [[shape, extent, radius, position].filter(function (s) {
|
13605 |
-
return !!s;
|
13606 |
-
}).join(' ')].concat(args.slice(idx));
|
13607 |
-
};
|
13608 |
-
|
13609 |
-
var transformObsoleteColorStops = function transformObsoleteColorStops(args) {
|
13610 |
-
return args.map(function (color) {
|
13611 |
-
return color.match(FROM_TO_COLORSTOP);
|
13612 |
-
})
|
13613 |
-
// $FlowFixMe
|
13614 |
-
.map(function (v, index) {
|
13615 |
-
if (!v) {
|
13616 |
-
return args[index];
|
13617 |
-
}
|
13618 |
-
|
13619 |
-
switch (v[1]) {
|
13620 |
-
case 'from':
|
13621 |
-
return v[4] + ' 0%';
|
13622 |
-
case 'to':
|
13623 |
-
return v[4] + ' 100%';
|
13624 |
-
case 'color-stop':
|
13625 |
-
if (v[3] === '%') {
|
13626 |
-
return v[4] + ' ' + v[2];
|
13627 |
-
}
|
13628 |
-
return v[4] + ' ' + parseFloat(v[2]) * 100 + '%';
|
13629 |
-
}
|
13630 |
-
});
|
13631 |
-
};
|
13632 |
-
|
13633 |
-
/***/ }),
|
13634 |
-
/* 53 */
|
13635 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13636 |
-
|
13637 |
-
"use strict";
|
13638 |
-
|
13639 |
-
|
13640 |
-
Object.defineProperty(exports, "__esModule", {
|
13641 |
-
value: true
|
13642 |
-
});
|
13643 |
-
var ANGLE = /([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;
|
13644 |
-
|
13645 |
-
var parseAngle = exports.parseAngle = function parseAngle(angle) {
|
13646 |
-
var match = angle.match(ANGLE);
|
13647 |
-
|
13648 |
-
if (match) {
|
13649 |
-
var value = parseFloat(match[1]);
|
13650 |
-
switch (match[2].toLowerCase()) {
|
13651 |
-
case 'deg':
|
13652 |
-
return Math.PI * value / 180;
|
13653 |
-
case 'grad':
|
13654 |
-
return Math.PI / 200 * value;
|
13655 |
-
case 'rad':
|
13656 |
-
return value;
|
13657 |
-
case 'turn':
|
13658 |
-
return Math.PI * 2 * value;
|
13659 |
-
}
|
13660 |
-
}
|
13661 |
-
|
13662 |
-
return null;
|
13663 |
-
};
|
13664 |
-
|
13665 |
-
/***/ }),
|
13666 |
-
/* 54 */
|
13667 |
-
/***/ (function(module, exports, __webpack_require__) {
|
13668 |
-
|
13669 |
-
"use strict";
|
13670 |
-
|
13671 |
-
|
13672 |
-
Object.defineProperty(exports, "__esModule", {
|
13673 |
-
value: true
|
13674 |
-
});
|
13675 |
-
exports.cloneWindow = exports.DocumentCloner = undefined;
|
13676 |
-
|
13677 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
13678 |
-
|
13679 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
13680 |
-
|
13681 |
-
var _Bounds = __webpack_require__(1);
|
13682 |
-
|
13683 |
-
var _Proxy = __webpack_require__(26);
|
13684 |
-
|
13685 |
-
var _ResourceLoader = __webpack_require__(55);
|
13686 |
-
|
13687 |
-
var _ResourceLoader2 = _interopRequireDefault(_ResourceLoader);
|
13688 |
-
|
13689 |
-
var _Util = __webpack_require__(4);
|
13690 |
-
|
13691 |
-
var _background = __webpack_require__(5);
|
13692 |
-
|
13693 |
-
var _CanvasRenderer = __webpack_require__(15);
|
13694 |
-
|
13695 |
-
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
13696 |
-
|
13697 |
-
var _PseudoNodeContent = __webpack_require__(56);
|
13698 |
-
|
13699 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13700 |
-
|
13701 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13702 |
-
|
13703 |
-
var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';
|
13704 |
-
|
13705 |
-
var DocumentCloner = exports.DocumentCloner = function () {
|
13706 |
-
function DocumentCloner(element, options, logger, copyInline, renderer) {
|
13707 |
-
_classCallCheck(this, DocumentCloner);
|
13708 |
-
|
13709 |
-
this.referenceElement = element;
|
13710 |
-
this.scrolledElements = [];
|
13711 |
-
this.copyStyles = copyInline;
|
13712 |
-
this.inlineImages = copyInline;
|
13713 |
-
this.logger = logger;
|
13714 |
-
this.options = options;
|
13715 |
-
this.renderer = renderer;
|
13716 |
-
this.resourceLoader = new _ResourceLoader2.default(options, logger, window);
|
13717 |
-
this.pseudoContentData = {
|
13718 |
-
counters: {},
|
13719 |
-
quoteDepth: 0
|
13720 |
-
};
|
13721 |
-
// $FlowFixMe
|
13722 |
-
this.documentElement = this.cloneNode(element.ownerDocument.documentElement);
|
13723 |
-
}
|
13724 |
-
|
13725 |
-
_createClass(DocumentCloner, [{
|
13726 |
-
key: 'inlineAllImages',
|
13727 |
-
value: function inlineAllImages(node) {
|
13728 |
-
var _this = this;
|
13729 |
-
|
13730 |
-
if (this.inlineImages && node) {
|
13731 |
-
var style = node.style;
|
13732 |
-
Promise.all((0, _background.parseBackgroundImage)(style.backgroundImage).map(function (backgroundImage) {
|
13733 |
-
if (backgroundImage.method === 'url') {
|
13734 |
-
return _this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function (img) {
|
13735 |
-
return img && typeof img.src === 'string' ? 'url("' + img.src + '")' : 'none';
|
13736 |
-
}).catch(function (e) {
|
13737 |
-
if (true) {
|
13738 |
-
_this.logger.log('Unable to load image', e);
|
13739 |
-
}
|
13740 |
-
});
|
13741 |
-
}
|
13742 |
-
return Promise.resolve('' + backgroundImage.prefix + backgroundImage.method + '(' + backgroundImage.args.join(',') + ')');
|
13743 |
-
})).then(function (backgroundImages) {
|
13744 |
-
if (backgroundImages.length > 1) {
|
13745 |
-
// TODO Multiple backgrounds somehow broken in Chrome
|
13746 |
-
style.backgroundColor = '';
|
13747 |
-
}
|
13748 |
-
style.backgroundImage = backgroundImages.join(',');
|
13749 |
-
});
|
13750 |
-
|
13751 |
-
if (node instanceof HTMLImageElement) {
|
13752 |
-
this.resourceLoader.inlineImage(node.src).then(function (img) {
|
13753 |
-
if (img && node instanceof HTMLImageElement && node.parentNode) {
|
13754 |
-
var parentNode = node.parentNode;
|
13755 |
-
var clonedChild = (0, _Util.copyCSSStyles)(node.style, img.cloneNode(false));
|
13756 |
-
parentNode.replaceChild(clonedChild, node);
|
13757 |
-
}
|
13758 |
-
}).catch(function (e) {
|
13759 |
-
if (true) {
|
13760 |
-
_this.logger.log('Unable to load image', e);
|
13761 |
-
}
|
13762 |
-
});
|
13763 |
-
}
|
13764 |
-
}
|
13765 |
-
}
|
13766 |
-
}, {
|
13767 |
-
key: 'inlineFonts',
|
13768 |
-
value: function inlineFonts(document) {
|
13769 |
-
var _this2 = this;
|
13770 |
-
|
13771 |
-
return Promise.all(Array.from(document.styleSheets).map(function (sheet) {
|
13772 |
-
if (sheet.href) {
|
13773 |
-
return fetch(sheet.href).then(function (res) {
|
13774 |
-
return res.text();
|
13775 |
-
}).then(function (text) {
|
13776 |
-
return createStyleSheetFontsFromText(text, sheet.href);
|
13777 |
-
}).catch(function (e) {
|
13778 |
-
if (true) {
|
13779 |
-
_this2.logger.log('Unable to load stylesheet', e);
|
13780 |
-
}
|
13781 |
-
return [];
|
13782 |
-
});
|
13783 |
-
}
|
13784 |
-
return getSheetFonts(sheet, document);
|
13785 |
-
})).then(function (fonts) {
|
13786 |
-
return fonts.reduce(function (acc, font) {
|
13787 |
-
return acc.concat(font);
|
13788 |
-
}, []);
|
13789 |
-
}).then(function (fonts) {
|
13790 |
-
return Promise.all(fonts.map(function (font) {
|
13791 |
-
return fetch(font.formats[0].src).then(function (response) {
|
13792 |
-
return response.blob();
|
13793 |
-
}).then(function (blob) {
|
13794 |
-
return new Promise(function (resolve, reject) {
|
13795 |
-
var reader = new FileReader();
|
13796 |
-
reader.onerror = reject;
|
13797 |
-
reader.onload = function () {
|
13798 |
-
// $FlowFixMe
|
13799 |
-
var result = reader.result;
|
13800 |
-
resolve(result);
|
13801 |
-
};
|
13802 |
-
reader.readAsDataURL(blob);
|
13803 |
-
});
|
13804 |
-
}).then(function (dataUri) {
|
13805 |
-
font.fontFace.setProperty('src', 'url("' + dataUri + '")');
|
13806 |
-
return '@font-face {' + font.fontFace.cssText + ' ';
|
13807 |
-
});
|
13808 |
-
}));
|
13809 |
-
}).then(function (fontCss) {
|
13810 |
-
var style = document.createElement('style');
|
13811 |
-
style.textContent = fontCss.join('\n');
|
13812 |
-
_this2.documentElement.appendChild(style);
|
13813 |
-
});
|
13814 |
-
}
|
13815 |
-
}, {
|
13816 |
-
key: 'createElementClone',
|
13817 |
-
value: function createElementClone(node) {
|
13818 |
-
var _this3 = this;
|
13819 |
-
|
13820 |
-
if (this.copyStyles && node instanceof HTMLCanvasElement) {
|
13821 |
-
var img = node.ownerDocument.createElement('img');
|
13822 |
-
try {
|
13823 |
-
img.src = node.toDataURL();
|
13824 |
-
return img;
|
13825 |
-
} catch (e) {
|
13826 |
-
if (true) {
|
13827 |
-
this.logger.log('Unable to clone canvas contents, canvas is tainted');
|
13828 |
-
}
|
13829 |
-
}
|
13830 |
-
}
|
13831 |
-
|
13832 |
-
if (node instanceof HTMLIFrameElement) {
|
13833 |
-
var tempIframe = node.cloneNode(false);
|
13834 |
-
var iframeKey = generateIframeKey();
|
13835 |
-
tempIframe.setAttribute('data-html2canvas-internal-iframe-key', iframeKey);
|
13836 |
-
|
13837 |
-
var _parseBounds = (0, _Bounds.parseBounds)(node, 0, 0),
|
13838 |
-
width = _parseBounds.width,
|
13839 |
-
height = _parseBounds.height;
|
13840 |
-
|
13841 |
-
this.resourceLoader.cache[iframeKey] = getIframeDocumentElement(node, this.options).then(function (documentElement) {
|
13842 |
-
return _this3.renderer(documentElement, {
|
13843 |
-
async: _this3.options.async,
|
13844 |
-
allowTaint: _this3.options.allowTaint,
|
13845 |
-
backgroundColor: '#ffffff',
|
13846 |
-
canvas: null,
|
13847 |
-
imageTimeout: _this3.options.imageTimeout,
|
13848 |
-
logging: _this3.options.logging,
|
13849 |
-
proxy: _this3.options.proxy,
|
13850 |
-
removeContainer: _this3.options.removeContainer,
|
13851 |
-
scale: _this3.options.scale,
|
13852 |
-
foreignObjectRendering: _this3.options.foreignObjectRendering,
|
13853 |
-
useCORS: _this3.options.useCORS,
|
13854 |
-
target: new _CanvasRenderer2.default(),
|
13855 |
-
width: width,
|
13856 |
-
height: height,
|
13857 |
-
x: 0,
|
13858 |
-
y: 0,
|
13859 |
-
windowWidth: documentElement.ownerDocument.defaultView.innerWidth,
|
13860 |
-
windowHeight: documentElement.ownerDocument.defaultView.innerHeight,
|
13861 |
-
scrollX: documentElement.ownerDocument.defaultView.pageXOffset,
|
13862 |
-
scrollY: documentElement.ownerDocument.defaultView.pageYOffset
|
13863 |
-
}, _this3.logger.child(iframeKey));
|
13864 |
-
}).then(function (canvas) {
|
13865 |
-
return new Promise(function (resolve, reject) {
|
13866 |
-
var iframeCanvas = document.createElement('img');
|
13867 |
-
iframeCanvas.onload = function () {
|
13868 |
-
return resolve(canvas);
|
13869 |
-
};
|
13870 |
-
iframeCanvas.onerror = reject;
|
13871 |
-
iframeCanvas.src = canvas.toDataURL();
|
13872 |
-
if (tempIframe.parentNode) {
|
13873 |
-
tempIframe.parentNode.replaceChild((0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node), iframeCanvas), tempIframe);
|
13874 |
-
}
|
13875 |
-
});
|
13876 |
-
});
|
13877 |
-
return tempIframe;
|
13878 |
-
}
|
13879 |
-
|
13880 |
-
if (node instanceof HTMLStyleElement && node.sheet && node.sheet.cssRules) {
|
13881 |
-
var css = [].slice.call(node.sheet.cssRules, 0).reduce(function (css, rule) {
|
13882 |
-
return css + rule.cssText;
|
13883 |
-
}, '');
|
13884 |
-
var style = node.cloneNode(false);
|
13885 |
-
style.textContent = css;
|
13886 |
-
return style;
|
13887 |
-
}
|
13888 |
-
|
13889 |
-
return node.cloneNode(false);
|
13890 |
-
}
|
13891 |
-
}, {
|
13892 |
-
key: 'cloneNode',
|
13893 |
-
value: function cloneNode(node) {
|
13894 |
-
var clone = node.nodeType === Node.TEXT_NODE ? document.createTextNode(node.nodeValue) : this.createElementClone(node);
|
13895 |
-
|
13896 |
-
var window = node.ownerDocument.defaultView;
|
13897 |
-
var style = node instanceof window.HTMLElement ? window.getComputedStyle(node) : null;
|
13898 |
-
var styleBefore = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':before') : null;
|
13899 |
-
var styleAfter = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':after') : null;
|
13900 |
-
|
13901 |
-
if (this.referenceElement === node && clone instanceof window.HTMLElement) {
|
13902 |
-
this.clonedReferenceElement = clone;
|
13903 |
-
}
|
13904 |
-
|
13905 |
-
if (clone instanceof window.HTMLBodyElement) {
|
13906 |
-
createPseudoHideStyles(clone);
|
13907 |
-
}
|
13908 |
-
|
13909 |
-
var counters = (0, _PseudoNodeContent.parseCounterReset)(style, this.pseudoContentData);
|
13910 |
-
var contentBefore = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleBefore, this.pseudoContentData);
|
13911 |
-
|
13912 |
-
for (var child = node.firstChild; child; child = child.nextSibling) {
|
13913 |
-
if (child.nodeType !== Node.ELEMENT_NODE || child.nodeName !== 'SCRIPT' &&
|
13914 |
-
// $FlowFixMe
|
13915 |
-
!child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== 'function' ||
|
13916 |
-
// $FlowFixMe
|
13917 |
-
!this.options.ignoreElements(child))) {
|
13918 |
-
if (!this.copyStyles || child.nodeName !== 'STYLE') {
|
13919 |
-
clone.appendChild(this.cloneNode(child));
|
13920 |
-
}
|
13921 |
-
}
|
13922 |
-
}
|
13923 |
-
|
13924 |
-
var contentAfter = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleAfter, this.pseudoContentData);
|
13925 |
-
(0, _PseudoNodeContent.popCounters)(counters, this.pseudoContentData);
|
13926 |
-
|
13927 |
-
if (node instanceof window.HTMLElement && clone instanceof window.HTMLElement) {
|
13928 |
-
if (styleBefore) {
|
13929 |
-
this.inlineAllImages(inlinePseudoElement(node, clone, styleBefore, contentBefore, PSEUDO_BEFORE));
|
13930 |
-
}
|
13931 |
-
if (styleAfter) {
|
13932 |
-
this.inlineAllImages(inlinePseudoElement(node, clone, styleAfter, contentAfter, PSEUDO_AFTER));
|
13933 |
-
}
|
13934 |
-
if (style && this.copyStyles && !(node instanceof HTMLIFrameElement)) {
|
13935 |
-
(0, _Util.copyCSSStyles)(style, clone);
|
13936 |
-
}
|
13937 |
-
this.inlineAllImages(clone);
|
13938 |
-
if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
|
13939 |
-
this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);
|
13940 |
-
}
|
13941 |
-
switch (node.nodeName) {
|
13942 |
-
case 'CANVAS':
|
13943 |
-
if (!this.copyStyles) {
|
13944 |
-
cloneCanvasContents(node, clone);
|
13945 |
-
}
|
13946 |
-
break;
|
13947 |
-
case 'TEXTAREA':
|
13948 |
-
case 'SELECT':
|
13949 |
-
clone.value = node.value;
|
13950 |
-
break;
|
13951 |
-
}
|
13952 |
-
}
|
13953 |
-
return clone;
|
13954 |
-
}
|
13955 |
-
}]);
|
13956 |
-
|
13957 |
-
return DocumentCloner;
|
13958 |
-
}();
|
13959 |
-
|
13960 |
-
var getSheetFonts = function getSheetFonts(sheet, document) {
|
13961 |
-
// $FlowFixMe
|
13962 |
-
return (sheet.cssRules ? Array.from(sheet.cssRules) : []).filter(function (rule) {
|
13963 |
-
return rule.type === CSSRule.FONT_FACE_RULE;
|
13964 |
-
}).map(function (rule) {
|
13965 |
-
var src = (0, _background.parseBackgroundImage)(rule.style.getPropertyValue('src'));
|
13966 |
-
var formats = [];
|
13967 |
-
for (var i = 0; i < src.length; i++) {
|
13968 |
-
if (src[i].method === 'url' && src[i + 1] && src[i + 1].method === 'format') {
|
13969 |
-
var a = document.createElement('a');
|
13970 |
-
a.href = src[i].args[0];
|
13971 |
-
if (document.body) {
|
13972 |
-
document.body.appendChild(a);
|
13973 |
-
}
|
13974 |
-
|
13975 |
-
var font = {
|
13976 |
-
src: a.href,
|
13977 |
-
format: src[i + 1].args[0]
|
13978 |
-
};
|
13979 |
-
formats.push(font);
|
13980 |
-
}
|
13981 |
-
}
|
13982 |
-
|
13983 |
-
return {
|
13984 |
-
// TODO select correct format for browser),
|
13985 |
-
|
13986 |
-
formats: formats.filter(function (font) {
|
13987 |
-
return (/^woff/i.test(font.format)
|
13988 |
-
);
|
13989 |
-
}),
|
13990 |
-
fontFace: rule.style
|
13991 |
-
};
|
13992 |
-
}).filter(function (font) {
|
13993 |
-
return font.formats.length;
|
13994 |
-
});
|
13995 |
-
};
|
13996 |
-
|
13997 |
-
var createStyleSheetFontsFromText = function createStyleSheetFontsFromText(text, baseHref) {
|
13998 |
-
var doc = document.implementation.createHTMLDocument('');
|
13999 |
-
var base = document.createElement('base');
|
14000 |
-
// $FlowFixMe
|
14001 |
-
base.href = baseHref;
|
14002 |
-
var style = document.createElement('style');
|
14003 |
-
|
14004 |
-
style.textContent = text;
|
14005 |
-
if (doc.head) {
|
14006 |
-
doc.head.appendChild(base);
|
14007 |
-
}
|
14008 |
-
if (doc.body) {
|
14009 |
-
doc.body.appendChild(style);
|
14010 |
-
}
|
14011 |
-
|
14012 |
-
return style.sheet ? getSheetFonts(style.sheet, doc) : [];
|
14013 |
-
};
|
14014 |
-
|
14015 |
-
var restoreOwnerScroll = function restoreOwnerScroll(ownerDocument, x, y) {
|
14016 |
-
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
14017 |
-
ownerDocument.defaultView.scrollTo(x, y);
|
14018 |
-
}
|
14019 |
-
};
|
14020 |
-
|
14021 |
-
var cloneCanvasContents = function cloneCanvasContents(canvas, clonedCanvas) {
|
14022 |
-
try {
|
14023 |
-
if (clonedCanvas) {
|
14024 |
-
clonedCanvas.width = canvas.width;
|
14025 |
-
clonedCanvas.height = canvas.height;
|
14026 |
-
var ctx = canvas.getContext('2d');
|
14027 |
-
var clonedCtx = clonedCanvas.getContext('2d');
|
14028 |
-
if (ctx) {
|
14029 |
-
clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
14030 |
-
} else {
|
14031 |
-
clonedCtx.drawImage(canvas, 0, 0);
|
14032 |
-
}
|
14033 |
-
}
|
14034 |
-
} catch (e) {}
|
14035 |
-
};
|
14036 |
-
|
14037 |
-
var inlinePseudoElement = function inlinePseudoElement(node, clone, style, contentItems, pseudoElt) {
|
14038 |
-
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
14039 |
-
return;
|
14040 |
-
}
|
14041 |
-
|
14042 |
-
var anonymousReplacedElement = clone.ownerDocument.createElement('html2canvaspseudoelement');
|
14043 |
-
(0, _Util.copyCSSStyles)(style, anonymousReplacedElement);
|
14044 |
-
|
14045 |
-
if (contentItems) {
|
14046 |
-
var len = contentItems.length;
|
14047 |
-
for (var i = 0; i < len; i++) {
|
14048 |
-
var item = contentItems[i];
|
14049 |
-
switch (item.type) {
|
14050 |
-
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:
|
14051 |
-
var img = clone.ownerDocument.createElement('img');
|
14052 |
-
img.src = (0, _background.parseBackgroundImage)('url(' + item.value + ')')[0].args[0];
|
14053 |
-
img.style.opacity = '1';
|
14054 |
-
anonymousReplacedElement.appendChild(img);
|
14055 |
-
break;
|
14056 |
-
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:
|
14057 |
-
anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value));
|
14058 |
-
break;
|
14059 |
-
}
|
14060 |
-
}
|
14061 |
-
}
|
14062 |
-
|
14063 |
-
anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
14064 |
-
clone.className += pseudoElt === PSEUDO_BEFORE ? ' ' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
14065 |
-
if (pseudoElt === PSEUDO_BEFORE) {
|
14066 |
-
clone.insertBefore(anonymousReplacedElement, clone.firstChild);
|
14067 |
-
} else {
|
14068 |
-
clone.appendChild(anonymousReplacedElement);
|
14069 |
-
}
|
14070 |
-
|
14071 |
-
return anonymousReplacedElement;
|
14072 |
-
};
|
14073 |
-
|
14074 |
-
var URL_REGEXP = /^url\((.+)\)$/i;
|
14075 |
-
var PSEUDO_BEFORE = ':before';
|
14076 |
-
var PSEUDO_AFTER = ':after';
|
14077 |
-
var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';
|
14078 |
-
var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';
|
14079 |
-
|
14080 |
-
var PSEUDO_HIDE_ELEMENT_STYLE = '{\n content: "" !important;\n display: none !important;\n}';
|
14081 |
-
|
14082 |
-
var createPseudoHideStyles = function createPseudoHideStyles(body) {
|
14083 |
-
createStyles(body, '.' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + '\n .' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
|
14084 |
-
};
|
14085 |
-
|
14086 |
-
var createStyles = function createStyles(body, styles) {
|
14087 |
-
var style = body.ownerDocument.createElement('style');
|
14088 |
-
style.innerHTML = styles;
|
14089 |
-
body.appendChild(style);
|
14090 |
-
};
|
14091 |
-
|
14092 |
-
var initNode = function initNode(_ref) {
|
14093 |
-
var _ref2 = _slicedToArray(_ref, 3),
|
14094 |
-
element = _ref2[0],
|
14095 |
-
x = _ref2[1],
|
14096 |
-
y = _ref2[2];
|
14097 |
-
|
14098 |
-
element.scrollLeft = x;
|
14099 |
-
element.scrollTop = y;
|
14100 |
-
};
|
14101 |
-
|
14102 |
-
var generateIframeKey = function generateIframeKey() {
|
14103 |
-
return Math.ceil(Date.now() + Math.random() * 10000000).toString(16);
|
14104 |
-
};
|
14105 |
-
|
14106 |
-
var DATA_URI_REGEXP = /^data:text\/(.+);(base64)?,(.*)$/i;
|
14107 |
-
|
14108 |
-
var getIframeDocumentElement = function getIframeDocumentElement(node, options) {
|
14109 |
-
try {
|
14110 |
-
return Promise.resolve(node.contentWindow.document.documentElement);
|
14111 |
-
} catch (e) {
|
14112 |
-
return options.proxy ? (0, _Proxy.Proxy)(node.src, options).then(function (html) {
|
14113 |
-
var match = html.match(DATA_URI_REGEXP);
|
14114 |
-
if (!match) {
|
14115 |
-
return Promise.reject();
|
14116 |
-
}
|
14117 |
-
|
14118 |
-
return match[2] === 'base64' ? window.atob(decodeURIComponent(match[3])) : decodeURIComponent(match[3]);
|
14119 |
-
}).then(function (html) {
|
14120 |
-
return createIframeContainer(node.ownerDocument, (0, _Bounds.parseBounds)(node, 0, 0)).then(function (cloneIframeContainer) {
|
14121 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
14122 |
-
var documentClone = cloneWindow.document;
|
14123 |
-
|
14124 |
-
documentClone.open();
|
14125 |
-
documentClone.write(html);
|
14126 |
-
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
14127 |
-
return documentClone.documentElement;
|
14128 |
-
});
|
14129 |
-
|
14130 |
-
documentClone.close();
|
14131 |
-
return iframeLoad;
|
14132 |
-
});
|
14133 |
-
}) : Promise.reject();
|
14134 |
-
}
|
14135 |
-
};
|
14136 |
-
|
14137 |
-
var createIframeContainer = function createIframeContainer(ownerDocument, bounds) {
|
14138 |
-
var cloneIframeContainer = ownerDocument.createElement('iframe');
|
14139 |
-
|
14140 |
-
cloneIframeContainer.className = 'html2canvas-container';
|
14141 |
-
cloneIframeContainer.style.visibility = 'hidden';
|
14142 |
-
cloneIframeContainer.style.position = 'fixed';
|
14143 |
-
cloneIframeContainer.style.left = '-10000px';
|
14144 |
-
cloneIframeContainer.style.top = '0px';
|
14145 |
-
cloneIframeContainer.style.border = '0';
|
14146 |
-
cloneIframeContainer.width = bounds.width.toString();
|
14147 |
-
cloneIframeContainer.height = bounds.height.toString();
|
14148 |
-
cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
|
14149 |
-
cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
|
14150 |
-
if (!ownerDocument.body) {
|
14151 |
-
return Promise.reject( true ? 'Body element not found in Document that is getting rendered' : '');
|
14152 |
-
}
|
14153 |
-
|
14154 |
-
ownerDocument.body.appendChild(cloneIframeContainer);
|
14155 |
-
|
14156 |
-
return Promise.resolve(cloneIframeContainer);
|
14157 |
-
};
|
14158 |
-
|
14159 |
-
var iframeLoader = function iframeLoader(cloneIframeContainer) {
|
14160 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
14161 |
-
var documentClone = cloneWindow.document;
|
14162 |
-
|
14163 |
-
return new Promise(function (resolve, reject) {
|
14164 |
-
cloneWindow.onload = cloneIframeContainer.onload = documentClone.onreadystatechange = function () {
|
14165 |
-
var interval = setInterval(function () {
|
14166 |
-
if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
|
14167 |
-
clearInterval(interval);
|
14168 |
-
resolve(cloneIframeContainer);
|
14169 |
-
}
|
14170 |
-
}, 50);
|
14171 |
-
};
|
14172 |
-
});
|
14173 |
-
};
|
14174 |
-
|
14175 |
-
var cloneWindow = exports.cloneWindow = function cloneWindow(ownerDocument, bounds, referenceElement, options, logger, renderer) {
|
14176 |
-
var cloner = new DocumentCloner(referenceElement, options, logger, false, renderer);
|
14177 |
-
var scrollX = ownerDocument.defaultView.pageXOffset;
|
14178 |
-
var scrollY = ownerDocument.defaultView.pageYOffset;
|
14179 |
-
|
14180 |
-
return createIframeContainer(ownerDocument, bounds).then(function (cloneIframeContainer) {
|
14181 |
-
var cloneWindow = cloneIframeContainer.contentWindow;
|
14182 |
-
var documentClone = cloneWindow.document;
|
14183 |
-
|
14184 |
-
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
14185 |
-
if window url is about:blank, we can assign the url to current by writing onto the document
|
14186 |
-
*/
|
14187 |
-
|
14188 |
-
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
14189 |
-
cloner.scrolledElements.forEach(initNode);
|
14190 |
-
cloneWindow.scrollTo(bounds.left, bounds.top);
|
14191 |
-
if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== bounds.top || cloneWindow.scrollX !== bounds.left)) {
|
14192 |
-
documentClone.documentElement.style.top = -bounds.top + 'px';
|
14193 |
-
documentClone.documentElement.style.left = -bounds.left + 'px';
|
14194 |
-
documentClone.documentElement.style.position = 'absolute';
|
14195 |
-
}
|
14196 |
-
|
14197 |
-
var result = Promise.resolve([cloneIframeContainer, cloner.clonedReferenceElement, cloner.resourceLoader]);
|
14198 |
-
|
14199 |
-
var onclone = options.onclone;
|
14200 |
-
|
14201 |
-
return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement || cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement || cloner.clonedReferenceElement instanceof HTMLElement ? typeof onclone === 'function' ? Promise.resolve().then(function () {
|
14202 |
-
return onclone(documentClone);
|
14203 |
-
}).then(function () {
|
14204 |
-
return result;
|
14205 |
-
}) : result : Promise.reject( true ? 'Error finding the ' + referenceElement.nodeName + ' in the cloned document' : '');
|
14206 |
-
});
|
14207 |
-
|
14208 |
-
documentClone.open();
|
14209 |
-
documentClone.write(serializeDoctype(document.doctype) + '<html></html>');
|
14210 |
-
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
14211 |
-
restoreOwnerScroll(referenceElement.ownerDocument, scrollX, scrollY);
|
14212 |
-
documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement), documentClone.documentElement);
|
14213 |
-
documentClone.close();
|
14214 |
-
|
14215 |
-
return iframeLoad;
|
14216 |
-
});
|
14217 |
-
};
|
14218 |
-
|
14219 |
-
var serializeDoctype = function serializeDoctype(doctype) {
|
14220 |
-
var str = '';
|
14221 |
-
if (doctype) {
|
14222 |
-
str += '<!DOCTYPE ';
|
14223 |
-
if (doctype.name) {
|
14224 |
-
str += doctype.name;
|
14225 |
-
}
|
14226 |
-
|
14227 |
-
if (doctype.internalSubset) {
|
14228 |
-
str += doctype.internalSubset;
|
14229 |
-
}
|
14230 |
-
|
14231 |
-
if (doctype.publicId) {
|
14232 |
-
str += '"' + doctype.publicId + '"';
|
14233 |
-
}
|
14234 |
-
|
14235 |
-
if (doctype.systemId) {
|
14236 |
-
str += '"' + doctype.systemId + '"';
|
14237 |
-
}
|
14238 |
-
|
14239 |
-
str += '>';
|
14240 |
-
}
|
14241 |
-
|
14242 |
-
return str;
|
14243 |
-
};
|
14244 |
-
|
14245 |
-
/***/ }),
|
14246 |
-
/* 55 */
|
14247 |
-
/***/ (function(module, exports, __webpack_require__) {
|
14248 |
-
|
14249 |
-
"use strict";
|
14250 |
-
|
14251 |
-
|
14252 |
-
Object.defineProperty(exports, "__esModule", {
|
14253 |
-
value: true
|
14254 |
-
});
|
14255 |
-
exports.ResourceStore = undefined;
|
14256 |
-
|
14257 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
14258 |
-
|
14259 |
-
var _Feature = __webpack_require__(10);
|
14260 |
-
|
14261 |
-
var _Feature2 = _interopRequireDefault(_Feature);
|
14262 |
-
|
14263 |
-
var _Proxy = __webpack_require__(26);
|
14264 |
-
|
14265 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14266 |
-
|
14267 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14268 |
-
|
14269 |
-
var ResourceLoader = function () {
|
14270 |
-
function ResourceLoader(options, logger, window) {
|
14271 |
-
_classCallCheck(this, ResourceLoader);
|
14272 |
-
|
14273 |
-
this.options = options;
|
14274 |
-
this._window = window;
|
14275 |
-
this.origin = this.getOrigin(window.location.href);
|
14276 |
-
this.cache = {};
|
14277 |
-
this.logger = logger;
|
14278 |
-
this._index = 0;
|
14279 |
-
}
|
14280 |
-
|
14281 |
-
_createClass(ResourceLoader, [{
|
14282 |
-
key: 'loadImage',
|
14283 |
-
value: function loadImage(src) {
|
14284 |
-
var _this = this;
|
14285 |
-
|
14286 |
-
if (this.hasResourceInCache(src)) {
|
14287 |
-
return src;
|
14288 |
-
}
|
14289 |
-
|
14290 |
-
if (!isSVG(src) || _Feature2.default.SUPPORT_SVG_DRAWING) {
|
14291 |
-
if (this.options.allowTaint === true || isInlineImage(src) || this.isSameOrigin(src)) {
|
14292 |
-
return this.addImage(src, src, false);
|
14293 |
-
} else if (!this.isSameOrigin(src)) {
|
14294 |
-
if (typeof this.options.proxy === 'string') {
|
14295 |
-
this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
14296 |
-
return _loadImage(src, _this.options.imageTimeout || 0);
|
14297 |
-
});
|
14298 |
-
return src;
|
14299 |
-
} else if (this.options.useCORS === true && _Feature2.default.SUPPORT_CORS_IMAGES) {
|
14300 |
-
return this.addImage(src, src, true);
|
14301 |
-
}
|
14302 |
-
}
|
14303 |
-
}
|
14304 |
-
}
|
14305 |
-
}, {
|
14306 |
-
key: 'inlineImage',
|
14307 |
-
value: function inlineImage(src) {
|
14308 |
-
var _this2 = this;
|
14309 |
-
|
14310 |
-
if (isInlineImage(src)) {
|
14311 |
-
return _loadImage(src, this.options.imageTimeout || 0);
|
14312 |
-
}
|
14313 |
-
if (this.hasResourceInCache(src)) {
|
14314 |
-
return this.cache[src];
|
14315 |
-
}
|
14316 |
-
if (!this.isSameOrigin(src) && typeof this.options.proxy === 'string') {
|
14317 |
-
return this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
14318 |
-
return _loadImage(src, _this2.options.imageTimeout || 0);
|
14319 |
-
});
|
14320 |
-
}
|
14321 |
-
|
14322 |
-
return this.xhrImage(src);
|
14323 |
-
}
|
14324 |
-
}, {
|
14325 |
-
key: 'xhrImage',
|
14326 |
-
value: function xhrImage(src) {
|
14327 |
-
var _this3 = this;
|
14328 |
-
|
14329 |
-
this.cache[src] = new Promise(function (resolve, reject) {
|
14330 |
-
var xhr = new XMLHttpRequest();
|
14331 |
-
xhr.onreadystatechange = function () {
|
14332 |
-
if (xhr.readyState === 4) {
|
14333 |
-
if (xhr.status !== 200) {
|
14334 |
-
reject('Failed to fetch image ' + src.substring(0, 256) + ' with status code ' + xhr.status);
|
14335 |
-
} else {
|
14336 |
-
var reader = new FileReader();
|
14337 |
-
reader.addEventListener('load', function () {
|
14338 |
-
// $FlowFixMe
|
14339 |
-
var result = reader.result;
|
14340 |
-
resolve(result);
|
14341 |
-
}, false);
|
14342 |
-
reader.addEventListener('error', function (e) {
|
14343 |
-
return reject(e);
|
14344 |
-
}, false);
|
14345 |
-
reader.readAsDataURL(xhr.response);
|
14346 |
-
}
|
14347 |
-
}
|
14348 |
-
};
|
14349 |
-
xhr.responseType = 'blob';
|
14350 |
-
if (_this3.options.imageTimeout) {
|
14351 |
-
var timeout = _this3.options.imageTimeout;
|
14352 |
-
xhr.timeout = timeout;
|
14353 |
-
xhr.ontimeout = function () {
|
14354 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
14355 |
-
};
|
14356 |
-
}
|
14357 |
-
xhr.open('GET', src, true);
|
14358 |
-
xhr.send();
|
14359 |
-
}).then(function (src) {
|
14360 |
-
return _loadImage(src, _this3.options.imageTimeout || 0);
|
14361 |
-
});
|
14362 |
-
|
14363 |
-
return this.cache[src];
|
14364 |
-
}
|
14365 |
-
}, {
|
14366 |
-
key: 'loadCanvas',
|
14367 |
-
value: function loadCanvas(node) {
|
14368 |
-
var key = String(this._index++);
|
14369 |
-
this.cache[key] = Promise.resolve(node);
|
14370 |
-
return key;
|
14371 |
-
}
|
14372 |
-
}, {
|
14373 |
-
key: 'hasResourceInCache',
|
14374 |
-
value: function hasResourceInCache(key) {
|
14375 |
-
return typeof this.cache[key] !== 'undefined';
|
14376 |
-
}
|
14377 |
-
}, {
|
14378 |
-
key: 'addImage',
|
14379 |
-
value: function addImage(key, src, useCORS) {
|
14380 |
-
var _this4 = this;
|
14381 |
-
|
14382 |
-
if (true) {
|
14383 |
-
this.logger.log('Added image ' + key.substring(0, 256));
|
14384 |
-
}
|
14385 |
-
|
14386 |
-
var imageLoadHandler = function imageLoadHandler(supportsDataImages) {
|
14387 |
-
return new Promise(function (resolve, reject) {
|
14388 |
-
var img = new Image();
|
14389 |
-
img.onload = function () {
|
14390 |
-
return resolve(img);
|
14391 |
-
};
|
14392 |
-
//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
|
14393 |
-
if (!supportsDataImages || useCORS) {
|
14394 |
-
img.crossOrigin = 'anonymous';
|
14395 |
-
}
|
14396 |
-
|
14397 |
-
img.onerror = reject;
|
14398 |
-
img.src = src;
|
14399 |
-
if (img.complete === true) {
|
14400 |
-
// Inline XML images may fail to parse, throwing an Error later on
|
14401 |
-
setTimeout(function () {
|
14402 |
-
resolve(img);
|
14403 |
-
}, 500);
|
14404 |
-
}
|
14405 |
-
if (_this4.options.imageTimeout) {
|
14406 |
-
var timeout = _this4.options.imageTimeout;
|
14407 |
-
setTimeout(function () {
|
14408 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
14409 |
-
}, timeout);
|
14410 |
-
}
|
14411 |
-
});
|
14412 |
-
};
|
14413 |
-
|
14414 |
-
this.cache[key] = isInlineBase64Image(src) && !isSVG(src) ? // $FlowFixMe
|
14415 |
-
_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler) : imageLoadHandler(true);
|
14416 |
-
return key;
|
14417 |
-
}
|
14418 |
-
}, {
|
14419 |
-
key: 'isSameOrigin',
|
14420 |
-
value: function isSameOrigin(url) {
|
14421 |
-
return this.getOrigin(url) === this.origin;
|
14422 |
-
}
|
14423 |
-
}, {
|
14424 |
-
key: 'getOrigin',
|
14425 |
-
value: function getOrigin(url) {
|
14426 |
-
var link = this._link || (this._link = this._window.document.createElement('a'));
|
14427 |
-
link.href = url;
|
14428 |
-
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
14429 |
-
return link.protocol + link.hostname + link.port;
|
14430 |
-
}
|
14431 |
-
}, {
|
14432 |
-
key: 'ready',
|
14433 |
-
value: function ready() {
|
14434 |
-
var _this5 = this;
|
14435 |
-
|
14436 |
-
var keys = Object.keys(this.cache);
|
14437 |
-
var values = keys.map(function (str) {
|
14438 |
-
return _this5.cache[str].catch(function (e) {
|
14439 |
-
if (true) {
|
14440 |
-
_this5.logger.log('Unable to load image', e);
|
14441 |
-
}
|
14442 |
-
return null;
|
14443 |
-
});
|
14444 |
-
});
|
14445 |
-
return Promise.all(values).then(function (images) {
|
14446 |
-
if (true) {
|
14447 |
-
_this5.logger.log('Finished loading ' + images.length + ' images', images);
|
14448 |
-
}
|
14449 |
-
return new ResourceStore(keys, images);
|
14450 |
-
});
|
14451 |
-
}
|
14452 |
-
}]);
|
14453 |
-
|
14454 |
-
return ResourceLoader;
|
14455 |
-
}();
|
14456 |
-
|
14457 |
-
exports.default = ResourceLoader;
|
14458 |
-
|
14459 |
-
var ResourceStore = exports.ResourceStore = function () {
|
14460 |
-
function ResourceStore(keys, resources) {
|
14461 |
-
_classCallCheck(this, ResourceStore);
|
14462 |
-
|
14463 |
-
this._keys = keys;
|
14464 |
-
this._resources = resources;
|
14465 |
-
}
|
14466 |
-
|
14467 |
-
_createClass(ResourceStore, [{
|
14468 |
-
key: 'get',
|
14469 |
-
value: function get(key) {
|
14470 |
-
var index = this._keys.indexOf(key);
|
14471 |
-
return index === -1 ? null : this._resources[index];
|
14472 |
-
}
|
14473 |
-
}]);
|
14474 |
-
|
14475 |
-
return ResourceStore;
|
14476 |
-
}();
|
14477 |
-
|
14478 |
-
var INLINE_SVG = /^data:image\/svg\+xml/i;
|
14479 |
-
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
|
14480 |
-
var INLINE_IMG = /^data:image\/.*/i;
|
14481 |
-
|
14482 |
-
var isInlineImage = function isInlineImage(src) {
|
14483 |
-
return INLINE_IMG.test(src);
|
14484 |
-
};
|
14485 |
-
var isInlineBase64Image = function isInlineBase64Image(src) {
|
14486 |
-
return INLINE_BASE64.test(src);
|
14487 |
-
};
|
14488 |
-
|
14489 |
-
var isSVG = function isSVG(src) {
|
14490 |
-
return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);
|
14491 |
-
};
|
14492 |
-
|
14493 |
-
var _loadImage = function _loadImage(src, timeout) {
|
14494 |
-
return new Promise(function (resolve, reject) {
|
14495 |
-
var img = new Image();
|
14496 |
-
img.onload = function () {
|
14497 |
-
return resolve(img);
|
14498 |
-
};
|
14499 |
-
img.onerror = reject;
|
14500 |
-
img.src = src;
|
14501 |
-
if (img.complete === true) {
|
14502 |
-
// Inline XML images may fail to parse, throwing an Error later on
|
14503 |
-
setTimeout(function () {
|
14504 |
-
resolve(img);
|
14505 |
-
}, 500);
|
14506 |
-
}
|
14507 |
-
if (timeout) {
|
14508 |
-
setTimeout(function () {
|
14509 |
-
return reject( true ? 'Timed out (' + timeout + 'ms) loading image' : '');
|
14510 |
-
}, timeout);
|
14511 |
-
}
|
14512 |
-
});
|
14513 |
-
};
|
14514 |
-
|
14515 |
-
/***/ }),
|
14516 |
-
/* 56 */
|
14517 |
-
/***/ (function(module, exports, __webpack_require__) {
|
14518 |
-
|
14519 |
-
"use strict";
|
14520 |
-
|
14521 |
-
|
14522 |
-
Object.defineProperty(exports, "__esModule", {
|
14523 |
-
value: true
|
14524 |
-
});
|
14525 |
-
exports.parseContent = exports.resolvePseudoContent = exports.popCounters = exports.parseCounterReset = exports.TOKEN_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = undefined;
|
14526 |
-
|
14527 |
-
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
14528 |
-
|
14529 |
-
var _ListItem = __webpack_require__(14);
|
14530 |
-
|
14531 |
-
var _listStyle = __webpack_require__(8);
|
14532 |
-
|
14533 |
-
var PSEUDO_CONTENT_ITEM_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = {
|
14534 |
-
TEXT: 0,
|
14535 |
-
IMAGE: 1
|
14536 |
-
};
|
14537 |
-
|
14538 |
-
var TOKEN_TYPE = exports.TOKEN_TYPE = {
|
14539 |
-
STRING: 0,
|
14540 |
-
ATTRIBUTE: 1,
|
14541 |
-
URL: 2,
|
14542 |
-
COUNTER: 3,
|
14543 |
-
COUNTERS: 4,
|
14544 |
-
OPENQUOTE: 5,
|
14545 |
-
CLOSEQUOTE: 6
|
14546 |
-
};
|
14547 |
-
|
14548 |
-
var parseCounterReset = exports.parseCounterReset = function parseCounterReset(style, data) {
|
14549 |
-
if (!style || !style.counterReset || style.counterReset === 'none') {
|
14550 |
-
return [];
|
14551 |
-
}
|
14552 |
-
|
14553 |
-
var counterNames = [];
|
14554 |
-
var counterResets = style.counterReset.split(/\s*,\s*/);
|
14555 |
-
var lenCounterResets = counterResets.length;
|
14556 |
-
|
14557 |
-
for (var i = 0; i < lenCounterResets; i++) {
|
14558 |
-
var _counterResets$i$spli = counterResets[i].split(/\s+/),
|
14559 |
-
_counterResets$i$spli2 = _slicedToArray(_counterResets$i$spli, 2),
|
14560 |
-
counterName = _counterResets$i$spli2[0],
|
14561 |
-
initialValue = _counterResets$i$spli2[1];
|
14562 |
-
|
14563 |
-
counterNames.push(counterName);
|
14564 |
-
var counter = data.counters[counterName];
|
14565 |
-
if (!counter) {
|
14566 |
-
counter = data.counters[counterName] = [];
|
14567 |
-
}
|
14568 |
-
counter.push(parseInt(initialValue || 0, 10));
|
14569 |
-
}
|
14570 |
-
|
14571 |
-
return counterNames;
|
14572 |
-
};
|
14573 |
-
|
14574 |
-
var popCounters = exports.popCounters = function popCounters(counterNames, data) {
|
14575 |
-
var lenCounters = counterNames.length;
|
14576 |
-
for (var i = 0; i < lenCounters; i++) {
|
14577 |
-
data.counters[counterNames[i]].pop();
|
14578 |
-
}
|
14579 |
-
};
|
14580 |
-
|
14581 |
-
var resolvePseudoContent = exports.resolvePseudoContent = function resolvePseudoContent(node, style, data) {
|
14582 |
-
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
14583 |
-
return null;
|
14584 |
-
}
|
14585 |
-
|
14586 |
-
var tokens = parseContent(style.content);
|
14587 |
-
|
14588 |
-
var len = tokens.length;
|
14589 |
-
var contentItems = [];
|
14590 |
-
var s = '';
|
14591 |
-
|
14592 |
-
// increment the counter (if there is a "counter-increment" declaration)
|
14593 |
-
var counterIncrement = style.counterIncrement;
|
14594 |
-
if (counterIncrement && counterIncrement !== 'none') {
|
14595 |
-
var _counterIncrement$spl = counterIncrement.split(/\s+/),
|
14596 |
-
_counterIncrement$spl2 = _slicedToArray(_counterIncrement$spl, 2),
|
14597 |
-
counterName = _counterIncrement$spl2[0],
|
14598 |
-
incrementValue = _counterIncrement$spl2[1];
|
14599 |
-
|
14600 |
-
var counter = data.counters[counterName];
|
14601 |
-
if (counter) {
|
14602 |
-
counter[counter.length - 1] += incrementValue === undefined ? 1 : parseInt(incrementValue, 10);
|
14603 |
-
}
|
14604 |
-
}
|
14605 |
-
|
14606 |
-
// build the content string
|
14607 |
-
for (var i = 0; i < len; i++) {
|
14608 |
-
var token = tokens[i];
|
14609 |
-
switch (token.type) {
|
14610 |
-
case TOKEN_TYPE.STRING:
|
14611 |
-
s += token.value || '';
|
14612 |
-
break;
|
14613 |
-
|
14614 |
-
case TOKEN_TYPE.ATTRIBUTE:
|
14615 |
-
if (node instanceof HTMLElement && token.value) {
|
14616 |
-
s += node.getAttribute(token.value) || '';
|
14617 |
-
}
|
14618 |
-
break;
|
14619 |
-
|
14620 |
-
case TOKEN_TYPE.COUNTER:
|
14621 |
-
var _counter = data.counters[token.name || ''];
|
14622 |
-
if (_counter) {
|
14623 |
-
s += formatCounterValue([_counter[_counter.length - 1]], '', token.format);
|
14624 |
-
}
|
14625 |
-
break;
|
14626 |
-
|
14627 |
-
case TOKEN_TYPE.COUNTERS:
|
14628 |
-
var _counters = data.counters[token.name || ''];
|
14629 |
-
if (_counters) {
|
14630 |
-
s += formatCounterValue(_counters, token.glue, token.format);
|
14631 |
-
}
|
14632 |
-
break;
|
14633 |
-
|
14634 |
-
case TOKEN_TYPE.OPENQUOTE:
|
14635 |
-
s += getQuote(style, true, data.quoteDepth);
|
14636 |
-
data.quoteDepth++;
|
14637 |
-
break;
|
14638 |
-
|
14639 |
-
case TOKEN_TYPE.CLOSEQUOTE:
|
14640 |
-
data.quoteDepth--;
|
14641 |
-
s += getQuote(style, false, data.quoteDepth);
|
14642 |
-
break;
|
14643 |
-
|
14644 |
-
case TOKEN_TYPE.URL:
|
14645 |
-
if (s) {
|
14646 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
14647 |
-
s = '';
|
14648 |
-
}
|
14649 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.IMAGE, value: token.value || '' });
|
14650 |
-
break;
|
14651 |
-
}
|
14652 |
-
}
|
14653 |
-
|
14654 |
-
if (s) {
|
14655 |
-
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
14656 |
-
}
|
14657 |
-
|
14658 |
-
return contentItems;
|
14659 |
-
};
|
14660 |
-
|
14661 |
-
var parseContent = exports.parseContent = function parseContent(content, cache) {
|
14662 |
-
if (cache && cache[content]) {
|
14663 |
-
return cache[content];
|
14664 |
-
}
|
14665 |
-
|
14666 |
-
var tokens = [];
|
14667 |
-
var len = content.length;
|
14668 |
-
|
14669 |
-
var isString = false;
|
14670 |
-
var isEscaped = false;
|
14671 |
-
var isFunction = false;
|
14672 |
-
var str = '';
|
14673 |
-
var functionName = '';
|
14674 |
-
var args = [];
|
14675 |
-
|
14676 |
-
for (var i = 0; i < len; i++) {
|
14677 |
-
var c = content.charAt(i);
|
14678 |
-
|
14679 |
-
switch (c) {
|
14680 |
-
case "'":
|
14681 |
-
case '"':
|
14682 |
-
if (isEscaped) {
|
14683 |
-
str += c;
|
14684 |
-
} else {
|
14685 |
-
isString = !isString;
|
14686 |
-
if (!isFunction && !isString) {
|
14687 |
-
tokens.push({ type: TOKEN_TYPE.STRING, value: str });
|
14688 |
-
str = '';
|
14689 |
-
}
|
14690 |
-
}
|
14691 |
-
break;
|
14692 |
-
|
14693 |
-
case '\\':
|
14694 |
-
if (isEscaped) {
|
14695 |
-
str += c;
|
14696 |
-
isEscaped = false;
|
14697 |
-
} else {
|
14698 |
-
isEscaped = true;
|
14699 |
-
}
|
14700 |
-
break;
|
14701 |
-
|
14702 |
-
case '(':
|
14703 |
-
if (isString) {
|
14704 |
-
str += c;
|
14705 |
-
} else {
|
14706 |
-
isFunction = true;
|
14707 |
-
functionName = str;
|
14708 |
-
str = '';
|
14709 |
-
args = [];
|
14710 |
-
}
|
14711 |
-
break;
|
14712 |
-
|
14713 |
-
case ')':
|
14714 |
-
if (isString) {
|
14715 |
-
str += c;
|
14716 |
-
} else if (isFunction) {
|
14717 |
-
if (str) {
|
14718 |
-
args.push(str);
|
14719 |
-
}
|
14720 |
-
|
14721 |
-
switch (functionName) {
|
14722 |
-
case 'attr':
|
14723 |
-
if (args.length > 0) {
|
14724 |
-
tokens.push({ type: TOKEN_TYPE.ATTRIBUTE, value: args[0] });
|
14725 |
-
}
|
14726 |
-
break;
|
14727 |
-
|
14728 |
-
case 'counter':
|
14729 |
-
if (args.length > 0) {
|
14730 |
-
var counter = {
|
14731 |
-
type: TOKEN_TYPE.COUNTER,
|
14732 |
-
name: args[0]
|
14733 |
-
};
|
14734 |
-
if (args.length > 1) {
|
14735 |
-
counter.format = args[1];
|
14736 |
-
}
|
14737 |
-
tokens.push(counter);
|
14738 |
-
}
|
14739 |
-
break;
|
14740 |
-
|
14741 |
-
case 'counters':
|
14742 |
-
if (args.length > 0) {
|
14743 |
-
var _counters2 = {
|
14744 |
-
type: TOKEN_TYPE.COUNTERS,
|
14745 |
-
name: args[0]
|
14746 |
-
};
|
14747 |
-
if (args.length > 1) {
|
14748 |
-
_counters2.glue = args[1];
|
14749 |
-
}
|
14750 |
-
if (args.length > 2) {
|
14751 |
-
_counters2.format = args[2];
|
14752 |
-
}
|
14753 |
-
tokens.push(_counters2);
|
14754 |
-
}
|
14755 |
-
break;
|
14756 |
-
|
14757 |
-
case 'url':
|
14758 |
-
if (args.length > 0) {
|
14759 |
-
tokens.push({ type: TOKEN_TYPE.URL, value: args[0] });
|
14760 |
-
}
|
14761 |
-
break;
|
14762 |
-
}
|
14763 |
-
|
14764 |
-
isFunction = false;
|
14765 |
-
str = '';
|
14766 |
-
}
|
14767 |
-
break;
|
14768 |
-
|
14769 |
-
case ',':
|
14770 |
-
if (isString) {
|
14771 |
-
str += c;
|
14772 |
-
} else if (isFunction) {
|
14773 |
-
args.push(str);
|
14774 |
-
str = '';
|
14775 |
-
}
|
14776 |
-
break;
|
14777 |
-
|
14778 |
-
case ' ':
|
14779 |
-
case '\t':
|
14780 |
-
if (isString) {
|
14781 |
-
str += c;
|
14782 |
-
} else if (str) {
|
14783 |
-
addOtherToken(tokens, str);
|
14784 |
-
str = '';
|
14785 |
-
}
|
14786 |
-
break;
|
14787 |
-
|
14788 |
-
default:
|
14789 |
-
str += c;
|
14790 |
-
}
|
14791 |
-
|
14792 |
-
if (c !== '\\') {
|
14793 |
-
isEscaped = false;
|
14794 |
-
}
|
14795 |
-
}
|
14796 |
-
|
14797 |
-
if (str) {
|
14798 |
-
addOtherToken(tokens, str);
|
14799 |
-
}
|
14800 |
-
|
14801 |
-
if (cache) {
|
14802 |
-
cache[content] = tokens;
|
14803 |
-
}
|
14804 |
-
|
14805 |
-
return tokens;
|
14806 |
-
};
|
14807 |
-
|
14808 |
-
var addOtherToken = function addOtherToken(tokens, identifier) {
|
14809 |
-
switch (identifier) {
|
14810 |
-
case 'open-quote':
|
14811 |
-
tokens.push({ type: TOKEN_TYPE.OPENQUOTE });
|
14812 |
-
break;
|
14813 |
-
case 'close-quote':
|
14814 |
-
tokens.push({ type: TOKEN_TYPE.CLOSEQUOTE });
|
14815 |
-
break;
|
14816 |
-
}
|
14817 |
-
};
|
14818 |
-
|
14819 |
-
var getQuote = function getQuote(style, isOpening, quoteDepth) {
|
14820 |
-
var quotes = style.quotes ? style.quotes.split(/\s+/) : ["'\"'", "'\"'"];
|
14821 |
-
var idx = quoteDepth * 2;
|
14822 |
-
if (idx >= quotes.length) {
|
14823 |
-
idx = quotes.length - 2;
|
14824 |
-
}
|
14825 |
-
if (!isOpening) {
|
14826 |
-
++idx;
|
14827 |
-
}
|
14828 |
-
return quotes[idx].replace(/^["']|["']$/g, '');
|
14829 |
-
};
|
14830 |
-
|
14831 |
-
var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
14832 |
-
var len = counter.length;
|
14833 |
-
var result = '';
|
14834 |
-
|
14835 |
-
for (var i = 0; i < len; i++) {
|
14836 |
-
if (i > 0) {
|
14837 |
-
result += glue || '';
|
14838 |
-
}
|
14839 |
-
result += (0, _ListItem.createCounterText)(counter[i], (0, _listStyle.parseListStyleType)(format || 'decimal'), false);
|
14840 |
-
}
|
14841 |
-
|
14842 |
-
return result;
|
14843 |
-
};
|
14844 |
-
|
14845 |
-
/***/ })
|
14846 |
-
/******/ ]);
|
14847 |
});
|
|
|
14848 |
|
14849 |
/***/ },
|
14850 |
|
7595 |
/***/ 536:
|
7596 |
/***/ function(module, exports, __webpack_require__) {
|
7597 |
|
7598 |
+
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
7599 |
+
html2canvas 0.5.0-alpha2 <http://html2canvas.hertzen.com>
|
7600 |
+
Copyright (c) 2015 Niklas von Hertzen
|
7601 |
+
|
7602 |
+
Released under MIT License
|
7603 |
+
*/
|
7604 |
+
|
7605 |
+
!function(e){if(true)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.html2canvas=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
7606 |
+
(function (process,global){
|
7607 |
/*!
|
7608 |
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
7609 |
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
7610 |
+
* @license Licensed under MIT license
|
7611 |
+
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
|
7612 |
+
* @version 2.0.1
|
7613 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7614 |
|
7615 |
+
(function() {
|
7616 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
7617 |
|
7618 |
+
function $$utils$$objectOrFunction(x) {
|
7619 |
+
return typeof x === 'function' || (typeof x === 'object' && x !== null);
|
|
|
|
|
|
|
7620 |
}
|
|
|
|
|
7621 |
|
7622 |
+
function $$utils$$isFunction(x) {
|
7623 |
+
return typeof x === 'function';
|
|
|
|
|
|
|
7624 |
}
|
|
|
|
|
7625 |
|
7626 |
+
function $$utils$$isMaybeThenable(x) {
|
7627 |
+
return typeof x === 'object' && x !== null;
|
|
|
|
|
|
|
7628 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
7629 |
|
7630 |
+
var $$utils$$_isArray;
|
|
|
|
|
|
|
7631 |
|
7632 |
+
if (!Array.isArray) {
|
7633 |
+
$$utils$$_isArray = function (x) {
|
7634 |
+
return Object.prototype.toString.call(x) === '[object Array]';
|
7635 |
+
};
|
7636 |
+
} else {
|
7637 |
+
$$utils$$_isArray = Array.isArray;
|
7638 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7639 |
|
7640 |
+
var $$utils$$isArray = $$utils$$_isArray;
|
7641 |
+
var $$utils$$now = Date.now || function() { return new Date().getTime(); };
|
7642 |
+
function $$utils$$F() { }
|
7643 |
|
7644 |
+
var $$utils$$o_create = (Object.create || function (o) {
|
7645 |
+
if (arguments.length > 1) {
|
7646 |
+
throw new Error('Second argument not supported');
|
7647 |
+
}
|
7648 |
+
if (typeof o !== 'object') {
|
7649 |
+
throw new TypeError('Argument must be an object');
|
7650 |
+
}
|
7651 |
+
$$utils$$F.prototype = o;
|
7652 |
+
return new $$utils$$F();
|
7653 |
+
});
|
7654 |
|
7655 |
+
var $$asap$$len = 0;
|
7656 |
|
7657 |
+
var $$asap$$default = function asap(callback, arg) {
|
7658 |
+
$$asap$$queue[$$asap$$len] = callback;
|
7659 |
+
$$asap$$queue[$$asap$$len + 1] = arg;
|
7660 |
+
$$asap$$len += 2;
|
7661 |
+
if ($$asap$$len === 2) {
|
7662 |
+
// If len is 1, that means that we need to schedule an async flush.
|
7663 |
+
// If additional callbacks are queued before the queue is flushed, they
|
7664 |
+
// will be processed by this flush that we are scheduling.
|
7665 |
+
$$asap$$scheduleFlush();
|
7666 |
+
}
|
7667 |
+
};
|
7668 |
|
7669 |
+
var $$asap$$browserGlobal = (typeof window !== 'undefined') ? window : {};
|
7670 |
+
var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver;
|
|
|
|
|
7671 |
|
7672 |
+
// test for web worker but not in IE10
|
7673 |
+
var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
7674 |
+
typeof importScripts !== 'undefined' &&
|
7675 |
+
typeof MessageChannel !== 'undefined';
|
7676 |
|
7677 |
+
// node
|
7678 |
+
function $$asap$$useNextTick() {
|
7679 |
+
return function() {
|
7680 |
+
process.nextTick($$asap$$flush);
|
7681 |
+
};
|
7682 |
+
}
|
7683 |
|
7684 |
+
function $$asap$$useMutationObserver() {
|
7685 |
+
var iterations = 0;
|
7686 |
+
var observer = new $$asap$$BrowserMutationObserver($$asap$$flush);
|
7687 |
+
var node = document.createTextNode('');
|
7688 |
+
observer.observe(node, { characterData: true });
|
7689 |
|
7690 |
+
return function() {
|
7691 |
+
node.data = (iterations = ++iterations % 2);
|
7692 |
+
};
|
7693 |
+
}
|
7694 |
|
7695 |
+
// web worker
|
7696 |
+
function $$asap$$useMessageChannel() {
|
7697 |
+
var channel = new MessageChannel();
|
7698 |
+
channel.port1.onmessage = $$asap$$flush;
|
7699 |
+
return function () {
|
7700 |
+
channel.port2.postMessage(0);
|
7701 |
+
};
|
7702 |
+
}
|
7703 |
|
7704 |
+
function $$asap$$useSetTimeout() {
|
7705 |
+
return function() {
|
7706 |
+
setTimeout($$asap$$flush, 1);
|
7707 |
+
};
|
7708 |
+
}
|
7709 |
|
7710 |
+
var $$asap$$queue = new Array(1000);
|
7711 |
|
7712 |
+
function $$asap$$flush() {
|
7713 |
+
for (var i = 0; i < $$asap$$len; i+=2) {
|
7714 |
+
var callback = $$asap$$queue[i];
|
7715 |
+
var arg = $$asap$$queue[i+1];
|
7716 |
|
7717 |
+
callback(arg);
|
|
|
7718 |
|
7719 |
+
$$asap$$queue[i] = undefined;
|
7720 |
+
$$asap$$queue[i+1] = undefined;
|
7721 |
+
}
|
7722 |
|
7723 |
+
$$asap$$len = 0;
|
|
|
|
|
|
|
7724 |
}
|
7725 |
|
7726 |
+
var $$asap$$scheduleFlush;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7727 |
|
7728 |
+
// Decide what async method to use to triggering processing of queued callbacks:
|
7729 |
+
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
|
7730 |
+
$$asap$$scheduleFlush = $$asap$$useNextTick();
|
7731 |
+
} else if ($$asap$$BrowserMutationObserver) {
|
7732 |
+
$$asap$$scheduleFlush = $$asap$$useMutationObserver();
|
7733 |
+
} else if ($$asap$$isWorker) {
|
7734 |
+
$$asap$$scheduleFlush = $$asap$$useMessageChannel();
|
7735 |
+
} else {
|
7736 |
+
$$asap$$scheduleFlush = $$asap$$useSetTimeout();
|
7737 |
+
}
|
7738 |
|
7739 |
+
function $$$internal$$noop() {}
|
7740 |
+
var $$$internal$$PENDING = void 0;
|
7741 |
+
var $$$internal$$FULFILLED = 1;
|
7742 |
+
var $$$internal$$REJECTED = 2;
|
7743 |
+
var $$$internal$$GET_THEN_ERROR = new $$$internal$$ErrorObject();
|
7744 |
|
7745 |
+
function $$$internal$$selfFullfillment() {
|
7746 |
+
return new TypeError("You cannot resolve a promise with itself");
|
7747 |
+
}
|
|
|
|
|
|
|
7748 |
|
7749 |
+
function $$$internal$$cannotReturnOwn() {
|
7750 |
+
return new TypeError('A promises callback cannot return that same promise.')
|
7751 |
+
}
|
7752 |
|
7753 |
+
function $$$internal$$getThen(promise) {
|
7754 |
+
try {
|
7755 |
+
return promise.then;
|
7756 |
+
} catch(error) {
|
7757 |
+
$$$internal$$GET_THEN_ERROR.error = error;
|
7758 |
+
return $$$internal$$GET_THEN_ERROR;
|
7759 |
+
}
|
7760 |
+
}
|
7761 |
|
7762 |
+
function $$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
|
7763 |
+
try {
|
7764 |
+
then.call(value, fulfillmentHandler, rejectionHandler);
|
7765 |
+
} catch(e) {
|
7766 |
+
return e;
|
7767 |
+
}
|
7768 |
}
|
|
|
7769 |
|
7770 |
+
function $$$internal$$handleForeignThenable(promise, thenable, then) {
|
7771 |
+
$$asap$$default(function(promise) {
|
7772 |
+
var sealed = false;
|
7773 |
+
var error = $$$internal$$tryThen(then, thenable, function(value) {
|
7774 |
+
if (sealed) { return; }
|
7775 |
+
sealed = true;
|
7776 |
+
if (thenable !== value) {
|
7777 |
+
$$$internal$$resolve(promise, value);
|
7778 |
+
} else {
|
7779 |
+
$$$internal$$fulfill(promise, value);
|
7780 |
+
}
|
7781 |
+
}, function(reason) {
|
7782 |
+
if (sealed) { return; }
|
7783 |
+
sealed = true;
|
7784 |
|
7785 |
+
$$$internal$$reject(promise, reason);
|
7786 |
+
}, 'Settle: ' + (promise._label || ' unknown promise'));
|
7787 |
|
7788 |
+
if (!sealed && error) {
|
7789 |
+
sealed = true;
|
7790 |
+
$$$internal$$reject(promise, error);
|
7791 |
+
}
|
7792 |
+
}, promise);
|
|
|
|
|
|
|
|
|
|
|
|
|
7793 |
}
|
|
|
7794 |
|
7795 |
+
function $$$internal$$handleOwnThenable(promise, thenable) {
|
7796 |
+
if (thenable._state === $$$internal$$FULFILLED) {
|
7797 |
+
$$$internal$$fulfill(promise, thenable._result);
|
7798 |
+
} else if (promise._state === $$$internal$$REJECTED) {
|
7799 |
+
$$$internal$$reject(promise, thenable._result);
|
7800 |
+
} else {
|
7801 |
+
$$$internal$$subscribe(thenable, undefined, function(value) {
|
7802 |
+
$$$internal$$resolve(promise, value);
|
7803 |
+
}, function(reason) {
|
7804 |
+
$$$internal$$reject(promise, reason);
|
7805 |
+
});
|
7806 |
+
}
|
7807 |
}
|
7808 |
|
7809 |
+
function $$$internal$$handleMaybeThenable(promise, maybeThenable) {
|
7810 |
+
if (maybeThenable.constructor === promise.constructor) {
|
7811 |
+
$$$internal$$handleOwnThenable(promise, maybeThenable);
|
7812 |
+
} else {
|
7813 |
+
var then = $$$internal$$getThen(maybeThenable);
|
7814 |
+
|
7815 |
+
if (then === $$$internal$$GET_THEN_ERROR) {
|
7816 |
+
$$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error);
|
7817 |
+
} else if (then === undefined) {
|
7818 |
+
$$$internal$$fulfill(promise, maybeThenable);
|
7819 |
+
} else if ($$utils$$isFunction(then)) {
|
7820 |
+
$$$internal$$handleForeignThenable(promise, maybeThenable, then);
|
7821 |
+
} else {
|
7822 |
+
$$$internal$$fulfill(promise, maybeThenable);
|
7823 |
+
}
|
7824 |
+
}
|
7825 |
}
|
7826 |
|
7827 |
+
function $$$internal$$resolve(promise, value) {
|
7828 |
+
if (promise === value) {
|
7829 |
+
$$$internal$$reject(promise, $$$internal$$selfFullfillment());
|
7830 |
+
} else if ($$utils$$objectOrFunction(value)) {
|
7831 |
+
$$$internal$$handleMaybeThenable(promise, value);
|
7832 |
+
} else {
|
7833 |
+
$$$internal$$fulfill(promise, value);
|
7834 |
+
}
|
7835 |
}
|
7836 |
|
7837 |
+
function $$$internal$$publishRejection(promise) {
|
7838 |
+
if (promise._onerror) {
|
7839 |
+
promise._onerror(promise._result);
|
7840 |
+
}
|
7841 |
+
|
7842 |
+
$$$internal$$publish(promise);
|
7843 |
}
|
7844 |
|
7845 |
+
function $$$internal$$fulfill(promise, value) {
|
7846 |
+
if (promise._state !== $$$internal$$PENDING) { return; }
|
7847 |
|
7848 |
+
promise._result = value;
|
7849 |
+
promise._state = $$$internal$$FULFILLED;
|
|
|
7850 |
|
7851 |
+
if (promise._subscribers.length === 0) {
|
7852 |
+
} else {
|
7853 |
+
$$asap$$default($$$internal$$publish, promise);
|
7854 |
+
}
|
7855 |
+
}
|
7856 |
|
7857 |
+
function $$$internal$$reject(promise, reason) {
|
7858 |
+
if (promise._state !== $$$internal$$PENDING) { return; }
|
7859 |
+
promise._state = $$$internal$$REJECTED;
|
7860 |
+
promise._result = reason;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7861 |
|
7862 |
+
$$asap$$default($$$internal$$publishRejection, promise);
|
7863 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7864 |
|
7865 |
+
function $$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
|
7866 |
+
var subscribers = parent._subscribers;
|
7867 |
+
var length = subscribers.length;
|
|
|
|
|
|
|
7868 |
|
7869 |
+
parent._onerror = null;
|
7870 |
+
|
7871 |
+
subscribers[length] = child;
|
7872 |
+
subscribers[length + $$$internal$$FULFILLED] = onFulfillment;
|
7873 |
+
subscribers[length + $$$internal$$REJECTED] = onRejection;
|
7874 |
+
|
7875 |
+
if (length === 0 && parent._state) {
|
7876 |
+
$$asap$$default($$$internal$$publish, parent);
|
7877 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7878 |
}
|
|
|
7879 |
|
7880 |
+
function $$$internal$$publish(promise) {
|
7881 |
+
var subscribers = promise._subscribers;
|
7882 |
+
var settled = promise._state;
|
7883 |
|
7884 |
+
if (subscribers.length === 0) { return; }
|
7885 |
|
7886 |
+
var child, callback, detail = promise._result;
|
7887 |
|
7888 |
+
for (var i = 0; i < subscribers.length; i += 3) {
|
7889 |
+
child = subscribers[i];
|
7890 |
+
callback = subscribers[i + settled];
|
|
|
7891 |
|
7892 |
+
if (child) {
|
7893 |
+
$$$internal$$invokeCallback(settled, child, callback, detail);
|
7894 |
+
} else {
|
7895 |
+
callback(detail);
|
7896 |
+
}
|
7897 |
+
}
|
7898 |
|
7899 |
+
promise._subscribers.length = 0;
|
7900 |
+
}
|
7901 |
|
7902 |
+
function $$$internal$$ErrorObject() {
|
7903 |
+
this.error = null;
|
7904 |
+
}
|
7905 |
|
7906 |
+
var $$$internal$$TRY_CATCH_ERROR = new $$$internal$$ErrorObject();
|
7907 |
|
7908 |
+
function $$$internal$$tryCatch(callback, detail) {
|
7909 |
+
try {
|
7910 |
+
return callback(detail);
|
7911 |
+
} catch(e) {
|
7912 |
+
$$$internal$$TRY_CATCH_ERROR.error = e;
|
7913 |
+
return $$$internal$$TRY_CATCH_ERROR;
|
7914 |
+
}
|
7915 |
+
}
|
7916 |
|
7917 |
+
function $$$internal$$invokeCallback(settled, promise, callback, detail) {
|
7918 |
+
var hasCallback = $$utils$$isFunction(callback),
|
7919 |
+
value, error, succeeded, failed;
|
7920 |
|
7921 |
+
if (hasCallback) {
|
7922 |
+
value = $$$internal$$tryCatch(callback, detail);
|
|
|
|
|
7923 |
|
7924 |
+
if (value === $$$internal$$TRY_CATCH_ERROR) {
|
7925 |
+
failed = true;
|
7926 |
+
error = value.error;
|
7927 |
+
value = null;
|
7928 |
+
} else {
|
7929 |
+
succeeded = true;
|
7930 |
+
}
|
7931 |
|
7932 |
+
if (promise === value) {
|
7933 |
+
$$$internal$$reject(promise, $$$internal$$cannotReturnOwn());
|
7934 |
+
return;
|
|
|
7935 |
}
|
7936 |
+
|
7937 |
+
} else {
|
7938 |
+
value = detail;
|
7939 |
+
succeeded = true;
|
7940 |
+
}
|
7941 |
+
|
7942 |
+
if (promise._state !== $$$internal$$PENDING) {
|
7943 |
+
// noop
|
7944 |
+
} else if (hasCallback && succeeded) {
|
7945 |
+
$$$internal$$resolve(promise, value);
|
7946 |
+
} else if (failed) {
|
7947 |
+
$$$internal$$reject(promise, error);
|
7948 |
+
} else if (settled === $$$internal$$FULFILLED) {
|
7949 |
+
$$$internal$$fulfill(promise, value);
|
7950 |
+
} else if (settled === $$$internal$$REJECTED) {
|
7951 |
+
$$$internal$$reject(promise, value);
|
7952 |
+
}
|
7953 |
}
|
7954 |
|
7955 |
+
function $$$internal$$initializePromise(promise, resolver) {
|
7956 |
+
try {
|
7957 |
+
resolver(function resolvePromise(value){
|
7958 |
+
$$$internal$$resolve(promise, value);
|
7959 |
+
}, function rejectPromise(reason) {
|
7960 |
+
$$$internal$$reject(promise, reason);
|
7961 |
+
});
|
7962 |
+
} catch(e) {
|
7963 |
+
$$$internal$$reject(promise, e);
|
7964 |
+
}
|
7965 |
+
}
|
|
|
|
|
|
|
|
|
|
|
7966 |
|
7967 |
+
function $$$enumerator$$makeSettledResult(state, position, value) {
|
7968 |
+
if (state === $$$internal$$FULFILLED) {
|
7969 |
+
return {
|
7970 |
+
state: 'fulfilled',
|
7971 |
+
value: value
|
7972 |
+
};
|
7973 |
+
} else {
|
7974 |
+
return {
|
7975 |
+
state: 'rejected',
|
7976 |
+
reason: value
|
7977 |
+
};
|
7978 |
+
}
|
7979 |
+
}
|
7980 |
|
7981 |
+
function $$$enumerator$$Enumerator(Constructor, input, abortOnReject, label) {
|
7982 |
+
this._instanceConstructor = Constructor;
|
7983 |
+
this.promise = new Constructor($$$internal$$noop, label);
|
7984 |
+
this._abortOnReject = abortOnReject;
|
7985 |
|
7986 |
+
if (this._validateInput(input)) {
|
7987 |
+
this._input = input;
|
7988 |
+
this.length = input.length;
|
7989 |
+
this._remaining = input.length;
|
7990 |
|
7991 |
+
this._init();
|
|
|
|
|
|
|
7992 |
|
7993 |
+
if (this.length === 0) {
|
7994 |
+
$$$internal$$fulfill(this.promise, this._result);
|
7995 |
+
} else {
|
7996 |
+
this.length = this.length || 0;
|
7997 |
+
this._enumerate();
|
7998 |
+
if (this._remaining === 0) {
|
7999 |
+
$$$internal$$fulfill(this.promise, this._result);
|
8000 |
+
}
|
8001 |
+
}
|
8002 |
+
} else {
|
8003 |
+
$$$internal$$reject(this.promise, this._validationError());
|
8004 |
+
}
|
|
|
8005 |
}
|
|
|
8006 |
|
8007 |
+
$$$enumerator$$Enumerator.prototype._validateInput = function(input) {
|
8008 |
+
return $$utils$$isArray(input);
|
8009 |
+
};
|
8010 |
+
|
8011 |
+
$$$enumerator$$Enumerator.prototype._validationError = function() {
|
8012 |
+
return new Error('Array Methods must be provided an Array');
|
8013 |
+
};
|
8014 |
+
|
8015 |
+
$$$enumerator$$Enumerator.prototype._init = function() {
|
8016 |
+
this._result = new Array(this.length);
|
8017 |
+
};
|
8018 |
|
8019 |
+
var $$$enumerator$$default = $$$enumerator$$Enumerator;
|
8020 |
|
8021 |
+
$$$enumerator$$Enumerator.prototype._enumerate = function() {
|
8022 |
+
var length = this.length;
|
8023 |
+
var promise = this.promise;
|
8024 |
+
var input = this._input;
|
8025 |
|
8026 |
+
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
|
8027 |
+
this._eachEntry(input[i], i);
|
8028 |
+
}
|
8029 |
+
};
|
8030 |
+
|
8031 |
+
$$$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
|
8032 |
+
var c = this._instanceConstructor;
|
8033 |
+
if ($$utils$$isMaybeThenable(entry)) {
|
8034 |
+
if (entry.constructor === c && entry._state !== $$$internal$$PENDING) {
|
8035 |
+
entry._onerror = null;
|
8036 |
+
this._settledAt(entry._state, i, entry._result);
|
8037 |
+
} else {
|
8038 |
+
this._willSettleAt(c.resolve(entry), i);
|
8039 |
+
}
|
8040 |
+
} else {
|
8041 |
+
this._remaining--;
|
8042 |
+
this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry);
|
8043 |
+
}
|
8044 |
+
};
|
8045 |
|
8046 |
+
$$$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
|
8047 |
+
var promise = this.promise;
|
8048 |
|
8049 |
+
if (promise._state === $$$internal$$PENDING) {
|
8050 |
+
this._remaining--;
|
8051 |
|
8052 |
+
if (this._abortOnReject && state === $$$internal$$REJECTED) {
|
8053 |
+
$$$internal$$reject(promise, value);
|
8054 |
+
} else {
|
8055 |
+
this._result[i] = this._makeResult(state, i, value);
|
8056 |
+
}
|
8057 |
+
}
|
8058 |
|
8059 |
+
if (this._remaining === 0) {
|
8060 |
+
$$$internal$$fulfill(promise, this._result);
|
8061 |
+
}
|
8062 |
+
};
|
8063 |
|
8064 |
+
$$$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) {
|
8065 |
+
return value;
|
8066 |
+
};
|
8067 |
|
8068 |
+
$$$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
|
8069 |
+
var enumerator = this;
|
8070 |
|
8071 |
+
$$$internal$$subscribe(promise, undefined, function(value) {
|
8072 |
+
enumerator._settledAt($$$internal$$FULFILLED, i, value);
|
8073 |
+
}, function(reason) {
|
8074 |
+
enumerator._settledAt($$$internal$$REJECTED, i, reason);
|
8075 |
+
});
|
8076 |
+
};
|
8077 |
|
8078 |
+
var $$promise$all$$default = function all(entries, label) {
|
8079 |
+
return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise;
|
8080 |
+
};
|
8081 |
|
8082 |
+
var $$promise$race$$default = function race(entries, label) {
|
8083 |
+
/*jshint validthis:true */
|
8084 |
+
var Constructor = this;
|
8085 |
|
8086 |
+
var promise = new Constructor($$$internal$$noop, label);
|
8087 |
|
8088 |
+
if (!$$utils$$isArray(entries)) {
|
8089 |
+
$$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
|
8090 |
+
return promise;
|
8091 |
+
}
|
8092 |
|
8093 |
+
var length = entries.length;
|
8094 |
|
8095 |
+
function onFulfillment(value) {
|
8096 |
+
$$$internal$$resolve(promise, value);
|
8097 |
+
}
|
8098 |
|
8099 |
+
function onRejection(reason) {
|
8100 |
+
$$$internal$$reject(promise, reason);
|
8101 |
+
}
|
8102 |
|
8103 |
+
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
|
8104 |
+
$$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
8105 |
+
}
|
8106 |
|
8107 |
+
return promise;
|
8108 |
+
};
|
8109 |
|
8110 |
+
var $$promise$resolve$$default = function resolve(object, label) {
|
8111 |
+
/*jshint validthis:true */
|
8112 |
+
var Constructor = this;
|
8113 |
|
8114 |
+
if (object && typeof object === 'object' && object.constructor === Constructor) {
|
8115 |
+
return object;
|
8116 |
+
}
|
8117 |
|
8118 |
+
var promise = new Constructor($$$internal$$noop, label);
|
8119 |
+
$$$internal$$resolve(promise, object);
|
8120 |
+
return promise;
|
8121 |
+
};
|
8122 |
|
8123 |
+
var $$promise$reject$$default = function reject(reason, label) {
|
8124 |
+
/*jshint validthis:true */
|
8125 |
+
var Constructor = this;
|
8126 |
+
var promise = new Constructor($$$internal$$noop, label);
|
8127 |
+
$$$internal$$reject(promise, reason);
|
8128 |
+
return promise;
|
8129 |
+
};
|
8130 |
|
8131 |
+
var $$es6$promise$promise$$counter = 0;
|
8132 |
|
8133 |
+
function $$es6$promise$promise$$needsResolver() {
|
8134 |
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
8135 |
+
}
|
8136 |
|
8137 |
+
function $$es6$promise$promise$$needsNew() {
|
8138 |
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
8139 |
+
}
|
8140 |
|
8141 |
+
var $$es6$promise$promise$$default = $$es6$promise$promise$$Promise;
|
8142 |
|
8143 |
+
/**
|
8144 |
+
Promise objects represent the eventual result of an asynchronous operation. The
|
8145 |
+
primary way of interacting with a promise is through its `then` method, which
|
8146 |
+
registers callbacks to receive either a promise’s eventual value or the reason
|
8147 |
+
why the promise cannot be fulfilled.
|
8148 |
|
8149 |
+
Terminology
|
8150 |
+
-----------
|
8151 |
|
8152 |
+
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
|
8153 |
+
- `thenable` is an object or function that defines a `then` method.
|
8154 |
+
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
8155 |
+
- `exception` is a value that is thrown using the throw statement.
|
8156 |
+
- `reason` is a value that indicates why a promise was rejected.
|
8157 |
+
- `settled` the final resting state of a promise, fulfilled or rejected.
|
8158 |
|
8159 |
+
A promise can be in one of three states: pending, fulfilled, or rejected.
|
8160 |
|
8161 |
+
Promises that are fulfilled have a fulfillment value and are in the fulfilled
|
8162 |
+
state. Promises that are rejected have a rejection reason and are in the
|
8163 |
+
rejected state. A fulfillment value is never a thenable.
|
8164 |
|
8165 |
+
Promises can also be said to *resolve* a value. If this value is also a
|
8166 |
+
promise, then the original promise's settled state will match the value's
|
8167 |
+
settled state. So a promise that *resolves* a promise that rejects will
|
8168 |
+
itself reject, and a promise that *resolves* a promise that fulfills will
|
8169 |
+
itself fulfill.
|
8170 |
|
|
|
8171 |
|
8172 |
+
Basic Usage:
|
8173 |
+
------------
|
|
|
8174 |
|
8175 |
+
```js
|
8176 |
+
var promise = new Promise(function(resolve, reject) {
|
8177 |
+
// on success
|
8178 |
+
resolve(value);
|
8179 |
|
8180 |
+
// on failure
|
8181 |
+
reject(reason);
|
8182 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8183 |
|
8184 |
+
promise.then(function(value) {
|
8185 |
+
// on fulfillment
|
8186 |
+
}, function(reason) {
|
8187 |
+
// on rejection
|
8188 |
+
});
|
8189 |
+
```
|
8190 |
|
8191 |
+
Advanced Usage:
|
8192 |
+
---------------
|
8193 |
|
8194 |
+
Promises shine when abstracting away asynchronous interactions such as
|
8195 |
+
`XMLHttpRequest`s.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8196 |
|
8197 |
+
```js
|
8198 |
+
function getJSON(url) {
|
8199 |
+
return new Promise(function(resolve, reject){
|
8200 |
+
var xhr = new XMLHttpRequest();
|
8201 |
|
8202 |
+
xhr.open('GET', url);
|
8203 |
+
xhr.onreadystatechange = handler;
|
8204 |
+
xhr.responseType = 'json';
|
8205 |
+
xhr.setRequestHeader('Accept', 'application/json');
|
8206 |
+
xhr.send();
|
|
|
|
|
|
|
8207 |
|
8208 |
+
function handler() {
|
8209 |
+
if (this.readyState === this.DONE) {
|
8210 |
+
if (this.status === 200) {
|
8211 |
+
resolve(this.response);
|
8212 |
+
} else {
|
8213 |
+
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
8214 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8215 |
}
|
8216 |
+
};
|
8217 |
+
});
|
8218 |
+
}
|
8219 |
|
8220 |
+
getJSON('/posts.json').then(function(json) {
|
8221 |
+
// on fulfillment
|
8222 |
+
}, function(reason) {
|
8223 |
+
// on rejection
|
8224 |
+
});
|
8225 |
+
```
|
8226 |
|
8227 |
+
Unlike callbacks, promises are great composable primitives.
|
|
|
|
|
8228 |
|
8229 |
+
```js
|
8230 |
+
Promise.all([
|
8231 |
+
getJSON('/posts'),
|
8232 |
+
getJSON('/comments')
|
8233 |
+
]).then(function(values){
|
8234 |
+
values[0] // => postsJSON
|
8235 |
+
values[1] // => commentsJSON
|
8236 |
|
8237 |
+
return values;
|
8238 |
+
});
|
8239 |
+
```
|
8240 |
|
8241 |
+
@class Promise
|
8242 |
+
@param {function} resolver
|
8243 |
+
Useful for tooling.
|
8244 |
+
@constructor
|
8245 |
+
*/
|
8246 |
+
function $$es6$promise$promise$$Promise(resolver) {
|
8247 |
+
this._id = $$es6$promise$promise$$counter++;
|
8248 |
+
this._state = undefined;
|
8249 |
+
this._result = undefined;
|
8250 |
+
this._subscribers = [];
|
8251 |
|
8252 |
+
if ($$$internal$$noop !== resolver) {
|
8253 |
+
if (!$$utils$$isFunction(resolver)) {
|
8254 |
+
$$es6$promise$promise$$needsResolver();
|
8255 |
+
}
|
8256 |
|
8257 |
+
if (!(this instanceof $$es6$promise$promise$$Promise)) {
|
8258 |
+
$$es6$promise$promise$$needsNew();
|
|
|
|
|
|
|
|
|
|
|
8259 |
}
|
8260 |
+
|
8261 |
+
$$$internal$$initializePromise(this, resolver);
|
8262 |
+
}
|
8263 |
}
|
|
|
|
|
8264 |
|
8265 |
+
$$es6$promise$promise$$Promise.all = $$promise$all$$default;
|
8266 |
+
$$es6$promise$promise$$Promise.race = $$promise$race$$default;
|
8267 |
+
$$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default;
|
8268 |
+
$$es6$promise$promise$$Promise.reject = $$promise$reject$$default;
|
8269 |
|
8270 |
+
$$es6$promise$promise$$Promise.prototype = {
|
8271 |
+
constructor: $$es6$promise$promise$$Promise,
|
|
|
8272 |
|
8273 |
+
/**
|
8274 |
+
The primary way of interacting with a promise is through its `then` method,
|
8275 |
+
which registers callbacks to receive either a promise's eventual value or the
|
8276 |
+
reason why the promise cannot be fulfilled.
|
8277 |
+
|
8278 |
+
```js
|
8279 |
+
findUser().then(function(user){
|
8280 |
+
// user is available
|
8281 |
+
}, function(reason){
|
8282 |
+
// user is unavailable, and you are given the reason why
|
8283 |
+
});
|
8284 |
+
```
|
8285 |
+
|
8286 |
+
Chaining
|
8287 |
+
--------
|
8288 |
+
|
8289 |
+
The return value of `then` is itself a promise. This second, 'downstream'
|
8290 |
+
promise is resolved with the return value of the first promise's fulfillment
|
8291 |
+
or rejection handler, or rejected if the handler throws an exception.
|
8292 |
+
|
8293 |
+
```js
|
8294 |
+
findUser().then(function (user) {
|
8295 |
+
return user.name;
|
8296 |
+
}, function (reason) {
|
8297 |
+
return 'default name';
|
8298 |
+
}).then(function (userName) {
|
8299 |
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
8300 |
+
// will be `'default name'`
|
8301 |
+
});
|
8302 |
|
8303 |
+
findUser().then(function (user) {
|
8304 |
+
throw new Error('Found user, but still unhappy');
|
8305 |
+
}, function (reason) {
|
8306 |
+
throw new Error('`findUser` rejected and we're unhappy');
|
8307 |
+
}).then(function (value) {
|
8308 |
+
// never reached
|
8309 |
+
}, function (reason) {
|
8310 |
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
8311 |
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
8312 |
+
});
|
8313 |
+
```
|
8314 |
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
8315 |
+
|
8316 |
+
```js
|
8317 |
+
findUser().then(function (user) {
|
8318 |
+
throw new PedagogicalException('Upstream error');
|
8319 |
+
}).then(function (value) {
|
8320 |
+
// never reached
|
8321 |
+
}).then(function (value) {
|
8322 |
+
// never reached
|
8323 |
+
}, function (reason) {
|
8324 |
+
// The `PedgagocialException` is propagated all the way down to here
|
8325 |
+
});
|
8326 |
+
```
|
8327 |
|
8328 |
+
Assimilation
|
8329 |
+
------------
|
|
|
|
|
8330 |
|
8331 |
+
Sometimes the value you want to propagate to a downstream promise can only be
|
8332 |
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
8333 |
+
fulfillment or rejection handler. The downstream promise will then be pending
|
8334 |
+
until the returned promise is settled. This is called *assimilation*.
|
8335 |
|
8336 |
+
```js
|
8337 |
+
findUser().then(function (user) {
|
8338 |
+
return findCommentsByAuthor(user);
|
8339 |
+
}).then(function (comments) {
|
8340 |
+
// The user's comments are now available
|
8341 |
+
});
|
8342 |
+
```
|
8343 |
|
8344 |
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
8345 |
|
8346 |
+
```js
|
8347 |
+
findUser().then(function (user) {
|
8348 |
+
return findCommentsByAuthor(user);
|
8349 |
+
}).then(function (comments) {
|
8350 |
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
8351 |
+
}, function (reason) {
|
8352 |
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
8353 |
+
});
|
8354 |
+
```
|
8355 |
|
8356 |
+
Simple Example
|
8357 |
+
--------------
|
8358 |
|
8359 |
+
Synchronous Example
|
8360 |
|
8361 |
+
```javascript
|
8362 |
+
var result;
|
8363 |
|
8364 |
+
try {
|
8365 |
+
result = findResult();
|
8366 |
+
// success
|
8367 |
+
} catch(reason) {
|
8368 |
+
// failure
|
8369 |
+
}
|
8370 |
+
```
|
8371 |
|
8372 |
+
Errback Example
|
8373 |
|
8374 |
+
```js
|
8375 |
+
findResult(function(result, err){
|
8376 |
+
if (err) {
|
8377 |
+
// failure
|
8378 |
+
} else {
|
8379 |
+
// success
|
8380 |
+
}
|
8381 |
+
});
|
8382 |
+
```
|
8383 |
|
8384 |
+
Promise Example;
|
8385 |
|
8386 |
+
```javascript
|
8387 |
+
findResult().then(function(result){
|
8388 |
+
// success
|
8389 |
+
}, function(reason){
|
8390 |
+
// failure
|
8391 |
+
});
|
8392 |
+
```
|
8393 |
|
8394 |
+
Advanced Example
|
8395 |
+
--------------
|
|
|
|
|
|
|
|
|
8396 |
|
8397 |
+
Synchronous Example
|
|
|
|
|
|
|
|
|
|
|
8398 |
|
8399 |
+
```javascript
|
8400 |
+
var author, books;
|
|
|
|
|
|
|
8401 |
|
8402 |
+
try {
|
8403 |
+
author = findAuthor();
|
8404 |
+
books = findBooksByAuthor(author);
|
8405 |
+
// success
|
8406 |
+
} catch(reason) {
|
8407 |
+
// failure
|
8408 |
+
}
|
8409 |
+
```
|
8410 |
|
8411 |
+
Errback Example
|
8412 |
|
8413 |
+
```js
|
|
|
8414 |
|
8415 |
+
function foundBooks(books) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8416 |
|
8417 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8418 |
|
8419 |
+
function failure(reason) {
|
|
|
|
|
8420 |
|
8421 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8422 |
|
8423 |
+
findAuthor(function(author, err){
|
8424 |
+
if (err) {
|
8425 |
+
failure(err);
|
8426 |
+
// failure
|
8427 |
+
} else {
|
8428 |
+
try {
|
8429 |
+
findBoooksByAuthor(author, function(books, err) {
|
8430 |
+
if (err) {
|
8431 |
+
failure(err);
|
8432 |
+
} else {
|
8433 |
+
try {
|
8434 |
+
foundBooks(books);
|
8435 |
+
} catch(reason) {
|
8436 |
+
failure(reason);
|
8437 |
+
}
|
8438 |
+
}
|
8439 |
+
});
|
8440 |
+
} catch(error) {
|
8441 |
+
failure(err);
|
8442 |
+
}
|
8443 |
+
// success
|
8444 |
+
}
|
8445 |
+
});
|
8446 |
+
```
|
8447 |
|
8448 |
+
Promise Example;
|
|
|
8449 |
|
8450 |
+
```javascript
|
8451 |
+
findAuthor().
|
8452 |
+
then(findBooksByAuthor).
|
8453 |
+
then(function(books){
|
8454 |
+
// found books
|
8455 |
+
}).catch(function(reason){
|
8456 |
+
// something went wrong
|
8457 |
+
});
|
8458 |
+
```
|
8459 |
|
8460 |
+
@method then
|
8461 |
+
@param {Function} onFulfilled
|
8462 |
+
@param {Function} onRejected
|
8463 |
+
Useful for tooling.
|
8464 |
+
@return {Promise}
|
8465 |
+
*/
|
8466 |
+
then: function(onFulfillment, onRejection) {
|
8467 |
+
var parent = this;
|
8468 |
+
var state = parent._state;
|
8469 |
|
8470 |
+
if (state === $$$internal$$FULFILLED && !onFulfillment || state === $$$internal$$REJECTED && !onRejection) {
|
8471 |
+
return this;
|
8472 |
+
}
|
8473 |
|
8474 |
+
var child = new this.constructor($$$internal$$noop);
|
8475 |
+
var result = parent._result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8476 |
|
8477 |
+
if (state) {
|
8478 |
+
var callback = arguments[state - 1];
|
8479 |
+
$$asap$$default(function(){
|
8480 |
+
$$$internal$$invokeCallback(state, child, callback, result);
|
8481 |
+
});
|
8482 |
+
} else {
|
8483 |
+
$$$internal$$subscribe(parent, child, onFulfillment, onRejection);
|
8484 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8485 |
|
8486 |
+
return child;
|
8487 |
+
},
|
|
|
8488 |
|
8489 |
+
/**
|
8490 |
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
8491 |
+
as the catch block of a try/catch statement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8492 |
|
8493 |
+
```js
|
8494 |
+
function findAuthor(){
|
8495 |
+
throw new Error('couldn't find that author');
|
8496 |
+
}
|
|
|
|
|
|
|
|
|
8497 |
|
8498 |
+
// synchronous
|
8499 |
+
try {
|
8500 |
+
findAuthor();
|
8501 |
+
} catch(reason) {
|
8502 |
+
// something went wrong
|
8503 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8504 |
|
8505 |
+
// async with promises
|
8506 |
+
findAuthor().catch(function(reason){
|
8507 |
+
// something went wrong
|
8508 |
+
});
|
8509 |
+
```
|
8510 |
|
8511 |
+
@method catch
|
8512 |
+
@param {Function} onRejection
|
8513 |
+
Useful for tooling.
|
8514 |
+
@return {Promise}
|
8515 |
+
*/
|
8516 |
+
'catch': function(onRejection) {
|
8517 |
+
return this.then(null, onRejection);
|
8518 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8519 |
};
|
8520 |
|
8521 |
+
var $$es6$promise$polyfill$$default = function polyfill() {
|
8522 |
+
var local;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8523 |
|
8524 |
+
if (typeof global !== 'undefined') {
|
8525 |
+
local = global;
|
8526 |
+
} else if (typeof window !== 'undefined' && window.document) {
|
8527 |
+
local = window;
|
8528 |
+
} else {
|
8529 |
+
local = self;
|
8530 |
+
}
|
8531 |
+
|
8532 |
+
var es6PromiseSupport =
|
8533 |
+
"Promise" in local &&
|
8534 |
+
// Some of these methods are missing from
|
8535 |
+
// Firefox/Chrome experimental implementations
|
8536 |
+
"resolve" in local.Promise &&
|
8537 |
+
"reject" in local.Promise &&
|
8538 |
+
"all" in local.Promise &&
|
8539 |
+
"race" in local.Promise &&
|
8540 |
+
// Older version of the spec had a resolver object
|
8541 |
+
// as the arg rather than a function
|
8542 |
+
(function() {
|
8543 |
+
var resolve;
|
8544 |
+
new local.Promise(function(r) { resolve = r; });
|
8545 |
+
return $$utils$$isFunction(resolve);
|
8546 |
+
}());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8547 |
|
8548 |
+
if (!es6PromiseSupport) {
|
8549 |
+
local.Promise = $$es6$promise$promise$$default;
|
8550 |
+
}
|
8551 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8552 |
|
8553 |
+
var es6$promise$umd$$ES6Promise = {
|
8554 |
+
'Promise': $$es6$promise$promise$$default,
|
8555 |
+
'polyfill': $$es6$promise$polyfill$$default
|
|
|
|
|
|
|
8556 |
};
|
|
|
8557 |
|
8558 |
+
/* global define:true module:true window: true */
|
8559 |
+
if (typeof define === 'function' && define['amd']) {
|
8560 |
+
define(function() { return es6$promise$umd$$ES6Promise; });
|
8561 |
+
} else if (typeof module !== 'undefined' && module['exports']) {
|
8562 |
+
module['exports'] = es6$promise$umd$$ES6Promise;
|
8563 |
+
} else if (typeof this !== 'undefined') {
|
8564 |
+
this['ES6Promise'] = es6$promise$umd$$ES6Promise;
|
8565 |
}
|
8566 |
+
}).call(this);
|
8567 |
+
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
8568 |
+
},{"_process":2}],2:[function(require,module,exports){
|
8569 |
+
// shim for using process in browser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8570 |
|
8571 |
+
var process = module.exports = {};
|
8572 |
+
var queue = [];
|
8573 |
+
var draining = false;
|
8574 |
|
8575 |
+
function drainQueue() {
|
8576 |
+
if (draining) {
|
8577 |
+
return;
|
8578 |
}
|
8579 |
+
draining = true;
|
8580 |
+
var currentQueue;
|
8581 |
+
var len = queue.length;
|
8582 |
+
while(len) {
|
8583 |
+
currentQueue = queue;
|
8584 |
+
queue = [];
|
8585 |
+
var i = -1;
|
8586 |
+
while (++i < len) {
|
8587 |
+
currentQueue[i]();
|
8588 |
}
|
8589 |
+
len = queue.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8590 |
}
|
8591 |
+
draining = false;
|
|
|
8592 |
}
|
8593 |
+
process.nextTick = function (fun) {
|
8594 |
+
queue.push(fun);
|
8595 |
+
if (!draining) {
|
8596 |
+
setTimeout(drainQueue, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8597 |
}
|
|
|
|
|
8598 |
};
|
8599 |
|
8600 |
+
process.title = 'browser';
|
8601 |
+
process.browser = true;
|
8602 |
+
process.env = {};
|
8603 |
+
process.argv = [];
|
8604 |
+
process.version = ''; // empty string to avoid regexp issues
|
8605 |
|
8606 |
+
function noop() {}
|
|
|
|
|
8607 |
|
8608 |
+
process.on = noop;
|
8609 |
+
process.addListener = noop;
|
8610 |
+
process.once = noop;
|
8611 |
+
process.off = noop;
|
8612 |
+
process.removeListener = noop;
|
8613 |
+
process.removeAllListeners = noop;
|
8614 |
+
process.emit = noop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8615 |
|
8616 |
+
process.binding = function (name) {
|
8617 |
+
throw new Error('process.binding is not supported');
|
8618 |
};
|
8619 |
|
8620 |
+
// TODO(shtylman)
|
8621 |
+
process.cwd = function () { return '/' };
|
8622 |
+
process.chdir = function (dir) {
|
8623 |
+
throw new Error('process.chdir is not supported');
|
8624 |
};
|
8625 |
+
process.umask = function() { return 0; };
|
8626 |
+
|
8627 |
+
},{}],3:[function(require,module,exports){
|
8628 |
+
(function (global){
|
8629 |
+
/*! http://mths.be/punycode v1.2.4 by @mathias */
|
8630 |
+
;(function(root) {
|
8631 |
+
|
8632 |
+
/** Detect free variables */
|
8633 |
+
var freeExports = typeof exports == 'object' && exports;
|
8634 |
+
var freeModule = typeof module == 'object' && module &&
|
8635 |
+
module.exports == freeExports && module;
|
8636 |
+
var freeGlobal = typeof global == 'object' && global;
|
8637 |
+
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
8638 |
+
root = freeGlobal;
|
8639 |
+
}
|
8640 |
|
8641 |
+
/**
|
8642 |
+
* The `punycode` object.
|
8643 |
+
* @name punycode
|
8644 |
+
* @type Object
|
8645 |
+
*/
|
8646 |
+
var punycode,
|
8647 |
+
|
8648 |
+
/** Highest positive signed 32-bit float value */
|
8649 |
+
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
8650 |
+
|
8651 |
+
/** Bootstring parameters */
|
8652 |
+
base = 36,
|
8653 |
+
tMin = 1,
|
8654 |
+
tMax = 26,
|
8655 |
+
skew = 38,
|
8656 |
+
damp = 700,
|
8657 |
+
initialBias = 72,
|
8658 |
+
initialN = 128, // 0x80
|
8659 |
+
delimiter = '-', // '\x2D'
|
8660 |
+
|
8661 |
+
/** Regular expressions */
|
8662 |
+
regexPunycode = /^xn--/,
|
8663 |
+
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
8664 |
+
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
|
8665 |
+
|
8666 |
+
/** Error messages */
|
8667 |
+
errors = {
|
8668 |
+
'overflow': 'Overflow: input needs wider integers to process',
|
8669 |
+
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
8670 |
+
'invalid-input': 'Invalid input'
|
8671 |
+
},
|
8672 |
+
|
8673 |
+
/** Convenience shortcuts */
|
8674 |
+
baseMinusTMin = base - tMin,
|
8675 |
+
floor = Math.floor,
|
8676 |
+
stringFromCharCode = String.fromCharCode,
|
8677 |
+
|
8678 |
+
/** Temporary variable */
|
8679 |
+
key;
|
8680 |
+
|
8681 |
+
/*--------------------------------------------------------------------------*/
|
8682 |
+
|
8683 |
+
/**
|
8684 |
+
* A generic error utility function.
|
8685 |
+
* @private
|
8686 |
+
* @param {String} type The error type.
|
8687 |
+
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
8688 |
+
*/
|
8689 |
+
function error(type) {
|
8690 |
+
throw RangeError(errors[type]);
|
8691 |
+
}
|
8692 |
|
8693 |
+
/**
|
8694 |
+
* A generic `Array#map` utility function.
|
8695 |
+
* @private
|
8696 |
+
* @param {Array} array The array to iterate over.
|
8697 |
+
* @param {Function} callback The function that gets called for every array
|
8698 |
+
* item.
|
8699 |
+
* @returns {Array} A new array of values returned by the callback function.
|
8700 |
+
*/
|
8701 |
+
function map(array, fn) {
|
8702 |
+
var length = array.length;
|
8703 |
+
while (length--) {
|
8704 |
+
array[length] = fn(array[length]);
|
8705 |
+
}
|
8706 |
+
return array;
|
8707 |
+
}
|
8708 |
|
8709 |
+
/**
|
8710 |
+
* A simple `Array#map`-like wrapper to work with domain name strings.
|
8711 |
+
* @private
|
8712 |
+
* @param {String} domain The domain name.
|
8713 |
+
* @param {Function} callback The function that gets called for every
|
8714 |
+
* character.
|
8715 |
+
* @returns {Array} A new string of characters returned by the callback
|
8716 |
+
* function.
|
8717 |
+
*/
|
8718 |
+
function mapDomain(string, fn) {
|
8719 |
+
return map(string.split(regexSeparators), fn).join('.');
|
8720 |
+
}
|
8721 |
|
8722 |
+
/**
|
8723 |
+
* Creates an array containing the numeric code points of each Unicode
|
8724 |
+
* character in the string. While JavaScript uses UCS-2 internally,
|
8725 |
+
* this function will convert a pair of surrogate halves (each of which
|
8726 |
+
* UCS-2 exposes as separate characters) into a single code point,
|
8727 |
+
* matching UTF-16.
|
8728 |
+
* @see `punycode.ucs2.encode`
|
8729 |
+
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
8730 |
+
* @memberOf punycode.ucs2
|
8731 |
+
* @name decode
|
8732 |
+
* @param {String} string The Unicode input string (UCS-2).
|
8733 |
+
* @returns {Array} The new array of code points.
|
8734 |
+
*/
|
8735 |
+
function ucs2decode(string) {
|
8736 |
+
var output = [],
|
8737 |
+
counter = 0,
|
8738 |
+
length = string.length,
|
8739 |
+
value,
|
8740 |
+
extra;
|
8741 |
+
while (counter < length) {
|
8742 |
+
value = string.charCodeAt(counter++);
|
8743 |
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
8744 |
+
// high surrogate, and there is a next character
|
8745 |
+
extra = string.charCodeAt(counter++);
|
8746 |
+
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
8747 |
+
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
8748 |
+
} else {
|
8749 |
+
// unmatched surrogate; only append this code unit, in case the next
|
8750 |
+
// code unit is the high surrogate of a surrogate pair
|
8751 |
+
output.push(value);
|
8752 |
+
counter--;
|
8753 |
+
}
|
8754 |
+
} else {
|
8755 |
+
output.push(value);
|
8756 |
+
}
|
8757 |
+
}
|
8758 |
+
return output;
|
8759 |
+
}
|
8760 |
|
8761 |
+
/**
|
8762 |
+
* Creates a string based on an array of numeric code points.
|
8763 |
+
* @see `punycode.ucs2.decode`
|
8764 |
+
* @memberOf punycode.ucs2
|
8765 |
+
* @name encode
|
8766 |
+
* @param {Array} codePoints The array of numeric code points.
|
8767 |
+
* @returns {String} The new Unicode string (UCS-2).
|
8768 |
+
*/
|
8769 |
+
function ucs2encode(array) {
|
8770 |
+
return map(array, function(value) {
|
8771 |
+
var output = '';
|
8772 |
+
if (value > 0xFFFF) {
|
8773 |
+
value -= 0x10000;
|
8774 |
+
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
8775 |
+
value = 0xDC00 | value & 0x3FF;
|
8776 |
+
}
|
8777 |
+
output += stringFromCharCode(value);
|
8778 |
+
return output;
|
8779 |
+
}).join('');
|
8780 |
+
}
|
8781 |
|
8782 |
+
/**
|
8783 |
+
* Converts a basic code point into a digit/integer.
|
8784 |
+
* @see `digitToBasic()`
|
8785 |
+
* @private
|
8786 |
+
* @param {Number} codePoint The basic numeric code point value.
|
8787 |
+
* @returns {Number} The numeric value of a basic code point (for use in
|
8788 |
+
* representing integers) in the range `0` to `base - 1`, or `base` if
|
8789 |
+
* the code point does not represent a value.
|
8790 |
+
*/
|
8791 |
+
function basicToDigit(codePoint) {
|
8792 |
+
if (codePoint - 48 < 10) {
|
8793 |
+
return codePoint - 22;
|
8794 |
+
}
|
8795 |
+
if (codePoint - 65 < 26) {
|
8796 |
+
return codePoint - 65;
|
8797 |
+
}
|
8798 |
+
if (codePoint - 97 < 26) {
|
8799 |
+
return codePoint - 97;
|
8800 |
+
}
|
8801 |
+
return base;
|
8802 |
+
}
|
8803 |
|
8804 |
+
/**
|
8805 |
+
* Converts a digit/integer into a basic code point.
|
8806 |
+
* @see `basicToDigit()`
|
8807 |
+
* @private
|
8808 |
+
* @param {Number} digit The numeric value of a basic code point.
|
8809 |
+
* @returns {Number} The basic code point whose value (when used for
|
8810 |
+
* representing integers) is `digit`, which needs to be in the range
|
8811 |
+
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
8812 |
+
* used; else, the lowercase form is used. The behavior is undefined
|
8813 |
+
* if `flag` is non-zero and `digit` has no uppercase form.
|
8814 |
+
*/
|
8815 |
+
function digitToBasic(digit, flag) {
|
8816 |
+
// 0..25 map to ASCII a..z or A..Z
|
8817 |
+
// 26..35 map to ASCII 0..9
|
8818 |
+
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
8819 |
+
}
|
8820 |
|
8821 |
+
/**
|
8822 |
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
8823 |
+
* http://tools.ietf.org/html/rfc3492#section-3.4
|
8824 |
+
* @private
|
8825 |
+
*/
|
8826 |
+
function adapt(delta, numPoints, firstTime) {
|
8827 |
+
var k = 0;
|
8828 |
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
8829 |
+
delta += floor(delta / numPoints);
|
8830 |
+
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
8831 |
+
delta = floor(delta / baseMinusTMin);
|
8832 |
+
}
|
8833 |
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
8834 |
+
}
|
8835 |
|
8836 |
+
/**
|
8837 |
+
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
8838 |
+
* symbols.
|
8839 |
+
* @memberOf punycode
|
8840 |
+
* @param {String} input The Punycode string of ASCII-only symbols.
|
8841 |
+
* @returns {String} The resulting string of Unicode symbols.
|
8842 |
+
*/
|
8843 |
+
function decode(input) {
|
8844 |
+
// Don't use UCS-2
|
8845 |
+
var output = [],
|
8846 |
+
inputLength = input.length,
|
8847 |
+
out,
|
8848 |
+
i = 0,
|
8849 |
+
n = initialN,
|
8850 |
+
bias = initialBias,
|
8851 |
+
basic,
|
8852 |
+
j,
|
8853 |
+
index,
|
8854 |
+
oldi,
|
8855 |
+
w,
|
8856 |
+
k,
|
8857 |
+
digit,
|
8858 |
+
t,
|
8859 |
+
/** Cached calculation results */
|
8860 |
+
baseMinusT;
|
8861 |
+
|
8862 |
+
// Handle the basic code points: let `basic` be the number of input code
|
8863 |
+
// points before the last delimiter, or `0` if there is none, then copy
|
8864 |
+
// the first basic code points to the output.
|
8865 |
+
|
8866 |
+
basic = input.lastIndexOf(delimiter);
|
8867 |
+
if (basic < 0) {
|
8868 |
+
basic = 0;
|
8869 |
+
}
|
8870 |
|
8871 |
+
for (j = 0; j < basic; ++j) {
|
8872 |
+
// if it's not a basic code point
|
8873 |
+
if (input.charCodeAt(j) >= 0x80) {
|
8874 |
+
error('not-basic');
|
8875 |
+
}
|
8876 |
+
output.push(input.charCodeAt(j));
|
8877 |
+
}
|
8878 |
|
8879 |
+
// Main decoding loop: start just after the last delimiter if any basic code
|
8880 |
+
// points were copied; start at the beginning otherwise.
|
|
|
|
|
|
|
|
|
|
|
8881 |
|
8882 |
+
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
|
|
|
|
|
|
|
|
|
8883 |
|
8884 |
+
// `index` is the index of the next character to be consumed.
|
8885 |
+
// Decode a generalized variable-length integer into `delta`,
|
8886 |
+
// which gets added to `i`. The overflow checking is easier
|
8887 |
+
// if we increase `i` as we go, then subtract off its starting
|
8888 |
+
// value at the end to obtain `delta`.
|
8889 |
+
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
8890 |
|
8891 |
+
if (index >= inputLength) {
|
8892 |
+
error('invalid-input');
|
8893 |
+
}
|
8894 |
|
8895 |
+
digit = basicToDigit(input.charCodeAt(index++));
|
8896 |
|
8897 |
+
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
8898 |
+
error('overflow');
|
8899 |
+
}
|
8900 |
|
8901 |
+
i += digit * w;
|
8902 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
|
|
|
8903 |
|
8904 |
+
if (digit < t) {
|
8905 |
+
break;
|
8906 |
+
}
|
8907 |
|
8908 |
+
baseMinusT = base - t;
|
8909 |
+
if (w > floor(maxInt / baseMinusT)) {
|
8910 |
+
error('overflow');
|
8911 |
+
}
|
8912 |
|
8913 |
+
w *= baseMinusT;
|
8914 |
|
8915 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8916 |
|
8917 |
+
out = output.length + 1;
|
8918 |
+
bias = adapt(i - oldi, out, oldi == 0);
|
|
|
8919 |
|
8920 |
+
// `i` was supposed to wrap around from `out` to `0`,
|
8921 |
+
// incrementing `n` each time, so we'll fix that now:
|
8922 |
+
if (floor(i / out) > maxInt - n) {
|
8923 |
+
error('overflow');
|
8924 |
+
}
|
|
|
8925 |
|
8926 |
+
n += floor(i / out);
|
8927 |
+
i %= out;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8928 |
|
8929 |
+
// Insert `n` at position `i` of the output
|
8930 |
+
output.splice(i++, 0, n);
|
|
|
|
|
8931 |
|
8932 |
+
}
|
|
|
8933 |
|
8934 |
+
return ucs2encode(output);
|
8935 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8936 |
|
8937 |
+
/**
|
8938 |
+
* Converts a string of Unicode symbols to a Punycode string of ASCII-only
|
8939 |
+
* symbols.
|
8940 |
+
* @memberOf punycode
|
8941 |
+
* @param {String} input The string of Unicode symbols.
|
8942 |
+
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
8943 |
+
*/
|
8944 |
+
function encode(input) {
|
8945 |
+
var n,
|
8946 |
+
delta,
|
8947 |
+
handledCPCount,
|
8948 |
+
basicLength,
|
8949 |
+
bias,
|
8950 |
+
j,
|
8951 |
+
m,
|
8952 |
+
q,
|
8953 |
+
k,
|
8954 |
+
t,
|
8955 |
+
currentValue,
|
8956 |
+
output = [],
|
8957 |
+
/** `inputLength` will hold the number of code points in `input`. */
|
8958 |
+
inputLength,
|
8959 |
+
/** Cached calculation results */
|
8960 |
+
handledCPCountPlusOne,
|
8961 |
+
baseMinusT,
|
8962 |
+
qMinusT;
|
8963 |
+
|
8964 |
+
// Convert the input in UCS-2 to Unicode
|
8965 |
+
input = ucs2decode(input);
|
8966 |
+
|
8967 |
+
// Cache the length
|
8968 |
+
inputLength = input.length;
|
8969 |
+
|
8970 |
+
// Initialize the state
|
8971 |
+
n = initialN;
|
8972 |
+
delta = 0;
|
8973 |
+
bias = initialBias;
|
8974 |
+
|
8975 |
+
// Handle the basic code points
|
8976 |
+
for (j = 0; j < inputLength; ++j) {
|
8977 |
+
currentValue = input[j];
|
8978 |
+
if (currentValue < 0x80) {
|
8979 |
+
output.push(stringFromCharCode(currentValue));
|
8980 |
+
}
|
8981 |
+
}
|
8982 |
|
8983 |
+
handledCPCount = basicLength = output.length;
|
|
|
8984 |
|
8985 |
+
// `handledCPCount` is the number of code points that have been handled;
|
8986 |
+
// `basicLength` is the number of basic code points.
|
|
|
|
|
|
|
|
|
8987 |
|
8988 |
+
// Finish the basic string - if it is not empty - with a delimiter
|
8989 |
+
if (basicLength) {
|
8990 |
+
output.push(delimiter);
|
8991 |
+
}
|
8992 |
|
8993 |
+
// Main encoding loop:
|
8994 |
+
while (handledCPCount < inputLength) {
|
8995 |
|
8996 |
+
// All non-basic code points < n have been handled already. Find the next
|
8997 |
+
// larger one:
|
8998 |
+
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
8999 |
+
currentValue = input[j];
|
9000 |
+
if (currentValue >= n && currentValue < m) {
|
9001 |
+
m = currentValue;
|
9002 |
+
}
|
9003 |
+
}
|
9004 |
|
9005 |
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
9006 |
+
// but guard against overflow
|
9007 |
+
handledCPCountPlusOne = handledCPCount + 1;
|
9008 |
+
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
9009 |
+
error('overflow');
|
9010 |
+
}
|
9011 |
|
9012 |
+
delta += (m - n) * handledCPCountPlusOne;
|
9013 |
+
n = m;
|
9014 |
|
9015 |
+
for (j = 0; j < inputLength; ++j) {
|
9016 |
+
currentValue = input[j];
|
9017 |
|
9018 |
+
if (currentValue < n && ++delta > maxInt) {
|
9019 |
+
error('overflow');
|
9020 |
+
}
|
9021 |
|
9022 |
+
if (currentValue == n) {
|
9023 |
+
// Represent delta as a generalized variable-length integer
|
9024 |
+
for (q = delta, k = base; /* no condition */; k += base) {
|
9025 |
+
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
9026 |
+
if (q < t) {
|
9027 |
+
break;
|
9028 |
+
}
|
9029 |
+
qMinusT = q - t;
|
9030 |
+
baseMinusT = base - t;
|
9031 |
+
output.push(
|
9032 |
+
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
9033 |
+
);
|
9034 |
+
q = floor(qMinusT / baseMinusT);
|
9035 |
+
}
|
9036 |
|
9037 |
+
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
9038 |
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
9039 |
+
delta = 0;
|
9040 |
+
++handledCPCount;
|
9041 |
+
}
|
9042 |
+
}
|
9043 |
|
9044 |
+
++delta;
|
9045 |
+
++n;
|
|
|
9046 |
|
9047 |
+
}
|
9048 |
+
return output.join('');
|
9049 |
+
}
|
|
|
|
|
|
|
|
|
9050 |
|
9051 |
+
/**
|
9052 |
+
* Converts a Punycode string representing a domain name to Unicode. Only the
|
9053 |
+
* Punycoded parts of the domain name will be converted, i.e. it doesn't
|
9054 |
+
* matter if you call it on a string that has already been converted to
|
9055 |
+
* Unicode.
|
9056 |
+
* @memberOf punycode
|
9057 |
+
* @param {String} domain The Punycode domain name to convert to Unicode.
|
9058 |
+
* @returns {String} The Unicode representation of the given Punycode
|
9059 |
+
* string.
|
9060 |
+
*/
|
9061 |
+
function toUnicode(domain) {
|
9062 |
+
return mapDomain(domain, function(string) {
|
9063 |
+
return regexPunycode.test(string)
|
9064 |
+
? decode(string.slice(4).toLowerCase())
|
9065 |
+
: string;
|
9066 |
+
});
|
9067 |
+
}
|
9068 |
|
9069 |
+
/**
|
9070 |
+
* Converts a Unicode string representing a domain name to Punycode. Only the
|
9071 |
+
* non-ASCII parts of the domain name will be converted, i.e. it doesn't
|
9072 |
+
* matter if you call it with a domain that's already in ASCII.
|
9073 |
+
* @memberOf punycode
|
9074 |
+
* @param {String} domain The domain name to convert, as a Unicode string.
|
9075 |
+
* @returns {String} The Punycode representation of the given domain name.
|
9076 |
+
*/
|
9077 |
+
function toASCII(domain) {
|
9078 |
+
return mapDomain(domain, function(string) {
|
9079 |
+
return regexNonASCII.test(string)
|
9080 |
+
? 'xn--' + encode(string)
|
9081 |
+
: string;
|
9082 |
+
});
|
9083 |
+
}
|
9084 |
|
9085 |
+
/*--------------------------------------------------------------------------*/
|
9086 |
+
|
9087 |
+
/** Define the public API */
|
9088 |
+
punycode = {
|
9089 |
+
/**
|
9090 |
+
* A string representing the current Punycode.js version number.
|
9091 |
+
* @memberOf punycode
|
9092 |
+
* @type String
|
9093 |
+
*/
|
9094 |
+
'version': '1.2.4',
|
9095 |
+
/**
|
9096 |
+
* An object of methods to convert from JavaScript's internal character
|
9097 |
+
* representation (UCS-2) to Unicode code points, and back.
|
9098 |
+
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
9099 |
+
* @memberOf punycode
|
9100 |
+
* @type Object
|
9101 |
+
*/
|
9102 |
+
'ucs2': {
|
9103 |
+
'decode': ucs2decode,
|
9104 |
+
'encode': ucs2encode
|
9105 |
+
},
|
9106 |
+
'decode': decode,
|
9107 |
+
'encode': encode,
|
9108 |
+
'toASCII': toASCII,
|
9109 |
+
'toUnicode': toUnicode
|
9110 |
+
};
|
9111 |
|
9112 |
+
/** Expose `punycode` */
|
9113 |
+
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
9114 |
+
// like the following:
|
9115 |
+
if (
|
9116 |
+
typeof define == 'function' &&
|
9117 |
+
typeof define.amd == 'object' &&
|
9118 |
+
define.amd
|
9119 |
+
) {
|
9120 |
+
define('punycode', function() {
|
9121 |
+
return punycode;
|
9122 |
+
});
|
9123 |
+
} else if (freeExports && !freeExports.nodeType) {
|
9124 |
+
if (freeModule) { // in Node.js or RingoJS v0.8.0+
|
9125 |
+
freeModule.exports = punycode;
|
9126 |
+
} else { // in Narwhal or RingoJS v0.7.0-
|
9127 |
+
for (key in punycode) {
|
9128 |
+
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
9129 |
+
}
|
9130 |
+
}
|
9131 |
+
} else { // in Rhino or a web browser
|
9132 |
+
root.punycode = punycode;
|
9133 |
+
}
|
9134 |
|
9135 |
+
}(this));
|
9136 |
+
|
9137 |
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
9138 |
+
},{}],4:[function(require,module,exports){
|
9139 |
+
var log = require('./log');
|
9140 |
+
var Promise = require('./promise');
|
9141 |
+
|
9142 |
+
var html2canvasCanvasCloneAttribute = "data-html2canvas-canvas-clone";
|
9143 |
+
var html2canvasCanvasCloneIndex = 0;
|
9144 |
+
|
9145 |
+
function cloneNodeValues(document, clone, nodeName) {
|
9146 |
+
var originalNodes = document.getElementsByTagName(nodeName);
|
9147 |
+
var clonedNodes = clone.getElementsByTagName(nodeName);
|
9148 |
+
var count = originalNodes.length;
|
9149 |
+
for (var i = 0; i < count; i++) {
|
9150 |
+
clonedNodes[i].value = originalNodes[i].value;
|
9151 |
+
}
|
9152 |
+
}
|
9153 |
+
|
9154 |
+
function restoreOwnerScroll(ownerDocument, x, y) {
|
9155 |
+
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
9156 |
+
ownerDocument.defaultView.scrollTo(x, y);
|
9157 |
+
}
|
9158 |
+
}
|
9159 |
+
|
9160 |
+
function labelCanvasElements(ownerDocument) {
|
9161 |
+
[].slice.call(ownerDocument.querySelectorAll("canvas"), 0).forEach(function(canvas) {
|
9162 |
+
canvas.setAttribute(html2canvasCanvasCloneAttribute, "canvas-" + html2canvasCanvasCloneIndex++);
|
9163 |
+
});
|
9164 |
+
}
|
9165 |
+
|
9166 |
+
function cloneCanvasContents(ownerDocument, documentClone) {
|
9167 |
+
[].slice.call(ownerDocument.querySelectorAll("[" + html2canvasCanvasCloneAttribute + "]"), 0).forEach(function(canvas) {
|
9168 |
+
try {
|
9169 |
+
var clonedCanvas = documentClone.querySelector('[' + html2canvasCanvasCloneAttribute + '="' + canvas.getAttribute(html2canvasCanvasCloneAttribute) + '"]');
|
9170 |
+
if (clonedCanvas) {
|
9171 |
+
clonedCanvas.width = canvas.width;
|
9172 |
+
clonedCanvas.height = canvas.height;
|
9173 |
+
clonedCanvas.getContext("2d").putImageData(canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
9174 |
+
}
|
9175 |
+
} catch(e) {
|
9176 |
+
log("Unable to copy canvas content from", canvas, e);
|
9177 |
+
}
|
9178 |
+
canvas.removeAttribute(html2canvasCanvasCloneAttribute);
|
9179 |
+
});
|
9180 |
+
}
|
9181 |
+
|
9182 |
+
function removeScriptNodes(parent) {
|
9183 |
+
[].slice.call(parent.childNodes, 0).filter(isElementNode).forEach(function(node) {
|
9184 |
+
if (node.tagName === "SCRIPT") {
|
9185 |
+
parent.removeChild(node);
|
9186 |
+
} else {
|
9187 |
+
removeScriptNodes(node);
|
9188 |
+
}
|
9189 |
+
});
|
9190 |
+
return parent;
|
9191 |
+
}
|
9192 |
+
|
9193 |
+
function isIE9() {
|
9194 |
+
return document.documentMode && document.documentMode <= 9;
|
9195 |
+
}
|
9196 |
+
|
9197 |
+
// https://github.com/niklasvh/html2canvas/issues/503
|
9198 |
+
function cloneNodeIE9(node, javascriptEnabled) {
|
9199 |
+
var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false);
|
9200 |
+
|
9201 |
+
var child = node.firstChild;
|
9202 |
+
while(child) {
|
9203 |
+
if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') {
|
9204 |
+
clone.appendChild(cloneNodeIE9(child, javascriptEnabled));
|
9205 |
+
}
|
9206 |
+
child = child.nextSibling;
|
9207 |
+
}
|
9208 |
+
|
9209 |
+
return clone;
|
9210 |
+
}
|
9211 |
+
|
9212 |
+
|
9213 |
+
|
9214 |
+
function isElementNode(node) {
|
9215 |
+
return node.nodeType === Node.ELEMENT_NODE;
|
9216 |
+
}
|
9217 |
+
|
9218 |
+
module.exports = function(ownerDocument, containerDocument, width, height, options, x ,y) {
|
9219 |
+
labelCanvasElements(ownerDocument);
|
9220 |
+
var documentElement = isIE9() ? cloneNodeIE9(ownerDocument.documentElement, options.javascriptEnabled) : ownerDocument.documentElement.cloneNode(true);
|
9221 |
+
var container = containerDocument.createElement("iframe");
|
9222 |
+
|
9223 |
+
container.className = "html2canvas-container";
|
9224 |
+
container.style.visibility = "hidden";
|
9225 |
+
container.style.position = "fixed";
|
9226 |
+
container.style.left = "-10000px";
|
9227 |
+
container.style.top = "0px";
|
9228 |
+
container.style.border = "0";
|
9229 |
+
container.width = width;
|
9230 |
+
container.height = height;
|
9231 |
+
container.scrolling = "no"; // ios won't scroll without it
|
9232 |
+
containerDocument.body.appendChild(container);
|
9233 |
+
|
9234 |
+
return new Promise(function(resolve) {
|
9235 |
+
var documentClone = container.contentWindow.document;
|
9236 |
+
|
9237 |
+
cloneNodeValues(ownerDocument.documentElement, documentElement, "textarea");
|
9238 |
+
cloneNodeValues(ownerDocument.documentElement, documentElement, "select");
|
9239 |
+
|
9240 |
+
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
9241 |
+
if window url is about:blank, we can assign the url to current by writing onto the document
|
9242 |
+
*/
|
9243 |
+
container.contentWindow.onload = container.onload = function() {
|
9244 |
+
var interval = setInterval(function() {
|
9245 |
+
if (documentClone.body.childNodes.length > 0) {
|
9246 |
+
cloneCanvasContents(ownerDocument, documentClone);
|
9247 |
+
clearInterval(interval);
|
9248 |
+
if (options.type === "view") {
|
9249 |
+
container.contentWindow.scrollTo(x, y);
|
9250 |
+
}
|
9251 |
+
resolve(container);
|
9252 |
+
}
|
9253 |
+
}, 50);
|
9254 |
+
};
|
9255 |
+
|
9256 |
+
documentClone.open();
|
9257 |
+
documentClone.write("<!DOCTYPE html><html></html>");
|
9258 |
+
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
9259 |
+
restoreOwnerScroll(ownerDocument, x, y);
|
9260 |
+
documentClone.replaceChild(options.javascriptEnabled === true ? documentClone.adoptNode(documentElement) : removeScriptNodes(documentClone.adoptNode(documentElement)), documentClone.documentElement);
|
9261 |
+
documentClone.close();
|
9262 |
+
});
|
9263 |
+
};
|
9264 |
+
|
9265 |
+
},{"./log":15,"./promise":18}],5:[function(require,module,exports){
|
9266 |
+
// http://dev.w3.org/csswg/css-color/
|
9267 |
+
|
9268 |
+
function Color(value) {
|
9269 |
+
this.r = 0;
|
9270 |
+
this.g = 0;
|
9271 |
+
this.b = 0;
|
9272 |
+
this.a = null;
|
9273 |
+
var result = this.fromArray(value) ||
|
9274 |
+
this.namedColor(value) ||
|
9275 |
+
this.rgb(value) ||
|
9276 |
+
this.rgba(value) ||
|
9277 |
+
this.hex6(value) ||
|
9278 |
+
this.hex3(value);
|
9279 |
+
}
|
9280 |
+
|
9281 |
+
Color.prototype.darken = function(amount) {
|
9282 |
+
var a = 1 - amount;
|
9283 |
+
return new Color([
|
9284 |
+
Math.round(this.r * a),
|
9285 |
+
Math.round(this.g * a),
|
9286 |
+
Math.round(this.b * a),
|
9287 |
+
this.a
|
9288 |
+
]);
|
9289 |
+
};
|
9290 |
+
|
9291 |
+
Color.prototype.isTransparent = function() {
|
9292 |
+
return this.a === 0;
|
9293 |
+
};
|
9294 |
+
|
9295 |
+
Color.prototype.isBlack = function() {
|
9296 |
+
return this.r === 0 && this.g === 0 && this.b === 0;
|
9297 |
+
};
|
9298 |
+
|
9299 |
+
Color.prototype.fromArray = function(array) {
|
9300 |
+
if (Array.isArray(array)) {
|
9301 |
+
this.r = Math.min(array[0], 255);
|
9302 |
+
this.g = Math.min(array[1], 255);
|
9303 |
+
this.b = Math.min(array[2], 255);
|
9304 |
+
if (array.length > 3) {
|
9305 |
+
this.a = array[3];
|
9306 |
+
}
|
9307 |
+
}
|
9308 |
+
|
9309 |
+
return (Array.isArray(array));
|
9310 |
+
};
|
9311 |
+
|
9312 |
+
var _hex3 = /^#([a-f0-9]{3})$/i;
|
9313 |
+
|
9314 |
+
Color.prototype.hex3 = function(value) {
|
9315 |
+
var match = null;
|
9316 |
+
if ((match = value.match(_hex3)) !== null) {
|
9317 |
+
this.r = parseInt(match[1][0] + match[1][0], 16);
|
9318 |
+
this.g = parseInt(match[1][1] + match[1][1], 16);
|
9319 |
+
this.b = parseInt(match[1][2] + match[1][2], 16);
|
9320 |
+
}
|
9321 |
+
return match !== null;
|
9322 |
+
};
|
9323 |
+
|
9324 |
+
var _hex6 = /^#([a-f0-9]{6})$/i;
|
9325 |
+
|
9326 |
+
Color.prototype.hex6 = function(value) {
|
9327 |
+
var match = null;
|
9328 |
+
if ((match = value.match(_hex6)) !== null) {
|
9329 |
+
this.r = parseInt(match[1].substring(0, 2), 16);
|
9330 |
+
this.g = parseInt(match[1].substring(2, 4), 16);
|
9331 |
+
this.b = parseInt(match[1].substring(4, 6), 16);
|
9332 |
+
}
|
9333 |
+
return match !== null;
|
9334 |
+
};
|
9335 |
+
|
9336 |
+
|
9337 |
+
var _rgb = /^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;
|
9338 |
+
|
9339 |
+
Color.prototype.rgb = function(value) {
|
9340 |
+
var match = null;
|
9341 |
+
if ((match = value.match(_rgb)) !== null) {
|
9342 |
+
this.r = Number(match[1]);
|
9343 |
+
this.g = Number(match[2]);
|
9344 |
+
this.b = Number(match[3]);
|
9345 |
+
}
|
9346 |
+
return match !== null;
|
9347 |
+
};
|
9348 |
+
|
9349 |
+
var _rgba = /^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;
|
9350 |
+
|
9351 |
+
Color.prototype.rgba = function(value) {
|
9352 |
+
var match = null;
|
9353 |
+
if ((match = value.match(_rgba)) !== null) {
|
9354 |
+
this.r = Number(match[1]);
|
9355 |
+
this.g = Number(match[2]);
|
9356 |
+
this.b = Number(match[3]);
|
9357 |
+
this.a = Number(match[4]);
|
9358 |
+
}
|
9359 |
+
return match !== null;
|
9360 |
+
};
|
9361 |
+
|
9362 |
+
Color.prototype.toString = function() {
|
9363 |
+
return this.a !== null && this.a !== 1 ?
|
9364 |
+
"rgba(" + [this.r, this.g, this.b, this.a].join(",") + ")" :
|
9365 |
+
"rgb(" + [this.r, this.g, this.b].join(",") + ")";
|
9366 |
+
};
|
9367 |
+
|
9368 |
+
Color.prototype.namedColor = function(value) {
|
9369 |
+
var color = colors[value.toLowerCase()];
|
9370 |
+
if (color) {
|
9371 |
+
this.r = color[0];
|
9372 |
+
this.g = color[1];
|
9373 |
+
this.b = color[2];
|
9374 |
+
} else if (value.toLowerCase() === "transparent") {
|
9375 |
+
this.r = this.g = this.b = this.a = 0;
|
9376 |
+
return true;
|
9377 |
+
}
|
9378 |
+
|
9379 |
+
return !!color;
|
9380 |
+
};
|
9381 |
+
|
9382 |
+
Color.prototype.isColor = true;
|
9383 |
+
|
9384 |
+
// JSON.stringify([].slice.call($$('.named-color-table tr'), 1).map(function(row) { return [row.childNodes[3].textContent, row.childNodes[5].textContent.trim().split(",").map(Number)] }).reduce(function(data, row) {data[row[0]] = row[1]; return data}, {}))
|
9385 |
+
var colors = {
|
9386 |
+
"aliceblue": [240, 248, 255],
|
9387 |
+
"antiquewhite": [250, 235, 215],
|
9388 |
+
"aqua": [0, 255, 255],
|
9389 |
+
"aquamarine": [127, 255, 212],
|
9390 |
+
"azure": [240, 255, 255],
|
9391 |
+
"beige": [245, 245, 220],
|
9392 |
+
"bisque": [255, 228, 196],
|
9393 |
+
"black": [0, 0, 0],
|
9394 |
+
"blanchedalmond": [255, 235, 205],
|
9395 |
+
"blue": [0, 0, 255],
|
9396 |
+
"blueviolet": [138, 43, 226],
|
9397 |
+
"brown": [165, 42, 42],
|
9398 |
+
"burlywood": [222, 184, 135],
|
9399 |
+
"cadetblue": [95, 158, 160],
|
9400 |
+
"chartreuse": [127, 255, 0],
|
9401 |
+
"chocolate": [210, 105, 30],
|
9402 |
+
"coral": [255, 127, 80],
|
9403 |
+
"cornflowerblue": [100, 149, 237],
|
9404 |
+
"cornsilk": [255, 248, 220],
|
9405 |
+
"crimson": [220, 20, 60],
|
9406 |
+
"cyan": [0, 255, 255],
|
9407 |
+
"darkblue": [0, 0, 139],
|
9408 |
+
"darkcyan": [0, 139, 139],
|
9409 |
+
"darkgoldenrod": [184, 134, 11],
|
9410 |
+
"darkgray": [169, 169, 169],
|
9411 |
+
"darkgreen": [0, 100, 0],
|
9412 |
+
"darkgrey": [169, 169, 169],
|
9413 |
+
"darkkhaki": [189, 183, 107],
|
9414 |
+
"darkmagenta": [139, 0, 139],
|
9415 |
+
"darkolivegreen": [85, 107, 47],
|
9416 |
+
"darkorange": [255, 140, 0],
|
9417 |
+
"darkorchid": [153, 50, 204],
|
9418 |
+
"darkred": [139, 0, 0],
|
9419 |
+
"darksalmon": [233, 150, 122],
|
9420 |
+
"darkseagreen": [143, 188, 143],
|
9421 |
+
"darkslateblue": [72, 61, 139],
|
9422 |
+
"darkslategray": [47, 79, 79],
|
9423 |
+
"darkslategrey": [47, 79, 79],
|
9424 |
+
"darkturquoise": [0, 206, 209],
|
9425 |
+
"darkviolet": [148, 0, 211],
|
9426 |
+
"deeppink": [255, 20, 147],
|
9427 |
+
"deepskyblue": [0, 191, 255],
|
9428 |
+
"dimgray": [105, 105, 105],
|
9429 |
+
"dimgrey": [105, 105, 105],
|
9430 |
+
"dodgerblue": [30, 144, 255],
|
9431 |
+
"firebrick": [178, 34, 34],
|
9432 |
+
"floralwhite": [255, 250, 240],
|
9433 |
+
"forestgreen": [34, 139, 34],
|
9434 |
+
"fuchsia": [255, 0, 255],
|
9435 |
+
"gainsboro": [220, 220, 220],
|
9436 |
+
"ghostwhite": [248, 248, 255],
|
9437 |
+
"gold": [255, 215, 0],
|
9438 |
+
"goldenrod": [218, 165, 32],
|
9439 |
+
"gray": [128, 128, 128],
|
9440 |
+
"green": [0, 128, 0],
|
9441 |
+
"greenyellow": [173, 255, 47],
|
9442 |
+
"grey": [128, 128, 128],
|
9443 |
+
"honeydew": [240, 255, 240],
|
9444 |
+
"hotpink": [255, 105, 180],
|
9445 |
+
"indianred": [205, 92, 92],
|
9446 |
+
"indigo": [75, 0, 130],
|
9447 |
+
"ivory": [255, 255, 240],
|
9448 |
+
"khaki": [240, 230, 140],
|
9449 |
+
"lavender": [230, 230, 250],
|
9450 |
+
"lavenderblush": [255, 240, 245],
|
9451 |
+
"lawngreen": [124, 252, 0],
|
9452 |
+
"lemonchiffon": [255, 250, 205],
|
9453 |
+
"lightblue": [173, 216, 230],
|
9454 |
+
"lightcoral": [240, 128, 128],
|
9455 |
+
"lightcyan": [224, 255, 255],
|
9456 |
+
"lightgoldenrodyellow": [250, 250, 210],
|
9457 |
+
"lightgray": [211, 211, 211],
|
9458 |
+
"lightgreen": [144, 238, 144],
|
9459 |
+
"lightgrey": [211, 211, 211],
|
9460 |
+
"lightpink": [255, 182, 193],
|
9461 |
+
"lightsalmon": [255, 160, 122],
|
9462 |
+
"lightseagreen": [32, 178, 170],
|
9463 |
+
"lightskyblue": [135, 206, 250],
|
9464 |
+
"lightslategray": [119, 136, 153],
|
9465 |
+
"lightslategrey": [119, 136, 153],
|
9466 |
+
"lightsteelblue": [176, 196, 222],
|
9467 |
+
"lightyellow": [255, 255, 224],
|
9468 |
+
"lime": [0, 255, 0],
|
9469 |
+
"limegreen": [50, 205, 50],
|
9470 |
+
"linen": [250, 240, 230],
|
9471 |
+
"magenta": [255, 0, 255],
|
9472 |
+
"maroon": [128, 0, 0],
|
9473 |
+
"mediumaquamarine": [102, 205, 170],
|
9474 |
+
"mediumblue": [0, 0, 205],
|
9475 |
+
"mediumorchid": [186, 85, 211],
|
9476 |
+
"mediumpurple": [147, 112, 219],
|
9477 |
+
"mediumseagreen": [60, 179, 113],
|
9478 |
+
"mediumslateblue": [123, 104, 238],
|
9479 |
+
"mediumspringgreen": [0, 250, 154],
|
9480 |
+
"mediumturquoise": [72, 209, 204],
|
9481 |
+
"mediumvioletred": [199, 21, 133],
|
9482 |
+
"midnightblue": [25, 25, 112],
|
9483 |
+
"mintcream": [245, 255, 250],
|
9484 |
+
"mistyrose": [255, 228, 225],
|
9485 |
+
"moccasin": [255, 228, 181],
|
9486 |
+
"navajowhite": [255, 222, 173],
|
9487 |
+
"navy": [0, 0, 128],
|
9488 |
+
"oldlace": [253, 245, 230],
|
9489 |
+
"olive": [128, 128, 0],
|
9490 |
+
"olivedrab": [107, 142, 35],
|
9491 |
+
"orange": [255, 165, 0],
|
9492 |
+
"orangered": [255, 69, 0],
|
9493 |
+
"orchid": [218, 112, 214],
|
9494 |
+
"palegoldenrod": [238, 232, 170],
|
9495 |
+
"palegreen": [152, 251, 152],
|
9496 |
+
"paleturquoise": [175, 238, 238],
|
9497 |
+
"palevioletred": [219, 112, 147],
|
9498 |
+
"papayawhip": [255, 239, 213],
|
9499 |
+
"peachpuff": [255, 218, 185],
|
9500 |
+
"peru": [205, 133, 63],
|
9501 |
+
"pink": [255, 192, 203],
|
9502 |
+
"plum": [221, 160, 221],
|
9503 |
+
"powderblue": [176, 224, 230],
|
9504 |
+
"purple": [128, 0, 128],
|
9505 |
+
"rebeccapurple": [102, 51, 153],
|
9506 |
+
"red": [255, 0, 0],
|
9507 |
+
"rosybrown": [188, 143, 143],
|
9508 |
+
"royalblue": [65, 105, 225],
|
9509 |
+
"saddlebrown": [139, 69, 19],
|
9510 |
+
"salmon": [250, 128, 114],
|
9511 |
+
"sandybrown": [244, 164, 96],
|
9512 |
+
"seagreen": [46, 139, 87],
|
9513 |
+
"seashell": [255, 245, 238],
|
9514 |
+
"sienna": [160, 82, 45],
|
9515 |
+
"silver": [192, 192, 192],
|
9516 |
+
"skyblue": [135, 206, 235],
|
9517 |
+
"slateblue": [106, 90, 205],
|
9518 |
+
"slategray": [112, 128, 144],
|
9519 |
+
"slategrey": [112, 128, 144],
|
9520 |
+
"snow": [255, 250, 250],
|
9521 |
+
"springgreen": [0, 255, 127],
|
9522 |
+
"steelblue": [70, 130, 180],
|
9523 |
+
"tan": [210, 180, 140],
|
9524 |
+
"teal": [0, 128, 128],
|
9525 |
+
"thistle": [216, 191, 216],
|
9526 |
+
"tomato": [255, 99, 71],
|
9527 |
+
"turquoise": [64, 224, 208],
|
9528 |
+
"violet": [238, 130, 238],
|
9529 |
+
"wheat": [245, 222, 179],
|
9530 |
+
"white": [255, 255, 255],
|
9531 |
+
"whitesmoke": [245, 245, 245],
|
9532 |
+
"yellow": [255, 255, 0],
|
9533 |
+
"yellowgreen": [154, 205, 50]
|
9534 |
+
};
|
9535 |
+
|
9536 |
+
module.exports = Color;
|
9537 |
+
|
9538 |
+
},{}],6:[function(require,module,exports){
|
9539 |
+
var Promise = require('./promise');
|
9540 |
+
var Support = require('./support');
|
9541 |
+
var CanvasRenderer = require('./renderers/canvas');
|
9542 |
+
var ImageLoader = require('./imageloader');
|
9543 |
+
var NodeParser = require('./nodeparser');
|
9544 |
+
var NodeContainer = require('./nodecontainer');
|
9545 |
+
var log = require('./log');
|
9546 |
+
var utils = require('./utils');
|
9547 |
+
var createWindowClone = require('./clone');
|
9548 |
+
var loadUrlDocument = require('./proxy').loadUrlDocument;
|
9549 |
+
var getBounds = utils.getBounds;
|
9550 |
+
|
9551 |
+
var html2canvasNodeAttribute = "data-html2canvas-node";
|
9552 |
+
var html2canvasCloneIndex = 0;
|
9553 |
+
|
9554 |
+
function html2canvas(nodeList, options) {
|
9555 |
+
var index = html2canvasCloneIndex++;
|
9556 |
+
options = options || {};
|
9557 |
+
if (options.logging) {
|
9558 |
+
window.html2canvas.logging = true;
|
9559 |
+
window.html2canvas.start = Date.now();
|
9560 |
+
}
|
9561 |
+
|
9562 |
+
options.async = typeof(options.async) === "undefined" ? true : options.async;
|
9563 |
+
options.allowTaint = typeof(options.allowTaint) === "undefined" ? false : options.allowTaint;
|
9564 |
+
options.removeContainer = typeof(options.removeContainer) === "undefined" ? true : options.removeContainer;
|
9565 |
+
options.javascriptEnabled = typeof(options.javascriptEnabled) === "undefined" ? false : options.javascriptEnabled;
|
9566 |
+
options.imageTimeout = typeof(options.imageTimeout) === "undefined" ? 10000 : options.imageTimeout;
|
9567 |
+
options.renderer = typeof(options.renderer) === "function" ? options.renderer : CanvasRenderer;
|
9568 |
+
options.strict = !!options.strict;
|
9569 |
+
|
9570 |
+
if (typeof(nodeList) === "string") {
|
9571 |
+
if (typeof(options.proxy) !== "string") {
|
9572 |
+
return Promise.reject("Proxy must be used when rendering url");
|
9573 |
+
}
|
9574 |
+
var width = options.width != null ? options.width : window.innerWidth;
|
9575 |
+
var height = options.height != null ? options.height : window.innerHeight;
|
9576 |
+
return loadUrlDocument(absoluteUrl(nodeList), options.proxy, document, width, height, options).then(function(container) {
|
9577 |
+
return renderWindow(container.contentWindow.document.documentElement, container, options, width, height);
|
9578 |
+
});
|
9579 |
+
}
|
9580 |
+
|
9581 |
+
var node = ((nodeList === undefined) ? [document.documentElement] : ((nodeList.length) ? nodeList : [nodeList]))[0];
|
9582 |
+
node.setAttribute(html2canvasNodeAttribute + index, index);
|
9583 |
+
return renderDocument(node.ownerDocument, options, node.ownerDocument.defaultView.innerWidth, node.ownerDocument.defaultView.innerHeight, index).then(function(canvas) {
|
9584 |
+
if (typeof(options.onrendered) === "function") {
|
9585 |
+
log("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas");
|
9586 |
+
options.onrendered(canvas);
|
9587 |
+
}
|
9588 |
+
return canvas;
|
9589 |
+
});
|
9590 |
+
}
|
9591 |
+
|
9592 |
+
html2canvas.Promise = Promise;
|
9593 |
+
html2canvas.CanvasRenderer = CanvasRenderer;
|
9594 |
+
html2canvas.NodeContainer = NodeContainer;
|
9595 |
+
html2canvas.log = log;
|
9596 |
+
html2canvas.utils = utils;
|
9597 |
+
|
9598 |
+
module.exports = (typeof(document) === "undefined" || typeof(Object.create) !== "function" || typeof(document.createElement("canvas").getContext) !== "function") ? function() {
|
9599 |
+
return Promise.reject("No canvas support");
|
9600 |
+
} : html2canvas;
|
9601 |
+
|
9602 |
+
function renderDocument(document, options, windowWidth, windowHeight, html2canvasIndex) {
|
9603 |
+
return createWindowClone(document, document, windowWidth, windowHeight, options, document.defaultView.pageXOffset, document.defaultView.pageYOffset).then(function(container) {
|
9604 |
+
log("Document cloned");
|
9605 |
+
var attributeName = html2canvasNodeAttribute + html2canvasIndex;
|
9606 |
+
var selector = "[" + attributeName + "='" + html2canvasIndex + "']";
|
9607 |
+
document.querySelector(selector).removeAttribute(attributeName);
|
9608 |
+
var clonedWindow = container.contentWindow;
|
9609 |
+
var node = clonedWindow.document.querySelector(selector);
|
9610 |
+
var oncloneHandler = (typeof(options.onclone) === "function") ? Promise.resolve(options.onclone(clonedWindow.document)) : Promise.resolve(true);
|
9611 |
+
return oncloneHandler.then(function() {
|
9612 |
+
return renderWindow(node, container, options, windowWidth, windowHeight);
|
9613 |
+
});
|
9614 |
+
});
|
9615 |
+
}
|
9616 |
+
|
9617 |
+
function renderWindow(node, container, options, windowWidth, windowHeight) {
|
9618 |
+
var clonedWindow = container.contentWindow;
|
9619 |
+
var support = new Support(clonedWindow.document);
|
9620 |
+
var imageLoader = new ImageLoader(options, support);
|
9621 |
+
var bounds = getBounds(node);
|
9622 |
+
var width = options.type === "view" ? windowWidth : documentWidth(clonedWindow.document);
|
9623 |
+
var height = options.type === "view" ? windowHeight : documentHeight(clonedWindow.document);
|
9624 |
+
var renderer = new options.renderer(width, height, imageLoader, options, document);
|
9625 |
+
var parser = new NodeParser(node, renderer, support, imageLoader, options);
|
9626 |
+
return parser.ready.then(function() {
|
9627 |
+
log("Finished rendering");
|
9628 |
+
var canvas;
|
9629 |
+
|
9630 |
+
if (options.type === "view") {
|
9631 |
+
canvas = crop(renderer.canvas, {width: renderer.canvas.width, height: renderer.canvas.height, top: 0, left: 0, x: 0, y: 0});
|
9632 |
+
} else if (node === clonedWindow.document.body || node === clonedWindow.document.documentElement || options.canvas != null) {
|
9633 |
+
canvas = renderer.canvas;
|
9634 |
+
} else {
|
9635 |
+
canvas = crop(renderer.canvas, {width: options.width != null ? options.width : bounds.width, height: options.height != null ? options.height : bounds.height, top: bounds.top, left: bounds.left, x: clonedWindow.pageXOffset, y: clonedWindow.pageYOffset});
|
9636 |
+
}
|
9637 |
+
|
9638 |
+
cleanupContainer(container, options);
|
9639 |
+
return canvas;
|
9640 |
+
});
|
9641 |
+
}
|
9642 |
+
|
9643 |
+
function cleanupContainer(container, options) {
|
9644 |
+
if (options.removeContainer) {
|
9645 |
+
container.parentNode.removeChild(container);
|
9646 |
+
log("Cleaned up container");
|
9647 |
+
}
|
9648 |
+
}
|
9649 |
+
|
9650 |
+
function crop(canvas, bounds) {
|
9651 |
+
var croppedCanvas = document.createElement("canvas");
|
9652 |
+
var x1 = Math.min(canvas.width - 1, Math.max(0, bounds.left));
|
9653 |
+
var x2 = Math.min(canvas.width, Math.max(1, bounds.left + bounds.width));
|
9654 |
+
var y1 = Math.min(canvas.height - 1, Math.max(0, bounds.top));
|
9655 |
+
var y2 = Math.min(canvas.height, Math.max(1, bounds.top + bounds.height));
|
9656 |
+
croppedCanvas.width = bounds.width;
|
9657 |
+
croppedCanvas.height = bounds.height;
|
9658 |
+
log("Cropping canvas at:", "left:", bounds.left, "top:", bounds.top, "width:", (x2-x1), "height:", (y2-y1));
|
9659 |
+
log("Resulting crop with width", bounds.width, "and height", bounds.height, " with x", x1, "and y", y1);
|
9660 |
+
croppedCanvas.getContext("2d").drawImage(canvas, x1, y1, x2-x1, y2-y1, bounds.x, bounds.y, x2-x1, y2-y1);
|
9661 |
+
return croppedCanvas;
|
9662 |
+
}
|
9663 |
+
|
9664 |
+
function documentWidth (doc) {
|
9665 |
+
return Math.max(
|
9666 |
+
Math.max(doc.body.scrollWidth, doc.documentElement.scrollWidth),
|
9667 |
+
Math.max(doc.body.offsetWidth, doc.documentElement.offsetWidth),
|
9668 |
+
Math.max(doc.body.clientWidth, doc.documentElement.clientWidth)
|
9669 |
+
);
|
9670 |
+
}
|
9671 |
+
|
9672 |
+
function documentHeight (doc) {
|
9673 |
+
return Math.max(
|
9674 |
+
Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight),
|
9675 |
+
Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight),
|
9676 |
+
Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
|
9677 |
+
);
|
9678 |
+
}
|
9679 |
+
|
9680 |
+
function absoluteUrl(url) {
|
9681 |
+
var link = document.createElement("a");
|
9682 |
+
link.href = url;
|
9683 |
+
link.href = link.href;
|
9684 |
+
return link;
|
9685 |
+
}
|
9686 |
+
|
9687 |
+
},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(require,module,exports){
|
9688 |
+
var Promise = require('./promise');
|
9689 |
+
var log = require('./log');
|
9690 |
+
var smallImage = require('./utils').smallImage;
|
9691 |
+
|
9692 |
+
function DummyImageContainer(src) {
|
9693 |
+
this.src = src;
|
9694 |
+
log("DummyImageContainer for", src);
|
9695 |
+
if (!this.promise || !this.image) {
|
9696 |
+
log("Initiating DummyImageContainer");
|
9697 |
+
DummyImageContainer.prototype.image = new Image();
|
9698 |
+
var image = this.image;
|
9699 |
+
DummyImageContainer.prototype.promise = new Promise(function(resolve, reject) {
|
9700 |
+
image.onload = resolve;
|
9701 |
+
image.onerror = reject;
|
9702 |
+
image.src = smallImage();
|
9703 |
+
if (image.complete === true) {
|
9704 |
+
resolve(image);
|
9705 |
+
}
|
9706 |
+
});
|
9707 |
+
}
|
9708 |
+
}
|
9709 |
+
|
9710 |
+
module.exports = DummyImageContainer;
|
9711 |
+
|
9712 |
+
},{"./log":15,"./promise":18,"./utils":29}],8:[function(require,module,exports){
|
9713 |
+
var smallImage = require('./utils').smallImage;
|
9714 |
+
|
9715 |
+
function Font(family, size) {
|
9716 |
+
var container = document.createElement('div'),
|
9717 |
+
img = document.createElement('img'),
|
9718 |
+
span = document.createElement('span'),
|
9719 |
+
sampleText = 'Hidden Text',
|
9720 |
+
baseline,
|
9721 |
+
middle;
|
9722 |
+
|
9723 |
+
container.style.visibility = "hidden";
|
9724 |
+
container.style.fontFamily = family;
|
9725 |
+
container.style.fontSize = size;
|
9726 |
+
container.style.margin = 0;
|
9727 |
+
container.style.padding = 0;
|
9728 |
+
|
9729 |
+
document.body.appendChild(container);
|
9730 |
+
|
9731 |
+
img.src = smallImage();
|
9732 |
+
img.width = 1;
|
9733 |
+
img.height = 1;
|
9734 |
+
|
9735 |
+
img.style.margin = 0;
|
9736 |
+
img.style.padding = 0;
|
9737 |
+
img.style.verticalAlign = "baseline";
|
9738 |
+
|
9739 |
+
span.style.fontFamily = family;
|
9740 |
+
span.style.fontSize = size;
|
9741 |
+
span.style.margin = 0;
|
9742 |
+
span.style.padding = 0;
|
9743 |
+
|
9744 |
+
span.appendChild(document.createTextNode(sampleText));
|
9745 |
+
container.appendChild(span);
|
9746 |
+
container.appendChild(img);
|
9747 |
+
baseline = (img.offsetTop - span.offsetTop) + 1;
|
9748 |
+
|
9749 |
+
container.removeChild(span);
|
9750 |
+
container.appendChild(document.createTextNode(sampleText));
|
9751 |
+
|
9752 |
+
container.style.lineHeight = "normal";
|
9753 |
+
img.style.verticalAlign = "super";
|
9754 |
+
|
9755 |
+
middle = (img.offsetTop-container.offsetTop) + 1;
|
9756 |
+
|
9757 |
+
document.body.removeChild(container);
|
9758 |
+
|
9759 |
+
this.baseline = baseline;
|
9760 |
+
this.lineWidth = 1;
|
9761 |
+
this.middle = middle;
|
9762 |
+
}
|
9763 |
+
|
9764 |
+
module.exports = Font;
|
9765 |
+
|
9766 |
+
},{"./utils":29}],9:[function(require,module,exports){
|
9767 |
+
var Font = require('./font');
|
9768 |
+
|
9769 |
+
function FontMetrics() {
|
9770 |
+
this.data = {};
|
9771 |
+
}
|
9772 |
+
|
9773 |
+
FontMetrics.prototype.getMetrics = function(family, size) {
|
9774 |
+
if (this.data[family + "-" + size] === undefined) {
|
9775 |
+
this.data[family + "-" + size] = new Font(family, size);
|
9776 |
+
}
|
9777 |
+
return this.data[family + "-" + size];
|
9778 |
+
};
|
9779 |
+
|
9780 |
+
module.exports = FontMetrics;
|
9781 |
+
|
9782 |
+
},{"./font":8}],10:[function(require,module,exports){
|
9783 |
+
var utils = require('./utils');
|
9784 |
+
var Promise = require('./promise');
|
9785 |
+
var getBounds = utils.getBounds;
|
9786 |
+
var loadUrlDocument = require('./proxy').loadUrlDocument;
|
9787 |
+
|
9788 |
+
function FrameContainer(container, sameOrigin, options) {
|
9789 |
+
this.image = null;
|
9790 |
+
this.src = container;
|
9791 |
+
var self = this;
|
9792 |
+
var bounds = getBounds(container);
|
9793 |
+
this.promise = (!sameOrigin ? this.proxyLoad(options.proxy, bounds, options) : new Promise(function(resolve) {
|
9794 |
+
if (container.contentWindow.document.URL === "about:blank" || container.contentWindow.document.documentElement == null) {
|
9795 |
+
container.contentWindow.onload = container.onload = function() {
|
9796 |
+
resolve(container);
|
9797 |
+
};
|
9798 |
+
} else {
|
9799 |
+
resolve(container);
|
9800 |
+
}
|
9801 |
+
})).then(function(container) {
|
9802 |
+
var html2canvas = require('./core');
|
9803 |
+
return html2canvas(container.contentWindow.document.documentElement, {type: 'view', width: container.width, height: container.height, proxy: options.proxy, javascriptEnabled: options.javascriptEnabled, removeContainer: options.removeContainer, allowTaint: options.allowTaint, imageTimeout: options.imageTimeout / 2});
|
9804 |
+
}).then(function(canvas) {
|
9805 |
+
return self.image = canvas;
|
9806 |
+
});
|
9807 |
+
}
|
9808 |
+
|
9809 |
+
FrameContainer.prototype.proxyLoad = function(proxy, bounds, options) {
|
9810 |
+
var container = this.src;
|
9811 |
+
return loadUrlDocument(container.src, proxy, container.ownerDocument, bounds.width, bounds.height, options);
|
9812 |
+
};
|
9813 |
+
|
9814 |
+
module.exports = FrameContainer;
|
9815 |
+
|
9816 |
+
},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(require,module,exports){
|
9817 |
+
var Promise = require('./promise');
|
9818 |
+
|
9819 |
+
function GradientContainer(imageData) {
|
9820 |
+
this.src = imageData.value;
|
9821 |
+
this.colorStops = [];
|
9822 |
+
this.type = null;
|
9823 |
+
this.x0 = 0.5;
|
9824 |
+
this.y0 = 0.5;
|
9825 |
+
this.x1 = 0.5;
|
9826 |
+
this.y1 = 0.5;
|
9827 |
+
this.promise = Promise.resolve(true);
|
9828 |
+
}
|
9829 |
+
|
9830 |
+
GradientContainer.prototype.TYPES = {
|
9831 |
+
LINEAR: 1,
|
9832 |
+
RADIAL: 2
|
9833 |
+
};
|
9834 |
+
|
9835 |
+
module.exports = GradientContainer;
|
9836 |
+
|
9837 |
+
},{"./promise":18}],12:[function(require,module,exports){
|
9838 |
+
var Promise = require('./promise');
|
9839 |
+
|
9840 |
+
function ImageContainer(src, cors) {
|
9841 |
+
this.src = src;
|
9842 |
+
this.image = new Image();
|
9843 |
+
var self = this;
|
9844 |
+
this.tainted = null;
|
9845 |
+
this.promise = new Promise(function(resolve, reject) {
|
9846 |
+
self.image.onload = resolve;
|
9847 |
+
self.image.onerror = reject;
|
9848 |
+
if (cors) {
|
9849 |
+
self.image.crossOrigin = "anonymous";
|
9850 |
+
}
|
9851 |
+
self.image.src = src;
|
9852 |
+
if (self.image.complete === true) {
|
9853 |
+
resolve(self.image);
|
9854 |
+
}
|
9855 |
+
});
|
9856 |
+
}
|
9857 |
+
|
9858 |
+
module.exports = ImageContainer;
|
9859 |
+
|
9860 |
+
},{"./promise":18}],13:[function(require,module,exports){
|
9861 |
+
var Promise = require('./promise');
|
9862 |
+
var log = require('./log');
|
9863 |
+
var ImageContainer = require('./imagecontainer');
|
9864 |
+
var DummyImageContainer = require('./dummyimagecontainer');
|
9865 |
+
var ProxyImageContainer = require('./proxyimagecontainer');
|
9866 |
+
var FrameContainer = require('./framecontainer');
|
9867 |
+
var SVGContainer = require('./svgcontainer');
|
9868 |
+
var SVGNodeContainer = require('./svgnodecontainer');
|
9869 |
+
var LinearGradientContainer = require('./lineargradientcontainer');
|
9870 |
+
var WebkitGradientContainer = require('./webkitgradientcontainer');
|
9871 |
+
var bind = require('./utils').bind;
|
9872 |
+
|
9873 |
+
function ImageLoader(options, support) {
|
9874 |
+
this.link = null;
|
9875 |
+
this.options = options;
|
9876 |
+
this.support = support;
|
9877 |
+
this.origin = this.getOrigin(window.location.href);
|
9878 |
+
}
|
9879 |
+
|
9880 |
+
ImageLoader.prototype.findImages = function(nodes) {
|
9881 |
+
var images = [];
|
9882 |
+
nodes.reduce(function(imageNodes, container) {
|
9883 |
+
switch(container.node.nodeName) {
|
9884 |
+
case "IMG":
|
9885 |
+
return imageNodes.concat([{
|
9886 |
+
args: [container.node.src],
|
9887 |
+
method: "url"
|
9888 |
+
}]);
|
9889 |
+
case "svg":
|
9890 |
+
case "IFRAME":
|
9891 |
+
return imageNodes.concat([{
|
9892 |
+
args: [container.node],
|
9893 |
+
method: container.node.nodeName
|
9894 |
+
}]);
|
9895 |
+
}
|
9896 |
+
return imageNodes;
|
9897 |
+
}, []).forEach(this.addImage(images, this.loadImage), this);
|
9898 |
+
return images;
|
9899 |
+
};
|
9900 |
+
|
9901 |
+
ImageLoader.prototype.findBackgroundImage = function(images, container) {
|
9902 |
+
container.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(images, this.loadImage), this);
|
9903 |
+
return images;
|
9904 |
+
};
|
9905 |
+
|
9906 |
+
ImageLoader.prototype.addImage = function(images, callback) {
|
9907 |
+
return function(newImage) {
|
9908 |
+
newImage.args.forEach(function(image) {
|
9909 |
+
if (!this.imageExists(images, image)) {
|
9910 |
+
images.splice(0, 0, callback.call(this, newImage));
|
9911 |
+
log('Added image #' + (images.length), typeof(image) === "string" ? image.substring(0, 100) : image);
|
9912 |
+
}
|
9913 |
+
}, this);
|
9914 |
+
};
|
9915 |
+
};
|
9916 |
+
|
9917 |
+
ImageLoader.prototype.hasImageBackground = function(imageData) {
|
9918 |
+
return imageData.method !== "none";
|
9919 |
+
};
|
9920 |
+
|
9921 |
+
ImageLoader.prototype.loadImage = function(imageData) {
|
9922 |
+
if (imageData.method === "url") {
|
9923 |
+
var src = imageData.args[0];
|
9924 |
+
if (this.isSVG(src) && !this.support.svg && !this.options.allowTaint) {
|
9925 |
+
return new SVGContainer(src);
|
9926 |
+
} else if (src.match(/data:image\/.*;base64,/i)) {
|
9927 |
+
return new ImageContainer(src.replace(/url\(['"]{0,}|['"]{0,}\)$/ig, ''), false);
|
9928 |
+
} else if (this.isSameOrigin(src) || this.options.allowTaint === true || this.isSVG(src)) {
|
9929 |
+
return new ImageContainer(src, false);
|
9930 |
+
} else if (this.support.cors && !this.options.allowTaint && this.options.useCORS) {
|
9931 |
+
return new ImageContainer(src, true);
|
9932 |
+
} else if (this.options.proxy) {
|
9933 |
+
return new ProxyImageContainer(src, this.options.proxy);
|
9934 |
+
} else {
|
9935 |
+
return new DummyImageContainer(src);
|
9936 |
+
}
|
9937 |
+
} else if (imageData.method === "linear-gradient") {
|
9938 |
+
return new LinearGradientContainer(imageData);
|
9939 |
+
} else if (imageData.method === "gradient") {
|
9940 |
+
return new WebkitGradientContainer(imageData);
|
9941 |
+
} else if (imageData.method === "svg") {
|
9942 |
+
return new SVGNodeContainer(imageData.args[0], this.support.svg);
|
9943 |
+
} else if (imageData.method === "IFRAME") {
|
9944 |
+
return new FrameContainer(imageData.args[0], this.isSameOrigin(imageData.args[0].src), this.options);
|
9945 |
+
} else {
|
9946 |
+
return new DummyImageContainer(imageData);
|
9947 |
+
}
|
9948 |
+
};
|
9949 |
+
|
9950 |
+
ImageLoader.prototype.isSVG = function(src) {
|
9951 |
+
return src.substring(src.length - 3).toLowerCase() === "svg" || SVGContainer.prototype.isInline(src);
|
9952 |
+
};
|
9953 |
+
|
9954 |
+
ImageLoader.prototype.imageExists = function(images, src) {
|
9955 |
+
return images.some(function(image) {
|
9956 |
+
return image.src === src;
|
9957 |
+
});
|
9958 |
+
};
|
9959 |
+
|
9960 |
+
ImageLoader.prototype.isSameOrigin = function(url) {
|
9961 |
+
return (this.getOrigin(url) === this.origin);
|
9962 |
+
};
|
9963 |
+
|
9964 |
+
ImageLoader.prototype.getOrigin = function(url) {
|
9965 |
+
var link = this.link || (this.link = document.createElement("a"));
|
9966 |
+
link.href = url;
|
9967 |
+
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
9968 |
+
return link.protocol + link.hostname + link.port;
|
9969 |
+
};
|
9970 |
+
|
9971 |
+
ImageLoader.prototype.getPromise = function(container) {
|
9972 |
+
return this.timeout(container, this.options.imageTimeout)['catch'](function() {
|
9973 |
+
var dummy = new DummyImageContainer(container.src);
|
9974 |
+
return dummy.promise.then(function(image) {
|
9975 |
+
container.image = image;
|
9976 |
+
});
|
9977 |
+
});
|
9978 |
+
};
|
9979 |
+
|
9980 |
+
ImageLoader.prototype.get = function(src) {
|
9981 |
+
var found = null;
|
9982 |
+
return this.images.some(function(img) {
|
9983 |
+
return (found = img).src === src;
|
9984 |
+
}) ? found : null;
|
9985 |
+
};
|
9986 |
+
|
9987 |
+
ImageLoader.prototype.fetch = function(nodes) {
|
9988 |
+
this.images = nodes.reduce(bind(this.findBackgroundImage, this), this.findImages(nodes));
|
9989 |
+
this.images.forEach(function(image, index) {
|
9990 |
+
image.promise.then(function() {
|
9991 |
+
log("Succesfully loaded image #"+ (index+1), image);
|
9992 |
+
}, function(e) {
|
9993 |
+
log("Failed loading image #"+ (index+1), image, e);
|
9994 |
+
});
|
9995 |
+
});
|
9996 |
+
this.ready = Promise.all(this.images.map(this.getPromise, this));
|
9997 |
+
log("Finished searching images");
|
9998 |
+
return this;
|
9999 |
+
};
|
10000 |
+
|
10001 |
+
ImageLoader.prototype.timeout = function(container, timeout) {
|
10002 |
+
var timer;
|
10003 |
+
var promise = Promise.race([container.promise, new Promise(function(res, reject) {
|
10004 |
+
timer = setTimeout(function() {
|
10005 |
+
log("Timed out loading image", container);
|
10006 |
+
reject(container);
|
10007 |
+
}, timeout);
|
10008 |
+
})]).then(function(container) {
|
10009 |
+
clearTimeout(timer);
|
10010 |
+
return container;
|
10011 |
+
});
|
10012 |
+
promise['catch'](function() {
|
10013 |
+
clearTimeout(timer);
|
10014 |
+
});
|
10015 |
+
return promise;
|
10016 |
+
};
|
10017 |
+
|
10018 |
+
module.exports = ImageLoader;
|
10019 |
+
|
10020 |
+
},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(require,module,exports){
|
10021 |
+
var GradientContainer = require('./gradientcontainer');
|
10022 |
+
var Color = require('./color');
|
10023 |
+
|
10024 |
+
function LinearGradientContainer(imageData) {
|
10025 |
+
GradientContainer.apply(this, arguments);
|
10026 |
+
this.type = this.TYPES.LINEAR;
|
10027 |
+
|
10028 |
+
var hasDirection = imageData.args[0].match(this.stepRegExp) === null;
|
10029 |
+
|
10030 |
+
if (hasDirection) {
|
10031 |
+
imageData.args[0].split(" ").reverse().forEach(function(position) {
|
10032 |
+
switch(position) {
|
10033 |
+
case "left":
|
10034 |
+
this.x0 = 0;
|
10035 |
+
this.x1 = 1;
|
10036 |
+
break;
|
10037 |
+
case "top":
|
10038 |
+
this.y0 = 0;
|
10039 |
+
this.y1 = 1;
|
10040 |
+
break;
|
10041 |
+
case "right":
|
10042 |
+
this.x0 = 1;
|
10043 |
+
this.x1 = 0;
|
10044 |
+
break;
|
10045 |
+
case "bottom":
|
10046 |
+
this.y0 = 1;
|
10047 |
+
this.y1 = 0;
|
10048 |
+
break;
|
10049 |
+
case "to":
|
10050 |
+
var y0 = this.y0;
|
10051 |
+
var x0 = this.x0;
|
10052 |
+
this.y0 = this.y1;
|
10053 |
+
this.x0 = this.x1;
|
10054 |
+
this.x1 = x0;
|
10055 |
+
this.y1 = y0;
|
10056 |
+
break;
|
10057 |
+
}
|
10058 |
+
}, this);
|
10059 |
+
} else {
|
10060 |
+
this.y0 = 0;
|
10061 |
+
this.y1 = 1;
|
10062 |
+
}
|
10063 |
+
|
10064 |
+
this.colorStops = imageData.args.slice(hasDirection ? 1 : 0).map(function(colorStop) {
|
10065 |
+
var colorStopMatch = colorStop.match(this.stepRegExp);
|
10066 |
+
return {
|
10067 |
+
color: new Color(colorStopMatch[1]),
|
10068 |
+
stop: colorStopMatch[3] === "%" ? colorStopMatch[2] / 100 : null
|
10069 |
+
};
|
10070 |
+
}, this);
|
10071 |
+
|
10072 |
+
if (this.colorStops[0].stop === null) {
|
10073 |
+
this.colorStops[0].stop = 0;
|
10074 |
+
}
|
10075 |
+
|
10076 |
+
if (this.colorStops[this.colorStops.length - 1].stop === null) {
|
10077 |
+
this.colorStops[this.colorStops.length - 1].stop = 1;
|
10078 |
+
}
|
10079 |
+
|
10080 |
+
this.colorStops.forEach(function(colorStop, index) {
|
10081 |
+
if (colorStop.stop === null) {
|
10082 |
+
this.colorStops.slice(index).some(function(find, count) {
|
10083 |
+
if (find.stop !== null) {
|
10084 |
+
colorStop.stop = ((find.stop - this.colorStops[index - 1].stop) / (count + 1)) + this.colorStops[index - 1].stop;
|
10085 |
+
return true;
|
10086 |
+
} else {
|
10087 |
+
return false;
|
10088 |
+
}
|
10089 |
+
}, this);
|
10090 |
+
}
|
10091 |
+
}, this);
|
10092 |
+
}
|
10093 |
+
|
10094 |
+
LinearGradientContainer.prototype = Object.create(GradientContainer.prototype);
|
10095 |
+
|
10096 |
+
LinearGradientContainer.prototype.stepRegExp = /((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/;
|
10097 |
+
|
10098 |
+
module.exports = LinearGradientContainer;
|
10099 |
+
|
10100 |
+
},{"./color":5,"./gradientcontainer":11}],15:[function(require,module,exports){
|
10101 |
+
module.exports = function() {
|
10102 |
+
if (window.html2canvas.logging && window.console && window.console.log) {
|
10103 |
+
Function.prototype.bind.call(window.console.log, (window.console)).apply(window.console, [(Date.now() - window.html2canvas.start) + "ms", "html2canvas:"].concat([].slice.call(arguments, 0)));
|
10104 |
+
}
|
10105 |
+
};
|
10106 |
+
|
10107 |
+
},{}],16:[function(require,module,exports){
|
10108 |
+
var Color = require('./color');
|
10109 |
+
var utils = require('./utils');
|
10110 |
+
var getBounds = utils.getBounds;
|
10111 |
+
var parseBackgrounds = utils.parseBackgrounds;
|
10112 |
+
var offsetBounds = utils.offsetBounds;
|
10113 |
+
|
10114 |
+
function NodeContainer(node, parent) {
|
10115 |
+
this.node = node;
|
10116 |
+
this.parent = parent;
|
10117 |
+
this.stack = null;
|
10118 |
+
this.bounds = null;
|
10119 |
+
this.borders = null;
|
10120 |
+
this.clip = [];
|
10121 |
+
this.backgroundClip = [];
|
10122 |
+
this.offsetBounds = null;
|
10123 |
+
this.visible = null;
|
10124 |
+
this.computedStyles = null;
|
10125 |
+
this.colors = {};
|
10126 |
+
this.styles = {};
|
10127 |
+
this.backgroundImages = null;
|
10128 |
+
this.transformData = null;
|
10129 |
+
this.transformMatrix = null;
|
10130 |
+
this.isPseudoElement = false;
|
10131 |
+
this.opacity = null;
|
10132 |
+
}
|
10133 |
+
|
10134 |
+
NodeContainer.prototype.cloneTo = function(stack) {
|
10135 |
+
stack.visible = this.visible;
|
10136 |
+
stack.borders = this.borders;
|
10137 |
+
stack.bounds = this.bounds;
|
10138 |
+
stack.clip = this.clip;
|
10139 |
+
stack.backgroundClip = this.backgroundClip;
|
10140 |
+
stack.computedStyles = this.computedStyles;
|
10141 |
+
stack.styles = this.styles;
|
10142 |
+
stack.backgroundImages = this.backgroundImages;
|
10143 |
+
stack.opacity = this.opacity;
|
10144 |
+
};
|
10145 |
+
|
10146 |
+
NodeContainer.prototype.getOpacity = function() {
|
10147 |
+
return this.opacity === null ? (this.opacity = this.cssFloat('opacity')) : this.opacity;
|
10148 |
+
};
|
10149 |
+
|
10150 |
+
NodeContainer.prototype.assignStack = function(stack) {
|
10151 |
+
this.stack = stack;
|
10152 |
+
stack.children.push(this);
|
10153 |
+
};
|
10154 |
+
|
10155 |
+
NodeContainer.prototype.isElementVisible = function() {
|
10156 |
+
return this.node.nodeType === Node.TEXT_NODE ? this.parent.visible : (
|
10157 |
+
this.css('display') !== "none" &&
|
10158 |
+
this.css('visibility') !== "hidden" &&
|
10159 |
+
!this.node.hasAttribute("data-html2canvas-ignore") &&
|
10160 |
+
(this.node.nodeName !== "INPUT" || this.node.getAttribute("type") !== "hidden")
|
10161 |
+
);
|
10162 |
+
};
|
10163 |
+
|
10164 |
+
NodeContainer.prototype.css = function(attribute) {
|
10165 |
+
if (!this.computedStyles) {
|
10166 |
+
this.computedStyles = this.isPseudoElement ? this.parent.computedStyle(this.before ? ":before" : ":after") : this.computedStyle(null);
|
10167 |
+
}
|
10168 |
+
|
10169 |
+
return this.styles[attribute] || (this.styles[attribute] = this.computedStyles[attribute]);
|
10170 |
+
};
|
10171 |
+
|
10172 |
+
NodeContainer.prototype.prefixedCss = function(attribute) {
|
10173 |
+
var prefixes = ["webkit", "moz", "ms", "o"];
|
10174 |
+
var value = this.css(attribute);
|
10175 |
+
if (value === undefined) {
|
10176 |
+
prefixes.some(function(prefix) {
|
10177 |
+
value = this.css(prefix + attribute.substr(0, 1).toUpperCase() + attribute.substr(1));
|
10178 |
+
return value !== undefined;
|
10179 |
+
}, this);
|
10180 |
+
}
|
10181 |
+
return value === undefined ? null : value;
|
10182 |
+
};
|
10183 |
+
|
10184 |
+
NodeContainer.prototype.computedStyle = function(type) {
|
10185 |
+
return this.node.ownerDocument.defaultView.getComputedStyle(this.node, type);
|
10186 |
+
};
|
10187 |
+
|
10188 |
+
NodeContainer.prototype.cssInt = function(attribute) {
|
10189 |
+
var value = parseInt(this.css(attribute), 10);
|
10190 |
+
return (isNaN(value)) ? 0 : value; // borders in old IE are throwing 'medium' for demo.html
|
10191 |
+
};
|
10192 |
+
|
10193 |
+
NodeContainer.prototype.color = function(attribute) {
|
10194 |
+
return this.colors[attribute] || (this.colors[attribute] = new Color(this.css(attribute)));
|
10195 |
+
};
|
10196 |
+
|
10197 |
+
NodeContainer.prototype.cssFloat = function(attribute) {
|
10198 |
+
var value = parseFloat(this.css(attribute));
|
10199 |
+
return (isNaN(value)) ? 0 : value;
|
10200 |
+
};
|
10201 |
+
|
10202 |
+
NodeContainer.prototype.fontWeight = function() {
|
10203 |
+
var weight = this.css("fontWeight");
|
10204 |
+
switch(parseInt(weight, 10)){
|
10205 |
+
case 401:
|
10206 |
+
weight = "bold";
|
10207 |
+
break;
|
10208 |
+
case 400:
|
10209 |
+
weight = "normal";
|
10210 |
+
break;
|
10211 |
+
}
|
10212 |
+
return weight;
|
10213 |
+
};
|
10214 |
+
|
10215 |
+
NodeContainer.prototype.parseClip = function() {
|
10216 |
+
var matches = this.css('clip').match(this.CLIP);
|
10217 |
+
if (matches) {
|
10218 |
+
return {
|
10219 |
+
top: parseInt(matches[1], 10),
|
10220 |
+
right: parseInt(matches[2], 10),
|
10221 |
+
bottom: parseInt(matches[3], 10),
|
10222 |
+
left: parseInt(matches[4], 10)
|
10223 |
+
};
|
10224 |
+
}
|
10225 |
+
return null;
|
10226 |
+
};
|
10227 |
+
|
10228 |
+
NodeContainer.prototype.parseBackgroundImages = function() {
|
10229 |
+
return this.backgroundImages || (this.backgroundImages = parseBackgrounds(this.css("backgroundImage")));
|
10230 |
+
};
|
10231 |
+
|
10232 |
+
NodeContainer.prototype.cssList = function(property, index) {
|
10233 |
+
var value = (this.css(property) || '').split(',');
|
10234 |
+
value = value[index || 0] || value[0] || 'auto';
|
10235 |
+
value = value.trim().split(' ');
|
10236 |
+
if (value.length === 1) {
|
10237 |
+
value = [value[0], isPercentage(value[0]) ? 'auto' : value[0]];
|
10238 |
+
}
|
10239 |
+
return value;
|
10240 |
+
};
|
10241 |
+
|
10242 |
+
NodeContainer.prototype.parseBackgroundSize = function(bounds, image, index) {
|
10243 |
+
var size = this.cssList("backgroundSize", index);
|
10244 |
+
var width, height;
|
10245 |
+
|
10246 |
+
if (isPercentage(size[0])) {
|
10247 |
+
width = bounds.width * parseFloat(size[0]) / 100;
|
10248 |
+
} else if (/contain|cover/.test(size[0])) {
|
10249 |
+
var targetRatio = bounds.width / bounds.height, currentRatio = image.width / image.height;
|
10250 |
+
return (targetRatio < currentRatio ^ size[0] === 'contain') ? {width: bounds.height * currentRatio, height: bounds.height} : {width: bounds.width, height: bounds.width / currentRatio};
|
10251 |
+
} else {
|
10252 |
+
width = parseInt(size[0], 10);
|
10253 |
+
}
|
10254 |
+
|
10255 |
+
if (size[0] === 'auto' && size[1] === 'auto') {
|
10256 |
+
height = image.height;
|
10257 |
+
} else if (size[1] === 'auto') {
|
10258 |
+
height = width / image.width * image.height;
|
10259 |
+
} else if (isPercentage(size[1])) {
|
10260 |
+
height = bounds.height * parseFloat(size[1]) / 100;
|
10261 |
+
} else {
|
10262 |
+
height = parseInt(size[1], 10);
|
10263 |
+
}
|
10264 |
+
|
10265 |
+
if (size[0] === 'auto') {
|
10266 |
+
width = height / image.height * image.width;
|
10267 |
+
}
|
10268 |
+
|
10269 |
+
return {width: width, height: height};
|
10270 |
+
};
|
10271 |
+
|
10272 |
+
NodeContainer.prototype.parseBackgroundPosition = function(bounds, image, index, backgroundSize) {
|
10273 |
+
var position = this.cssList('backgroundPosition', index);
|
10274 |
+
var left, top;
|
10275 |
+
|
10276 |
+
if (isPercentage(position[0])){
|
10277 |
+
left = (bounds.width - (backgroundSize || image).width) * (parseFloat(position[0]) / 100);
|
10278 |
+
} else {
|
10279 |
+
left = parseInt(position[0], 10);
|
10280 |
+
}
|
10281 |
+
|
10282 |
+
if (position[1] === 'auto') {
|
10283 |
+
top = left / image.width * image.height;
|
10284 |
+
} else if (isPercentage(position[1])){
|
10285 |
+
top = (bounds.height - (backgroundSize || image).height) * parseFloat(position[1]) / 100;
|
10286 |
+
} else {
|
10287 |
+
top = parseInt(position[1], 10);
|
10288 |
+
}
|
10289 |
+
|
10290 |
+
if (position[0] === 'auto') {
|
10291 |
+
left = top / image.height * image.width;
|
10292 |
+
}
|
10293 |
+
|
10294 |
+
return {left: left, top: top};
|
10295 |
+
};
|
10296 |
+
|
10297 |
+
NodeContainer.prototype.parseBackgroundRepeat = function(index) {
|
10298 |
+
return this.cssList("backgroundRepeat", index)[0];
|
10299 |
+
};
|
10300 |
+
|
10301 |
+
NodeContainer.prototype.parseTextShadows = function() {
|
10302 |
+
var textShadow = this.css("textShadow");
|
10303 |
+
var results = [];
|
10304 |
+
|
10305 |
+
if (textShadow && textShadow !== 'none') {
|
10306 |
+
var shadows = textShadow.match(this.TEXT_SHADOW_PROPERTY);
|
10307 |
+
for (var i = 0; shadows && (i < shadows.length); i++) {
|
10308 |
+
var s = shadows[i].match(this.TEXT_SHADOW_VALUES);
|
10309 |
+
results.push({
|
10310 |
+
color: new Color(s[0]),
|
10311 |
+
offsetX: s[1] ? parseFloat(s[1].replace('px', '')) : 0,
|
10312 |
+
offsetY: s[2] ? parseFloat(s[2].replace('px', '')) : 0,
|
10313 |
+
blur: s[3] ? s[3].replace('px', '') : 0
|
10314 |
+
});
|
10315 |
+
}
|
10316 |
+
}
|
10317 |
+
return results;
|
10318 |
+
};
|
10319 |
+
|
10320 |
+
NodeContainer.prototype.parseTransform = function() {
|
10321 |
+
if (!this.transformData) {
|
10322 |
+
if (this.hasTransform()) {
|
10323 |
+
var offset = this.parseBounds();
|
10324 |
+
var origin = this.prefixedCss("transformOrigin").split(" ").map(removePx).map(asFloat);
|
10325 |
+
origin[0] += offset.left;
|
10326 |
+
origin[1] += offset.top;
|
10327 |
+
this.transformData = {
|
10328 |
+
origin: origin,
|
10329 |
+
matrix: this.parseTransformMatrix()
|
10330 |
+
};
|
10331 |
+
} else {
|
10332 |
+
this.transformData = {
|
10333 |
+
origin: [0, 0],
|
10334 |
+
matrix: [1, 0, 0, 1, 0, 0]
|
10335 |
+
};
|
10336 |
+
}
|
10337 |
+
}
|
10338 |
+
return this.transformData;
|
10339 |
+
};
|
10340 |
+
|
10341 |
+
NodeContainer.prototype.parseTransformMatrix = function() {
|
10342 |
+
if (!this.transformMatrix) {
|
10343 |
+
var transform = this.prefixedCss("transform");
|
10344 |
+
var matrix = transform ? parseMatrix(transform.match(this.MATRIX_PROPERTY)) : null;
|
10345 |
+
this.transformMatrix = matrix ? matrix : [1, 0, 0, 1, 0, 0];
|
10346 |
+
}
|
10347 |
+
return this.transformMatrix;
|
10348 |
+
};
|
10349 |
+
|
10350 |
+
NodeContainer.prototype.parseBounds = function() {
|
10351 |
+
return this.bounds || (this.bounds = this.hasTransform() ? offsetBounds(this.node) : getBounds(this.node));
|
10352 |
+
};
|
10353 |
+
|
10354 |
+
NodeContainer.prototype.hasTransform = function() {
|
10355 |
+
return this.parseTransformMatrix().join(",") !== "1,0,0,1,0,0" || (this.parent && this.parent.hasTransform());
|
10356 |
+
};
|
10357 |
+
|
10358 |
+
NodeContainer.prototype.getValue = function() {
|
10359 |
+
var value = this.node.value || "";
|
10360 |
+
if (this.node.tagName === "SELECT") {
|
10361 |
+
value = selectionValue(this.node);
|
10362 |
+
} else if (this.node.type === "password") {
|
10363 |
+
value = Array(value.length + 1).join('\u2022'); // jshint ignore:line
|
10364 |
+
}
|
10365 |
+
return value.length === 0 ? (this.node.placeholder || "") : value;
|
10366 |
+
};
|
10367 |
+
|
10368 |
+
NodeContainer.prototype.MATRIX_PROPERTY = /(matrix)\((.+)\)/;
|
10369 |
+
NodeContainer.prototype.TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;
|
10370 |
+
NodeContainer.prototype.TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;
|
10371 |
+
NodeContainer.prototype.CLIP = /^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/;
|
10372 |
+
|
10373 |
+
function selectionValue(node) {
|
10374 |
+
var option = node.options[node.selectedIndex || 0];
|
10375 |
+
return option ? (option.text || "") : "";
|
10376 |
+
}
|
10377 |
+
|
10378 |
+
function parseMatrix(match) {
|
10379 |
+
if (match && match[1] === "matrix") {
|
10380 |
+
return match[2].split(",").map(function(s) {
|
10381 |
+
return parseFloat(s.trim());
|
10382 |
+
});
|
10383 |
+
}
|
10384 |
+
}
|
10385 |
+
|
10386 |
+
function isPercentage(value) {
|
10387 |
+
return value.toString().indexOf("%") !== -1;
|
10388 |
+
}
|
10389 |
+
|
10390 |
+
function removePx(str) {
|
10391 |
+
return str.replace("px", "");
|
10392 |
+
}
|
10393 |
+
|
10394 |
+
function asFloat(str) {
|
10395 |
+
return parseFloat(str);
|
10396 |
+
}
|
10397 |
+
|
10398 |
+
module.exports = NodeContainer;
|
10399 |
+
|
10400 |
+
},{"./color":5,"./utils":29}],17:[function(require,module,exports){
|
10401 |
+
var log = require('./log');
|
10402 |
+
var punycode = require('punycode');
|
10403 |
+
var NodeContainer = require('./nodecontainer');
|
10404 |
+
var TextContainer = require('./textcontainer');
|
10405 |
+
var PseudoElementContainer = require('./pseudoelementcontainer');
|
10406 |
+
var FontMetrics = require('./fontmetrics');
|
10407 |
+
var Color = require('./color');
|
10408 |
+
var Promise = require('./promise');
|
10409 |
+
var StackingContext = require('./stackingcontext');
|
10410 |
+
var utils = require('./utils');
|
10411 |
+
var bind = utils.bind;
|
10412 |
+
var getBounds = utils.getBounds;
|
10413 |
+
var parseBackgrounds = utils.parseBackgrounds;
|
10414 |
+
var offsetBounds = utils.offsetBounds;
|
10415 |
+
|
10416 |
+
function NodeParser(element, renderer, support, imageLoader, options) {
|
10417 |
+
log("Starting NodeParser");
|
10418 |
+
this.renderer = renderer;
|
10419 |
+
this.options = options;
|
10420 |
+
this.range = null;
|
10421 |
+
this.support = support;
|
10422 |
+
this.renderQueue = [];
|
10423 |
+
this.stack = new StackingContext(true, 1, element.ownerDocument, null);
|
10424 |
+
var parent = new NodeContainer(element, null);
|
10425 |
+
if (options.background) {
|
10426 |
+
renderer.rectangle(0, 0, renderer.width, renderer.height, new Color(options.background));
|
10427 |
+
}
|
10428 |
+
if (element === element.ownerDocument.documentElement) {
|
10429 |
+
// http://www.w3.org/TR/css3-background/#special-backgrounds
|
10430 |
+
var canvasBackground = new NodeContainer(parent.color('backgroundColor').isTransparent() ? element.ownerDocument.body : element.ownerDocument.documentElement, null);
|
10431 |
+
renderer.rectangle(0, 0, renderer.width, renderer.height, canvasBackground.color('backgroundColor'));
|
10432 |
+
}
|
10433 |
+
parent.visibile = parent.isElementVisible();
|
10434 |
+
this.createPseudoHideStyles(element.ownerDocument);
|
10435 |
+
this.disableAnimations(element.ownerDocument);
|
10436 |
+
this.nodes = flatten([parent].concat(this.getChildren(parent)).filter(function(container) {
|
10437 |
+
return container.visible = container.isElementVisible();
|
10438 |
+
}).map(this.getPseudoElements, this));
|
10439 |
+
this.fontMetrics = new FontMetrics();
|
10440 |
+
log("Fetched nodes, total:", this.nodes.length);
|
10441 |
+
log("Calculate overflow clips");
|
10442 |
+
this.calculateOverflowClips();
|
10443 |
+
log("Start fetching images");
|
10444 |
+
this.images = imageLoader.fetch(this.nodes.filter(isElement));
|
10445 |
+
this.ready = this.images.ready.then(bind(function() {
|
10446 |
+
log("Images loaded, starting parsing");
|
10447 |
+
log("Creating stacking contexts");
|
10448 |
+
this.createStackingContexts();
|
10449 |
+
log("Sorting stacking contexts");
|
10450 |
+
this.sortStackingContexts(this.stack);
|
10451 |
+
this.parse(this.stack);
|
10452 |
+
log("Render queue created with " + this.renderQueue.length + " items");
|
10453 |
+
return new Promise(bind(function(resolve) {
|
10454 |
+
if (!options.async) {
|
10455 |
+
this.renderQueue.forEach(this.paint, this);
|
10456 |
+
resolve();
|
10457 |
+
} else if (typeof(options.async) === "function") {
|
10458 |
+
options.async.call(this, this.renderQueue, resolve);
|
10459 |
+
} else if (this.renderQueue.length > 0){
|
10460 |
+
this.renderIndex = 0;
|
10461 |
+
this.asyncRenderer(this.renderQueue, resolve);
|
10462 |
+
} else {
|
10463 |
+
resolve();
|
10464 |
+
}
|
10465 |
+
}, this));
|
10466 |
+
}, this));
|
10467 |
+
}
|
10468 |
+
|
10469 |
+
NodeParser.prototype.calculateOverflowClips = function() {
|
10470 |
+
this.nodes.forEach(function(container) {
|
10471 |
+
if (isElement(container)) {
|
10472 |
+
if (isPseudoElement(container)) {
|
10473 |
+
container.appendToDOM();
|
10474 |
+
}
|
10475 |
+
container.borders = this.parseBorders(container);
|
10476 |
+
var clip = (container.css('overflow') === "hidden") ? [container.borders.clip] : [];
|
10477 |
+
var cssClip = container.parseClip();
|
10478 |
+
if (cssClip && ["absolute", "fixed"].indexOf(container.css('position')) !== -1) {
|
10479 |
+
clip.push([["rect",
|
10480 |
+
container.bounds.left + cssClip.left,
|
10481 |
+
container.bounds.top + cssClip.top,
|
10482 |
+
cssClip.right - cssClip.left,
|
10483 |
+
cssClip.bottom - cssClip.top
|
10484 |
+
]]);
|
10485 |
+
}
|
10486 |
+
container.clip = hasParentClip(container) ? container.parent.clip.concat(clip) : clip;
|
10487 |
+
container.backgroundClip = (container.css('overflow') !== "hidden") ? container.clip.concat([container.borders.clip]) : container.clip;
|
10488 |
+
if (isPseudoElement(container)) {
|
10489 |
+
container.cleanDOM();
|
10490 |
+
}
|
10491 |
+
} else if (isTextNode(container)) {
|
10492 |
+
container.clip = hasParentClip(container) ? container.parent.clip : [];
|
10493 |
+
}
|
10494 |
+
if (!isPseudoElement(container)) {
|
10495 |
+
container.bounds = null;
|
10496 |
+
}
|
10497 |
+
}, this);
|
10498 |
+
};
|
10499 |
+
|
10500 |
+
function hasParentClip(container) {
|
10501 |
+
return container.parent && container.parent.clip.length;
|
10502 |
+
}
|
10503 |
+
|
10504 |
+
NodeParser.prototype.asyncRenderer = function(queue, resolve, asyncTimer) {
|
10505 |
+
asyncTimer = asyncTimer || Date.now();
|
10506 |
+
this.paint(queue[this.renderIndex++]);
|
10507 |
+
if (queue.length === this.renderIndex) {
|
10508 |
+
resolve();
|
10509 |
+
} else if (asyncTimer + 20 > Date.now()) {
|
10510 |
+
this.asyncRenderer(queue, resolve, asyncTimer);
|
10511 |
+
} else {
|
10512 |
+
setTimeout(bind(function() {
|
10513 |
+
this.asyncRenderer(queue, resolve);
|
10514 |
+
}, this), 0);
|
10515 |
+
}
|
10516 |
+
};
|
10517 |
+
|
10518 |
+
NodeParser.prototype.createPseudoHideStyles = function(document) {
|
10519 |
+
this.createStyles(document, '.' + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ':before { content: "" !important; display: none !important; }' +
|
10520 |
+
'.' + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER + ':after { content: "" !important; display: none !important; }');
|
10521 |
+
};
|
10522 |
+
|
10523 |
+
NodeParser.prototype.disableAnimations = function(document) {
|
10524 |
+
this.createStyles(document, '* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; ' +
|
10525 |
+
'-webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}');
|
10526 |
+
};
|
10527 |
+
|
10528 |
+
NodeParser.prototype.createStyles = function(document, styles) {
|
10529 |
+
var hidePseudoElements = document.createElement('style');
|
10530 |
+
hidePseudoElements.innerHTML = styles;
|
10531 |
+
document.body.appendChild(hidePseudoElements);
|
10532 |
+
};
|
10533 |
+
|
10534 |
+
NodeParser.prototype.getPseudoElements = function(container) {
|
10535 |
+
var nodes = [[container]];
|
10536 |
+
if (container.node.nodeType === Node.ELEMENT_NODE) {
|
10537 |
+
var before = this.getPseudoElement(container, ":before");
|
10538 |
+
var after = this.getPseudoElement(container, ":after");
|
10539 |
+
|
10540 |
+
if (before) {
|
10541 |
+
nodes.push(before);
|
10542 |
+
}
|
10543 |
+
|
10544 |
+
if (after) {
|
10545 |
+
nodes.push(after);
|
10546 |
+
}
|
10547 |
+
}
|
10548 |
+
return flatten(nodes);
|
10549 |
+
};
|
10550 |
+
|
10551 |
+
function toCamelCase(str) {
|
10552 |
+
return str.replace(/(\-[a-z])/g, function(match){
|
10553 |
+
return match.toUpperCase().replace('-','');
|
10554 |
+
});
|
10555 |
+
}
|
10556 |
+
|
10557 |
+
NodeParser.prototype.getPseudoElement = function(container, type) {
|
10558 |
+
var style = container.computedStyle(type);
|
10559 |
+
if(!style || !style.content || style.content === "none" || style.content === "-moz-alt-content" || style.display === "none") {
|
10560 |
+
return null;
|
10561 |
+
}
|
10562 |
+
|
10563 |
+
var content = stripQuotes(style.content);
|
10564 |
+
var isImage = content.substr(0, 3) === 'url';
|
10565 |
+
var pseudoNode = document.createElement(isImage ? 'img' : 'html2canvaspseudoelement');
|
10566 |
+
var pseudoContainer = new PseudoElementContainer(pseudoNode, container, type);
|
10567 |
+
|
10568 |
+
for (var i = style.length-1; i >= 0; i--) {
|
10569 |
+
var property = toCamelCase(style.item(i));
|
10570 |
+
pseudoNode.style[property] = style[property];
|
10571 |
+
}
|
10572 |
+
|
10573 |
+
pseudoNode.className = PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
10574 |
+
|
10575 |
+
if (isImage) {
|
10576 |
+
pseudoNode.src = parseBackgrounds(content)[0].args[0];
|
10577 |
+
return [pseudoContainer];
|
10578 |
+
} else {
|
10579 |
+
var text = document.createTextNode(content);
|
10580 |
+
pseudoNode.appendChild(text);
|
10581 |
+
return [pseudoContainer, new TextContainer(text, pseudoContainer)];
|
10582 |
+
}
|
10583 |
+
};
|
10584 |
+
|
10585 |
+
|
10586 |
+
NodeParser.prototype.getChildren = function(parentContainer) {
|
10587 |
+
return flatten([].filter.call(parentContainer.node.childNodes, renderableNode).map(function(node) {
|
10588 |
+
var container = [node.nodeType === Node.TEXT_NODE ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
|
10589 |
+
return node.nodeType === Node.ELEMENT_NODE && container.length && node.tagName !== "TEXTAREA" ? (container[0].isElementVisible() ? container.concat(this.getChildren(container[0])) : []) : container;
|
10590 |
+
}, this));
|
10591 |
+
};
|
10592 |
+
|
10593 |
+
NodeParser.prototype.newStackingContext = function(container, hasOwnStacking) {
|
10594 |
+
var stack = new StackingContext(hasOwnStacking, container.getOpacity(), container.node, container.parent);
|
10595 |
+
container.cloneTo(stack);
|
10596 |
+
var parentStack = hasOwnStacking ? stack.getParentStack(this) : stack.parent.stack;
|
10597 |
+
parentStack.contexts.push(stack);
|
10598 |
+
container.stack = stack;
|
10599 |
+
};
|
10600 |
+
|
10601 |
+
NodeParser.prototype.createStackingContexts = function() {
|
10602 |
+
this.nodes.forEach(function(container) {
|
10603 |
+
if (isElement(container) && (this.isRootElement(container) || hasOpacity(container) || isPositionedForStacking(container) || this.isBodyWithTransparentRoot(container) || container.hasTransform())) {
|
10604 |
+
this.newStackingContext(container, true);
|
10605 |
+
} else if (isElement(container) && ((isPositioned(container) && zIndex0(container)) || isInlineBlock(container) || isFloating(container))) {
|
10606 |
+
this.newStackingContext(container, false);
|
10607 |
+
} else {
|
10608 |
+
container.assignStack(container.parent.stack);
|
10609 |
+
}
|
10610 |
+
}, this);
|
10611 |
+
};
|
10612 |
+
|
10613 |
+
NodeParser.prototype.isBodyWithTransparentRoot = function(container) {
|
10614 |
+
return container.node.nodeName === "BODY" && container.parent.color('backgroundColor').isTransparent();
|
10615 |
+
};
|
10616 |
+
|
10617 |
+
NodeParser.prototype.isRootElement = function(container) {
|
10618 |
+
return container.parent === null;
|
10619 |
+
};
|
10620 |
+
|
10621 |
+
NodeParser.prototype.sortStackingContexts = function(stack) {
|
10622 |
+
stack.contexts.sort(zIndexSort(stack.contexts.slice(0)));
|
10623 |
+
stack.contexts.forEach(this.sortStackingContexts, this);
|
10624 |
+
};
|
10625 |
+
|
10626 |
+
NodeParser.prototype.parseTextBounds = function(container) {
|
10627 |
+
return function(text, index, textList) {
|
10628 |
+
if (container.parent.css("textDecoration").substr(0, 4) !== "none" || text.trim().length !== 0) {
|
10629 |
+
if (this.support.rangeBounds && !container.parent.hasTransform()) {
|
10630 |
+
var offset = textList.slice(0, index).join("").length;
|
10631 |
+
return this.getRangeBounds(container.node, offset, text.length);
|
10632 |
+
} else if (container.node && typeof(container.node.data) === "string") {
|
10633 |
+
var replacementNode = container.node.splitText(text.length);
|
10634 |
+
var bounds = this.getWrapperBounds(container.node, container.parent.hasTransform());
|
10635 |
+
container.node = replacementNode;
|
10636 |
+
return bounds;
|
10637 |
+
}
|
10638 |
+
} else if(!this.support.rangeBounds || container.parent.hasTransform()){
|
10639 |
+
container.node = container.node.splitText(text.length);
|
10640 |
+
}
|
10641 |
+
return {};
|
10642 |
+
};
|
10643 |
+
};
|
10644 |
+
|
10645 |
+
NodeParser.prototype.getWrapperBounds = function(node, transform) {
|
10646 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
10647 |
+
var parent = node.parentNode,
|
10648 |
+
backupText = node.cloneNode(true);
|
10649 |
+
|
10650 |
+
wrapper.appendChild(node.cloneNode(true));
|
10651 |
+
parent.replaceChild(wrapper, node);
|
10652 |
+
var bounds = transform ? offsetBounds(wrapper) : getBounds(wrapper);
|
10653 |
+
parent.replaceChild(backupText, wrapper);
|
10654 |
+
return bounds;
|
10655 |
+
};
|
10656 |
+
|
10657 |
+
NodeParser.prototype.getRangeBounds = function(node, offset, length) {
|
10658 |
+
var range = this.range || (this.range = node.ownerDocument.createRange());
|
10659 |
+
range.setStart(node, offset);
|
10660 |
+
range.setEnd(node, offset + length);
|
10661 |
+
return range.getBoundingClientRect();
|
10662 |
+
};
|
10663 |
+
|
10664 |
+
function ClearTransform() {}
|
10665 |
+
|
10666 |
+
NodeParser.prototype.parse = function(stack) {
|
10667 |
+
// http://www.w3.org/TR/CSS21/visuren.html#z-index
|
10668 |
+
var negativeZindex = stack.contexts.filter(negativeZIndex); // 2. the child stacking contexts with negative stack levels (most negative first).
|
10669 |
+
var descendantElements = stack.children.filter(isElement);
|
10670 |
+
var descendantNonFloats = descendantElements.filter(not(isFloating));
|
10671 |
+
var nonInlineNonPositionedDescendants = descendantNonFloats.filter(not(isPositioned)).filter(not(inlineLevel)); // 3 the in-flow, non-inline-level, non-positioned descendants.
|
10672 |
+
var nonPositionedFloats = descendantElements.filter(not(isPositioned)).filter(isFloating); // 4. the non-positioned floats.
|
10673 |
+
var inFlow = descendantNonFloats.filter(not(isPositioned)).filter(inlineLevel); // 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
10674 |
+
var stackLevel0 = stack.contexts.concat(descendantNonFloats.filter(isPositioned)).filter(zIndex0); // 6. the child stacking contexts with stack level 0 and the positioned descendants with stack level 0.
|
10675 |
+
var text = stack.children.filter(isTextNode).filter(hasText);
|
10676 |
+
var positiveZindex = stack.contexts.filter(positiveZIndex); // 7. the child stacking contexts with positive stack levels (least positive first).
|
10677 |
+
negativeZindex.concat(nonInlineNonPositionedDescendants).concat(nonPositionedFloats)
|
10678 |
+
.concat(inFlow).concat(stackLevel0).concat(text).concat(positiveZindex).forEach(function(container) {
|
10679 |
+
this.renderQueue.push(container);
|
10680 |
+
if (isStackingContext(container)) {
|
10681 |
+
this.parse(container);
|
10682 |
+
this.renderQueue.push(new ClearTransform());
|
10683 |
+
}
|
10684 |
+
}, this);
|
10685 |
+
};
|
10686 |
+
|
10687 |
+
NodeParser.prototype.paint = function(container) {
|
10688 |
+
try {
|
10689 |
+
if (container instanceof ClearTransform) {
|
10690 |
+
this.renderer.ctx.restore();
|
10691 |
+
} else if (isTextNode(container)) {
|
10692 |
+
if (isPseudoElement(container.parent)) {
|
10693 |
+
container.parent.appendToDOM();
|
10694 |
+
}
|
10695 |
+
this.paintText(container);
|
10696 |
+
if (isPseudoElement(container.parent)) {
|
10697 |
+
container.parent.cleanDOM();
|
10698 |
+
}
|
10699 |
+
} else {
|
10700 |
+
this.paintNode(container);
|
10701 |
+
}
|
10702 |
+
} catch(e) {
|
10703 |
+
log(e);
|
10704 |
+
if (this.options.strict) {
|
10705 |
+
throw e;
|
10706 |
+
}
|
10707 |
+
}
|
10708 |
+
};
|
10709 |
+
|
10710 |
+
NodeParser.prototype.paintNode = function(container) {
|
10711 |
+
if (isStackingContext(container)) {
|
10712 |
+
this.renderer.setOpacity(container.opacity);
|
10713 |
+
this.renderer.ctx.save();
|
10714 |
+
if (container.hasTransform()) {
|
10715 |
+
this.renderer.setTransform(container.parseTransform());
|
10716 |
+
}
|
10717 |
+
}
|
10718 |
+
|
10719 |
+
if (container.node.nodeName === "INPUT" && container.node.type === "checkbox") {
|
10720 |
+
this.paintCheckbox(container);
|
10721 |
+
} else if (container.node.nodeName === "INPUT" && container.node.type === "radio") {
|
10722 |
+
this.paintRadio(container);
|
10723 |
+
} else {
|
10724 |
+
this.paintElement(container);
|
10725 |
+
}
|
10726 |
+
};
|
10727 |
+
|
10728 |
+
NodeParser.prototype.paintElement = function(container) {
|
10729 |
+
var bounds = container.parseBounds();
|
10730 |
+
this.renderer.clip(container.backgroundClip, function() {
|
10731 |
+
this.renderer.renderBackground(container, bounds, container.borders.borders.map(getWidth));
|
10732 |
+
}, this);
|
10733 |
+
|
10734 |
+
this.renderer.clip(container.clip, function() {
|
10735 |
+
this.renderer.renderBorders(container.borders.borders);
|
10736 |
+
}, this);
|
10737 |
+
|
10738 |
+
this.renderer.clip(container.backgroundClip, function() {
|
10739 |
+
switch (container.node.nodeName) {
|
10740 |
+
case "svg":
|
10741 |
+
case "IFRAME":
|
10742 |
+
var imgContainer = this.images.get(container.node);
|
10743 |
+
if (imgContainer) {
|
10744 |
+
this.renderer.renderImage(container, bounds, container.borders, imgContainer);
|
10745 |
+
} else {
|
10746 |
+
log("Error loading <" + container.node.nodeName + ">", container.node);
|
10747 |
+
}
|
10748 |
+
break;
|
10749 |
+
case "IMG":
|
10750 |
+
var imageContainer = this.images.get(container.node.src);
|
10751 |
+
if (imageContainer) {
|
10752 |
+
this.renderer.renderImage(container, bounds, container.borders, imageContainer);
|
10753 |
+
} else {
|
10754 |
+
log("Error loading <img>", container.node.src);
|
10755 |
+
}
|
10756 |
+
break;
|
10757 |
+
case "CANVAS":
|
10758 |
+
this.renderer.renderImage(container, bounds, container.borders, {image: container.node});
|
10759 |
+
break;
|
10760 |
+
case "SELECT":
|
10761 |
+
case "INPUT":
|
10762 |
+
case "TEXTAREA":
|
10763 |
+
this.paintFormValue(container);
|
10764 |
+
break;
|
10765 |
+
}
|
10766 |
+
}, this);
|
10767 |
+
};
|
10768 |
+
|
10769 |
+
NodeParser.prototype.paintCheckbox = function(container) {
|
10770 |
+
var b = container.parseBounds();
|
10771 |
+
|
10772 |
+
var size = Math.min(b.width, b.height);
|
10773 |
+
var bounds = {width: size - 1, height: size - 1, top: b.top, left: b.left};
|
10774 |
+
var r = [3, 3];
|
10775 |
+
var radius = [r, r, r, r];
|
10776 |
+
var borders = [1,1,1,1].map(function(w) {
|
10777 |
+
return {color: new Color('#A5A5A5'), width: w};
|
10778 |
+
});
|
10779 |
+
|
10780 |
+
var borderPoints = calculateCurvePoints(bounds, radius, borders);
|
10781 |
+
|
10782 |
+
this.renderer.clip(container.backgroundClip, function() {
|
10783 |
+
this.renderer.rectangle(bounds.left + 1, bounds.top + 1, bounds.width - 2, bounds.height - 2, new Color("#DEDEDE"));
|
10784 |
+
this.renderer.renderBorders(calculateBorders(borders, bounds, borderPoints, radius));
|
10785 |
+
if (container.node.checked) {
|
10786 |
+
this.renderer.font(new Color('#424242'), 'normal', 'normal', 'bold', (size - 3) + "px", 'arial');
|
10787 |
+
this.renderer.text("\u2714", bounds.left + size / 6, bounds.top + size - 1);
|
10788 |
+
}
|
10789 |
+
}, this);
|
10790 |
+
};
|
10791 |
+
|
10792 |
+
NodeParser.prototype.paintRadio = function(container) {
|
10793 |
+
var bounds = container.parseBounds();
|
10794 |
+
|
10795 |
+
var size = Math.min(bounds.width, bounds.height) - 2;
|
10796 |
+
|
10797 |
+
this.renderer.clip(container.backgroundClip, function() {
|
10798 |
+
this.renderer.circleStroke(bounds.left + 1, bounds.top + 1, size, new Color('#DEDEDE'), 1, new Color('#A5A5A5'));
|
10799 |
+
if (container.node.checked) {
|
10800 |
+
this.renderer.circle(Math.ceil(bounds.left + size / 4) + 1, Math.ceil(bounds.top + size / 4) + 1, Math.floor(size / 2), new Color('#424242'));
|
10801 |
+
}
|
10802 |
+
}, this);
|
10803 |
+
};
|
10804 |
+
|
10805 |
+
NodeParser.prototype.paintFormValue = function(container) {
|
10806 |
+
var value = container.getValue();
|
10807 |
+
if (value.length > 0) {
|
10808 |
+
var document = container.node.ownerDocument;
|
10809 |
+
var wrapper = document.createElement('html2canvaswrapper');
|
10810 |
+
var properties = ['lineHeight', 'textAlign', 'fontFamily', 'fontWeight', 'fontSize', 'color',
|
10811 |
+
'paddingLeft', 'paddingTop', 'paddingRight', 'paddingBottom',
|
10812 |
+
'width', 'height', 'borderLeftStyle', 'borderTopStyle', 'borderLeftWidth', 'borderTopWidth',
|
10813 |
+
'boxSizing', 'whiteSpace', 'wordWrap'];
|
10814 |
+
|
10815 |
+
properties.forEach(function(property) {
|
10816 |
+
try {
|
10817 |
+
wrapper.style[property] = container.css(property);
|
10818 |
+
} catch(e) {
|
10819 |
+
// Older IE has issues with "border"
|
10820 |
+
log("html2canvas: Parse: Exception caught in renderFormValue: " + e.message);
|
10821 |
+
}
|
10822 |
+
});
|
10823 |
+
var bounds = container.parseBounds();
|
10824 |
+
wrapper.style.position = "fixed";
|
10825 |
+
wrapper.style.left = bounds.left + "px";
|
10826 |
+
wrapper.style.top = bounds.top + "px";
|
10827 |
+
wrapper.textContent = value;
|
10828 |
+
document.body.appendChild(wrapper);
|
10829 |
+
this.paintText(new TextContainer(wrapper.firstChild, container));
|
10830 |
+
document.body.removeChild(wrapper);
|
10831 |
+
}
|
10832 |
+
};
|
10833 |
+
|
10834 |
+
NodeParser.prototype.paintText = function(container) {
|
10835 |
+
container.applyTextTransform();
|
10836 |
+
var characters = punycode.ucs2.decode(container.node.data);
|
10837 |
+
var textList = (!this.options.letterRendering || noLetterSpacing(container)) && !hasUnicode(container.node.data) ? getWords(characters) : characters.map(function(character) {
|
10838 |
+
return punycode.ucs2.encode([character]);
|
10839 |
+
});
|
10840 |
+
|
10841 |
+
var weight = container.parent.fontWeight();
|
10842 |
+
var size = container.parent.css('fontSize');
|
10843 |
+
var family = container.parent.css('fontFamily');
|
10844 |
+
var shadows = container.parent.parseTextShadows();
|
10845 |
+
|
10846 |
+
this.renderer.font(container.parent.color('color'), container.parent.css('fontStyle'), container.parent.css('fontVariant'), weight, size, family);
|
10847 |
+
if (shadows.length) {
|
10848 |
+
// TODO: support multiple text shadows
|
10849 |
+
this.renderer.fontShadow(shadows[0].color, shadows[0].offsetX, shadows[0].offsetY, shadows[0].blur);
|
10850 |
+
} else {
|
10851 |
+
this.renderer.clearShadow();
|
10852 |
+
}
|
10853 |
+
|
10854 |
+
this.renderer.clip(container.parent.clip, function() {
|
10855 |
+
textList.map(this.parseTextBounds(container), this).forEach(function(bounds, index) {
|
10856 |
+
if (bounds) {
|
10857 |
+
this.renderer.text(textList[index], bounds.left, bounds.bottom);
|
10858 |
+
this.renderTextDecoration(container.parent, bounds, this.fontMetrics.getMetrics(family, size));
|
10859 |
+
}
|
10860 |
+
}, this);
|
10861 |
+
}, this);
|
10862 |
+
};
|
10863 |
+
|
10864 |
+
NodeParser.prototype.renderTextDecoration = function(container, bounds, metrics) {
|
10865 |
+
switch(container.css("textDecoration").split(" ")[0]) {
|
10866 |
+
case "underline":
|
10867 |
+
// Draws a line at the baseline of the font
|
10868 |
+
// TODO As some browsers display the line as more than 1px if the font-size is big, need to take that into account both in position and size
|
10869 |
+
this.renderer.rectangle(bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, container.color("color"));
|
10870 |
+
break;
|
10871 |
+
case "overline":
|
10872 |
+
this.renderer.rectangle(bounds.left, Math.round(bounds.top), bounds.width, 1, container.color("color"));
|
10873 |
+
break;
|
10874 |
+
case "line-through":
|
10875 |
+
// TODO try and find exact position for line-through
|
10876 |
+
this.renderer.rectangle(bounds.left, Math.ceil(bounds.top + metrics.middle + metrics.lineWidth), bounds.width, 1, container.color("color"));
|
10877 |
+
break;
|
10878 |
+
}
|
10879 |
+
};
|
10880 |
+
|
10881 |
+
var borderColorTransforms = {
|
10882 |
+
inset: [
|
10883 |
+
["darken", 0.60],
|
10884 |
+
["darken", 0.10],
|
10885 |
+
["darken", 0.10],
|
10886 |
+
["darken", 0.60]
|
10887 |
+
]
|
10888 |
+
};
|
10889 |
+
|
10890 |
+
NodeParser.prototype.parseBorders = function(container) {
|
10891 |
+
var nodeBounds = container.parseBounds();
|
10892 |
+
var radius = getBorderRadiusData(container);
|
10893 |
+
var borders = ["Top", "Right", "Bottom", "Left"].map(function(side, index) {
|
10894 |
+
var style = container.css('border' + side + 'Style');
|
10895 |
+
var color = container.color('border' + side + 'Color');
|
10896 |
+
if (style === "inset" && color.isBlack()) {
|
10897 |
+
color = new Color([255, 255, 255, color.a]); // this is wrong, but
|
10898 |
+
}
|
10899 |
+
var colorTransform = borderColorTransforms[style] ? borderColorTransforms[style][index] : null;
|
10900 |
+
return {
|
10901 |
+
width: container.cssInt('border' + side + 'Width'),
|
10902 |
+
color: colorTransform ? color[colorTransform[0]](colorTransform[1]) : color,
|
10903 |
+
args: null
|
10904 |
+
};
|
10905 |
+
});
|
10906 |
+
var borderPoints = calculateCurvePoints(nodeBounds, radius, borders);
|
10907 |
+
|
10908 |
+
return {
|
10909 |
+
clip: this.parseBackgroundClip(container, borderPoints, borders, radius, nodeBounds),
|
10910 |
+
borders: calculateBorders(borders, nodeBounds, borderPoints, radius)
|
10911 |
+
};
|
10912 |
+
};
|
10913 |
+
|
10914 |
+
function calculateBorders(borders, nodeBounds, borderPoints, radius) {
|
10915 |
+
return borders.map(function(border, borderSide) {
|
10916 |
+
if (border.width > 0) {
|
10917 |
+
var bx = nodeBounds.left;
|
10918 |
+
var by = nodeBounds.top;
|
10919 |
+
var bw = nodeBounds.width;
|
10920 |
+
var bh = nodeBounds.height - (borders[2].width);
|
10921 |
+
|
10922 |
+
switch(borderSide) {
|
10923 |
+
case 0:
|
10924 |
+
// top border
|
10925 |
+
bh = borders[0].width;
|
10926 |
+
border.args = drawSide({
|
10927 |
+
c1: [bx, by],
|
10928 |
+
c2: [bx + bw, by],
|
10929 |
+
c3: [bx + bw - borders[1].width, by + bh],
|
10930 |
+
c4: [bx + borders[3].width, by + bh]
|
10931 |
+
}, radius[0], radius[1],
|
10932 |
+
borderPoints.topLeftOuter, borderPoints.topLeftInner, borderPoints.topRightOuter, borderPoints.topRightInner);
|
10933 |
+
break;
|
10934 |
+
case 1:
|
10935 |
+
// right border
|
10936 |
+
bx = nodeBounds.left + nodeBounds.width - (borders[1].width);
|
10937 |
+
bw = borders[1].width;
|
10938 |
+
|
10939 |
+
border.args = drawSide({
|
10940 |
+
c1: [bx + bw, by],
|
10941 |
+
c2: [bx + bw, by + bh + borders[2].width],
|
10942 |
+
c3: [bx, by + bh],
|
10943 |
+
c4: [bx, by + borders[0].width]
|
10944 |
+
}, radius[1], radius[2],
|
10945 |
+
borderPoints.topRightOuter, borderPoints.topRightInner, borderPoints.bottomRightOuter, borderPoints.bottomRightInner);
|
10946 |
+
break;
|
10947 |
+
case 2:
|
10948 |
+
// bottom border
|
10949 |
+
by = (by + nodeBounds.height) - (borders[2].width);
|
10950 |
+
bh = borders[2].width;
|
10951 |
+
border.args = drawSide({
|
10952 |
+
c1: [bx + bw, by + bh],
|
10953 |
+
c2: [bx, by + bh],
|
10954 |
+
c3: [bx + borders[3].width, by],
|
10955 |
+
c4: [bx + bw - borders[3].width, by]
|
10956 |
+
}, radius[2], radius[3],
|
10957 |
+
borderPoints.bottomRightOuter, borderPoints.bottomRightInner, borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner);
|
10958 |
+
break;
|
10959 |
+
case 3:
|
10960 |
+
// left border
|
10961 |
+
bw = borders[3].width;
|
10962 |
+
border.args = drawSide({
|
10963 |
+
c1: [bx, by + bh + borders[2].width],
|
10964 |
+
c2: [bx, by],
|
10965 |
+
c3: [bx + bw, by + borders[0].width],
|
10966 |
+
c4: [bx + bw, by + bh]
|
10967 |
+
}, radius[3], radius[0],
|
10968 |
+
borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner, borderPoints.topLeftOuter, borderPoints.topLeftInner);
|
10969 |
+
break;
|
10970 |
+
}
|
10971 |
+
}
|
10972 |
+
return border;
|
10973 |
+
});
|
10974 |
+
}
|
10975 |
+
|
10976 |
+
NodeParser.prototype.parseBackgroundClip = function(container, borderPoints, borders, radius, bounds) {
|
10977 |
+
var backgroundClip = container.css('backgroundClip'),
|
10978 |
+
borderArgs = [];
|
10979 |
+
|
10980 |
+
switch(backgroundClip) {
|
10981 |
+
case "content-box":
|
10982 |
+
case "padding-box":
|
10983 |
+
parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftInner, borderPoints.topRightInner, bounds.left + borders[3].width, bounds.top + borders[0].width);
|
10984 |
+
parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightInner, borderPoints.bottomRightInner, bounds.left + bounds.width - borders[1].width, bounds.top + borders[0].width);
|
10985 |
+
parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightInner, borderPoints.bottomLeftInner, bounds.left + bounds.width - borders[1].width, bounds.top + bounds.height - borders[2].width);
|
10986 |
+
parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftInner, borderPoints.topLeftInner, bounds.left + borders[3].width, bounds.top + bounds.height - borders[2].width);
|
10987 |
+
break;
|
10988 |
+
|
10989 |
+
default:
|
10990 |
+
parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftOuter, borderPoints.topRightOuter, bounds.left, bounds.top);
|
10991 |
+
parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightOuter, borderPoints.bottomRightOuter, bounds.left + bounds.width, bounds.top);
|
10992 |
+
parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightOuter, borderPoints.bottomLeftOuter, bounds.left + bounds.width, bounds.top + bounds.height);
|
10993 |
+
parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftOuter, borderPoints.topLeftOuter, bounds.left, bounds.top + bounds.height);
|
10994 |
+
break;
|
10995 |
+
}
|
10996 |
+
|
10997 |
+
return borderArgs;
|
10998 |
+
};
|
10999 |
+
|
11000 |
+
function getCurvePoints(x, y, r1, r2) {
|
11001 |
+
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
11002 |
+
var ox = (r1) * kappa, // control point offset horizontal
|
11003 |
+
oy = (r2) * kappa, // control point offset vertical
|
11004 |
+
xm = x + r1, // x-middle
|
11005 |
+
ym = y + r2; // y-middle
|
11006 |
+
return {
|
11007 |
+
topLeft: bezierCurve({x: x, y: ym}, {x: x, y: ym - oy}, {x: xm - ox, y: y}, {x: xm, y: y}),
|
11008 |
+
topRight: bezierCurve({x: x, y: y}, {x: x + ox,y: y}, {x: xm, y: ym - oy}, {x: xm, y: ym}),
|
11009 |
+
bottomRight: bezierCurve({x: xm, y: y}, {x: xm, y: y + oy}, {x: x + ox, y: ym}, {x: x, y: ym}),
|
11010 |
+
bottomLeft: bezierCurve({x: xm, y: ym}, {x: xm - ox, y: ym}, {x: x, y: y + oy}, {x: x, y:y})
|
11011 |
+
};
|
11012 |
+
}
|
11013 |
+
|
11014 |
+
function calculateCurvePoints(bounds, borderRadius, borders) {
|
11015 |
+
var x = bounds.left,
|
11016 |
+
y = bounds.top,
|
11017 |
+
width = bounds.width,
|
11018 |
+
height = bounds.height,
|
11019 |
+
|
11020 |
+
tlh = borderRadius[0][0],
|
11021 |
+
tlv = borderRadius[0][1],
|
11022 |
+
trh = borderRadius[1][0],
|
11023 |
+
trv = borderRadius[1][1],
|
11024 |
+
brh = borderRadius[2][0],
|
11025 |
+
brv = borderRadius[2][1],
|
11026 |
+
blh = borderRadius[3][0],
|
11027 |
+
blv = borderRadius[3][1];
|
11028 |
+
|
11029 |
+
var topWidth = width - trh,
|
11030 |
+
rightHeight = height - brv,
|
11031 |
+
bottomWidth = width - brh,
|
11032 |
+
leftHeight = height - blv;
|
11033 |
+
|
11034 |
+
return {
|
11035 |
+
topLeftOuter: getCurvePoints(x, y, tlh, tlv).topLeft.subdivide(0.5),
|
11036 |
+
topLeftInner: getCurvePoints(x + borders[3].width, y + borders[0].width, Math.max(0, tlh - borders[3].width), Math.max(0, tlv - borders[0].width)).topLeft.subdivide(0.5),
|
11037 |
+
topRightOuter: getCurvePoints(x + topWidth, y, trh, trv).topRight.subdivide(0.5),
|
11038 |
+
topRightInner: getCurvePoints(x + Math.min(topWidth, width + borders[3].width), y + borders[0].width, (topWidth > width + borders[3].width) ? 0 :trh - borders[3].width, trv - borders[0].width).topRight.subdivide(0.5),
|
11039 |
+
bottomRightOuter: getCurvePoints(x + bottomWidth, y + rightHeight, brh, brv).bottomRight.subdivide(0.5),
|
11040 |
+
bottomRightInner: getCurvePoints(x + Math.min(bottomWidth, width - borders[3].width), y + Math.min(rightHeight, height + borders[0].width), Math.max(0, brh - borders[1].width), brv - borders[2].width).bottomRight.subdivide(0.5),
|
11041 |
+
bottomLeftOuter: getCurvePoints(x, y + leftHeight, blh, blv).bottomLeft.subdivide(0.5),
|
11042 |
+
bottomLeftInner: getCurvePoints(x + borders[3].width, y + leftHeight, Math.max(0, blh - borders[3].width), blv - borders[2].width).bottomLeft.subdivide(0.5)
|
11043 |
+
};
|
11044 |
+
}
|
11045 |
+
|
11046 |
+
function bezierCurve(start, startControl, endControl, end) {
|
11047 |
+
var lerp = function (a, b, t) {
|
11048 |
+
return {
|
11049 |
+
x: a.x + (b.x - a.x) * t,
|
11050 |
+
y: a.y + (b.y - a.y) * t
|
11051 |
+
};
|
11052 |
+
};
|
11053 |
+
|
11054 |
+
return {
|
11055 |
+
start: start,
|
11056 |
+
startControl: startControl,
|
11057 |
+
endControl: endControl,
|
11058 |
+
end: end,
|
11059 |
+
subdivide: function(t) {
|
11060 |
+
var ab = lerp(start, startControl, t),
|
11061 |
+
bc = lerp(startControl, endControl, t),
|
11062 |
+
cd = lerp(endControl, end, t),
|
11063 |
+
abbc = lerp(ab, bc, t),
|
11064 |
+
bccd = lerp(bc, cd, t),
|
11065 |
+
dest = lerp(abbc, bccd, t);
|
11066 |
+
return [bezierCurve(start, ab, abbc, dest), bezierCurve(dest, bccd, cd, end)];
|
11067 |
+
},
|
11068 |
+
curveTo: function(borderArgs) {
|
11069 |
+
borderArgs.push(["bezierCurve", startControl.x, startControl.y, endControl.x, endControl.y, end.x, end.y]);
|
11070 |
+
},
|
11071 |
+
curveToReversed: function(borderArgs) {
|
11072 |
+
borderArgs.push(["bezierCurve", endControl.x, endControl.y, startControl.x, startControl.y, start.x, start.y]);
|
11073 |
+
}
|
11074 |
+
};
|
11075 |
+
}
|
11076 |
+
|
11077 |
+
function drawSide(borderData, radius1, radius2, outer1, inner1, outer2, inner2) {
|
11078 |
+
var borderArgs = [];
|
11079 |
+
|
11080 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
11081 |
+
borderArgs.push(["line", outer1[1].start.x, outer1[1].start.y]);
|
11082 |
+
outer1[1].curveTo(borderArgs);
|
11083 |
+
} else {
|
11084 |
+
borderArgs.push([ "line", borderData.c1[0], borderData.c1[1]]);
|
11085 |
+
}
|
11086 |
+
|
11087 |
+
if (radius2[0] > 0 || radius2[1] > 0) {
|
11088 |
+
borderArgs.push(["line", outer2[0].start.x, outer2[0].start.y]);
|
11089 |
+
outer2[0].curveTo(borderArgs);
|
11090 |
+
borderArgs.push(["line", inner2[0].end.x, inner2[0].end.y]);
|
11091 |
+
inner2[0].curveToReversed(borderArgs);
|
11092 |
+
} else {
|
11093 |
+
borderArgs.push(["line", borderData.c2[0], borderData.c2[1]]);
|
11094 |
+
borderArgs.push(["line", borderData.c3[0], borderData.c3[1]]);
|
11095 |
+
}
|
11096 |
+
|
11097 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
11098 |
+
borderArgs.push(["line", inner1[1].end.x, inner1[1].end.y]);
|
11099 |
+
inner1[1].curveToReversed(borderArgs);
|
11100 |
+
} else {
|
11101 |
+
borderArgs.push(["line", borderData.c4[0], borderData.c4[1]]);
|
11102 |
+
}
|
11103 |
+
|
11104 |
+
return borderArgs;
|
11105 |
+
}
|
11106 |
+
|
11107 |
+
function parseCorner(borderArgs, radius1, radius2, corner1, corner2, x, y) {
|
11108 |
+
if (radius1[0] > 0 || radius1[1] > 0) {
|
11109 |
+
borderArgs.push(["line", corner1[0].start.x, corner1[0].start.y]);
|
11110 |
+
corner1[0].curveTo(borderArgs);
|
11111 |
+
corner1[1].curveTo(borderArgs);
|
11112 |
+
} else {
|
11113 |
+
borderArgs.push(["line", x, y]);
|
11114 |
+
}
|
11115 |
+
|
11116 |
+
if (radius2[0] > 0 || radius2[1] > 0) {
|
11117 |
+
borderArgs.push(["line", corner2[0].start.x, corner2[0].start.y]);
|
11118 |
+
}
|
11119 |
+
}
|
11120 |
+
|
11121 |
+
function negativeZIndex(container) {
|
11122 |
+
return container.cssInt("zIndex") < 0;
|
11123 |
+
}
|
11124 |
+
|
11125 |
+
function positiveZIndex(container) {
|
11126 |
+
return container.cssInt("zIndex") > 0;
|
11127 |
+
}
|
11128 |
+
|
11129 |
+
function zIndex0(container) {
|
11130 |
+
return container.cssInt("zIndex") === 0;
|
11131 |
+
}
|
11132 |
+
|
11133 |
+
function inlineLevel(container) {
|
11134 |
+
return ["inline", "inline-block", "inline-table"].indexOf(container.css("display")) !== -1;
|
11135 |
+
}
|
11136 |
+
|
11137 |
+
function isStackingContext(container) {
|
11138 |
+
return (container instanceof StackingContext);
|
11139 |
+
}
|
11140 |
+
|
11141 |
+
function hasText(container) {
|
11142 |
+
return container.node.data.trim().length > 0;
|
11143 |
+
}
|
11144 |
+
|
11145 |
+
function noLetterSpacing(container) {
|
11146 |
+
return (/^(normal|none|0px)$/.test(container.parent.css("letterSpacing")));
|
11147 |
+
}
|
11148 |
+
|
11149 |
+
function getBorderRadiusData(container) {
|
11150 |
+
return ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map(function(side) {
|
11151 |
+
var value = container.css('border' + side + 'Radius');
|
11152 |
+
var arr = value.split(" ");
|
11153 |
+
if (arr.length <= 1) {
|
11154 |
+
arr[1] = arr[0];
|
11155 |
+
}
|
11156 |
+
return arr.map(asInt);
|
11157 |
+
});
|
11158 |
+
}
|
11159 |
+
|
11160 |
+
function renderableNode(node) {
|
11161 |
+
return (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE);
|
11162 |
+
}
|
11163 |
+
|
11164 |
+
function isPositionedForStacking(container) {
|
11165 |
+
var position = container.css("position");
|
11166 |
+
var zIndex = (["absolute", "relative", "fixed"].indexOf(position) !== -1) ? container.css("zIndex") : "auto";
|
11167 |
+
return zIndex !== "auto";
|
11168 |
+
}
|
11169 |
+
|
11170 |
+
function isPositioned(container) {
|
11171 |
+
return container.css("position") !== "static";
|
11172 |
+
}
|
11173 |
+
|
11174 |
+
function isFloating(container) {
|
11175 |
+
return container.css("float") !== "none";
|
11176 |
+
}
|
11177 |
+
|
11178 |
+
function isInlineBlock(container) {
|
11179 |
+
return ["inline-block", "inline-table"].indexOf(container.css("display")) !== -1;
|
11180 |
+
}
|
11181 |
+
|
11182 |
+
function not(callback) {
|
11183 |
+
var context = this;
|
11184 |
+
return function() {
|
11185 |
+
return !callback.apply(context, arguments);
|
11186 |
+
};
|
11187 |
+
}
|
11188 |
+
|
11189 |
+
function isElement(container) {
|
11190 |
+
return container.node.nodeType === Node.ELEMENT_NODE;
|
11191 |
+
}
|
11192 |
+
|
11193 |
+
function isPseudoElement(container) {
|
11194 |
+
return container.isPseudoElement === true;
|
11195 |
+
}
|
11196 |
+
|
11197 |
+
function isTextNode(container) {
|
11198 |
+
return container.node.nodeType === Node.TEXT_NODE;
|
11199 |
+
}
|
11200 |
+
|
11201 |
+
function zIndexSort(contexts) {
|
11202 |
+
return function(a, b) {
|
11203 |
+
return (a.cssInt("zIndex") + (contexts.indexOf(a) / contexts.length)) - (b.cssInt("zIndex") + (contexts.indexOf(b) / contexts.length));
|
11204 |
+
};
|
11205 |
+
}
|
11206 |
+
|
11207 |
+
function hasOpacity(container) {
|
11208 |
+
return container.getOpacity() < 1;
|
11209 |
+
}
|
11210 |
+
|
11211 |
+
function asInt(value) {
|
11212 |
+
return parseInt(value, 10);
|
11213 |
+
}
|
11214 |
+
|
11215 |
+
function getWidth(border) {
|
11216 |
+
return border.width;
|
11217 |
+
}
|
11218 |
+
|
11219 |
+
function nonIgnoredElement(nodeContainer) {
|
11220 |
+
return (nodeContainer.node.nodeType !== Node.ELEMENT_NODE || ["SCRIPT", "HEAD", "TITLE", "OBJECT", "BR", "OPTION"].indexOf(nodeContainer.node.nodeName) === -1);
|
11221 |
+
}
|
11222 |
+
|
11223 |
+
function flatten(arrays) {
|
11224 |
+
return [].concat.apply([], arrays);
|
11225 |
+
}
|
11226 |
+
|
11227 |
+
function stripQuotes(content) {
|
11228 |
+
var first = content.substr(0, 1);
|
11229 |
+
return (first === content.substr(content.length - 1) && first.match(/'|"/)) ? content.substr(1, content.length - 2) : content;
|
11230 |
+
}
|
11231 |
+
|
11232 |
+
function getWords(characters) {
|
11233 |
+
var words = [], i = 0, onWordBoundary = false, word;
|
11234 |
+
while(characters.length) {
|
11235 |
+
if (isWordBoundary(characters[i]) === onWordBoundary) {
|
11236 |
+
word = characters.splice(0, i);
|
11237 |
+
if (word.length) {
|
11238 |
+
words.push(punycode.ucs2.encode(word));
|
11239 |
+
}
|
11240 |
+
onWordBoundary =! onWordBoundary;
|
11241 |
+
i = 0;
|
11242 |
+
} else {
|
11243 |
+
i++;
|
11244 |
+
}
|
11245 |
+
|
11246 |
+
if (i >= characters.length) {
|
11247 |
+
word = characters.splice(0, i);
|
11248 |
+
if (word.length) {
|
11249 |
+
words.push(punycode.ucs2.encode(word));
|
11250 |
+
}
|
11251 |
+
}
|
11252 |
+
}
|
11253 |
+
return words;
|
11254 |
+
}
|
11255 |
+
|
11256 |
+
function isWordBoundary(characterCode) {
|
11257 |
+
return [
|
11258 |
+
32, // <space>
|
11259 |
+
13, // \r
|
11260 |
+
10, // \n
|
11261 |
+
9, // \t
|
11262 |
+
45 // -
|
11263 |
+
].indexOf(characterCode) !== -1;
|
11264 |
+
}
|
11265 |
+
|
11266 |
+
function hasUnicode(string) {
|
11267 |
+
return (/[^\u0000-\u00ff]/).test(string);
|
11268 |
+
}
|
11269 |
+
|
11270 |
+
module.exports = NodeParser;
|
11271 |
+
|
11272 |
+
},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,"punycode":3}],18:[function(require,module,exports){
|
11273 |
+
module.exports = require('es6-promise').Promise;
|
11274 |
+
|
11275 |
+
},{"es6-promise":1}],19:[function(require,module,exports){
|
11276 |
+
var Promise = require('./promise');
|
11277 |
+
var XHR = require('./xhr');
|
11278 |
+
var utils = require('./utils');
|
11279 |
+
var log = require('./log');
|
11280 |
+
var createWindowClone = require('./clone');
|
11281 |
+
var decode64 = utils.decode64;
|
11282 |
+
|
11283 |
+
function Proxy(src, proxyUrl, document) {
|
11284 |
+
var supportsCORS = ('withCredentials' in new XMLHttpRequest());
|
11285 |
+
if (!proxyUrl) {
|
11286 |
+
return Promise.reject("No proxy configured");
|
11287 |
+
}
|
11288 |
+
var callback = createCallback(supportsCORS);
|
11289 |
+
var url = createProxyUrl(proxyUrl, src, callback);
|
11290 |
+
|
11291 |
+
return supportsCORS ? XHR(url) : (jsonp(document, url, callback).then(function(response) {
|
11292 |
+
return decode64(response.content);
|
11293 |
+
}));
|
11294 |
+
}
|
11295 |
+
var proxyCount = 0;
|
11296 |
+
|
11297 |
+
function ProxyURL(src, proxyUrl, document) {
|
11298 |
+
var supportsCORSImage = ('crossOrigin' in new Image());
|
11299 |
+
var callback = createCallback(supportsCORSImage);
|
11300 |
+
var url = createProxyUrl(proxyUrl, src, callback);
|
11301 |
+
return (supportsCORSImage ? Promise.resolve(url) : jsonp(document, url, callback).then(function(response) {
|
11302 |
+
return "data:" + response.type + ";base64," + response.content;
|
11303 |
+
}));
|
11304 |
+
}
|
11305 |
+
|
11306 |
+
function jsonp(document, url, callback) {
|
11307 |
+
return new Promise(function(resolve, reject) {
|
11308 |
+
var s = document.createElement("script");
|
11309 |
+
var cleanup = function() {
|
11310 |
+
delete window.html2canvas.proxy[callback];
|
11311 |
+
document.body.removeChild(s);
|
11312 |
+
};
|
11313 |
+
window.html2canvas.proxy[callback] = function(response) {
|
11314 |
+
cleanup();
|
11315 |
+
resolve(response);
|
11316 |
+
};
|
11317 |
+
s.src = url;
|
11318 |
+
s.onerror = function(e) {
|
11319 |
+
cleanup();
|
11320 |
+
reject(e);
|
11321 |
+
};
|
11322 |
+
document.body.appendChild(s);
|
11323 |
+
});
|
11324 |
+
}
|
11325 |
+
|
11326 |
+
function createCallback(useCORS) {
|
11327 |
+
return !useCORS ? "html2canvas_" + Date.now() + "_" + (++proxyCount) + "_" + Math.round(Math.random() * 100000) : "";
|
11328 |
+
}
|
11329 |
+
|
11330 |
+
function createProxyUrl(proxyUrl, src, callback) {
|
11331 |
+
return proxyUrl + "?url=" + encodeURIComponent(src) + (callback.length ? "&callback=html2canvas.proxy." + callback : "");
|
11332 |
+
}
|
11333 |
+
|
11334 |
+
function documentFromHTML(src) {
|
11335 |
+
return function(html) {
|
11336 |
+
var parser = new DOMParser(), doc;
|
11337 |
+
try {
|
11338 |
+
doc = parser.parseFromString(html, "text/html");
|
11339 |
+
} catch(e) {
|
11340 |
+
log("DOMParser not supported, falling back to createHTMLDocument");
|
11341 |
+
doc = document.implementation.createHTMLDocument("");
|
11342 |
+
try {
|
11343 |
+
doc.open();
|
11344 |
+
doc.write(html);
|
11345 |
+
doc.close();
|
11346 |
+
} catch(ee) {
|
11347 |
+
log("createHTMLDocument write not supported, falling back to document.body.innerHTML");
|
11348 |
+
doc.body.innerHTML = html; // ie9 doesnt support writing to documentElement
|
11349 |
+
}
|
11350 |
+
}
|
11351 |
+
|
11352 |
+
var b = doc.querySelector("base");
|
11353 |
+
if (!b || !b.href.host) {
|
11354 |
+
var base = doc.createElement("base");
|
11355 |
+
base.href = src;
|
11356 |
+
doc.head.insertBefore(base, doc.head.firstChild);
|
11357 |
+
}
|
11358 |
+
|
11359 |
+
return doc;
|
11360 |
+
};
|
11361 |
+
}
|
11362 |
+
|
11363 |
+
function loadUrlDocument(src, proxy, document, width, height, options) {
|
11364 |
+
return new Proxy(src, proxy, window.document).then(documentFromHTML(src)).then(function(doc) {
|
11365 |
+
return createWindowClone(doc, document, width, height, options, 0, 0);
|
11366 |
+
});
|
11367 |
+
}
|
11368 |
+
|
11369 |
+
exports.Proxy = Proxy;
|
11370 |
+
exports.ProxyURL = ProxyURL;
|
11371 |
+
exports.loadUrlDocument = loadUrlDocument;
|
11372 |
+
|
11373 |
+
},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(require,module,exports){
|
11374 |
+
var ProxyURL = require('./proxy').ProxyURL;
|
11375 |
+
var Promise = require('./promise');
|
11376 |
+
|
11377 |
+
function ProxyImageContainer(src, proxy) {
|
11378 |
+
var link = document.createElement("a");
|
11379 |
+
link.href = src;
|
11380 |
+
src = link.href;
|
11381 |
+
this.src = src;
|
11382 |
+
this.image = new Image();
|
11383 |
+
var self = this;
|
11384 |
+
this.promise = new Promise(function(resolve, reject) {
|
11385 |
+
self.image.crossOrigin = "Anonymous";
|
11386 |
+
self.image.onload = resolve;
|
11387 |
+
self.image.onerror = reject;
|
11388 |
+
|
11389 |
+
new ProxyURL(src, proxy, document).then(function(url) {
|
11390 |
+
self.image.src = url;
|
11391 |
+
})['catch'](reject);
|
11392 |
+
});
|
11393 |
+
}
|
11394 |
+
|
11395 |
+
module.exports = ProxyImageContainer;
|
11396 |
+
|
11397 |
+
},{"./promise":18,"./proxy":19}],21:[function(require,module,exports){
|
11398 |
+
var NodeContainer = require('./nodecontainer');
|
11399 |
+
|
11400 |
+
function PseudoElementContainer(node, parent, type) {
|
11401 |
+
NodeContainer.call(this, node, parent);
|
11402 |
+
this.isPseudoElement = true;
|
11403 |
+
this.before = type === ":before";
|
11404 |
+
}
|
11405 |
+
|
11406 |
+
PseudoElementContainer.prototype.cloneTo = function(stack) {
|
11407 |
+
PseudoElementContainer.prototype.cloneTo.call(this, stack);
|
11408 |
+
stack.isPseudoElement = true;
|
11409 |
+
stack.before = this.before;
|
11410 |
+
};
|
11411 |
+
|
11412 |
+
PseudoElementContainer.prototype = Object.create(NodeContainer.prototype);
|
11413 |
+
|
11414 |
+
PseudoElementContainer.prototype.appendToDOM = function() {
|
11415 |
+
if (this.before) {
|
11416 |
+
this.parent.node.insertBefore(this.node, this.parent.node.firstChild);
|
11417 |
+
} else {
|
11418 |
+
this.parent.node.appendChild(this.node);
|
11419 |
+
}
|
11420 |
+
this.parent.node.className += " " + this.getHideClass();
|
11421 |
+
};
|
11422 |
+
|
11423 |
+
PseudoElementContainer.prototype.cleanDOM = function() {
|
11424 |
+
this.node.parentNode.removeChild(this.node);
|
11425 |
+
this.parent.node.className = this.parent.node.className.replace(this.getHideClass(), "");
|
11426 |
+
};
|
11427 |
+
|
11428 |
+
PseudoElementContainer.prototype.getHideClass = function() {
|
11429 |
+
return this["PSEUDO_HIDE_ELEMENT_CLASS_" + (this.before ? "BEFORE" : "AFTER")];
|
11430 |
+
};
|
11431 |
+
|
11432 |
+
PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = "___html2canvas___pseudoelement_before";
|
11433 |
+
PseudoElementContainer.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER = "___html2canvas___pseudoelement_after";
|
11434 |
+
|
11435 |
+
module.exports = PseudoElementContainer;
|
11436 |
+
|
11437 |
+
},{"./nodecontainer":16}],22:[function(require,module,exports){
|
11438 |
+
var log = require('./log');
|
11439 |
+
|
11440 |
+
function Renderer(width, height, images, options, document) {
|
11441 |
+
this.width = width;
|
11442 |
+
this.height = height;
|
11443 |
+
this.images = images;
|
11444 |
+
this.options = options;
|
11445 |
+
this.document = document;
|
11446 |
+
}
|
11447 |
+
|
11448 |
+
Renderer.prototype.renderImage = function(container, bounds, borderData, imageContainer) {
|
11449 |
+
var paddingLeft = container.cssInt('paddingLeft'),
|
11450 |
+
paddingTop = container.cssInt('paddingTop'),
|
11451 |
+
paddingRight = container.cssInt('paddingRight'),
|
11452 |
+
paddingBottom = container.cssInt('paddingBottom'),
|
11453 |
+
borders = borderData.borders;
|
11454 |
+
|
11455 |
+
var width = bounds.width - (borders[1].width + borders[3].width + paddingLeft + paddingRight);
|
11456 |
+
var height = bounds.height - (borders[0].width + borders[2].width + paddingTop + paddingBottom);
|
11457 |
+
this.drawImage(
|
11458 |
+
imageContainer,
|
11459 |
+
0,
|
11460 |
+
0,
|
11461 |
+
imageContainer.image.width || width,
|
11462 |
+
imageContainer.image.height || height,
|
11463 |
+
bounds.left + paddingLeft + borders[3].width,
|
11464 |
+
bounds.top + paddingTop + borders[0].width,
|
11465 |
+
width,
|
11466 |
+
height
|
11467 |
+
);
|
11468 |
+
};
|
11469 |
+
|
11470 |
+
Renderer.prototype.renderBackground = function(container, bounds, borderData) {
|
11471 |
+
if (bounds.height > 0 && bounds.width > 0) {
|
11472 |
+
this.renderBackgroundColor(container, bounds);
|
11473 |
+
this.renderBackgroundImage(container, bounds, borderData);
|
11474 |
+
}
|
11475 |
+
};
|
11476 |
+
|
11477 |
+
Renderer.prototype.renderBackgroundColor = function(container, bounds) {
|
11478 |
+
var color = container.color("backgroundColor");
|
11479 |
+
if (!color.isTransparent()) {
|
11480 |
+
this.rectangle(bounds.left, bounds.top, bounds.width, bounds.height, color);
|
11481 |
+
}
|
11482 |
+
};
|
11483 |
+
|
11484 |
+
Renderer.prototype.renderBorders = function(borders) {
|
11485 |
+
borders.forEach(this.renderBorder, this);
|
11486 |
+
};
|
11487 |
+
|
11488 |
+
Renderer.prototype.renderBorder = function(data) {
|
11489 |
+
if (!data.color.isTransparent() && data.args !== null) {
|
11490 |
+
this.drawShape(data.args, data.color);
|
11491 |
+
}
|
11492 |
+
};
|
11493 |
+
|
11494 |
+
Renderer.prototype.renderBackgroundImage = function(container, bounds, borderData) {
|
11495 |
+
var backgroundImages = container.parseBackgroundImages();
|
11496 |
+
backgroundImages.reverse().forEach(function(backgroundImage, index, arr) {
|
11497 |
+
switch(backgroundImage.method) {
|
11498 |
+
case "url":
|
11499 |
+
var image = this.images.get(backgroundImage.args[0]);
|
11500 |
+
if (image) {
|
11501 |
+
this.renderBackgroundRepeating(container, bounds, image, arr.length - (index+1), borderData);
|
11502 |
+
} else {
|
11503 |
+
log("Error loading background-image", backgroundImage.args[0]);
|
11504 |
+
}
|
11505 |
+
break;
|
11506 |
+
case "linear-gradient":
|
11507 |
+
case "gradient":
|
11508 |
+
var gradientImage = this.images.get(backgroundImage.value);
|
11509 |
+
if (gradientImage) {
|
11510 |
+
this.renderBackgroundGradient(gradientImage, bounds, borderData);
|
11511 |
+
} else {
|
11512 |
+
log("Error loading background-image", backgroundImage.args[0]);
|
11513 |
+
}
|
11514 |
+
break;
|
11515 |
+
case "none":
|
11516 |
+
break;
|
11517 |
+
default:
|
11518 |
+
log("Unknown background-image type", backgroundImage.args[0]);
|
11519 |
+
}
|
11520 |
+
}, this);
|
11521 |
+
};
|
11522 |
+
|
11523 |
+
Renderer.prototype.renderBackgroundRepeating = function(container, bounds, imageContainer, index, borderData) {
|
11524 |
+
var size = container.parseBackgroundSize(bounds, imageContainer.image, index);
|
11525 |
+
var position = container.parseBackgroundPosition(bounds, imageContainer.image, index, size);
|
11526 |
+
var repeat = container.parseBackgroundRepeat(index);
|
11527 |
+
switch (repeat) {
|
11528 |
+
case "repeat-x":
|
11529 |
+
case "repeat no-repeat":
|
11530 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + borderData[3], bounds.top + position.top + borderData[0], 99999, size.height, borderData);
|
11531 |
+
break;
|
11532 |
+
case "repeat-y":
|
11533 |
+
case "no-repeat repeat":
|
11534 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + position.left + borderData[3], bounds.top + borderData[0], size.width, 99999, borderData);
|
11535 |
+
break;
|
11536 |
+
case "no-repeat":
|
11537 |
+
this.backgroundRepeatShape(imageContainer, position, size, bounds, bounds.left + position.left + borderData[3], bounds.top + position.top + borderData[0], size.width, size.height, borderData);
|
11538 |
+
break;
|
11539 |
+
default:
|
11540 |
+
this.renderBackgroundRepeat(imageContainer, position, size, {top: bounds.top, left: bounds.left}, borderData[3], borderData[0]);
|
11541 |
+
break;
|
11542 |
+
}
|
11543 |
+
};
|
11544 |
+
|
11545 |
+
module.exports = Renderer;
|
11546 |
+
|
11547 |
+
},{"./log":15}],23:[function(require,module,exports){
|
11548 |
+
var Renderer = require('../renderer');
|
11549 |
+
var LinearGradientContainer = require('../lineargradientcontainer');
|
11550 |
+
var log = require('../log');
|
11551 |
+
|
11552 |
+
function CanvasRenderer(width, height) {
|
11553 |
+
Renderer.apply(this, arguments);
|
11554 |
+
this.canvas = this.options.canvas || this.document.createElement("canvas");
|
11555 |
+
if (!this.options.canvas) {
|
11556 |
+
this.canvas.width = width;
|
11557 |
+
this.canvas.height = height;
|
11558 |
+
}
|
11559 |
+
this.ctx = this.canvas.getContext("2d");
|
11560 |
+
this.taintCtx = this.document.createElement("canvas").getContext("2d");
|
11561 |
+
this.ctx.textBaseline = "bottom";
|
11562 |
+
this.variables = {};
|
11563 |
+
log("Initialized CanvasRenderer with size", width, "x", height);
|
11564 |
+
}
|
11565 |
+
|
11566 |
+
CanvasRenderer.prototype = Object.create(Renderer.prototype);
|
11567 |
+
|
11568 |
+
CanvasRenderer.prototype.setFillStyle = function(fillStyle) {
|
11569 |
+
this.ctx.fillStyle = typeof(fillStyle) === "object" && !!fillStyle.isColor ? fillStyle.toString() : fillStyle;
|
11570 |
+
return this.ctx;
|
11571 |
+
};
|
11572 |
+
|
11573 |
+
CanvasRenderer.prototype.rectangle = function(left, top, width, height, color) {
|
11574 |
+
this.setFillStyle(color).fillRect(left, top, width, height);
|
11575 |
+
};
|
11576 |
+
|
11577 |
+
CanvasRenderer.prototype.circle = function(left, top, size, color) {
|
11578 |
+
this.setFillStyle(color);
|
11579 |
+
this.ctx.beginPath();
|
11580 |
+
this.ctx.arc(left + size / 2, top + size / 2, size / 2, 0, Math.PI*2, true);
|
11581 |
+
this.ctx.closePath();
|
11582 |
+
this.ctx.fill();
|
11583 |
+
};
|
11584 |
+
|
11585 |
+
CanvasRenderer.prototype.circleStroke = function(left, top, size, color, stroke, strokeColor) {
|
11586 |
+
this.circle(left, top, size, color);
|
11587 |
+
this.ctx.strokeStyle = strokeColor.toString();
|
11588 |
+
this.ctx.stroke();
|
11589 |
+
};
|
11590 |
+
|
11591 |
+
CanvasRenderer.prototype.drawShape = function(shape, color) {
|
11592 |
+
this.shape(shape);
|
11593 |
+
this.setFillStyle(color).fill();
|
11594 |
+
};
|
11595 |
+
|
11596 |
+
CanvasRenderer.prototype.taints = function(imageContainer) {
|
11597 |
+
if (imageContainer.tainted === null) {
|
11598 |
+
this.taintCtx.drawImage(imageContainer.image, 0, 0);
|
11599 |
+
try {
|
11600 |
+
this.taintCtx.getImageData(0, 0, 1, 1);
|
11601 |
+
imageContainer.tainted = false;
|
11602 |
+
} catch(e) {
|
11603 |
+
this.taintCtx = document.createElement("canvas").getContext("2d");
|
11604 |
+
imageContainer.tainted = true;
|
11605 |
+
}
|
11606 |
+
}
|
11607 |
+
|
11608 |
+
return imageContainer.tainted;
|
11609 |
+
};
|
11610 |
+
|
11611 |
+
CanvasRenderer.prototype.drawImage = function(imageContainer, sx, sy, sw, sh, dx, dy, dw, dh) {
|
11612 |
+
if (!this.taints(imageContainer) || this.options.allowTaint) {
|
11613 |
+
this.ctx.drawImage(imageContainer.image, sx, sy, sw, sh, dx, dy, dw, dh);
|
11614 |
+
}
|
11615 |
+
};
|
11616 |
+
|
11617 |
+
CanvasRenderer.prototype.clip = function(shapes, callback, context) {
|
11618 |
+
this.ctx.save();
|
11619 |
+
shapes.filter(hasEntries).forEach(function(shape) {
|
11620 |
+
this.shape(shape).clip();
|
11621 |
+
}, this);
|
11622 |
+
callback.call(context);
|
11623 |
+
this.ctx.restore();
|
11624 |
+
};
|
11625 |
+
|
11626 |
+
CanvasRenderer.prototype.shape = function(shape) {
|
11627 |
+
this.ctx.beginPath();
|
11628 |
+
shape.forEach(function(point, index) {
|
11629 |
+
if (point[0] === "rect") {
|
11630 |
+
this.ctx.rect.apply(this.ctx, point.slice(1));
|
11631 |
+
} else {
|
11632 |
+
this.ctx[(index === 0) ? "moveTo" : point[0] + "To" ].apply(this.ctx, point.slice(1));
|
11633 |
+
}
|
11634 |
+
}, this);
|
11635 |
+
this.ctx.closePath();
|
11636 |
+
return this.ctx;
|
11637 |
+
};
|
11638 |
+
|
11639 |
+
CanvasRenderer.prototype.font = function(color, style, variant, weight, size, family) {
|
11640 |
+
this.setFillStyle(color).font = [style, variant, weight, size, family].join(" ").split(",")[0];
|
11641 |
+
};
|
11642 |
+
|
11643 |
+
CanvasRenderer.prototype.fontShadow = function(color, offsetX, offsetY, blur) {
|
11644 |
+
this.setVariable("shadowColor", color.toString())
|
11645 |
+
.setVariable("shadowOffsetY", offsetX)
|
11646 |
+
.setVariable("shadowOffsetX", offsetY)
|
11647 |
+
.setVariable("shadowBlur", blur);
|
11648 |
+
};
|
11649 |
+
|
11650 |
+
CanvasRenderer.prototype.clearShadow = function() {
|
11651 |
+
this.setVariable("shadowColor", "rgba(0,0,0,0)");
|
11652 |
+
};
|
11653 |
+
|
11654 |
+
CanvasRenderer.prototype.setOpacity = function(opacity) {
|
11655 |
+
this.ctx.globalAlpha = opacity;
|
11656 |
+
};
|
11657 |
+
|
11658 |
+
CanvasRenderer.prototype.setTransform = function(transform) {
|
11659 |
+
this.ctx.translate(transform.origin[0], transform.origin[1]);
|
11660 |
+
this.ctx.transform.apply(this.ctx, transform.matrix);
|
11661 |
+
this.ctx.translate(-transform.origin[0], -transform.origin[1]);
|
11662 |
+
};
|
11663 |
+
|
11664 |
+
CanvasRenderer.prototype.setVariable = function(property, value) {
|
11665 |
+
if (this.variables[property] !== value) {
|
11666 |
+
this.variables[property] = this.ctx[property] = value;
|
11667 |
+
}
|
11668 |
+
|
11669 |
+
return this;
|
11670 |
+
};
|
11671 |
+
|
11672 |
+
CanvasRenderer.prototype.text = function(text, left, bottom) {
|
11673 |
+
this.ctx.fillText(text, left, bottom);
|
11674 |
+
};
|
11675 |
+
|
11676 |
+
CanvasRenderer.prototype.backgroundRepeatShape = function(imageContainer, backgroundPosition, size, bounds, left, top, width, height, borderData) {
|
11677 |
+
var shape = [
|
11678 |
+
["line", Math.round(left), Math.round(top)],
|
11679 |
+
["line", Math.round(left + width), Math.round(top)],
|
11680 |
+
["line", Math.round(left + width), Math.round(height + top)],
|
11681 |
+
["line", Math.round(left), Math.round(height + top)]
|
11682 |
+
];
|
11683 |
+
this.clip([shape], function() {
|
11684 |
+
this.renderBackgroundRepeat(imageContainer, backgroundPosition, size, bounds, borderData[3], borderData[0]);
|
11685 |
+
}, this);
|
11686 |
+
};
|
11687 |
+
|
11688 |
+
CanvasRenderer.prototype.renderBackgroundRepeat = function(imageContainer, backgroundPosition, size, bounds, borderLeft, borderTop) {
|
11689 |
+
var offsetX = Math.round(bounds.left + backgroundPosition.left + borderLeft), offsetY = Math.round(bounds.top + backgroundPosition.top + borderTop);
|
11690 |
+
this.setFillStyle(this.ctx.createPattern(this.resizeImage(imageContainer, size), "repeat"));
|
11691 |
+
this.ctx.translate(offsetX, offsetY);
|
11692 |
+
this.ctx.fill();
|
11693 |
+
this.ctx.translate(-offsetX, -offsetY);
|
11694 |
+
};
|
11695 |
+
|
11696 |
+
CanvasRenderer.prototype.renderBackgroundGradient = function(gradientImage, bounds) {
|
11697 |
+
if (gradientImage instanceof LinearGradientContainer) {
|
11698 |
+
var gradient = this.ctx.createLinearGradient(
|
11699 |
+
bounds.left + bounds.width * gradientImage.x0,
|
11700 |
+
bounds.top + bounds.height * gradientImage.y0,
|
11701 |
+
bounds.left + bounds.width * gradientImage.x1,
|
11702 |
+
bounds.top + bounds.height * gradientImage.y1);
|
11703 |
+
gradientImage.colorStops.forEach(function(colorStop) {
|
11704 |
+
gradient.addColorStop(colorStop.stop, colorStop.color.toString());
|
11705 |
+
});
|
11706 |
+
this.rectangle(bounds.left, bounds.top, bounds.width, bounds.height, gradient);
|
11707 |
+
}
|
11708 |
+
};
|
11709 |
+
|
11710 |
+
CanvasRenderer.prototype.resizeImage = function(imageContainer, size) {
|
11711 |
+
var image = imageContainer.image;
|
11712 |
+
if(image.width === size.width && image.height === size.height) {
|
11713 |
+
return image;
|
11714 |
+
}
|
11715 |
+
|
11716 |
+
var ctx, canvas = document.createElement('canvas');
|
11717 |
+
canvas.width = size.width;
|
11718 |
+
canvas.height = size.height;
|
11719 |
+
ctx = canvas.getContext("2d");
|
11720 |
+
ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, size.width, size.height );
|
11721 |
+
return canvas;
|
11722 |
+
};
|
11723 |
+
|
11724 |
+
function hasEntries(array) {
|
11725 |
+
return array.length > 0;
|
11726 |
+
}
|
11727 |
+
|
11728 |
+
module.exports = CanvasRenderer;
|
11729 |
+
|
11730 |
+
},{"../lineargradientcontainer":14,"../log":15,"../renderer":22}],24:[function(require,module,exports){
|
11731 |
+
var NodeContainer = require('./nodecontainer');
|
11732 |
+
|
11733 |
+
function StackingContext(hasOwnStacking, opacity, element, parent) {
|
11734 |
+
NodeContainer.call(this, element, parent);
|
11735 |
+
this.ownStacking = hasOwnStacking;
|
11736 |
+
this.contexts = [];
|
11737 |
+
this.children = [];
|
11738 |
+
this.opacity = (this.parent ? this.parent.stack.opacity : 1) * opacity;
|
11739 |
+
}
|
11740 |
+
|
11741 |
+
StackingContext.prototype = Object.create(NodeContainer.prototype);
|
11742 |
+
|
11743 |
+
StackingContext.prototype.getParentStack = function(context) {
|
11744 |
+
var parentStack = (this.parent) ? this.parent.stack : null;
|
11745 |
+
return parentStack ? (parentStack.ownStacking ? parentStack : parentStack.getParentStack(context)) : context.stack;
|
11746 |
+
};
|
11747 |
+
|
11748 |
+
module.exports = StackingContext;
|
11749 |
+
|
11750 |
+
},{"./nodecontainer":16}],25:[function(require,module,exports){
|
11751 |
+
function Support(document) {
|
11752 |
+
this.rangeBounds = this.testRangeBounds(document);
|
11753 |
+
this.cors = this.testCORS();
|
11754 |
+
this.svg = this.testSVG();
|
11755 |
+
}
|
11756 |
+
|
11757 |
+
Support.prototype.testRangeBounds = function(document) {
|
11758 |
+
var range, testElement, rangeBounds, rangeHeight, support = false;
|
11759 |
+
|
11760 |
+
if (document.createRange) {
|
11761 |
+
range = document.createRange();
|
11762 |
+
if (range.getBoundingClientRect) {
|
11763 |
+
testElement = document.createElement('boundtest');
|
11764 |
+
testElement.style.height = "123px";
|
11765 |
+
testElement.style.display = "block";
|
11766 |
+
document.body.appendChild(testElement);
|
11767 |
+
|
11768 |
+
range.selectNode(testElement);
|
11769 |
+
rangeBounds = range.getBoundingClientRect();
|
11770 |
+
rangeHeight = rangeBounds.height;
|
11771 |
+
|
11772 |
+
if (rangeHeight === 123) {
|
11773 |
+
support = true;
|
11774 |
+
}
|
11775 |
+
document.body.removeChild(testElement);
|
11776 |
+
}
|
11777 |
+
}
|
11778 |
+
|
11779 |
+
return support;
|
11780 |
+
};
|
11781 |
+
|
11782 |
+
Support.prototype.testCORS = function() {
|
11783 |
+
return typeof((new Image()).crossOrigin) !== "undefined";
|
11784 |
+
};
|
11785 |
+
|
11786 |
+
Support.prototype.testSVG = function() {
|
11787 |
+
var img = new Image();
|
11788 |
+
var canvas = document.createElement("canvas");
|
11789 |
+
var ctx = canvas.getContext("2d");
|
11790 |
+
img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
|
11791 |
+
|
11792 |
+
try {
|
11793 |
+
ctx.drawImage(img, 0, 0);
|
11794 |
+
canvas.toDataURL();
|
11795 |
+
} catch(e) {
|
11796 |
+
return false;
|
11797 |
+
}
|
11798 |
+
return true;
|
11799 |
+
};
|
11800 |
+
|
11801 |
+
module.exports = Support;
|
11802 |
+
|
11803 |
+
},{}],26:[function(require,module,exports){
|
11804 |
+
var Promise = require('./promise');
|
11805 |
+
var XHR = require('./xhr');
|
11806 |
+
var decode64 = require('./utils').decode64;
|
11807 |
+
|
11808 |
+
function SVGContainer(src) {
|
11809 |
+
this.src = src;
|
11810 |
+
this.image = null;
|
11811 |
+
var self = this;
|
11812 |
+
|
11813 |
+
this.promise = this.hasFabric().then(function() {
|
11814 |
+
return (self.isInline(src) ? Promise.resolve(self.inlineFormatting(src)) : XHR(src));
|
11815 |
+
}).then(function(svg) {
|
11816 |
+
return new Promise(function(resolve) {
|
11817 |
+
window.html2canvas.svg.fabric.loadSVGFromString(svg, self.createCanvas.call(self, resolve));
|
11818 |
+
});
|
11819 |
+
});
|
11820 |
+
}
|
11821 |
+
|
11822 |
+
SVGContainer.prototype.hasFabric = function() {
|
11823 |
+
return !window.html2canvas.svg || !window.html2canvas.svg.fabric ? Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg")) : Promise.resolve();
|
11824 |
+
};
|
11825 |
+
|
11826 |
+
SVGContainer.prototype.inlineFormatting = function(src) {
|
11827 |
+
return (/^data:image\/svg\+xml;base64,/.test(src)) ? this.decode64(this.removeContentType(src)) : this.removeContentType(src);
|
11828 |
+
};
|
11829 |
+
|
11830 |
+
SVGContainer.prototype.removeContentType = function(src) {
|
11831 |
+
return src.replace(/^data:image\/svg\+xml(;base64)?,/,'');
|
11832 |
+
};
|
11833 |
+
|
11834 |
+
SVGContainer.prototype.isInline = function(src) {
|
11835 |
+
return (/^data:image\/svg\+xml/i.test(src));
|
11836 |
+
};
|
11837 |
+
|
11838 |
+
SVGContainer.prototype.createCanvas = function(resolve) {
|
11839 |
+
var self = this;
|
11840 |
+
return function (objects, options) {
|
11841 |
+
var canvas = new window.html2canvas.svg.fabric.StaticCanvas('c');
|
11842 |
+
self.image = canvas.lowerCanvasEl;
|
11843 |
+
canvas
|
11844 |
+
.setWidth(options.width)
|
11845 |
+
.setHeight(options.height)
|
11846 |
+
.add(window.html2canvas.svg.fabric.util.groupSVGElements(objects, options))
|
11847 |
+
.renderAll();
|
11848 |
+
resolve(canvas.lowerCanvasEl);
|
11849 |
+
};
|
11850 |
+
};
|
11851 |
+
|
11852 |
+
SVGContainer.prototype.decode64 = function(str) {
|
11853 |
+
return (typeof(window.atob) === "function") ? window.atob(str) : decode64(str);
|
11854 |
+
};
|
11855 |
+
|
11856 |
+
module.exports = SVGContainer;
|
11857 |
+
|
11858 |
+
},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(require,module,exports){
|
11859 |
+
var SVGContainer = require('./svgcontainer');
|
11860 |
+
var Promise = require('./promise');
|
11861 |
+
|
11862 |
+
function SVGNodeContainer(node, _native) {
|
11863 |
+
this.src = node;
|
11864 |
+
this.image = null;
|
11865 |
+
var self = this;
|
11866 |
+
|
11867 |
+
this.promise = _native ? new Promise(function(resolve, reject) {
|
11868 |
+
self.image = new Image();
|
11869 |
+
self.image.onload = resolve;
|
11870 |
+
self.image.onerror = reject;
|
11871 |
+
self.image.src = "data:image/svg+xml," + (new XMLSerializer()).serializeToString(node);
|
11872 |
+
if (self.image.complete === true) {
|
11873 |
+
resolve(self.image);
|
11874 |
+
}
|
11875 |
+
}) : this.hasFabric().then(function() {
|
11876 |
+
return new Promise(function(resolve) {
|
11877 |
+
window.html2canvas.svg.fabric.parseSVGDocument(node, self.createCanvas.call(self, resolve));
|
11878 |
+
});
|
11879 |
+
});
|
11880 |
+
}
|
11881 |
+
|
11882 |
+
SVGNodeContainer.prototype = Object.create(SVGContainer.prototype);
|
11883 |
+
|
11884 |
+
module.exports = SVGNodeContainer;
|
11885 |
+
|
11886 |
+
},{"./promise":18,"./svgcontainer":26}],28:[function(require,module,exports){
|
11887 |
+
var NodeContainer = require('./nodecontainer');
|
11888 |
+
|
11889 |
+
function TextContainer(node, parent) {
|
11890 |
+
NodeContainer.call(this, node, parent);
|
11891 |
+
}
|
11892 |
+
|
11893 |
+
TextContainer.prototype = Object.create(NodeContainer.prototype);
|
11894 |
+
|
11895 |
+
TextContainer.prototype.applyTextTransform = function() {
|
11896 |
+
this.node.data = this.transform(this.parent.css("textTransform"));
|
11897 |
+
};
|
11898 |
+
|
11899 |
+
TextContainer.prototype.transform = function(transform) {
|
11900 |
+
var text = this.node.data;
|
11901 |
+
switch(transform){
|
11902 |
+
case "lowercase":
|
11903 |
+
return text.toLowerCase();
|
11904 |
+
case "capitalize":
|
11905 |
+
return text.replace(/(^|\s|:|-|\(|\))([a-z])/g, capitalize);
|
11906 |
+
case "uppercase":
|
11907 |
+
return text.toUpperCase();
|
11908 |
+
default:
|
11909 |
+
return text;
|
11910 |
+
}
|
11911 |
+
};
|
11912 |
+
|
11913 |
+
function capitalize(m, p1, p2) {
|
11914 |
+
if (m.length > 0) {
|
11915 |
+
return p1 + p2.toUpperCase();
|
11916 |
+
}
|
11917 |
+
}
|
11918 |
+
|
11919 |
+
module.exports = TextContainer;
|
11920 |
+
|
11921 |
+
},{"./nodecontainer":16}],29:[function(require,module,exports){
|
11922 |
+
exports.smallImage = function smallImage() {
|
11923 |
+
return "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
11924 |
+
};
|
11925 |
+
|
11926 |
+
exports.bind = function(callback, context) {
|
11927 |
+
return function() {
|
11928 |
+
return callback.apply(context, arguments);
|
11929 |
+
};
|
11930 |
+
};
|
11931 |
+
|
11932 |
+
/*
|
11933 |
+
* base64-arraybuffer
|
11934 |
+
* https://github.com/niklasvh/base64-arraybuffer
|
11935 |
+
*
|
11936 |
+
* Copyright (c) 2012 Niklas von Hertzen
|
11937 |
+
* Licensed under the MIT license.
|
11938 |
+
*/
|
11939 |
+
|
11940 |
+
exports.decode64 = function(base64) {
|
11941 |
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
11942 |
+
var len = base64.length, i, encoded1, encoded2, encoded3, encoded4, byte1, byte2, byte3;
|
11943 |
+
|
11944 |
+
var output = "";
|
11945 |
+
|
11946 |
+
for (i = 0; i < len; i+=4) {
|
11947 |
+
encoded1 = chars.indexOf(base64[i]);
|
11948 |
+
encoded2 = chars.indexOf(base64[i+1]);
|
11949 |
+
encoded3 = chars.indexOf(base64[i+2]);
|
11950 |
+
encoded4 = chars.indexOf(base64[i+3]);
|
11951 |
+
|
11952 |
+
byte1 = (encoded1 << 2) | (encoded2 >> 4);
|
11953 |
+
byte2 = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
11954 |
+
byte3 = ((encoded3 & 3) << 6) | encoded4;
|
11955 |
+
if (encoded3 === 64) {
|
11956 |
+
output += String.fromCharCode(byte1);
|
11957 |
+
} else if (encoded4 === 64 || encoded4 === -1) {
|
11958 |
+
output += String.fromCharCode(byte1, byte2);
|
11959 |
+
} else{
|
11960 |
+
output += String.fromCharCode(byte1, byte2, byte3);
|
11961 |
+
}
|
11962 |
+
}
|
11963 |
+
|
11964 |
+
return output;
|
11965 |
+
};
|
11966 |
+
|
11967 |
+
exports.getBounds = function(node) {
|
11968 |
+
if (node.getBoundingClientRect) {
|
11969 |
+
var clientRect = node.getBoundingClientRect();
|
11970 |
+
var width = node.offsetWidth == null ? clientRect.width : node.offsetWidth;
|
11971 |
+
return {
|
11972 |
+
top: clientRect.top,
|
11973 |
+
bottom: clientRect.bottom || (clientRect.top + clientRect.height),
|
11974 |
+
right: clientRect.left + width,
|
11975 |
+
left: clientRect.left,
|
11976 |
+
width: width,
|
11977 |
+
height: node.offsetHeight == null ? clientRect.height : node.offsetHeight
|
11978 |
+
};
|
11979 |
+
}
|
11980 |
+
return {};
|
11981 |
+
};
|
11982 |
+
|
11983 |
+
exports.offsetBounds = function(node) {
|
11984 |
+
var parent = node.offsetParent ? exports.offsetBounds(node.offsetParent) : {top: 0, left: 0};
|
11985 |
+
|
11986 |
+
return {
|
11987 |
+
top: node.offsetTop + parent.top,
|
11988 |
+
bottom: node.offsetTop + node.offsetHeight + parent.top,
|
11989 |
+
right: node.offsetLeft + parent.left + node.offsetWidth,
|
11990 |
+
left: node.offsetLeft + parent.left,
|
11991 |
+
width: node.offsetWidth,
|
11992 |
+
height: node.offsetHeight
|
11993 |
+
};
|
11994 |
+
};
|
11995 |
+
|
11996 |
+
exports.parseBackgrounds = function(backgroundImage) {
|
11997 |
+
var whitespace = ' \r\n\t',
|
11998 |
+
method, definition, prefix, prefix_i, block, results = [],
|
11999 |
+
mode = 0, numParen = 0, quote, args;
|
12000 |
+
var appendResult = function() {
|
12001 |
+
if(method) {
|
12002 |
+
if (definition.substr(0, 1) === '"') {
|
12003 |
+
definition = definition.substr(1, definition.length - 2);
|
12004 |
+
}
|
12005 |
+
if (definition) {
|
12006 |
+
args.push(definition);
|
12007 |
+
}
|
12008 |
+
if (method.substr(0, 1) === '-' && (prefix_i = method.indexOf('-', 1 ) + 1) > 0) {
|
12009 |
+
prefix = method.substr(0, prefix_i);
|
12010 |
+
method = method.substr(prefix_i);
|
12011 |
+
}
|
12012 |
+
results.push({
|
12013 |
+
prefix: prefix,
|
12014 |
+
method: method.toLowerCase(),
|
12015 |
+
value: block,
|
12016 |
+
args: args,
|
12017 |
+
image: null
|
12018 |
+
});
|
12019 |
+
}
|
12020 |
+
args = [];
|
12021 |
+
method = prefix = definition = block = '';
|
12022 |
+
};
|
12023 |
+
args = [];
|
12024 |
+
method = prefix = definition = block = '';
|
12025 |
+
backgroundImage.split("").forEach(function(c) {
|
12026 |
+
if (mode === 0 && whitespace.indexOf(c) > -1) {
|
12027 |
+
return;
|
12028 |
+
}
|
12029 |
+
switch(c) {
|
12030 |
+
case '"':
|
12031 |
+
if(!quote) {
|
12032 |
+
quote = c;
|
12033 |
+
} else if(quote === c) {
|
12034 |
+
quote = null;
|
12035 |
+
}
|
12036 |
+
break;
|
12037 |
+
case '(':
|
12038 |
+
if(quote) {
|
12039 |
+
break;
|
12040 |
+
} else if(mode === 0) {
|
12041 |
+
mode = 1;
|
12042 |
+
block += c;
|
12043 |
+
return;
|
12044 |
+
} else {
|
12045 |
+
numParen++;
|
12046 |
+
}
|
12047 |
+
break;
|
12048 |
+
case ')':
|
12049 |
+
if (quote) {
|
12050 |
+
break;
|
12051 |
+
} else if(mode === 1) {
|
12052 |
+
if(numParen === 0) {
|
12053 |
+
mode = 0;
|
12054 |
+
block += c;
|
12055 |
+
appendResult();
|
12056 |
+
return;
|
12057 |
+
} else {
|
12058 |
+
numParen--;
|
12059 |
+
}
|
12060 |
+
}
|
12061 |
+
break;
|
12062 |
+
|
12063 |
+
case ',':
|
12064 |
+
if (quote) {
|
12065 |
+
break;
|
12066 |
+
} else if(mode === 0) {
|
12067 |
+
appendResult();
|
12068 |
+
return;
|
12069 |
+
} else if (mode === 1) {
|
12070 |
+
if (numParen === 0 && !method.match(/^url$/i)) {
|
12071 |
+
args.push(definition);
|
12072 |
+
definition = '';
|
12073 |
+
block += c;
|
12074 |
+
return;
|
12075 |
+
}
|
12076 |
+
}
|
12077 |
+
break;
|
12078 |
+
}
|
12079 |
+
|
12080 |
+
block += c;
|
12081 |
+
if (mode === 0) {
|
12082 |
+
method += c;
|
12083 |
+
} else {
|
12084 |
+
definition += c;
|
12085 |
+
}
|
12086 |
+
});
|
12087 |
+
|
12088 |
+
appendResult();
|
12089 |
+
return results;
|
12090 |
+
};
|
12091 |
+
|
12092 |
+
},{}],30:[function(require,module,exports){
|
12093 |
+
var GradientContainer = require('./gradientcontainer');
|
12094 |
+
|
12095 |
+
function WebkitGradientContainer(imageData) {
|
12096 |
+
GradientContainer.apply(this, arguments);
|
12097 |
+
this.type = (imageData.args[0] === "linear") ? this.TYPES.LINEAR : this.TYPES.RADIAL;
|
12098 |
+
}
|
12099 |
+
|
12100 |
+
WebkitGradientContainer.prototype = Object.create(GradientContainer.prototype);
|
12101 |
+
|
12102 |
+
module.exports = WebkitGradientContainer;
|
12103 |
+
|
12104 |
+
},{"./gradientcontainer":11}],31:[function(require,module,exports){
|
12105 |
+
var Promise = require('./promise');
|
12106 |
+
|
12107 |
+
function XHR(url) {
|
12108 |
+
return new Promise(function(resolve, reject) {
|
12109 |
+
var xhr = new XMLHttpRequest();
|
12110 |
+
xhr.open('GET', url);
|
12111 |
+
|
12112 |
+
xhr.onload = function() {
|
12113 |
+
if (xhr.status === 200) {
|
12114 |
+
resolve(xhr.responseText);
|
12115 |
+
} else {
|
12116 |
+
reject(new Error(xhr.statusText));
|
12117 |
+
}
|
12118 |
+
};
|
12119 |
+
|
12120 |
+
xhr.onerror = function() {
|
12121 |
+
reject(new Error("Network Error"));
|
12122 |
+
};
|
12123 |
+
|
12124 |
+
xhr.send();
|
12125 |
+
});
|
12126 |
+
}
|
12127 |
+
|
12128 |
+
module.exports = XHR;
|
12129 |
+
|
12130 |
+
},{"./promise":18}]},{},[6])(6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12131 |
});
|
12132 |
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
12133 |
|
12134 |
/***/ },
|
12135 |
|
assets/js/{vendor.79f8bb9d.js → vendor.98a3aa8c.js}
RENAMED
@@ -76,7 +76,7 @@
|
|
76 |
/******/ script.charset = 'utf-8';
|
77 |
/******/ script.async = true;
|
78 |
|
79 |
-
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"
|
80 |
/******/ head.appendChild(script);
|
81 |
/******/ }
|
82 |
/******/ };
|
76 |
/******/ script.charset = 'utf-8';
|
77 |
/******/ script.async = true;
|
78 |
|
79 |
+
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"1d02af45","1":"bf69b320","2":"20737db0","3":"4267d9a6","4":"0b7c23bb"}[chunkId] + ".chunk.js";
|
80 |
/******/ head.appendChild(script);
|
81 |
/******/ }
|
82 |
/******/ };
|
lang/mailpoet-ca.mo
CHANGED
Binary file
|
lang/mailpoet-da_DK.mo
CHANGED
Binary file
|
lang/mailpoet-de_DE.mo
CHANGED
Binary file
|
lang/mailpoet-es_ES.mo
CHANGED
Binary file
|
lang/mailpoet-fa_IR.mo
CHANGED
Binary file
|
lang/mailpoet-fr_CA.mo
CHANGED
Binary file
|
lang/mailpoet-fr_FR.mo
CHANGED
Binary file
|
lang/mailpoet-it_IT.mo
CHANGED
Binary file
|
lang/mailpoet-ja.mo
CHANGED
Binary file
|
lang/mailpoet-nl_NL.mo
CHANGED
Binary file
|
lang/mailpoet-pl_PL.mo
CHANGED
Binary file
|
lang/mailpoet-pt_BR.mo
CHANGED
Binary file
|
lang/mailpoet-pt_PT.mo
CHANGED
Binary file
|
lang/mailpoet-ru_RU.mo
CHANGED
Binary file
|
lang/mailpoet-sq.mo
CHANGED
Binary file
|
lang/mailpoet-sv_SE.mo
CHANGED
Binary file
|
lang/mailpoet-tr_TR.mo
CHANGED
Binary file
|
lang/mailpoet.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
7 |
-
"POT-Creation-Date: 2018-04-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -76,7 +76,7 @@ msgstr ""
|
|
76 |
|
77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
78 |
#: lib/API/MP/v1/API.php:17
|
79 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
80 |
#: views/newsletter/editor.html:939 views/newsletter/editor.html:940
|
81 |
msgid "Email"
|
82 |
msgstr ""
|
@@ -236,14 +236,14 @@ msgid "You need to wait %d seconds before subscribing again."
|
|
236 |
msgstr ""
|
237 |
|
238 |
#: lib/API/MP/v1/API.php:21
|
239 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
240 |
#: lib/Subscription/Pages.php:283 views/form/editor.html:219
|
241 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
242 |
msgid "First name"
|
243 |
msgstr ""
|
244 |
|
245 |
#: lib/API/MP/v1/API.php:25
|
246 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
247 |
#: lib/Subscription/Pages.php:292 views/form/editor.html:228
|
248 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
249 |
msgid "Last name"
|
@@ -1089,11 +1089,11 @@ msgstr ""
|
|
1089 |
msgid "Maximum execution time has been reached."
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: lib/Cron/Daemon.php:
|
1093 |
msgid "Invalid or missing request data."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: lib/Cron/Daemon.php:
|
1097 |
msgid "Daemon does not exist."
|
1098 |
msgstr ""
|
1099 |
|
@@ -1575,22 +1575,22 @@ msgstr ""
|
|
1575 |
msgid "MailPoet Page"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
-
#: lib/Subscribers/ImportExport/Export/
|
|
|
|
|
|
|
|
|
1579 |
msgid "The export file could not be saved on the server."
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: lib/Subscribers/ImportExport/Export/Export.php:
|
1583 |
msgid "Export requires a ZIP extension to be installed on the host."
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: lib/Subscribers/ImportExport/Export/Export.php:
|
1587 |
msgid "List"
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: lib/Subscribers/ImportExport/Export/Export.php:204
|
1591 |
-
msgid "Not In Segment"
|
1592 |
-
msgstr ""
|
1593 |
-
|
1594 |
#: lib/Subscribers/ImportExport/Import/Import.php:69
|
1595 |
msgid "Missing or invalid import data."
|
1596 |
msgstr ""
|
@@ -1629,39 +1629,39 @@ msgstr ""
|
|
1629 |
msgid "Did not find any valid lists."
|
1630 |
msgstr ""
|
1631 |
|
1632 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1633 |
msgid "Not In List"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1637 |
msgid "IP address"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1641 |
msgid "Ignore field..."
|
1642 |
msgstr ""
|
1643 |
|
1644 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1645 |
msgid "Create new field..."
|
1646 |
msgstr ""
|
1647 |
|
1648 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1649 |
msgid "Select all..."
|
1650 |
msgstr ""
|
1651 |
|
1652 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1653 |
msgid "Deselect all..."
|
1654 |
msgstr ""
|
1655 |
|
1656 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1657 |
msgid "Actions"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1661 |
msgid "System fields"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
1665 |
#: views/subscribers/importExport/import.html:50
|
1666 |
msgid "User fields"
|
1667 |
msgstr ""
|
@@ -5524,12 +5524,12 @@ msgctxt "segments per page (screen options)"
|
|
5524 |
msgid "Number of segments per page"
|
5525 |
msgstr ""
|
5526 |
|
5527 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
5528 |
msgctxt "Subscription status"
|
5529 |
msgid "List status"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
-
#: lib/Subscribers/ImportExport/ImportExportFactory.php:
|
5533 |
msgctxt "Subscription status"
|
5534 |
msgid "Global status"
|
5535 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
7 |
+
"POT-Creation-Date: 2018-04-10 14:33:59+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
76 |
|
77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
78 |
#: lib/API/MP/v1/API.php:17
|
79 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:44
|
80 |
#: views/newsletter/editor.html:939 views/newsletter/editor.html:940
|
81 |
msgid "Email"
|
82 |
msgstr ""
|
236 |
msgstr ""
|
237 |
|
238 |
#: lib/API/MP/v1/API.php:21
|
239 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:45
|
240 |
#: lib/Subscription/Pages.php:283 views/form/editor.html:219
|
241 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
242 |
msgid "First name"
|
243 |
msgstr ""
|
244 |
|
245 |
#: lib/API/MP/v1/API.php:25
|
246 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:46
|
247 |
#: lib/Subscription/Pages.php:292 views/form/editor.html:228
|
248 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
249 |
msgid "Last name"
|
1089 |
msgid "Maximum execution time has been reached."
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: lib/Cron/Daemon.php:37
|
1093 |
msgid "Invalid or missing request data."
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: lib/Cron/Daemon.php:40
|
1097 |
msgid "Daemon does not exist."
|
1098 |
msgstr ""
|
1099 |
|
1575 |
msgid "MailPoet Page"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
+
#: lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php:56
|
1579 |
+
msgid "Not In Segment"
|
1580 |
+
msgstr ""
|
1581 |
+
|
1582 |
+
#: lib/Subscribers/ImportExport/Export/Export.php:59
|
1583 |
msgid "The export file could not be saved on the server."
|
1584 |
msgstr ""
|
1585 |
|
1586 |
+
#: lib/Subscribers/ImportExport/Export/Export.php:62
|
1587 |
msgid "Export requires a ZIP extension to be installed on the host."
|
1588 |
msgstr ""
|
1589 |
|
1590 |
+
#: lib/Subscribers/ImportExport/Export/Export.php:86 views/segments.html:29
|
1591 |
msgid "List"
|
1592 |
msgstr ""
|
1593 |
|
|
|
|
|
|
|
|
|
1594 |
#: lib/Subscribers/ImportExport/Import/Import.php:69
|
1595 |
msgid "Missing or invalid import data."
|
1596 |
msgstr ""
|
1629 |
msgid "Did not find any valid lists."
|
1630 |
msgstr ""
|
1631 |
|
1632 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:32
|
1633 |
msgid "Not In List"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:54
|
1637 |
msgid "IP address"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:95
|
1641 |
msgid "Ignore field..."
|
1642 |
msgstr ""
|
1643 |
|
1644 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:99
|
1645 |
msgid "Create new field..."
|
1646 |
msgstr ""
|
1647 |
|
1648 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:105
|
1649 |
msgid "Select all..."
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:109
|
1653 |
msgid "Deselect all..."
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:114
|
1657 |
msgid "Actions"
|
1658 |
msgstr ""
|
1659 |
|
1660 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:118
|
1661 |
msgid "System fields"
|
1662 |
msgstr ""
|
1663 |
|
1664 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:124
|
1665 |
#: views/subscribers/importExport/import.html:50
|
1666 |
msgid "User fields"
|
1667 |
msgstr ""
|
5524 |
msgid "Number of segments per page"
|
5525 |
msgstr ""
|
5526 |
|
5527 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:52
|
5528 |
msgctxt "Subscription status"
|
5529 |
msgid "List status"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
+
#: lib/Subscribers/ImportExport/ImportExportFactory.php:53
|
5533 |
msgctxt "Subscription status"
|
5534 |
msgid "Global status"
|
5535 |
msgstr ""
|
lib/Config/Menu.php
CHANGED
@@ -601,7 +601,7 @@ class Menu {
|
|
601 |
}
|
602 |
|
603 |
function import() {
|
604 |
-
$import = new ImportExportFactory(
|
605 |
$data = $import->bootstrap();
|
606 |
$data = array_merge($data, array(
|
607 |
'date_types' => Block\Date::getDateTypes(),
|
@@ -613,7 +613,7 @@ class Menu {
|
|
613 |
}
|
614 |
|
615 |
function export() {
|
616 |
-
$export = new ImportExportFactory(
|
617 |
$data = $export->bootstrap();
|
618 |
$data['sub_menu'] = 'mailpoet-subscribers';
|
619 |
$this->displayPage('subscribers/importExport/export.html', $data);
|
601 |
}
|
602 |
|
603 |
function import() {
|
604 |
+
$import = new ImportExportFactory(ImportExportFactory::IMPORT_ACTION);
|
605 |
$data = $import->bootstrap();
|
606 |
$data = array_merge($data, array(
|
607 |
'date_types' => Block\Date::getDateTypes(),
|
613 |
}
|
614 |
|
615 |
function export() {
|
616 |
+
$export = new ImportExportFactory(ImportExportFactory::EXPORT_ACTION);
|
617 |
$data = $export->bootstrap();
|
618 |
$data['sub_menu'] = 'mailpoet-subscribers';
|
619 |
$this->displayPage('subscribers/importExport/export.html', $data);
|
lib/Cron/Daemon.php
CHANGED
@@ -30,6 +30,9 @@ class Daemon {
|
|
30 |
|
31 |
function run() {
|
32 |
ignore_user_abort(true);
|
|
|
|
|
|
|
33 |
if(!$this->request_data) {
|
34 |
$error = __('Invalid or missing request data.', 'mailpoet');
|
35 |
} else {
|
30 |
|
31 |
function run() {
|
32 |
ignore_user_abort(true);
|
33 |
+
if(strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
|
34 |
+
set_time_limit(0);
|
35 |
+
}
|
36 |
if(!$this->request_data) {
|
37 |
$error = __('Invalid or missing request data.', 'mailpoet');
|
38 |
} else {
|
lib/Models/Segment.php
CHANGED
@@ -190,7 +190,7 @@ class Segment extends Model {
|
|
190 |
'(SELECT segments.id, segments.name, COUNT(relation.subscriber_id) as subscribers ' .
|
191 |
'FROM ' . MP_SUBSCRIBER_SEGMENT_TABLE . ' relation ' .
|
192 |
'LEFT JOIN ' . self::$_table . ' segments ON segments.id = relation.segment_id ' .
|
193 |
-
'
|
194 |
'WHERE relation.segment_id IS NOT NULL ' .
|
195 |
'AND subscribers.deleted_at IS NULL ' .
|
196 |
'GROUP BY segments.id) ' .
|
190 |
'(SELECT segments.id, segments.name, COUNT(relation.subscriber_id) as subscribers ' .
|
191 |
'FROM ' . MP_SUBSCRIBER_SEGMENT_TABLE . ' relation ' .
|
192 |
'LEFT JOIN ' . self::$_table . ' segments ON segments.id = relation.segment_id ' .
|
193 |
+
'INNER JOIN ' . MP_SUBSCRIBERS_TABLE . ' subscribers ON subscribers.id = relation.subscriber_id ' .
|
194 |
'WHERE relation.segment_id IS NOT NULL ' .
|
195 |
'AND subscribers.deleted_at IS NULL ' .
|
196 |
'GROUP BY segments.id) ' .
|
lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailPoet\Subscribers\ImportExport\Export;
|
4 |
+
|
5 |
+
use MailPoet\Models\Segment;
|
6 |
+
use MailPoet\Models\Subscriber;
|
7 |
+
use MailPoet\Models\SubscriberSegment;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Gets batches of subscribers from default segments.
|
11 |
+
*/
|
12 |
+
class DefaultSubscribersGetter extends SubscribersGetter {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var bool
|
16 |
+
*/
|
17 |
+
protected $get_subscribers_without_segment;
|
18 |
+
|
19 |
+
public function __construct($segments_ids, $batch_size) {
|
20 |
+
parent::__construct($segments_ids, $batch_size);
|
21 |
+
$this->get_subscribers_without_segment = (array_search(0, $segments_ids) !== false);
|
22 |
+
}
|
23 |
+
|
24 |
+
protected function filter($subscribers) {
|
25 |
+
$subscribers = $subscribers
|
26 |
+
->selectMany(
|
27 |
+
array(
|
28 |
+
'list_status' => SubscriberSegment::$_table . '.status'
|
29 |
+
)
|
30 |
+
)
|
31 |
+
->left_outer_join(
|
32 |
+
SubscriberSegment::$_table,
|
33 |
+
array(
|
34 |
+
Subscriber::$_table . '.id',
|
35 |
+
'=',
|
36 |
+
SubscriberSegment::$_table . '.subscriber_id'
|
37 |
+
)
|
38 |
+
)
|
39 |
+
->left_outer_join(
|
40 |
+
Segment::$_table,
|
41 |
+
array(
|
42 |
+
Segment::$_table . '.id',
|
43 |
+
'=',
|
44 |
+
SubscriberSegment::$_table . '.segment_id'
|
45 |
+
)
|
46 |
+
)
|
47 |
+
->groupBy(Segment::$_table . '.id');
|
48 |
+
|
49 |
+
if($this->get_subscribers_without_segment !== false) {
|
50 |
+
// if there are subscribers who do not belong to any segment, use
|
51 |
+
// a CASE function to group them under "Not In Segment"
|
52 |
+
$subscribers = $subscribers
|
53 |
+
->selectExpr(
|
54 |
+
'MAX(CASE WHEN ' . Segment::$_table . '.name IS NOT NULL ' .
|
55 |
+
'THEN ' . Segment::$_table . '.name ' .
|
56 |
+
'ELSE "' . __('Not In Segment', 'mailpoet') . '" END) as segment_name'
|
57 |
+
)
|
58 |
+
->whereRaw(
|
59 |
+
SubscriberSegment::$_table . '.segment_id IN (' .
|
60 |
+
rtrim(str_repeat('?,', count($this->segments_ids)), ',') . ') ' .
|
61 |
+
'OR ' . SubscriberSegment::$_table . '.segment_id IS NULL ',
|
62 |
+
$this->segments_ids
|
63 |
+
);
|
64 |
+
} else {
|
65 |
+
// if all subscribers belong to at least one segment, select the segment name
|
66 |
+
$subscribers = $subscribers
|
67 |
+
->selectExpr('MAX(' . Segment::$_table . '.name) as segment_name')
|
68 |
+
->whereIn(SubscriberSegment::$_table . '.segment_id', $this->segments_ids);
|
69 |
+
}
|
70 |
+
|
71 |
+
$subscribers = $subscribers
|
72 |
+
->offset($this->offset)
|
73 |
+
->limit($this->batch_size)
|
74 |
+
->findArray();
|
75 |
+
|
76 |
+
return $subscribers;
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailPoet\Subscribers\ImportExport\Export;
|
4 |
+
|
5 |
+
use MailPoet\Models\Segment;
|
6 |
+
use MailPoet\Models\Subscriber;
|
7 |
+
use MailPoet\WP\Hooks;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Gets batches of subscribers from dynamic segments.
|
11 |
+
*/
|
12 |
+
class DynamicSubscribersGetter extends SubscribersGetter {
|
13 |
+
|
14 |
+
protected $segment_index = 0;
|
15 |
+
|
16 |
+
public function reset() {
|
17 |
+
parent::reset();
|
18 |
+
$this->segment_index = 0;
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function filter($subscribers) {
|
22 |
+
$segment_id = $this->segments_ids[$this->segment_index];
|
23 |
+
|
24 |
+
$filters = Hooks::applyFilters(
|
25 |
+
'mailpoet_get_segment_filters',
|
26 |
+
$segment_id
|
27 |
+
);
|
28 |
+
|
29 |
+
if(!is_array($filters) || empty($filters)) {
|
30 |
+
return array();
|
31 |
+
}
|
32 |
+
|
33 |
+
$name = Segment::findOne($segment_id)->name;
|
34 |
+
|
35 |
+
foreach($filters as $filter) {
|
36 |
+
$subscribers = $filter->toSql($subscribers);
|
37 |
+
}
|
38 |
+
|
39 |
+
return $subscribers
|
40 |
+
->selectMany(array(
|
41 |
+
'list_status' => Subscriber::$_table . '.status'
|
42 |
+
))
|
43 |
+
->selectExpr("'". $name . "' AS segment_name")
|
44 |
+
->offset($this->offset)
|
45 |
+
->limit($this->batch_size)
|
46 |
+
->findArray();
|
47 |
+
}
|
48 |
+
|
49 |
+
public function get() {
|
50 |
+
if($this->segment_index >= count($this->segments_ids)) {
|
51 |
+
$this->finished = true;
|
52 |
+
}
|
53 |
+
|
54 |
+
$subscribers = parent::get();
|
55 |
+
|
56 |
+
if($subscribers !== false && count($subscribers) < $this->batch_size) {
|
57 |
+
$this->segment_index ++;
|
58 |
+
$this->offset = 0;
|
59 |
+
$this->finished = false;
|
60 |
+
}
|
61 |
+
|
62 |
+
return $subscribers;
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
lib/Subscribers/ImportExport/Export/Export.php
CHANGED
@@ -13,24 +13,34 @@ use MailPoet\Util\Security;
|
|
13 |
use MailPoet\Util\XLSXWriter;
|
14 |
|
15 |
class Export {
|
|
|
|
|
16 |
public $export_format_option;
|
17 |
-
public $segments;
|
18 |
-
public $subscribers_without_segment;
|
19 |
public $subscriber_fields;
|
20 |
public $subscriber_custom_fields;
|
21 |
public $formatted_subscriber_fields;
|
22 |
public $export_path;
|
23 |
public $export_file;
|
24 |
public $export_file_URL;
|
25 |
-
public $
|
|
|
26 |
|
27 |
public function __construct($data) {
|
28 |
if(strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
|
29 |
set_time_limit(0);
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$this->export_format_option = $data['export_format_option'];
|
32 |
-
$this->segments = $data['segments'];
|
33 |
-
$this->subscribers_without_segment = array_search(0, $this->segments);
|
34 |
$this->subscriber_fields = $data['subscriber_fields'];
|
35 |
$this->subscriber_custom_fields = $this->getSubscriberCustomFields();
|
36 |
$this->formatted_subscriber_fields = $this->formatSubscriberFields(
|
@@ -40,10 +50,10 @@ class Export {
|
|
40 |
$this->export_path = Env::$temp_path;
|
41 |
$this->export_file = $this->getExportFile($this->export_format_option);
|
42 |
$this->export_file_URL = $this->getExportFileURL($this->export_file);
|
43 |
-
$this->subscriber_batch_size = 15000;
|
44 |
}
|
45 |
|
46 |
function process() {
|
|
|
47 |
try {
|
48 |
if(is_writable($this->export_path) === false) {
|
49 |
throw new \Exception(__('The export file could not be saved on the server.', 'mailpoet'));
|
@@ -68,7 +78,6 @@ class Export {
|
|
68 |
|
69 |
function generateCSV() {
|
70 |
$processed_subscribers = 0;
|
71 |
-
$offset = 0;
|
72 |
$formatted_subscriber_fields = $this->formatted_subscriber_fields;
|
73 |
$CSV_file = fopen($this->export_file, 'w');
|
74 |
$format_CSV = function($row) {
|
@@ -88,29 +97,30 @@ class Export {
|
|
88 |
)
|
89 |
) . PHP_EOL
|
90 |
);
|
91 |
-
|
92 |
-
|
|
|
93 |
$processed_subscribers += count($subscribers);
|
94 |
foreach($subscribers as $subscriber) {
|
95 |
$row = $this->formatSubscriberData($subscriber);
|
96 |
$row[] = ucwords($subscriber['segment_name']);
|
97 |
fwrite($CSV_file, implode(',', array_map($format_CSV, $row)) . "\n");
|
98 |
}
|
99 |
-
$
|
100 |
-
}
|
101 |
fclose($CSV_file);
|
102 |
return $processed_subscribers;
|
103 |
}
|
104 |
|
105 |
function generateXLSX() {
|
106 |
$processed_subscribers = 0;
|
107 |
-
$offset = 0;
|
108 |
$XLSX_writer = new XLSXWriter();
|
109 |
$XLSX_writer->setAuthor('MailPoet (www.mailpoet.com)');
|
110 |
$last_segment = false;
|
111 |
$processed_segments = array();
|
112 |
-
|
113 |
-
|
|
|
114 |
$processed_subscribers += count($subscribers);
|
115 |
foreach($subscribers as $i => $subscriber) {
|
116 |
$current_segment = ucwords($subscriber['segment_name']);
|
@@ -147,8 +157,8 @@ class Export {
|
|
147 |
$this->formatSubscriberData($subscriber)
|
148 |
);
|
149 |
}
|
150 |
-
$
|
151 |
-
}
|
152 |
$XLSX_writer->writeToFile($this->export_file);
|
153 |
return $processed_subscribers;
|
154 |
}
|
@@ -157,69 +167,11 @@ class Export {
|
|
157 |
return $XLSX_writer->writeSheetRow(ucwords($segment), $data);
|
158 |
}
|
159 |
|
160 |
-
function getSubscribers(
|
161 |
-
|
162 |
-
$subscribers
|
163 |
-
|
164 |
-
'last_name',
|
165 |
-
'email',
|
166 |
-
'subscribed_ip',
|
167 |
-
array(
|
168 |
-
'global_status' => Subscriber::$_table . '.status'
|
169 |
-
),
|
170 |
-
array(
|
171 |
-
'list_status' => SubscriberSegment::$_table . '.status'
|
172 |
-
)
|
173 |
-
);
|
174 |
-
|
175 |
-
// JOIN subscribers on segment and subscriber_segment tables
|
176 |
-
$subscribers = $subscribers
|
177 |
-
->left_outer_join(
|
178 |
-
SubscriberSegment::$_table,
|
179 |
-
array(
|
180 |
-
Subscriber::$_table . '.id',
|
181 |
-
'=',
|
182 |
-
SubscriberSegment::$_table . '.subscriber_id'
|
183 |
-
)
|
184 |
-
)
|
185 |
-
->left_outer_join(
|
186 |
-
Segment::$_table,
|
187 |
-
array(
|
188 |
-
Segment::$_table . '.id',
|
189 |
-
'=',
|
190 |
-
SubscriberSegment::$_table . '.segment_id'
|
191 |
-
)
|
192 |
-
)
|
193 |
-
->filter('filterWithCustomFieldsForExport')
|
194 |
-
->groupBy(Subscriber::$_table . '.id')
|
195 |
-
->groupBy(Segment::$_table . '.id');
|
196 |
-
|
197 |
-
if($this->subscribers_without_segment !== false) {
|
198 |
-
// if there are subscribers who do not belong to any segment, use
|
199 |
-
// a CASE function to group them under "Not In Segment"
|
200 |
-
$subscribers = $subscribers
|
201 |
-
->selectExpr(
|
202 |
-
'MAX(CASE WHEN ' . Segment::$_table . '.name IS NOT NULL ' .
|
203 |
-
'THEN ' . Segment::$_table . '.name ' .
|
204 |
-
'ELSE "' . __('Not In Segment', 'mailpoet') . '" END) as segment_name'
|
205 |
-
)
|
206 |
-
->whereRaw(
|
207 |
-
SubscriberSegment::$_table . '.segment_id IN (' .
|
208 |
-
rtrim(str_repeat('?,', count($this->segments)), ',') . ') ' .
|
209 |
-
'OR ' . SubscriberSegment::$_table . '.segment_id IS NULL ',
|
210 |
-
$this->segments
|
211 |
-
);
|
212 |
-
} else {
|
213 |
-
// if all subscribers belong to at least one segment, select the segment name
|
214 |
-
$subscribers = $subscribers
|
215 |
-
->selectExpr('MAX(' . Segment::$_table . '.name) as segment_name')
|
216 |
-
->whereIn(SubscriberSegment::$_table . '.segment_id', $this->segments);
|
217 |
}
|
218 |
-
$subscribers = $subscribers
|
219 |
-
->whereNull(Subscriber::$_table . '.deleted_at')
|
220 |
-
->offset($offset)
|
221 |
-
->limit($limit)
|
222 |
-
->findArray();
|
223 |
return $subscribers;
|
224 |
}
|
225 |
|
13 |
use MailPoet\Util\XLSXWriter;
|
14 |
|
15 |
class Export {
|
16 |
+
const SUBSCRIBER_BATCH_SIZE = 15000;
|
17 |
+
|
18 |
public $export_format_option;
|
|
|
|
|
19 |
public $subscriber_fields;
|
20 |
public $subscriber_custom_fields;
|
21 |
public $formatted_subscriber_fields;
|
22 |
public $export_path;
|
23 |
public $export_file;
|
24 |
public $export_file_URL;
|
25 |
+
public $default_subscribers_getter;
|
26 |
+
public $dynamic_subscribers_getter;
|
27 |
|
28 |
public function __construct($data) {
|
29 |
if(strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
|
30 |
set_time_limit(0);
|
31 |
}
|
32 |
+
|
33 |
+
$this->default_subscribers_getter = new DefaultSubscribersGetter(
|
34 |
+
$data['segments'],
|
35 |
+
self::SUBSCRIBER_BATCH_SIZE
|
36 |
+
);
|
37 |
+
|
38 |
+
$this->dynamic_subscribers_getter = new DynamicSubscribersGetter(
|
39 |
+
$data['segments'],
|
40 |
+
self::SUBSCRIBER_BATCH_SIZE
|
41 |
+
);
|
42 |
+
|
43 |
$this->export_format_option = $data['export_format_option'];
|
|
|
|
|
44 |
$this->subscriber_fields = $data['subscriber_fields'];
|
45 |
$this->subscriber_custom_fields = $this->getSubscriberCustomFields();
|
46 |
$this->formatted_subscriber_fields = $this->formatSubscriberFields(
|
50 |
$this->export_path = Env::$temp_path;
|
51 |
$this->export_file = $this->getExportFile($this->export_format_option);
|
52 |
$this->export_file_URL = $this->getExportFileURL($this->export_file);
|
|
|
53 |
}
|
54 |
|
55 |
function process() {
|
56 |
+
$this->default_subscribers_getter->reset();
|
57 |
try {
|
58 |
if(is_writable($this->export_path) === false) {
|
59 |
throw new \Exception(__('The export file could not be saved on the server.', 'mailpoet'));
|
78 |
|
79 |
function generateCSV() {
|
80 |
$processed_subscribers = 0;
|
|
|
81 |
$formatted_subscriber_fields = $this->formatted_subscriber_fields;
|
82 |
$CSV_file = fopen($this->export_file, 'w');
|
83 |
$format_CSV = function($row) {
|
97 |
)
|
98 |
) . PHP_EOL
|
99 |
);
|
100 |
+
|
101 |
+
$subscribers = $this->getSubscribers();
|
102 |
+
while($subscribers !== false) {
|
103 |
$processed_subscribers += count($subscribers);
|
104 |
foreach($subscribers as $subscriber) {
|
105 |
$row = $this->formatSubscriberData($subscriber);
|
106 |
$row[] = ucwords($subscriber['segment_name']);
|
107 |
fwrite($CSV_file, implode(',', array_map($format_CSV, $row)) . "\n");
|
108 |
}
|
109 |
+
$subscribers = $this->getSubscribers();
|
110 |
+
}
|
111 |
fclose($CSV_file);
|
112 |
return $processed_subscribers;
|
113 |
}
|
114 |
|
115 |
function generateXLSX() {
|
116 |
$processed_subscribers = 0;
|
|
|
117 |
$XLSX_writer = new XLSXWriter();
|
118 |
$XLSX_writer->setAuthor('MailPoet (www.mailpoet.com)');
|
119 |
$last_segment = false;
|
120 |
$processed_segments = array();
|
121 |
+
|
122 |
+
$subscribers = $this->getSubscribers();
|
123 |
+
while($subscribers !== false) {
|
124 |
$processed_subscribers += count($subscribers);
|
125 |
foreach($subscribers as $i => $subscriber) {
|
126 |
$current_segment = ucwords($subscriber['segment_name']);
|
157 |
$this->formatSubscriberData($subscriber)
|
158 |
);
|
159 |
}
|
160 |
+
$subscribers = $this->getSubscribers();
|
161 |
+
}
|
162 |
$XLSX_writer->writeToFile($this->export_file);
|
163 |
return $processed_subscribers;
|
164 |
}
|
167 |
return $XLSX_writer->writeSheetRow(ucwords($segment), $data);
|
168 |
}
|
169 |
|
170 |
+
function getSubscribers() {
|
171 |
+
$subscribers = $this->default_subscribers_getter->get();
|
172 |
+
if($subscribers === false) {
|
173 |
+
$subscribers = $this->dynamic_subscribers_getter->get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
175 |
return $subscribers;
|
176 |
}
|
177 |
|
lib/Subscribers/ImportExport/Export/SubscribersGetter.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailPoet\Subscribers\ImportExport\Export;
|
4 |
+
|
5 |
+
use MailPoet\Models\Subscriber;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Gets batches of subscribers for export.
|
9 |
+
*/
|
10 |
+
abstract class SubscribersGetter {
|
11 |
+
|
12 |
+
protected $segments_ids;
|
13 |
+
protected $batch_size;
|
14 |
+
protected $offset;
|
15 |
+
protected $finished;
|
16 |
+
|
17 |
+
public function __construct($segments_ids, $batch_size) {
|
18 |
+
$this->segments_ids = $segments_ids;
|
19 |
+
$this->batch_size = $batch_size;
|
20 |
+
$this->reset();
|
21 |
+
}
|
22 |
+
|
23 |
+
public function reset() {
|
24 |
+
$this->offset = 0;
|
25 |
+
$this->finished = false;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initialize the query by selecting fields and ignoring trashed subscribers.
|
30 |
+
*
|
31 |
+
* @return \ORM
|
32 |
+
*/
|
33 |
+
protected function select() {
|
34 |
+
return Subscriber::selectMany(
|
35 |
+
'first_name',
|
36 |
+
'last_name',
|
37 |
+
'email',
|
38 |
+
'subscribed_ip',
|
39 |
+
array(
|
40 |
+
'global_status' => Subscriber::$_table . '.status'
|
41 |
+
)
|
42 |
+
)
|
43 |
+
->filter('filterWithCustomFieldsForExport')
|
44 |
+
->groupBy(Subscriber::$_table . '.id')
|
45 |
+
->whereNull(Subscriber::$_table . '.deleted_at');
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Filters the subscribers query based on the segments, offset and batch size.
|
50 |
+
*
|
51 |
+
* @param \ORM $subscribers
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
abstract protected function filter($subscribers);
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Gets the next batch of subscribers or `false` if no more!
|
58 |
+
*/
|
59 |
+
public function get() {
|
60 |
+
if($this->finished) {
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
$subscribers = $this->select();
|
65 |
+
$subscribers = $this->filter($subscribers);
|
66 |
+
|
67 |
+
$this->offset += $this->batch_size;
|
68 |
+
|
69 |
+
if(count($subscribers) < $this->batch_size) {
|
70 |
+
$this->finished = true;
|
71 |
+
}
|
72 |
+
|
73 |
+
return $subscribers;
|
74 |
+
}
|
75 |
+
}
|
lib/Subscribers/ImportExport/ImportExportFactory.php
CHANGED
@@ -3,19 +3,31 @@ namespace MailPoet\Subscribers\ImportExport;
|
|
3 |
|
4 |
use MailPoet\Models\CustomField;
|
5 |
use MailPoet\Models\Segment;
|
|
|
6 |
use MailPoet\Util\Helpers;
|
|
|
7 |
|
8 |
class ImportExportFactory {
|
|
|
|
|
|
|
9 |
public $action;
|
10 |
|
11 |
function __construct($action = null) {
|
12 |
$this->action = $action;
|
13 |
}
|
14 |
|
15 |
-
function getSegments(
|
16 |
-
|
17 |
-
Segment::getSegmentsForImport()
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
return array_map(function($segment) {
|
20 |
if(!$segment['name']) $segment['name'] = __('Not In List', 'mailpoet');
|
21 |
if(!$segment['id']) $segment['id'] = 0;
|
3 |
|
4 |
use MailPoet\Models\CustomField;
|
5 |
use MailPoet\Models\Segment;
|
6 |
+
use MailPoet\Premium\Models\DynamicSegment;
|
7 |
use MailPoet\Util\Helpers;
|
8 |
+
use MailPoet\WP\Hooks;
|
9 |
|
10 |
class ImportExportFactory {
|
11 |
+
const IMPORT_ACTION = 'import';
|
12 |
+
const EXPORT_ACTION = 'export';
|
13 |
+
|
14 |
public $action;
|
15 |
|
16 |
function __construct($action = null) {
|
17 |
$this->action = $action;
|
18 |
}
|
19 |
|
20 |
+
function getSegments() {
|
21 |
+
if($this->action === self::IMPORT_ACTION) {
|
22 |
+
$segments = Segment::getSegmentsForImport();
|
23 |
+
} else {
|
24 |
+
$segments = Segment::getSegmentsForExport();
|
25 |
+
$segments = Hooks::applyFilters('mailpoet_segments_with_subscriber_count', $segments);
|
26 |
+
$segments = array_values(array_filter($segments, function($segment) {
|
27 |
+
return $segment['subscribers'] > 0;
|
28 |
+
}));
|
29 |
+
}
|
30 |
+
|
31 |
return array_map(function($segment) {
|
32 |
if(!$segment['name']) $segment['name'] = __('Not In List', 'mailpoet');
|
33 |
if(!$segment['id']) $segment['id'] = 0;
|
lib/Util/Helpers.php
CHANGED
@@ -159,4 +159,5 @@ class Helpers {
|
|
159 |
? $_SERVER['REMOTE_ADDR']
|
160 |
: null;
|
161 |
}
|
|
|
162 |
}
|
159 |
? $_SERVER['REMOTE_ADDR']
|
160 |
: null;
|
161 |
}
|
162 |
+
|
163 |
}
|
mailpoet.php
CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
|
|
4 |
|
5 |
/*
|
6 |
* Plugin Name: MailPoet 3 (New)
|
7 |
-
* Version: 3.6.
|
8 |
* Plugin URI: http://www.mailpoet.com
|
9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
10 |
* Author: MailPoet
|
@@ -20,7 +20,7 @@ if(!defined('ABSPATH')) exit;
|
|
20 |
*/
|
21 |
|
22 |
$mailpoet_plugin = array(
|
23 |
-
'version' => '3.6.
|
24 |
'filename' => __FILE__,
|
25 |
'path' => dirname(__FILE__),
|
26 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
4 |
|
5 |
/*
|
6 |
* Plugin Name: MailPoet 3 (New)
|
7 |
+
* Version: 3.6.5
|
8 |
* Plugin URI: http://www.mailpoet.com
|
9 |
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
10 |
* Author: MailPoet
|
20 |
*/
|
21 |
|
22 |
$mailpoet_plugin = array(
|
23 |
+
'version' => '3.6.5',
|
24 |
'filename' => __FILE__,
|
25 |
'path' => dirname(__FILE__),
|
26 |
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: newsletter, email, welcome email, post notification, autoresponder, signup
|
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 3.6.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -116,6 +116,11 @@ Stop by our [support site](https://www.mailpoet.com/support).
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
= 3.6.4 - 2018-04-03 =
|
120 |
* Fixed: editing sent emails will not remove them from email archive. Thanks David!
|
121 |
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 3.6.5
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 3.6.5 - 2018-04-10 =
|
120 |
+
* Premium: subscriber export tool now supports dynamic segments;
|
121 |
+
* Improved: sending was optimized for large newsletters and slow hosts. Thanks, Alison;
|
122 |
+
* Fixed: help icon functionality was restored for all users.
|
123 |
+
|
124 |
= 3.6.4 - 2018-04-03 =
|
125 |
* Fixed: editing sent emails will not remove them from email archive. Thanks David!
|
126 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit28c9c95e2758d46274fd066f54ef23d0::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -217,7 +217,10 @@ return array(
|
|
217 |
'MailPoet\\Statistics\\Track\\Clicks' => $baseDir . '/lib/Statistics/Track/Clicks.php',
|
218 |
'MailPoet\\Statistics\\Track\\Opens' => $baseDir . '/lib/Statistics/Track/Opens.php',
|
219 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => $baseDir . '/lib/Statistics/Track/Unsubscribes.php',
|
|
|
|
|
220 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => $baseDir . '/lib/Subscribers/ImportExport/Export/Export.php',
|
|
|
221 |
'MailPoet\\Subscribers\\ImportExport\\ImportExportFactory' => $baseDir . '/lib/Subscribers/ImportExport/ImportExportFactory.php',
|
222 |
'MailPoet\\Subscribers\\ImportExport\\Import\\Import' => $baseDir . '/lib/Subscribers/ImportExport/Import/Import.php',
|
223 |
'MailPoet\\Subscribers\\ImportExport\\Import\\MailChimp' => $baseDir . '/lib/Subscribers/ImportExport/Import/MailChimp.php',
|
217 |
'MailPoet\\Statistics\\Track\\Clicks' => $baseDir . '/lib/Statistics/Track/Clicks.php',
|
218 |
'MailPoet\\Statistics\\Track\\Opens' => $baseDir . '/lib/Statistics/Track/Opens.php',
|
219 |
'MailPoet\\Statistics\\Track\\Unsubscribes' => $baseDir . '/lib/Statistics/Track/Unsubscribes.php',
|
220 |
+
'MailPoet\\Subscribers\\ImportExport\\Export\\DefaultSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DefaultSubscribersGetter.php',
|
221 |
+
'MailPoet\\Subscribers\\ImportExport\\Export\\DynamicSubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/DynamicSubscribersGetter.php',
|
222 |
'MailPoet\\Subscribers\\ImportExport\\Export\\Export' => $baseDir . '/lib/Subscribers/ImportExport/Export/Export.php',
|
223 |
+
'MailPoet\\Subscribers\\ImportExport\\Export\\SubscribersGetter' => $baseDir . '/lib/Subscribers/ImportExport/Export/SubscribersGetter.php',
|
224 |
'MailPoet\\Subscribers\\ImportExport\\ImportExportFactory' => $baseDir . '/lib/Subscribers/ImportExport/ImportExportFactory.php',
|
225 |
'MailPoet\\Subscribers\\ImportExport\\Import\\Import' => $baseDir . '/lib/Subscribers/ImportExport/Import/Import.php',
|
226 |
'MailPoet\\Subscribers\\ImportExport\\Import\\MailChimp' => $baseDir . '/lib/Subscribers/ImportExport/Import/MailChimp.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitfab0beef964cb6216740347335a9d5d1
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitfab0beef964cb6216740347335a9d5d1
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit28c9c95e2758d46274fd066f54ef23d0
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit28c9c95e2758d46274fd066f54ef23d0', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit28c9c95e2758d46274fd066f54ef23d0', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit28c9c95e2758d46274fd066f54ef23d0::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
|