1(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-vendors~9b58fb86"],{ 2 3/***/ "24f8": 4/***/ (function(module, exports, __webpack_require__) { 5 6var http = __webpack_require__("9490") 7var url = __webpack_require__("0b16") 8 9var https = module.exports 10 11for (var key in http) { 12 if (http.hasOwnProperty(key)) https[key] = http[key] 13} 14 15https.request = function (params, cb) { 16 params = validateParams(params) 17 return http.request.call(this, params, cb) 18} 19 20https.get = function (params, cb) { 21 params = validateParams(params) 22 return http.get.call(this, params, cb) 23} 24 25function validateParams (params) { 26 if (typeof params === 'string') { 27 params = url.parse(params) 28 } 29 if (!params.protocol) { 30 params.protocol = 'https:' 31 } 32 if (params.protocol !== 'https:') { 33 throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') 34 } 35 return params 36} 37 38 39/***/ }), 40 41/***/ "5307": 42/***/ (function(module, exports, __webpack_require__) { 43 44var DomHandler = __webpack_require__("36cc"); 45var DomUtils = __webpack_require__("0f94"); 46 47//TODO: make this a streamable handler 48function FeedHandler(callback, options) { 49 this.init(callback, options); 50} 51 52__webpack_require__("3fb5")(FeedHandler, DomHandler); 53 54FeedHandler.prototype.init = DomHandler; 55 56function getElements(what, where) { 57 return DomUtils.getElementsByTagName(what, where, true); 58} 59function getOneElement(what, where) { 60 return DomUtils.getElementsByTagName(what, where, true, 1)[0]; 61} 62function fetch(what, where, recurse) { 63 return DomUtils.getText( 64 DomUtils.getElementsByTagName(what, where, recurse, 1) 65 ).trim(); 66} 67 68function addConditionally(obj, prop, what, where, recurse) { 69 var tmp = fetch(what, where, recurse); 70 if (tmp) obj[prop] = tmp; 71} 72 73var isValidFeed = function(value) { 74 return value === "rss" || value === "feed" || value === "rdf:RDF"; 75}; 76 77FeedHandler.prototype.onend = function() { 78 var feed = {}, 79 feedRoot = getOneElement(isValidFeed, this.dom), 80 tmp, 81 childs; 82 83 if (feedRoot) { 84 if (feedRoot.name === "feed") { 85 childs = feedRoot.children; 86 87 feed.type = "atom"; 88 addConditionally(feed, "id", "id", childs); 89 addConditionally(feed, "title", "title", childs); 90 if ( 91 (tmp = getOneElement("link", childs)) && 92 (tmp = tmp.attribs) && 93 (tmp = tmp.href) 94 ) 95 feed.link = tmp; 96 addConditionally(feed, "description", "subtitle", childs); 97 if ((tmp = fetch("updated", childs))) feed.updated = new Date(tmp); 98 addConditionally(feed, "author", "email", childs, true); 99 100 feed.items = getElements("entry", childs).map(function(item) { 101 var entry = {}, 102 tmp; 103 104 item = item.children; 105 106 addConditionally(entry, "id", "id", item); 107 addConditionally(entry, "title", "title", item); 108 if ( 109 (tmp = getOneElement("link", item)) && 110 (tmp = tmp.attribs) && 111 (tmp = tmp.href) 112 ) 113 entry.link = tmp; 114 if ((tmp = fetch("summary", item) || fetch("content", item))) 115 entry.description = tmp; 116 if ((tmp = fetch("updated", item))) 117 entry.pubDate = new Date(tmp); 118 return entry; 119 }); 120 } else { 121 childs = getOneElement("channel", feedRoot.children).children; 122 123 feed.type = feedRoot.name.substr(0, 3); 124 feed.id = ""; 125 addConditionally(feed, "title", "title", childs); 126 addConditionally(feed, "link", "link", childs); 127 addConditionally(feed, "description", "description", childs); 128 if ((tmp = fetch("lastBuildDate", childs))) 129 feed.updated = new Date(tmp); 130 addConditionally(feed, "author", "managingEditor", childs, true); 131 132 feed.items = getElements("item", feedRoot.children).map(function( 133 item 134 ) { 135 var entry = {}, 136 tmp; 137 138 item = item.children; 139 140 addConditionally(entry, "id", "guid", item); 141 addConditionally(entry, "title", "title", item); 142 addConditionally(entry, "link", "link", item); 143 addConditionally(entry, "description", "description", item); 144 if ((tmp = fetch("pubDate", item))) 145 entry.pubDate = new Date(tmp); 146 return entry; 147 }); 148 } 149 } 150 this.dom = feed; 151 DomHandler.prototype._handleCallback.call( 152 this, 153 feedRoot ? null : Error("couldn't find root of feed") 154 ); 155}; 156 157module.exports = FeedHandler; 158 159 160/***/ }), 161 162/***/ "579f": 163/***/ (function(module) { 164 165module.exports = JSON.parse("{\"amp\":\"&\",\"apos\":\"'\",\"gt\":\">\",\"lt\":\"<\",\"quot\":\"\\\"\"}"); 166 167/***/ }), 168 169/***/ "5804": 170/***/ (function(module, exports, __webpack_require__) { 171 172var Tokenizer = __webpack_require__("6fbd"); 173 174/* 175 Options: 176 177 xmlMode: Disables the special behavior for script/style tags (false by default) 178 lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`) 179 lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`) 180*/ 181 182/* 183 Callbacks: 184
185 oncdataend, 186 oncdatastart, 187 onclosetag, 188 oncomment, 189 oncommentend, 190 onerror, 191 onopentag, 192 onprocessinginstruction, 193 onreset, 194 ontext 195*/ 196 197var formTags = { 198 input: true, 199 option: true, 200 optgroup: true, 201 select: true, 202 button: true, 203 datalist: true, 204 textarea: true 205}; 206 207var openImpliesClose = { 208 tr: { tr: true, th: true, td: true }, 209 th: { th: true }, 210 td: { thead: true, th: true, td: true }, 211 body: { head: true, link: true, script: true }, 212 li: { li: true }, 213 p: { p: true }, 214 h1: { p: true }, 215 h2: { p: true }, 216 h3: { p: true }, 217 h4: { p: true }, 218 h5: { p: true }, 219 h6: { p: true }, 220 select: formTags, 221 input: formTags, 222 output: formTags, 223 button: formTags, 224 datalist: formTags, 225 textarea: formTags, 226 option: { option: true }, 227 optgroup: { optgroup: true } 228}; 229 230var voidElements = { 231 __proto__: null, 232 area: true, 233 base: true, 234 basefont: true, 235 br: true, 236 col: true, 237 command: true, 238 embed: true, 239 frame: true, 240 hr: true, 241 img: true, 242 input: true, 243 isindex: true, 244 keygen: true, 245 link: true, 246 meta: true, 247 param: true, 248 source: true, 249 track: true, 250 wbr: true 251}; 252 253var foreignContextElements = { 254 __proto__: null, 255 math: true, 256 svg: true 257}; 258var htmlIntegrationElements = { 259 __proto__: null, 260 mi: true, 261 mo: true, 262 mn: true, 263 ms: true, 264 mtext: true, 265 "annotation-xml": true, 266 foreignObject: true, 267 desc: true, 268 title: true 269}; 270 271var re_nameEnd = /\s|\//; 272 273function Parser(cbs, options) { 274 this._options = options || {}; 275 this._cbs = cbs || {}; 276 277 this._tagname = ""; 278 this._attribname = ""; 279 this._attribvalue = ""; 280 this._attribs = null; 281 this._stack = []; 282 this._foreignContext = []; 283 284 this.startIndex = 0; 285 this.endIndex = null; 286 287 this._lowerCaseTagNames = 288 "lowerCaseTags" in this._options 289 ? !!this._options.lowerCaseTags 290 : !this._options.xmlMode; 291 this._lowerCaseAttributeNames = 292 "lowerCaseAttributeNames" in this._options 293 ? !!this._options.lowerCaseAttributeNames 294 : !this._options.xmlMode; 295 296 if (this._options.Tokenizer) { 297 Tokenizer = this._options.Tokenizer; 298 } 299 this._tokenizer = new Tokenizer(this._options, this); 300 301 if (this._cbs.onparserinit) this._cbs.onparserinit(this); 302} 303 304__webpack_require__("3fb5")(Parser, __webpack_require__("faa1").EventEmitter); 305 306Parser.prototype._updatePosition = function(initialOffset) { 307 if (this.endIndex === null) { 308 if (this._tokenizer._sectionStart <= initialOffset) { 309 this.startIndex = 0; 310 } else { 311 this.startIndex = this._tokenizer._sectionStart - initialOffset; 312 } 313 } else this.startIndex = this.endIndex + 1; 314 this.endIndex = this._tokenizer.getAbsoluteIndex(); 315}; 316 317//Tokenizer event handlers 318Parser.prototype.ontext = function(data) { 319 this._updatePosition(1); 320 this.endIndex--; 321 322 if (this._cbs.ontext) this._cbs.ontext(data); 323}; 324 325Parser.prototype.onopentagname = function(name) { 326 if (this._lowerCaseTagNames) { 327 name = name.toLowerCase(); 328 } 329 330 this._tagname = name; 331 332 if (!this._options.xmlMode && name in openImpliesClose) { 333 for ( 334 var el; 335 (el = this._stack[this._stack.length - 1]) in 336 openImpliesClose[name]; 337 this.onclosetag(el) 338 ); 339 } 340 341 if (this._options.xmlMode || !(name in voidElements)) { 342 this._stack.push(name); 343 if (name in foreignContextElements) this._foreignContext.push(true); 344 else if (name in htmlIntegrationElements) 345 this._foreignContext.push(false); 346 } 347 348 if (this._cbs.onopentagname) this._cbs.onopentagname(name); 349 if (this._cbs.onopentag) this._attribs = {}; 350}; 351 352Parser.prototype.onopentagend = function() { 353 this._updatePosition(1); 354 355 if (this._attribs) { 356 if (this._cbs.onopentag) 357 this._cbs.onopentag(this._tagname, this._attribs); 358 this._attribs = null; 359 } 360 361 if ( 362 !this._options.xmlMode && 363 this._cbs.onclosetag && 364 this._tagname in voidElements 365 ) { 366 this._cbs.onclosetag(this._tagname); 367 } 368 369 this._tagname = ""; 370}; 371 372Parser.prototype.onclosetag = function(name) { 373 this._updatePosition(1); 374 375 if (this._lowerCaseTagNames) { 376 name = name.toLowerCase(); 377 } 378 379 if (name in foreignContextElements || name in htmlIntegrationElements) { 380 this._foreignContext.pop(); 381 } 382 383 if ( 384 this._stack.length && 385 (!(name in voidElements) || this._options.xmlMode) 386 ) { 387 var pos = this._stack.lastIndexOf(name); 388 if (pos !== -1) { 389 if (this._cbs.onclosetag) { 390 pos = this._stack.length - pos; 391 while (pos--) this._cbs.onclosetag(this._stack.pop()); 392 } else this._stack.length = pos; 393 } else if (name === "p" && !this._options.xmlMode) { 394 this.onopentagname(name); 395 this._closeCurrentTag(); 396 } 397 } else if (!this._options.xmlMode && (name === "br" || name === "p")) { 398 this.onopentagname(name); 399 this._closeCurrentTag(); 400 } 401}; 402 403Parser.prototype.onselfclosingtag = function() { 404 if ( 405 this._options.xmlMode || 406 this._options.recognizeSelfClosing || 407 this._foreignContext[this._foreignContext.length - 1] 408 ) { 409 this._closeCurrentTag(); 410 } else { 411 this.onopentagend(); 412 } 413}; 414 415Parser.prototype._closeCurrentTag = function() { 416 var name = this._tagname; 417 418 this.onopentagend(); 419 420 //self-closing tags will be on the top of the stack 421 //(cheaper check than in onclosetag) 422 if (this._stack[this._stack.length - 1] === name) { 423 if (this._cbs.onclosetag) { 424 this._cbs.onclosetag(name); 425 } 426 this._stack.pop(); 427 428 } 429}; 430 431Parser.prototype.onattribname = function(name) { 432 if (this._lowerCaseAttributeNames) { 433 name = name.toLowerCase(); 434 } 435 this._attribname = name; 436}; 437 438Parser.prototype.onattribdata = function(value) { 439 this._attribvalue += value; 440}; 441 442Parser.prototype.onattribend = function() { 443 if (this._cbs.onattribute) 444 this._cbs.onattribute(this._attribname, this._attribvalue); 445 if ( 446 this._attribs && 447 !Object.prototype.hasOwnProperty.call(this._attribs, this._attribname) 448 ) { 449 this._attribs[this._attribname] = this._attribvalue; 450 } 451 this._attribname = ""; 452 this._attribvalue = ""; 453}; 454 455Parser.prototype._getInstructionName = function(value) { 456 var idx = value.search(re_nameEnd), 457 name = idx < 0 ? value : value.substr(0, idx); 458 459 if (this._lowerCaseTagNames) { 460 name = name.toLowerCase(); 461 } 462 463 return name; 464}; 465 466Parser.prototype.ondeclaration = function(value) { 467 if (this._cbs.onprocessinginstruction) { 468 var name = this._getInstructionName(value); 469 this._cbs.onprocessinginstruction("!" + name, "!" + value); 470 } 471}; 472 473Parser.prototype.onprocessinginstruction = function(value) { 474 if (this._cbs.onprocessinginstruction) { 475 var name = this._getInstructionName(value); 476 this._cbs.onprocessinginstruction("?" + name, "?" + value); 477 } 478}; 479 480Parser.prototype.oncomment = function(value) { 481 this._updatePosition(4); 482 483 if (this._cbs.oncomment) this._cbs.oncomment(value); 484 if (this._cbs.oncommentend) this._cbs.oncommentend(); 485}; 486 487Parser.prototype.oncdata = function(value) { 488 this._updatePosition(1); 489 490 if (this._options.xmlMode || this._options.recognizeCDATA) { 491 if (this._cbs.oncdatastart) this._cbs.oncdatastart(); 492 if (this._cbs.ontext) this._cbs.ontext(value);
vendor: 4,194 bytes, lines 493-647
493 if (this._cbs.oncdataend) this._cbs.oncdataend(); 494 } else { 495 this.oncomment("[CDATA[" + value + "]]"); 496 } 497}; 498 499Parser.prototype.onerror = function(err) { 500 if (this._cbs.onerror) this._cbs.onerror(err); 501}; 502 503Parser.prototype.onend = function() { 504 if (this._cbs.onclosetag) { 505 for ( 506 var i = this._stack.length; 507 i > 0; 508 this._cbs.onclosetag(this._stack[--i]) 509 ); 510 } 511 if (this._cbs.onend) this._cbs.onend(); 512}; 513 514//Resets the parser to a blank state, ready to parse a new HTML document 515Parser.prototype.reset = function() { 516 if (this._cbs.onreset) this._cbs.onreset(); 517 this._tokenizer.reset(); 518 519 this._tagname = ""; 520 this._attribname = ""; 521 this._attribs = null; 522 this._stack = []; 523 524 if (this._cbs.onparserinit) this._cbs.onparserinit(this); 525}; 526 527//Parses a complete HTML document and pushes it to the handler 528Parser.prototype.parseComplete = function(data) { 529 this.reset(); 530 this.end(data); 531}; 532 533Parser.prototype.write = function(chunk) { 534 this._tokenizer.write(chunk); 535}; 536 537Parser.prototype.end = function(chunk) { 538 this._tokenizer.end(chunk); 539}; 540 541Parser.prototype.pause = function() { 542 this._tokenizer.pause(); 543}; 544 545Parser.prototype.resume = function() { 546 this._tokenizer.resume(); 547}; 548 549//alias for backwards compat 550Parser.prototype.parseChunk = Parser.prototype.write; 551Parser.prototype.done = Parser.prototype.end; 552 553module.exports = Parser; 554 555 556/***/ }), 557 558/***/ "60b4": 559/***/ (function(module) { 560 561module.exports = JSON.parse("{\"0\":65533,\"128\":8364,\"130\":8218,\"131\":402,\"132\":8222,\"133\":8230,\"134\":8224,\"135\":8225,\"136\":710,\"137\":8240,\"138\":352,\"139\":8249,\"140\":338,\"142\":381,\"145\":8216,\"146\":8217,\"147\":8220,\"148\":8221,\"149\":8226,\"150\":8211,\"151\":8212,\"152\":732,\"153\":8482,\"154\":353,\"155\":8250,\"156\":339,\"158\":382,\"159\":376}"); 562 563/***/ }), 564 565/***/ "6aa2": 566/***/ (function(module, exports, __webpack_require__) { 567 568"use strict"; 569 570 571var hash = __webpack_require__("7d92"); 572var utils = __webpack_require__("7658"); 573var assert = __webpack_require__("da3e"); 574 575function HmacDRBG(options) { 576 if (!(this instanceof HmacDRBG)) 577 return new HmacDRBG(options); 578 this.hash = options.hash; 579 this.predResist = !!options.predResist; 580 581 this.outLen = this.hash.outSize; 582 this.minEntropy = options.minEntropy || this.hash.hmacStrength; 583 584 this._reseed = null; 585 this.reseedInterval = null; 586 this.K = null; 587 this.V = null; 588 589 var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex'); 590 var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex'); 591 var pers = utils.toArray(options.pers, options.persEnc || 'hex'); 592 assert(entropy.length >= (this.minEntropy / 8), 593 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); 594 this._init(entropy, nonce, pers); 595} 596module.exports = HmacDRBG; 597 598HmacDRBG.prototype._init = function init(entropy, nonce, pers) { 599 var seed = entropy.concat(nonce).concat(pers); 600 601 this.K = new Array(this.outLen / 8); 602 this.V = new Array(this.outLen / 8); 603 for (var i = 0; i < this.V.length; i++) { 604 this.K[i] = 0x00; 605 this.V[i] = 0x01; 606 } 607 608 this._update(seed); 609 this._reseed = 1; 610 this.reseedInterval = 0x1000000000000; // 2^48 611}; 612 613HmacDRBG.prototype._hmac = function hmac() { 614 return new hash.hmac(this.hash, this.K); 615}; 616 617HmacDRBG.prototype._update = function update(seed) { 618 var kmac = this._hmac() 619 .update(this.V) 620 .update([ 0x00 ]); 621 if (seed) 622 kmac = kmac.update(seed); 623 this.K = kmac.digest(); 624 this.V = this._hmac().update(this.V).digest(); 625 if (!seed) 626 return; 627 628 this.K = this._hmac() 629 .update(this.V) 630 .update([ 0x01 ]) 631 .update(seed) 632 .digest(); 633 this.V = this._hmac().update(this.V).digest(); 634}; 635 636HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { 637 // Optional entropy enc 638 if (typeof entropyEnc !== 'string') { 639 addEnc = add; 640 add = entropyEnc; 641 entropyEnc = null; 642 } 643 644 entropy = utils.toArray(entropy, entropyEnc); 645 add = utils.toArray(add, addEnc); 646 647 assert(entropy.length >= (this.minEntropy / 8),
648 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); 649 650 this._update(entropy.concat(add || [])); 651 this._reseed = 1; 652}; 653 654HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { 655 if (this._reseed > this.reseedInterval) 656 throw new Error('Reseed is required'); 657 658 // Optional encoding 659 if (typeof enc !== 'string') { 660 addEnc = add; 661 add = enc; 662 enc = null; 663 } 664 665 // Optional additional data 666 if (add) { 667 add = utils.toArray(add, addEnc || 'hex'); 668 this._update(add); 669 } 670 671 var temp = []; 672 while (temp.length < len) { 673 this.V = this._hmac().update(this.V).digest(); 674 temp = temp.concat(this.V); 675 } 676 677 var res = temp.slice(0, len); 678 this._update(add); 679 this._reseed++; 680 return utils.encode(res, enc); 681}; 682 683 684/***/ }), 685 686/***/ "6ea8": 687/***/ (function(module) { 688 689module.exports = JSON.parse("{\"Aacute\":\"Ã\",\"aacute\":\"á\",\"Acirc\":\"Ã\",\"acirc\":\"â\",\"acute\":\"´\",\"AElig\":\"Ã\",\"aelig\":\"æ\",\"Agrave\":\"Ã\",\"agrave\":\"à \",\"amp\":\"&\",\"AMP\":\"&\",\"Aring\":\"à \",\"aring\":\"Ã¥\",\"Atilde\":\"Ã\",\"atilde\":\"ã\",\"Auml\":\"Ã\",\"auml\":\"ä\",\"brvbar\":\"¦\",\"Ccedil\":\"Ã\",\"ccedil\":\"ç\",\"cedil\":\"¸\",\"cent\":\"¢\",\"copy\":\"©\",\"COPY\":\"©\",\"curren\":\"¤\",\"deg\":\"°\",\"divide\":\"÷\",\"Eacute\":\"Ã\",\"eacute\":\"é\",\"Ecirc\":\"Ã\",\"ecirc\":\"ê\",\"Egrave\":\"Ã\",\"egrave\":\"è\",\"ETH\":\"Ã\",\"eth\":\"ð\",\"Euml\":\"Ã\",\"euml\":\"ë\",\"frac12\":\"½\",\"frac14\":\"¼\",\"frac34\":\"¾\",\"gt\":\">\",\"GT\":\">\",\"Iacute\":\"Ã\",\"iacute\":\"Ã\",\"Icirc\":\"Ã\",\"icirc\":\"î\",\"iexcl\":\"¡\",\"Igrave\":\"Ã\",\"igrave\":\"ì\",\"iquest\":\"¿\",\"Iuml\":\"Ã\",\"iuml\":\"ï\",\"laquo\":\"«\",\"lt\":\"<\",\"LT\":\"<\",\"macr\":\"¯\",\"micro\":\"µ\",\"middot\":\"·\",\"nbsp\":\" \",\"not\":\"¬\",\"Ntilde\":\"Ã\",\"ntilde\":\"ñ\",\"Oacute\":\"Ã\",\"oacute\":\"ó\",\"Ocirc\":\"Ã\",\"ocirc\":\"ô\",\"Ograve\":\"Ã\",\"ograve\":\"ò\",\"ordf\":\"ª\",\"ordm\":\"º\",\"Oslash\":\"Ã\",\"oslash\":\"ø\",\"Otilde\":\"Ã\",\"otilde\":\"õ\",\"Ouml\":\"Ã\",\"ouml\":\"ö\",\"para\":\"¶\",\"plusmn\":\"±\",\"pound\":\"£\",\"quot\":\"\\\"\",\"QUOT\":\"\\\"\",\"raquo\":\"»\",\"reg\":\"®\",\"REG\":\"®\",\"sect\":\"§\",\"shy\":\"Â\",\"sup1\":\"¹\",\"sup2\":\"²\",\"sup3\":\"³\",\"szlig\":\"Ã\",\"THORN\":\"Ã\",\"thorn\":\"þ\",\"times\":\"Ã\",\"Uacute\":\"Ã\",\"uacute\":\"ú\",\"Ucirc\":\"Ã\",\"ucirc\":\"û\",\"Ugrave\":\"Ã\",\"ugrave\":\"ù\",\"uml\":\"¨\",\"Uuml\":\"Ã\",\"uuml\":\"ü\",\"Yacute\":\"Ã\",\"yacute\":\"ý\",\"yen\":\"Â¥\",\"yuml\":\"ÿ\"}"); 690 691/***/ }), 692 693/***/ "852e": 694/***/ (function(module, exports, __webpack_require__) { 695 696var Parser = __webpack_require__("5804"); 697var DomHandler = __webpack_require__("36cc"); 698 699function defineProp(name, value) { 700 delete module.exports[name]; 701 module.exports[name] = value; 702 return value; 703} 704 705module.exports = { 706 Parser: Parser, 707 Tokenizer: __webpack_require__("6fbd"), 708 ElementType: __webpack_require__("4d1e"), 709 DomHandler: DomHandler, 710 get FeedHandler() { 711 return defineProp("FeedHandler", __webpack_require__("5307")); 712 }, 713 get Stream() { 714 return defineProp("Stream", __webpack_require__("d1e8")); 715 }, 716 get WritableStream() { 717 return defineProp("WritableStream", __webpack_require__("8769")); 718 }, 719 get ProxyHandler() { 720 return defineProp("ProxyHandler", __webpack_require__("bd7d")); 721 }, 722 get DomUtils() { 723 return defineProp("DomUtils", __webpack_require__("0f94")); 724 }, 725 get CollectingHandler() { 726 return defineProp( 727 "CollectingHandler", 728 __webpack_require__("d1f1") 729 ); 730 }, 731 // For legacy support 732 DefaultHandler: DomHandler, 733 get RssHandler() { 734 return defineProp("RssHandler", this.FeedHandler); 735 }, 736 //helper methods 737 parseDOM: function(data, options) { 738 var handler = new DomHandler(options); 739 new Parser(handler, options).end(data); 740 return handler.dom; 741 }, 742 parseFeed: function(feed, options) { 743 var handler = new module.exports.FeedHandler(options); 744 new Parser(handler, options).end(feed); 745 return handler.dom; 746 },
747 createDomStream: function(cb, options, elementCb) { 748 var handler = new DomHandler(cb, options, elementCb); 749 return new Parser(handler, options); 750 }, 751 // List of all events that the parser emits 752 EVENTS: { 753 /* Format: eventname: number of arguments */ 754 attribute: 2, 755 cdatastart: 0, 756 cdataend: 0, 757 text: 1, 758 processinginstruction: 2, 759 comment: 1, 760 commentend: 0, 761 closetag: 1, 762 opentag: 2, 763 opentagname: 1, 764 error: 1, 765 end: 0 766 } 767}; 768 769 770/***/ }), 771 772/***/ "8769": 773/***/ (function(module, exports, __webpack_require__) { 774 775module.exports = Stream; 776 777var Parser = __webpack_require__("5804"); 778var WritableStream = __webpack_require__(12).Writable; 779var StringDecoder = __webpack_require__("aa22").StringDecoder; 780var Buffer = __webpack_require__("b639").Buffer; 781 782function Stream(cbs, options) { 783 var parser = (this._parser = new Parser(cbs, options)); 784 var decoder = (this._decoder = new StringDecoder()); 785 786 WritableStream.call(this, { decodeStrings: false }); 787 788 this.once("finish", function() { 789 parser.end(decoder.end()); 790 }); 791} 792 793__webpack_require__("3fb5")(Stream, WritableStream); 794 795Stream.prototype._write = function(chunk, encoding, cb) { 796 if (chunk instanceof Buffer) chunk = this._decoder.write(chunk); 797 this._parser.write(chunk); 798 cb(); 799}; 800 801 802/***/ }), 803 804/***/ "9fab": 805/***/ (function(module, exports, __webpack_require__) { 806 807var decodeMap = __webpack_require__("60b4"); 808 809module.exports = decodeCodePoint; 810 811// modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119 812function decodeCodePoint(codePoint) { 813 if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { 814 return "\uFFFD"; 815 } 816 817 if (codePoint in decodeMap) { 818 codePoint = decodeMap[codePoint]; 819 } 820 821 var output = ""; 822 823 if (codePoint > 0xffff) { 824 codePoint -= 0x10000; 825 output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); 826 codePoint = 0xdc00 | (codePoint & 0x3ff); 827 } 828 829 output += String.fromCharCode(codePoint); 830 return output; 831} 832 833 834/***/ }), 835 836/***/ "bd7d": 837/***/ (function(module, exports, __webpack_require__) { 838 839module.exports = ProxyHandler; 840 841function ProxyHandler(cbs) { 842 this._cbs = cbs || {}; 843} 844 845var EVENTS = __webpack_require__("852e").EVENTS; 846Object.keys(EVENTS).forEach(function(name) { 847 if (EVENTS[name] === 0) { 848 name = "on" + name; 849 ProxyHandler.prototype[name] = function() { 850 if (this._cbs[name]) this._cbs[name](); 851 }; 852 } else if (EVENTS[name] === 1) { 853 name = "on" + name; 854 ProxyHandler.prototype[name] = function(a) { 855 if (this._cbs[name]) this._cbs[name](a); 856 }; 857 } else if (EVENTS[name] === 2) { 858 name = "on" + name; 859 ProxyHandler.prototype[name] = function(a, b) { 860 if (this._cbs[name]) this._cbs[name](a, b); 861 }; 862 } else { 863 throw Error("wrong number of arguments"); 864 } 865}); 866 867 868/***/ }), 869 870/***/ "d1e8": 871/***/ (function(module, exports, __webpack_require__) { 872 873module.exports = Stream; 874 875var Parser = __webpack_require__("8769"); 876 877function Stream(options) { 878 Parser.call(this, new Cbs(this), options); 879} 880 881__webpack_require__("3fb5")(Stream, Parser); 882 883Stream.prototype.readable = true; 884 885function Cbs(scope) { 886 this.scope = scope; 887} 888 889var EVENTS = __webpack_require__("852e").EVENTS; 890 891Object.keys(EVENTS).forEach(function(name) { 892 if (EVENTS[name] === 0) { 893 Cbs.prototype["on" + name] = function() { 894 this.scope.emit(name); 895 }; 896 } else if (EVENTS[name] === 1) { 897 Cbs.prototype["on" + name] = function(a) { 898 this.scope.emit(name, a); 899 }; 900 } else if (EVENTS[name] === 2) { 901 Cbs.prototype["on" + name] = function(a, b) { 902 this.scope.emit(name, a, b); 903 }; 904 } else { 905 throw Error("wrong number of arguments!"); 906 } 907}); 908 909 910/***/ }), 911 912/***/ "d1f1": 913/***/ (function(module, exports, __webpack_require__) { 914 915module.exports = CollectingHandler; 916 917function CollectingHandler(cbs) { 918 this._cbs = cbs || {}; 919 this.events = []; 920} 921 922var EVENTS = __webpack_require__("852e").EVENTS;
923Object.keys(EVENTS).forEach(function(name) { 924 if (EVENTS[name] === 0) { 925 name = "on" + name; 926 CollectingHandler.prototype[name] = function() { 927 this.events.push([name]); 928 if (this._cbs[name]) this._cbs[name](); 929 }; 930 } else if (EVENTS[name] === 1) { 931 name = "on" + name; 932 CollectingHandler.prototype[name] = function(a) { 933 this.events.push([name, a]); 934 if (this._cbs[name]) this._cbs[name](a); 935 }; 936 } else if (EVENTS[name] === 2) { 937 name = "on" + name; 938 CollectingHandler.prototype[name] = function(a, b) { 939 this.events.push([name, a, b]); 940 if (this._cbs[name]) this._cbs[name](a, b); 941 }; 942 } else { 943 throw Error("wrong number of arguments"); 944 } 945}); 946 947CollectingHandler.prototype.onreset = function() { 948 this.events = []; 949 if (this._cbs.onreset) this._cbs.onreset(); 950}; 951 952CollectingHandler.prototype.restart = function() { 953 if (this._cbs.onreset) this._cbs.onreset(); 954 955 for (var i = 0, len = this.events.length; i < len; i++) { 956 if (this._cbs[this.events[i][0]]) { 957 var num = this.events[i].length; 958 959 if (num === 1) { 960 this._cbs[this.events[i][0]](); 961 } else if (num === 2) { 962 this._cbs[this.events[i][0]](this.events[i][1]); 963 } else { 964 this._cbs[this.events[i][0]]( 965 this.events[i][1], 966 this.events[i][2] 967 ); 968 } 969 } 970 } 971}; 972 973 974/***/ }) 975 976}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.