UNPKG

html-docx

Version:

html-docx ============

1 lines 473 kB
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.htmlDocx=t()}}(function(){var define,module,exports;return function r(a,c,o){function s(n,t){if(!c[n]){if(!a[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(l)return l(n,!0);throw new Error("Cannot find module '"+n+"'")}var i=c[n]={exports:{}};a[n][0].call(i.exports,function(t){var e=a[n][1][t];return s(e||t)},i,i.exports,r,a,c,o)}return c[n].exports}for(var l="function"==typeof require&&require,t=0;t<o.length;t++)s(o[t]);return s}({1:[function(t,e,n){!function(t){"use strict";var u="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),i="/".charCodeAt(0),r="0".charCodeAt(0),a="a".charCodeAt(0),c="A".charCodeAt(0);function d(t){var e=t.charCodeAt(0);return e===n?62:e===i?63:e<r?-1:e<r+10?e-r+26+26:e<c+26?e-c:e<a+26?e-a+26:void 0}t.toByteArray=function(t){var e,n,i,r,a,c;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.length;a="="===t.charAt(o-2)?2:"="===t.charAt(o-1)?1:0,c=new u(3*t.length/4-a),i=0<a?t.length-4:t.length;var s=0;function l(t){c[s++]=t}for(n=e=0;e<i;e+=4,n+=3)l((16711680&(r=d(t.charAt(e))<<18|d(t.charAt(e+1))<<12|d(t.charAt(e+2))<<6|d(t.charAt(e+3))))>>16),l((65280&r)>>8),l(255&r);return 2==a?l(255&(r=d(t.charAt(e))<<2|d(t.charAt(e+1))>>4)):1==a&&(l((r=d(t.charAt(e))<<10|d(t.charAt(e+1))<<4|d(t.charAt(e+2))>>2)>>8&255),l(255&r)),c},t.fromByteArray=function(t){var e,n,i,r,a=t.length%3,c="";function o(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,i=t.length-a;e<i;e+=3)n=(t[e]<<16)+(t[e+1]<<8)+t[e+2],c+=o((r=n)>>18&63)+o(r>>12&63)+o(r>>6&63)+o(63&r);switch(a){case 1:c+=o((n=t[t.length-1])>>2),c+=o(n<<4&63),c+="==";break;case 2:c+=o((n=(t[t.length-2]<<8)+t[t.length-1])>>10),c+=o(n>>4&63),c+=o(n<<2&63),c+="="}return c}}(void 0===n?this.base64js={}:n)},{}],2:[function(t,e,n){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},{}],3:[function(t,e,n){},{}],4:[function(t,e,n){var i=t("buffer").Buffer;var r=n.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i.isEncoding(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=c;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=a)}this.charBuffer=new i(6),this.charReceived=0,this.charLength=0};function a(t){return t.toString(this.encoding)}function c(t){var e=this.charReceived=t.length%2;return this.charLength=e?2:0,e}function o(t){var e=this.charReceived=t.length%3;return this.charLength=e?3:0,e}r.prototype.write=function(t){for(var e="",n=0;this.charLength;){var i=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,n,i),this.charReceived+=i-n,n=i,this.charReceived<this.charLength)return"";if(!(55296<=(c=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))&&c<=56319)){if(this.charReceived=this.charLength=0,i==t.length)return e;t=t.slice(i,t.length);break}this.charLength+=this.surrogateSize,e=""}var r=this.detectIncompleteChar(t),a=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-r,a),a-=this.charReceived=r);var c;a=(e+=t.toString(this.encoding,0,a)).length-1;if(55296<=(c=e.charCodeAt(a))&&c<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),this.charBuffer.write(e.charAt(e.length-1),this.encoding),e.substring(0,a)}return e},r.prototype.detectIncompleteChar=function(t){for(var e=3<=t.length?3:t.length;0<e;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}return e},r.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,i=this.charBuffer,r=this.encoding;e+=i.slice(0,n).toString(r)}return e}},{buffer:5}],5:[function(t,e,n){var i=t("base64-js"),a=t("ieee754"),o=t("is-array");n.Buffer=l,n.SlowBuffer=l,n.INSPECT_MAX_BYTES=50,l.poolSize=8192;var s=1073741823;function l(t,e,n){if(!(this instanceof l))return new l(t,e,n);var i,r,a,c=typeof t;if("number"==c)i=0<t?t>>>0:0;else if("string"==c)"base64"===e&&(t=function(t){t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(y,"");for(;t.length%4!=0;)t+="=";return t}(t)),i=l.byteLength(t,e);else{if("object"!=c||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&o(t.data)&&(t=t.data),i=0<+t.length?Math.floor(+t.length):0}if(this.length>s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");if(l.TYPED_ARRAY_SUPPORT?r=l._augment(new Uint8Array(i)):((r=this).length=i,r._isBuffer=!0),l.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)r._set(t);else if(function(t){return o(t)||l.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}(t))if(l.isBuffer(t))for(a=0;a<i;a++)r[a]=t.readUInt8(a);else for(a=0;a<i;a++)r[a]=(t[a]%256+256)%256;else if("string"==c)r.write(t,0,e);else if("number"==c&&!l.TYPED_ARRAY_SUPPORT&&!n)for(a=0;a<i;a++)r[a]=0;return r}function u(t,e,n,i){return j(function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function r(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function c(t,e,n){var i="",r="";n=Math.min(t.length,n);for(var a=e;a<n;a++)t[a]<=127?(i+=H(r)+String.fromCharCode(t[a]),r=""):r+="%"+t[a].toString(16);return i+H(r)}function d(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;r++)i+=String.fromCharCode(t[r]);return i}function p(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||i<n)&&(n=i);for(var r="",a=e;a<n;a++)r+=z(t[a]);return r}function h(t,e,n){for(var i=t.slice(e,n),r="",a=0;a<i.length;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function b(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(n<t+e)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,i,r,a){if(!l.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r<e||e<a)throw new TypeError("value is out of bounds");if(n+i>t.length)throw new TypeError("index out of range")}function m(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,a=Math.min(t.length-n,2);r<a;r++)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function f(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,a=Math.min(t.length-n,4);r<a;r++)t[n+r]=e>>>8*(i?r:3-r)&255}function g(t,e,n,i,r,a){if(r<e||e<a)throw new TypeError("value is out of bounds");if(n+i>t.length)throw new TypeError("index out of range")}function v(t,e,n,i,r){return r||g(t,e,n,4,34028234663852886e22,-34028234663852886e22),a.write(t,e,n,i,23,4),n+4}function Z(t,e,n,i,r){return r||g(t,e,n,8,17976931348623157e292,-17976931348623157e292),a.write(t,e,n,i,52,8),n+8}l.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(t){return!1}}(),l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");for(var n=t.length,i=e.length,r=0,a=Math.min(n,i);r<a&&t[r]===e[r];r++);return r!==a&&(n=t[r],i=e[r]),n<i?-1:i<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!o(t))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===t.length)return new l(0);if(1===t.length)return t[0];var n;if(void 0===e)for(n=e=0;n<t.length;n++)e+=t[n].length;var i=new l(e),r=0;for(n=0;n<t.length;n++){var a=t[n];a.copy(i,r),r+=a.length}return i},l.byteLength=function(t,e){var n;switch(t+="",e||"utf8"){case"ascii":case"binary":case"raw":n=t.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;case"hex":n=t.length>>>1;break;case"utf8":case"utf-8":n=w(t).length;break;case"base64":n=V(t).length;break;default:n=t.length}return n},l.prototype.length=void 0,l.prototype.parent=void 0,l.prototype.toString=function(t,e,n){var i=!1;if(t||(t="utf8"),(e>>>=0)<0&&(e=0),(n=void 0===n||n===1/0?this.length:n>>>0)>this.length&&(n=this.length),n<=e)return"";for(;;)switch(t){case"hex":return p(this,e,n);case"utf8":case"utf-8":return c(this,e,n);case"ascii":return d(this,e,n);case"binary":return d(this,e,n);case"base64":return r(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return 0===l.compare(this,t)},l.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return l.compare(this,t)},l.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},l.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},l.prototype.write=function(t,e,n,i){if(isFinite(e))isFinite(n)||(i=n,n=void 0);else{var r=i;i=e,e=n,n=r}e=Number(e)||0;var a,c=this.length-e;switch(n?c<(n=Number(n))&&(n=c):n=c,i=String(i||"utf8").toLowerCase()){case"hex":a=function(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?r<(i=Number(i))&&(i=r):i=r;var a=e.length;if(a%2!=0)throw new Error("Invalid hex string");a/2<i&&(i=a/2);for(var c=0;c<i;c++){var o=parseInt(e.substr(2*c,2),16);if(isNaN(o))throw new Error("Invalid hex string");t[n+c]=o}return c}(this,t,e,n);break;case"utf8":case"utf-8":a=function(t,e,n,i){return j(w(e),t,n,i)}(this,t,e,n);break;case"ascii":a=u(this,t,e,n);break;case"binary":a=function(t,e,n,i){return u(t,e,n,i)}(this,t,e,n);break;case"base64":a=function(t,e,n,i){return j(V(e),t,n,i)}(this,t,e,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":a=function(t,e,n,i){return j(function(t){for(var e,n,i,r=[],a=0;a<t.length;a++)e=t.charCodeAt(a),n=e>>8,i=e%256,r.push(i),r.push(n);return r}(e),t,n,i,2)}(this,t,e,n);break;default:throw new TypeError("Unknown encoding: "+i)}return a},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(t,e){var n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)return l._augment(this.subarray(t,e));for(var i=e-t,r=new l(i,void 0,!0),a=0;a<i;a++)r[a]=this[a+t];return r},l.prototype.readUInt8=function(t,e){return e||b(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||b(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||b(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||b(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readInt8=function(t,e){return e||b(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||b(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||b(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||b(t,4,this.length),a.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||b(t,4,this.length),a.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||b(t,8,this.length),a.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||b(t,8,this.length),a.read(this,t,!1,52,8)},l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):m(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):m(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t):f(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):f(this,t,e,!1),e+4},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):m(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):m(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):f(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):f(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return v(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return v(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return Z(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return Z(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e||(e=0),i!==n&&0!==t.length&&0!==this.length){if(i<n)throw new TypeError("sourceEnd < sourceStart");if(e<0||e>=t.length)throw new TypeError("targetStart out of bounds");if(n<0||n>=this.length)throw new TypeError("sourceStart out of bounds");if(i<0||i>this.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r=i-n;if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(var a=0;a<r;a++)t[a+e]=this[a+n];else t._set(this.subarray(n,n+r),e)}},l.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),n<e)throw new TypeError("end < start");if(n!==e&&0!==this.length){if(e<0||e>=this.length)throw new TypeError("start out of bounds");if(n<0||n>this.length)throw new TypeError("end out of bounds");var i;if("number"==typeof t)for(i=e;i<n;i++)this[i]=t;else{var r=w(t.toString()),a=r.length;for(i=e;i<n;i++)this[i]=r[i%a]}return this}},l.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new TypeError("Buffer.toArrayBuffer not supported in this browser");if(l.TYPED_ARRAY_SUPPORT)return new l(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;e<n;e+=1)t[e]=this[e];return t.buffer};var W=l.prototype;l._augment=function(t){return t.constructor=l,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=W.get,t.set=W.set,t.write=W.write,t.toString=W.toString,t.toLocaleString=W.toString,t.toJSON=W.toJSON,t.equals=W.equals,t.compare=W.compare,t.copy=W.copy,t.slice=W.slice,t.readUInt8=W.readUInt8,t.readUInt16LE=W.readUInt16LE,t.readUInt16BE=W.readUInt16BE,t.readUInt32LE=W.readUInt32LE,t.readUInt32BE=W.readUInt32BE,t.readInt8=W.readInt8,t.readInt16LE=W.readInt16LE,t.readInt16BE=W.readInt16BE,t.readInt32LE=W.readInt32LE,t.readInt32BE=W.readInt32BE,t.readFloatLE=W.readFloatLE,t.readFloatBE=W.readFloatBE,t.readDoubleLE=W.readDoubleLE,t.readDoubleBE=W.readDoubleBE,t.writeUInt8=W.writeUInt8,t.writeUInt16LE=W.writeUInt16LE,t.writeUInt16BE=W.writeUInt16BE,t.writeUInt32LE=W.writeUInt32LE,t.writeUInt32BE=W.writeUInt32BE,t.writeInt8=W.writeInt8,t.writeInt16LE=W.writeInt16LE,t.writeInt16BE=W.writeInt16BE,t.writeInt32LE=W.writeInt32LE,t.writeInt32BE=W.writeInt32BE,t.writeFloatLE=W.writeFloatLE,t.writeFloatBE=W.writeFloatBE,t.writeDoubleLE=W.writeDoubleLE,t.writeDoubleBE=W.writeDoubleBE,t.fill=W.fill,t.inspect=W.inspect,t.toArrayBuffer=W.toArrayBuffer,t};var y=/[^+\/0-9A-z]/g;function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function w(t){for(var e=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<=127)e.push(i);else{var r=n;55296<=i&&i<=57343&&n++;for(var a=encodeURIComponent(t.slice(r,n+1)).substr(1).split("%"),c=0;c<a.length;c++)e.push(parseInt(a[c],16))}}return e}function V(t){return i.toByteArray(t)}function j(t,e,n,i,r){r&&(i-=i%r);for(var a=0;a<i&&!(a+n>=e.length||a>=t.length);a++)e[a+n]=t[a];return a}function H(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}},{"base64-js":1,ieee754:56,"is-array":58}],6:[function(t,e,n){(e.exports=t("./lib/cheerio")).version=t("./package.json").version},{"./lib/cheerio":12,"./package.json":18}],7:[function(t,e,u){var n=t("../static"),i=t("../utils"),d=i.isTag,p=i.domEach,h=Object.prototype.hasOwnProperty,b=i.camelCase,I=i.cssCase,m=/\s+/,f="data-",c={forEach:t("lodash.foreach"),extend:t("lodash.assignin"),some:t("lodash.some")},g={null:null,true:!0,false:!1},r=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,l=function(t,e){if(t&&d(t))return t.attribs||(t.attribs={}),e?h.call(t.attribs,e)?r.test(e)?e:t.attribs[e]:"option"===t.name&&"value"===e?n.text(t.children):"input"!==t.name||"radio"!==t.attribs.type&&"checkbox"!==t.attribs.type||"value"!==e?void 0:"on":t.attribs},Z=function(t,e,n){null===n?W(t,e):t.attribs[e]=n+""};u.attr=function(i,r){return"object"==typeof i||void 0!==r?p(this,"function"==typeof r?function(t,e){Z(e,i,r.call(e,t,e.attribs[i]))}:function(t,n){d(n)&&("object"==typeof i?c.forEach(i,function(t,e){Z(n,e,t)}):Z(n,i,r))}):l(this[0],i)};var o=function(t,e){if(t&&d(t))return t.hasOwnProperty(e)?t[e]:r.test(e)?void 0!==l(t,e):l(t,e)},s=function(t,e,n){t[e]=r.test(e)?!!n:n};u.prop=function(i,r){var n,a=0;if("string"==typeof i&&void 0===r){switch(i){case"style":n=this.css(),c.forEach(n,function(t,e){n[a++]=e}),n.length=a;break;case"tagName":case"nodeName":n=this[0].name.toUpperCase();break;default:n=o(this[0],i)}return n}if("object"==typeof i||void 0!==r)return p(this,"function"==typeof r?function(t,e){s(e,i,r.call(e,t,o(e,i)))}:function(t,n){d(n)&&("object"==typeof i?c.forEach(i,function(t,e){s(n,e,t)}):s(n,i,r))})};var a=function(t,e){var n,i,r,a,c,o,s,l=1===arguments.length;for(r=l?(n=Object.keys(t.attribs).filter(function(t){return t.slice(0,f.length)===f})).map(function(t){return b(t.slice(f.length))}):(n=[f+I(e)],[e]),o=0,s=n.length;o<s;++o)if(i=n[o],a=r[o],h.call(t.attribs,i)){if(c=t.attribs[i],h.call(g,c))c=g[c];else if(c===String(Number(c)))c=Number(c);else if(v.test(c))try{c=JSON.parse(c)}catch(t){}t.data[a]=c}return l?t.data:c};u.data=function(n,i){var t=this[0];if(t&&d(t))return t.data||(t.data={}),n?"object"==typeof n||void 0!==i?(p(this,function(t,e){!function(t,e,n){if(t.data||(t.data={}),"object"==typeof e)return c.extend(t.data,e);"string"==typeof e&&void 0!==n?t.data[e]=n:"object"==typeof e&&c.extend(t.data,e)}(e,n,i)}),this):h.call(t.data,n)?t.data[n]:a(t,n):a(t)},u.val=function(t){var e=0===arguments.length,n=this[0];if(n)switch(n.name){case"textarea":return this.text(t);case"input":switch(this.attr("type")){case"radio":return e?this.attr("value"):(this.attr("value",t),this);default:return this.attr("value",t)}return;case"select":var i,r=this.find("option:selected");if(void 0===r)return;if(e)return i=r.attr("value"),this.attr().hasOwnProperty("multiple")&&(i=[],p(r,function(t,e){i.push(l(e,"value"))})),i;if(!this.attr().hasOwnProperty("multiple")&&"object"==typeof t)return this;"object"!=typeof t&&(t=[t]),this.find("option").removeAttr("selected");for(var a=0;a<t.length;a++)this.find('option[value="'+t[a]+'"]').attr("selected","");return this;case"option":return e?this.attr("value"):(this.attr("value",t),this)}};var W=function(t,e){t.attribs&&h.call(t.attribs,e)&&delete t.attribs[e]};u.removeAttr=function(n){return p(this,function(t,e){W(e,n)}),this},u.hasClass=function(a){return c.some(this,function(t){var e,n=t.attribs,i=n&&n.class,r=-1;if(i)for(;-1<(r=i.indexOf(a,r+1));)if(e=r+a.length,(0===r||m.test(i[r-1]))&&(e===i.length||m.test(i[e])))return!0})},u.addClass=function(i){if("function"==typeof i)return p(this,function(t,e){var n=e.attribs.class||"";u.addClass.call([e],i.call(e,t,n))});if(!i||"string"!=typeof i)return this;for(var t=i.split(m),e=this.length,n=0;n<e;n++)if(d(this[n])){var r,a,c=l(this[n],"class");if(c){a=" "+c+" ",r=t.length;for(var o=0;o<r;o++){var s=t[o]+" ";a.indexOf(" "+s)<0&&(a+=s)}Z(this[n],"class",a.trim())}else Z(this[n],"class",t.join(" ").trim())}return this};var y=function(t){return t?t.trim().split(m):[]};u.removeClass=function(n){var c,o,s;return"function"==typeof n?p(this,function(t,e){u.removeClass.call([e],n.call(e,t,e.attribs.class||""))}):(c=y(n),o=c.length,s=0===arguments.length,p(this,function(t,e){if(d(e))if(s)e.attribs.class="";else{for(var n,i,r=y(e.attribs.class),a=0;a<o;a++)0<=(n=r.indexOf(c[a]))&&(r.splice(n,1),i=!0,a--);i&&(e.attribs.class=r.join(" "))}}))},u.toggleClass=function(n,i){if("function"==typeof n)return p(this,function(t,e){u.toggleClass.call([e],n.call(e,t,e.attribs.class||"",i),i)});if(!n||"string"!=typeof n)return this;for(var t,e,r=n.split(m),a=r.length,c="boolean"==typeof i?i?1:-1:0,o=this.length,s=0;s<o;s++)if(d(this[s])){t=y(this[s].attribs.class);for(var l=0;l<a;l++)e=t.indexOf(r[l]),0<=c&&e<0?t.push(r[l]):c<=0&&0<=e&&t.splice(e,1);this[s].attribs.class=t.join(" ")}return this},u.is=function(t){return!!t&&0<this.filter(t).length}},{"../static":14,"../utils":15,"lodash.assignin":90,"lodash.foreach":95,"lodash.some":101}],8:[function(t,e,n){var r=t("../utils").domEach,i={pick:t("lodash.pick")},a=Object.prototype.toString;function o(t,e){var n=function(t){return(t=(t||"").trim())?t.split(";").reduce(function(t,e){var n=e.indexOf(":");return n<1||n===e.length-1||(t[e.slice(0,n).trim()]=e.slice(n+1).trim()),t},{}):{}}(t.attribs.style);return"string"==typeof e?n[e]:Array.isArray(e)?i.pick(n,e):n}n.css=function(n,i){return 2===arguments.length||"[object Object]"===a.call(n)?r(this,function(t,e){!function e(n,i,t,r){if("string"==typeof i){var a=o(n);"function"==typeof t&&(t=t.call(n,r,a[i])),""===t?delete a[i]:null!=t&&(a[i]=t),n.attribs.style=(c=a,Object.keys(c||{}).reduce(function(t,e){return t+=(t?" ":"")+e+": "+c[e]+";"},""))}else"object"==typeof i&&Object.keys(i).forEach(function(t){e(n,t,i[t])});var c}(e,n,i,t)}):o(this[0],n)}},{"../utils":15,"lodash.pick":98}],9:[function(t,e,n){var i="input,select,textarea,keygen",r=/%20/g,c=/\r?\n/g,o={map:t("lodash.map")};n.serialize=function(){var t=this.serializeArray();return o.map(t,function(t){return encodeURIComponent(t.name)+"="+encodeURIComponent(t.value)}).join("&").replace(r,"+")},n.serializeArray=function(){var a=this.constructor;return this.map(function(){var t=a(this);return"form"===this.name?t.find(i).toArray():t.filter(i).toArray()}).filter('[name!=""]:not(:disabled):not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map(function(t,e){var n=a(e),i=n.attr("name"),r=n.val();return null==r?null:Array.isArray(r)?o.map(r,function(t){return{name:i,value:t.replace(c,"\r\n")}}):{name:i,value:r.replace(c,"\r\n")}}).get()}},{"lodash.map":96}],10:[function(t,e,r){var n=t("../parse"),l=t("../static"),u=n.update,a=n.evaluate,i=t("../utils"),d=i.domEach,c=i.cloneDom,p=i.isHtml,h=Array.prototype.slice,b={flatten:t("lodash.flatten"),bind:t("lodash.bind"),forEach:t("lodash.foreach")};r._makeDomArray=function(t,e){return null==t?[]:t.cheerio?e?c(t.get(),t.options):t.get():Array.isArray(t)?b.flatten(t.map(function(t){return this._makeDomArray(t,e)},this)):"string"==typeof t?a(t,this.options):e?c([t]):[t]};var o=function(c){return function(){var r=h.call(arguments),a=this.length-1;return d(this,function(t,e){var n,i;i="function"==typeof r[0]?r[0].call(e,t,l.html(e.children)):r,n=this._makeDomArray(i,t<a),c(n,e.children,e)})}},I=function(t,e,n,i,r){var a,c,o,s,l,u=[e,n].concat(i),d=t[e-1]||null,p=t[e]||null;for(a=0,c=i.length;a<c;++a)o=(l=(s=i[a]).parent||s.root)&&l.children.indexOf(i[a]),l&&-1<o&&(l.children.splice(o,1),r===l&&o<e&&u[0]--),s.root=null,s.parent=r,s.prev&&(s.prev.next=s.next||null),s.next&&(s.next.prev=s.prev||null),s.prev=i[a-1]||d,s.next=i[a+1]||p;return d&&(d.next=i[0]),p&&(p.prev=i[i.length-1]),t.splice.apply(t,u)};r.appendTo=function(t){return t.cheerio||(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t.append(this),this},r.prependTo=function(t){return t.cheerio||(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t.prepend(this),this},r.append=o(function(t,e,n){I(e,e.length,0,t,n)}),r.prepend=o(function(t,e,n){I(e,0,0,t,n)}),r.wrap=function(c){var o="function"==typeof c&&c,s=this.length-1;return b.forEach(this,b.bind(function(t,e){var n,i,r=t.parent||t.root,a=r.children;r&&(o&&(c=o.call(t,e)),"string"!=typeof c||p(c)||(c=this.parents().last().find(c).clone()),n=this._makeDomArray(c,e<s).slice(0,1),i=a.indexOf(t),u([t],n[0]),I(a,i,0,n,r))},this)),this},r.after=function(){var o=h.call(arguments),s=this.length-1;return d(this,function(t,e){var n=e.parent||e.root;if(n){var i,r,a=n.children,c=a.indexOf(e);c<0||(i="function"==typeof o[0]?o[0].call(e,t,l.html(e.children)):o,r=this._makeDomArray(i,t<s),I(a,c+1,0,r,n))}}),this},r.insertAfter=function(t){var c=[],o=this;return"string"==typeof t&&(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t=this._makeDomArray(t),o.remove(),d(t,function(t,e){var n=o._makeDomArray(o.clone()),i=e.parent||e.root;if(i){var r=i.children,a=r.indexOf(e);a<0||(I(r,a+1,0,n,i),c.push(n))}}),this.constructor.call(this.constructor,this._makeDomArray(c))},r.before=function(){var o=h.call(arguments),s=this.length-1;return d(this,function(t,e){var n=e.parent||e.root;if(n){var i,r,a=n.children,c=a.indexOf(e);c<0||(i="function"==typeof o[0]?o[0].call(e,t,l.html(e.children)):o,r=this._makeDomArray(i,t<s),I(a,c,0,r,n))}}),this},r.insertBefore=function(t){var c=[],o=this;return"string"==typeof t&&(t=this.constructor.call(this.constructor,t,null,this._originalRoot)),t=this._makeDomArray(t),o.remove(),d(t,function(t,e){var n=o._makeDomArray(o.clone()),i=e.parent||e.root;if(i){var r=i.children,a=r.indexOf(e);a<0||(I(r,a,0,n,i),c.push(n))}}),this.constructor.call(this.constructor,this._makeDomArray(c))},r.remove=function(t){var e=this;return t&&(e=e.filter(t)),d(e,function(t,e){var n=e.parent||e.root;if(n){var i=n.children,r=i.indexOf(e);r<0||(i.splice(r,1),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.prev=e.next=e.parent=e.root=null)}}),this},r.replaceWith=function(c){var o=this;return d(this,function(t,e){var n=e.parent||e.root;if(n){var i,r=n.children,a=o._makeDomArray("function"==typeof c?c.call(e,t,e):c);u(a,null),i=r.indexOf(e),I(r,i,1,a,n),e.parent=e.prev=e.next=e.root=null}}),this},r.empty=function(){return d(this,function(t,e){b.forEach(e.children,function(t){t.next=t.prev=t.parent=null}),e.children.length=0}),this},r.html=function(i){if(void 0===i)return this[0]&&this[0].children?l.html(this[0].children,this.options):null;var r=this.options;return d(this,function(t,e){b.forEach(e.children,function(t){t.next=t.prev=t.parent=null});var n=i.cheerio?i.clone().get():a(""+i,r);u(n,e)}),this},r.toString=function(){return l.html(this,this.options)},r.text=function(i){return void 0===i?l.text(this):"function"==typeof i?d(this,function(t,e){var n=[e];return r.text.call(n,i.call(e,t,l.text(n)))}):(d(this,function(t,e){b.forEach(e.children,function(t){t.next=t.prev=t.parent=null}),u({data:""+i,type:"text",parent:e,prev:null,next:null,children:[]},e)}),this)},r.clone=function(){return this._make(c(this.get(),this.options))}},{"../parse":13,"../static":14,"../utils":15,"lodash.bind":91,"lodash.flatten":94,"lodash.foreach":95}],11:[function(t,e,a){var c=t("css-select"),n=t("../utils"),o=n.domEach,s=t("htmlparser2").DomUtils.uniqueSort,l=n.isTag,u={bind:t("lodash.bind"),forEach:t("lodash.foreach"),reject:t("lodash.reject"),filter:t("lodash.filter"),reduce:t("lodash.reduce")};a.find=function(t){var e,n=u.reduce(this,function(t,e){return t.concat(u.filter(e.children,l))},[]),i=this.constructor.contains;if(t&&"string"!=typeof t)return e=t.cheerio?t.get():[t],this._make(e.filter(function(t){var e,n;for(e=0,n=this.length;e<n;++e)if(i(this[e],t))return!0},this));var r={__proto__:this.options,context:this.toArray()};return this._make(c(t,n,r))},a.parent=function(t){var i=[];return o(this,function(t,e){var n=e.parent;n&&i.indexOf(n)<0&&i.push(n)}),arguments.length&&(i=a.filter.call(i,t,this)),this._make(i)},a.parents=function(e){var n=[];return this.get().reverse().forEach(function(t){d(this,t.parent,e,1/0).forEach(function(t){-1===n.indexOf(t)&&n.push(t)})},this),this._make(n)},a.parentsUntil=function(t,e){var n,i,r=[];return"string"==typeof t?n=c(t,this.parents().toArray(),this.options)[0]:t&&t.cheerio?i=t.toArray():t&&(n=t),this.toArray().reverse().forEach(function(t){for(;(t=t.parent)&&(n&&t!==n||i&&-1===i.indexOf(t)||!n&&!i);)l(t)&&-1===r.indexOf(t)&&r.push(t)},this),this._make(e?c(e,r,this.options):r)},a.closest=function(i){var r=[];return i&&o(this,function(t,e){var n=d(this,e,i,1)[0];n&&r.indexOf(n)<0&&r.push(n)}.bind(this)),this._make(r)},a.next=function(t){if(!this[0])return this;var e=[];return u.forEach(this,function(t){for(;t=t.next;)if(l(t))return void e.push(t)}),t?a.filter.call(e,t,this):this._make(e)},a.nextAll=function(t){if(!this[0])return this;var e=[];return u.forEach(this,function(t){for(;t=t.next;)l(t)&&-1===e.indexOf(t)&&e.push(t)}),t?a.filter.call(e,t,this):this._make(e)},a.nextUntil=function(t,e){if(!this[0])return this;var n,i,r=[];return"string"==typeof t?n=c(t,this.nextAll().get(),this.options)[0]:t&&t.cheerio?i=t.get():t&&(n=t),u.forEach(this,function(t){for(;(t=t.next)&&(n&&t!==n||i&&-1===i.indexOf(t)||!n&&!i);)l(t)&&-1===r.indexOf(t)&&r.push(t)}),e?a.filter.call(r,e,this):this._make(r)},a.prev=function(t){if(!this[0])return this;var e=[];return u.forEach(this,function(t){for(;t=t.prev;)if(l(t))return void e.push(t)}),t?a.filter.call(e,t,this):this._make(e)},a.prevAll=function(t){if(!this[0])return this;var e=[];return u.forEach(this,function(t){for(;t=t.prev;)l(t)&&-1===e.indexOf(t)&&e.push(t)}),t?a.filter.call(e,t,this):this._make(e)},a.prevUntil=function(t,e){if(!this[0])return this;var n,i,r=[];return"string"==typeof t?n=c(t,this.prevAll().get(),this.options)[0]:t&&t.cheerio?i=t.get():t&&(n=t),u.forEach(this,function(t){for(;(t=t.prev)&&(n&&t!==n||i&&-1===i.indexOf(t)||!n&&!i);)l(t)&&-1===r.indexOf(t)&&r.push(t)}),e?a.filter.call(r,e,this):this._make(r)},a.siblings=function(t){var e=this.parent(),n=u.filter(e?e.children():this.siblingsAndMe(),u.bind(function(t){return l(t)&&!this.is(t)},this));return void 0!==t?a.filter.call(n,t,this):this._make(n)},a.children=function(t){var e=u.reduce(this,function(t,e){return t.concat(u.filter(e.children,l))},[]);return void 0===t?this._make(e):a.filter.call(e,t,this)},a.contents=function(){return this._make(u.reduce(this,function(t,e){return t.push.apply(t,e.children),t},[]))},a.each=function(t){for(var e=0,n=this.length;e<n&&!1!==t.call(this[e],e,this[e]);)++e;return this},a.map=function(r){return this._make(u.reduce(this,function(t,e,n){var i=r.call(e,n,e);return null==i?t:t.concat(i)},[]))};var i=function(i){return function(n,t){var e;return t=t||this,e="string"==typeof n?c.compile(n,t.options):"function"==typeof n?function(t,e){return n.call(t,e,t)}:n.cheerio?n.is.bind(n):function(t){return n===t},t._make(i(this,e))}};function d(t,e,n,i){for(var r=[];e&&r.length<i;)n&&!a.filter.call([e],n,t).length||r.push(e),e=e.parent;return r}a.filter=i(u.filter),a.not=i(u.reject),a.has=function(t){var e=this;return a.filter.call(this,function(){return 0<e._make(this).find(t).length})},a.first=function(){return 1<this.length?this._make(this[0]):this},a.last=function(){return 1<this.length?this._make(this[this.length-1]):this},a.eq=function(t){return 0===(t=+t)&&this.length<=1?this:(t<0&&(t=this.length+t),this[t]?this._make(this[t]):this._make([]))},a.get=function(t){return null==t?Array.prototype.slice.call(this):this[t<0?this.length+t:t]},a.index=function(t){var e,n;return n=0===arguments.length?(e=this.parent().children(),this[0]):"string"==typeof t?(e=this._make(t),this[0]):(e=this,t.cheerio?t[0]:t),e.get().indexOf(n)},a.slice=function(){return this._make([].slice.apply(this,arguments))},a.end=function(){return this.prevObject||this._make([])},a.add=function(t,e){for(var n=this._make(t,e),i=s(n.get().concat(this.get())),r=0;r<i.length;++r)n[r]=i[r];return n.length=i.length,n},a.addBack=function(t){return this.add(arguments.length?this.prevObject.filter(t):this.prevObject)}},{"../utils":15,"css-select":19,htmlparser2:55,"lodash.bind":91,"lodash.filter":93,"lodash.foreach":95,"lodash.reduce":99,"lodash.reject":100}],12:[function(t,e,n){var r=t("./parse"),a=t("./utils").isHtml,c={extend:t("lodash.assignin"),bind:t("lodash.bind"),forEach:t("lodash.foreach"),defaults:t("lodash.defaults")},i=[t("./api/attributes"),t("./api/traversing"),t("./api/manipulation"),t("./api/css"),t("./api/forms")],o=e.exports=function(t,e,n,i){return this instanceof o?(this.options=c.defaults(i||{},this.options),t?(n&&("string"==typeof n&&(n=r(n,this.options)),this._root=o.call(this,n)),t.cheerio?t:(s(t)&&(t=[t]),Array.isArray(t)?(c.forEach(t,c.bind(function(t,e){this[e]=t},this)),this.length=t.length,this):"string"==typeof t&&a(t)?o.call(this,r(t,this.options).children):(e?"string"==typeof e?e=a(e)?(e=r(e,this.options),o.call(this,e)):(t=[e,t].join(" "),this._root):e.cheerio||(e=o.call(this,e)):e=this._root,e?e.find(t):this))):this):new o(t,e,n,i)};c.extend(o,t("./static")),o.prototype.cheerio="[cheerio object]",o.prototype.options={withDomLvl1:!0,normalizeWhitespace:!1,xmlMode:!1,decodeEntities:!0},o.prototype.length=0,o.prototype.splice=Array.prototype.splice,o.prototype._make=function(t,e){var n=new this.constructor(t,e,this._root,this.options);return n.prevObject=this,n},o.prototype.toArray=function(){return this.get()},i.forEach(function(t){c.extend(o.prototype,t)});var s=function(t){return t.name||"text"===t.type||"comment"===t.type}},{"./api/attributes":7,"./api/css":8,"./api/forms":9,"./api/manipulation":10,"./api/traversing":11,"./parse":13,"./static":14,"./utils":15,"lodash.assignin":90,"lodash.bind":91,"lodash.defaults":16,"lodash.foreach":95}],13:[function(t,e,r){(function(n){var i=t("htmlparser2");(r=e.exports=function(t,e){var n=r.evaluate(t,e),i=r.evaluate("<root></root>",e)[0];return i.type="root",r.update(n,i),i}).evaluate=function(t,e){return"string"==typeof t||n.isBuffer(t)?i.parseDOM(t,e):t},r.update=function(t,e){Array.isArray(t)||(t=[t]),e?e.children=t:e=null;for(var n=0;n<t.length;n++){var i=t[n],r=i.parent||i.root,a=r&&r.children;a&&a!==t&&(a.splice(a.indexOf(i),1),i.prev&&(i.prev.next=i.next),i.next&&(i.next.prev=i.prev)),e?(i.prev=t[n-1]||null,i.next=t[n+1]||null):i.prev=i.next=null,e&&"root"===e.type?(i.root=e,i.parent=null):(i.root=null,i.parent=e)}return e}}).call(this,t("buffer").Buffer)},{buffer:5,htmlparser2:55}],14:[function(i,t,s){var r=i("dom-serializer"),a=i("css-select"),e=i("./parse"),l={merge:i("lodash.merge"),defaults:i("lodash.defaults")};function c(t,e,n){if(e)"string"==typeof e&&(e=a(e,t._root,n));else{if(!t._root||!t._root.children)return"";e=t._root.children}return r(e,n)}s.load=function(t,r){var a=i("./cheerio");r=l.defaults(r||{},a.prototype.options);var c=e(t,r),o=function(t,e,n,i){return this instanceof o?(i=l.defaults(i||{},r),a.call(this,t,e,n||c,i)):new o(t,e,n,i)};return o.prototype=Object.create(a.prototype),(o.prototype.constructor=o).fn=o.prototype,o.prototype._originalRoot=c,l.merge(o,s),o._root=c,o._options=r,o},s.html=function(t,e){var n=i("./cheerio");return"[object Object]"!==Object.prototype.toString.call(t)||e||"length"in t||"type"in t||(e=t,t=void 0),c(this,t,e=l.defaults(e||{},this._options,n.prototype.options))},s.xml=function(t){return c(this,t,l.defaults({xmlMode:!0},this._options))},s.text=function(t){t||(t=this.root());for(var e,n="",i=t.length,r=0;r<i;r++)"text"===(e=t[r]).type?n+=e.data:e.children&&"comment"!==e.type&&(n+=s.text(e.children));return n},s.parseHTML=function(t,e,n){var i;return t&&"string"==typeof t?("boolean"==typeof e&&(n=e),i=this.load(t),n||i("script").remove(),i.root()[0].children.slice()):null},s.root=function(){return this(this._root)},s.contains=function(t,e){if(e===t)return!1;for(;e&&e!==e.parent;)if((e=e.parent)===t)return!0;return!1}},{"./cheerio":12,"./parse":13,"css-select":19,"dom-serializer":27,"lodash.defaults":16,"lodash.merge":17}],15:[function(t,e,n){var i=t("./parse"),r=t("dom-serializer"),a={tag:!0,script:!0,style:!0};n.isTag=function(t){return t.type&&(t=t.type),a[t]||!1},n.camelCase=function(t){return t.replace(/[_.-](\w|$)/g,function(t,e){return e.toUpperCase()})},n.cssCase=function(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()},n.domEach=function(t,e){for(var n=0,i=t.length;n<i&&!1!==e.call(t,n,t[n]);)++n;return t},n.cloneDom=function(t,e){return i(r(t,e),e).children};var c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;n.isHtml=function(t){if("<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&3<=t.length)return!0;var e=c.exec(t);return!(!e||!e[1])}},{"./parse":13,"dom-serializer":27}],16:[function(t,e,n){var i=9007199254740991,c="[object Arguments]",r="[object Function]",a="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function s(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var l=Object.prototype,p=l.hasOwnProperty,u=l.toString,d=l.propertyIsEnumerable,h=Math.max;function b(t,e){var n=Z(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&W(t)}(t)&&p.call(t,"callee")&&(!d.call(t,"callee")||u.call(t)==c)}(t)?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],i=n.length,r=!!i;for(var a in t)!e&&!p.call(t,a)||r&&("length"==a||g(a,i))||n.push(a);return n}function I(t,e,n,i){return void 0===t||v(t,l[n])&&!p.call(i,n)?e:t}function m(t){if(!y(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=function(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||l;return t===n}(t),n=[];for(var i in t)("constructor"!=i||!e&&p.call(t,i))&&n.push(i);return n}function f(a,c){return c=h(void 0===c?a.length-1:c,0),function(){for(var t=arguments,e=-1,n=h(t.length-c,0),i=Array(n);++e<n;)i[e]=t[c+e];e=-1;for(var r=Array(c+1);++e<c;)r[e]=t[e];return r[c]=i,s(a,this,r)}}function g(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||o.test(t))&&-1<t&&t%1==0&&t<e}function v(t,e){return t===e||t!=t&&e!=e}var Z=Array.isArray;function W(t){return null!=t&&function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=i}(t.length)&&!function(t){var e=y(t)?u.call(t):"";return e==r||e==a}(t)}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var z,w=(z=function(t,e,n,i){!function(t,e,n,i){n||(n={});for(var r,a,c,o,s=-1,l=e.length;++s<l;){var u=e[s],d=i?i(n[u],t[u],u,n,t):void 0;r=n,a=u,c=void 0===d?t[u]:d,o=r[a],p.call(r,a)&&v(o,c)&&(void 0!==c||a in r)||(r[a]=c)}}(e,function(t){return W(t)?b(t,!0):m(t)}(e),t,i)},f(function(t,e){var n=-1,i=e.length,r=1<i?e[i-1]:void 0,a=2<i?e[2]:void 0;for(r=3<z.length&&"function"==typeof r?(i--,r):void 0,a&&function(t,e,n){if(!y(n))return!1;var i=typeof e;return!!("number"==i?W(n)&&g(e,n.length):"string"==i&&e in n)&&v(n[e],t)}(e[0],e[1],a)&&(r=i<3?void 0:r,i=1),t=Object(t);++n<i;){var c=e[n];c&&z(t,c,n,r)}return t})),V=f(function(t){return t.push(void 0,I),s(w,void 0,t)});e.exports=V},{}],17:[function(t,Ot,Et){(function(t){var i="__lodash_hash_undefined__",r=9007199254740991,e="[object Arguments]",n="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",o="[object Null]",I="[object Object]",s="[object Proxy]",l="[object Undefined]",u=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[e]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p[a]=p["[object Map]"]=p["[object Number]"]=p[I]=p["[object RegExp]"]=p["[object Set]"]=p["[object String]"]=p["[object WeakMap]"]=!1;var h="object"==typeof t&&t&&t.Object===Object&&t,b="object"==typeof self&&self&&self.Object===Object&&self,m=h||b||Function("return this")(),f="object"==typeof Et&&Et&&!Et.nodeType&&Et,g=f&&"object"==typeof Ot&&Ot&&!Ot.nodeType&&Ot,v=g&&g.exports===f,Z=v&&h.process,W=function(){try{return Z&&Z.binding&&Z.binding("util")}catch(t){}}(),y=W&&W.isTypedArray;function z(t,e){return"__proto__"==e?void 0:t[e]}var w,V,j,H=Array.prototype,G=Function.prototype,x=Object.prototype,R=m["__core-js_shared__"],N=G.toString,_=x.hasOwnProperty,S=(w=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",B=x.toString,P=N.call(Object),k=RegExp("^"+N.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=v?m.Buffer:void 0,O=m.Symbol,E=m.Uint8Array,F=Y?Y.allocUnsafe:void 0,M=(V=Object.getPrototypeOf,j=Object,function(t){return V(j(t))}),X=Object.create,J=x.propertyIsEnumerable,U=H.splice,T=O?O.toStringTag:void 0,D=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),A=Y?Y.isBuffer:void 0,C=Math.max,L=Date.now,Q=mt(m,"Map"),q=mt(Object,"create"),$=function(){function n(){}return function(t){if(!Rt(t))return{};if(X)return X(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}}();function K(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function tt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function et(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function nt(t){var e=this.__data__=new tt(t);this.size=e.size}function it(t,e){var n=Vt(t),i=!n&&wt(t),r=!n&&!i&&Ht(t),a=!n&&!i&&!r&&St(t),c=n||i||r||a,o=c?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],s=o.length;for(var l in t)!e&&!_.call(t,l)||c&&("length"==l||r&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ft(l,s))||o.push(l);return o}function rt(t,e,n){(void 0===n||zt(t[e],n))&&(void 0!==n||e in t)||ct(t,e,n)}function at(t,e){for(var n=t.length;n--;)if(zt(t[n][0],e))return n;return-1}function ct(t,e,n){"__proto__"==e&&D?D(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}K.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},K.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K.prototype.get=function(t){var e=this.__data__;if(q){var n=e[t];return n===i?void 0:n}return _.call(e,t)?e[t]:void 0},K.prototype.has=function(t){var e=this.__data__;return q?void 0!==e[t]:_.call(e,t)},K.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=q&&void 0===e?i:e,this},tt.prototype.clear=function(){this.__data__=[],this.size=0},tt.prototype.delete=function(t){var e=this.__data__,n=at(e,t);return!(n<0||(n==e.length-1?e.pop():U.call(e,n,1),--this.size,0))},tt.prototype.get=function(t){var e=this.__data__,n=at(e,t);return n<0?void 0:e[n][1]},tt.prototype.has=function(t){return-1<at(this.__data__,t)},tt.prototype.set=function(t,e){var n=this.__data__,i=at(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},et.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(Q||tt),string:new K}},et.prototype.delete=function(t){var e=It(this,t).delete(t);return this.size-=e?1:0,e},et.prototype.get=function(t){return It(this,t).get(t)},et.prototype.has=function(t){return It(this,t).has(t)},et.prototype.set=function(t,e){var n=It(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},nt.prototype.clear=function(){this.__data__=new tt,this.size=0},nt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},nt.prototype.get=function(t){return this.__data__.get(t)},nt.prototype.has=function(t){return this.__data__.has(t)},nt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof tt){var i=n.__data__;if(!Q||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new et(i)}return n.set(t,e),this.size=n.size,this};var ot,st=function(t,e,n){for(var i=-1,r=Object(t),a=n(t),c=a.length;c--;){var o=a[ot?c:++i];if(!1===e(r[o],o,r))break}return t};function lt(t){return null==t?void 0===t?l:o:T&&T in Object(t)?function(t){var e=_.call(t,T),n=t[T];try{var i=!(t[T]=void 0)}catch(t){}var r=B.call(t);i&&(e?t[T]=n:delete t[T]);return r}(t):function(t){return B.call(t)}(t)}function ut(t){return Nt(t)&&lt(t)==e}function dt(t){return!(!Rt(t)||function(t){return!!S&&S in t}(t))&&(Gt(t)?k:u).test(function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function pt(t){if(!Rt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=gt(t),n=[];for(var i in t)("constructor"!=i||!e&&_.call(t,i))&&n.push(i);return n}function ht(i,r,a,c,o){i!==r&&st(r,function(t,e){if(Rt(t))o||(o=new nt),function(t,e,n,i,r,a,c){var o=z(t,n),s=z(e,n),l=c.get(s);if(l)return rt(t,n,l);var u=a?a(o,s,n+"",t,e,c):void 0,d=void 0===u;if(d){var p=Vt(s),h=!p&&Ht(s),b=!p&&!h&&St(s);u=s,p||h||b?u=Vt(o)?o:function(t){return Nt(t)&&jt(t)}(o)?function(t,e){var n=-1,i=t.length;e||(e=Array(i));for(;++n<i;)e[n]=t[n];return e}(o):h?function(t,e){if(e)return t.slice();var n=t.length,i=F?F(n):new t.constructor(n);return t.copy(i),i}(s,!(d=!1)):b?function(t,e){var n=e?function(t){var e=new t.constructor(t.byteLength);return new E(e).set(new E(t)),e}(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(s,!(d=!1)):[]:function(t){if(!Nt(t)||lt(t)!=I)return!1;var e=M(t);if(null===e)return!0;var n=_.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&N.call(n)==P}(s)||wt(s)?wt(u=o)?u=function(t){return function(t,e,n,i){var r=!n;n||(n={});var a=-1,c=e.length;for(;++a<c;){var o=e[a],s=i?i(n[o],t[o],o,n,t):void 0;void 0===s&&(s=t[o]),r?ct(n,o,s):(d=s,void 0,p=(l=n)[u=o],_.call(l,u)&&zt(p,d)&&(void 0!==d||u in l)||ct(l,u,d))}var l,u,d,p;return n}(t,Bt(t))}(o):(!Rt(o)||i&&Gt(o))&&(u=function(t){return"function"!=typeof t.constructor||gt(t)?{}:$(M(t))}(s)):d=!1}d&&(c.set(s,u),r(u,s,i,a,c),c.delete(s));rt(t,n,u)}(i,r,e,a,ht,c,o);else{var n=c?c(z(i,e),t,e+"",i,r,o):void 0;void 0===n&&(n=t),rt(i,e,n)}},Bt)}function bt(t,e){return yt(function(a,c,o){return c=C(void 0===c?a.length-1:c,0),function(){for(var t=arguments,e=-1,n=C(t.length-c,0),i=Array(n);++e<n;)i[e]=t[c+e];e=-1;for(var r=Array(c+1);++e<c;)r[e]=t[e];return r[c]=o(i),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(a,this,r)}}(t,e,Yt),t+"")}function It(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function mt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(n)?n:void 0}function ft(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&d.test(t))&&-1<t&&t%1==0&&t<e}function gt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||x)}var vt,Zt,Wt,yt=(vt=D?function(t,e){return D(t,"toString",{configurable:!0,enumerable:!1,value:function(t){return function(){return t}}(e),writable:!0})}:Yt,Wt=Zt=0,function(){var t=L(),e=16-(t-Wt);if(Wt=t,0<e){if(800<=++Zt)return arguments[0]}else Zt=0;return vt.apply(void 0,arguments)});function zt(t,e){return t===e||t!=t&&e!=e}var wt=ut(function(){return arguments}())?ut:function(t){return Nt(t)&&_.call(t,"callee")&&!J.call(t,"callee")},Vt=Array.isArray;function jt(t){return null!=t&&xt(t.length)&&!Gt(t)}var Ht=A||function(){return!1};function Gt(t){if(!Rt(t))return!1;var e=lt(t);return e==a||e==c||e==n||e==s}function xt(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=r}function Rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Nt(t){return null!=t&&"object"==typeof t}var _t,St=y?(_t=y,function(t){return _t(t)}):function(t){return Nt(t)&&xt(t.length)&&!!p[lt(t)]};function Bt(t){return jt(t)?it(t,!0):pt(t)}var Pt,kt=(Pt=function(t,e,n){ht(t,e,n)},bt(function(t,e){var n=-1,i=e.length,r=1<i?e