/** * jsPDF - PDF Document creation from JavaScript * Version 1.0.0-trunk Built on 2014-03-10T05:30 * Commit dbb2fbceea2f397d479b802fa4fdf10e6d7c6963 * * Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF * 2010 Aaron Spike, https://github.com/acspike * 2012 Willow Systems Corporation, willow-systems.com * 2012 Pablo Hess, https://github.com/pablohess * 2012 Florian Jenett, https://github.com/fjenett * 2013 Warren Weckesser, https://github.com/warrenweckesser * 2013 Youssef Beddad, https://github.com/lifof * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2013 Stefan Slonevskiy, https://github.com/stefslon * 2013 Jeremy Morel, https://github.com/jmorel * 2013 Christoph Hartmann, https://github.com/chris-rock * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Makes, https://github.com/dollaruw * 2014 Diego Casorran, https://github.com/diegocr * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Contributor(s): * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, * kim3er, mfo, alnorth, */ /** * jsPDF addImage plugin (JPEG only at this time) * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/ * 2013 Chris Dowling, https://github.com/gingerchris * 2013 Trinh Ho, https://github.com/ineedfat * 2013 Edwin Alejandro Perez, https://github.com/eaparango * 2013 Norah Smith, https://github.com/burnburnrocket * 2014 Diego Casorran, https://github.com/diegocr */ /** * jsPDF Cell plugin * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Hall, james@parall.ax * 2014 Diego Casorran, https://github.com/diegocr */ /** * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser, jQuery * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 Diego Casorran, https://github.com/diegocr */ /** * jsPDF JavaScript plugin * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com */ /** jsPDF Silly SVG plugin Copyright (c) 2012 Willow Systems Corporation, willow-systems.com */ /** jsPDF split_text_to_size plugin Copyright (c) 2012 Willow Systems Corporation, willow-systems.com MIT license. */ /** jsPDF standard_fonts_metrics plugin Copyright (c) 2012 Willow Systems Corporation, willow-systems.com MIT license. */ /** * jsPDF total_pages plugin * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br */ /* Blob.js * A Blob implementation. * 2013-12-27 * By Eli Grey, http://eligrey.com * By Devin Samarin, https://github.com/eboyjr * License: X11/MIT * See LICENSE.md */ /*! FileSaver.js * A saveAs() FileSaver implementation. * 2014-01-24 * By Eli Grey, http://eligrey.com * License: X11/MIT * See LICENSE.md */ /* * Copyright (c) 2012 chick307 * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ /* Deflate.js - https://github.com/gildas-lormeau/zip.js Copyright (c) 2013 Gildas Lormeau. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * JavaScript Polyfill functions for jsPDF * Collected from public resources by * https://github.com/diegocr */ !function(t,e){if(e["true"]=t,"function"!=typeof n&&"object"!=typeof n||"undefined"==typeof URL)if("function"!=typeof n&&"object"!=typeof n||"undefined"==typeof webkitURL)var n=function(t){"use strict";var e=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},r=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},s=n.prototype,o=r.prototype,i=t.FileReaderSync,a=function(t){this.code=this[this.name=t]},u="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=u.length,l=t.URL||t.webkitURL||t,f=l.createObjectURL,d=l.revokeObjectURL,w=l,m=t.btoa,p=t.atob,h=t.ArrayBuffer,v=t.Uint8Array;for(r.fake=o.fake=!0;c--;)a.prototype[u[c]]=c+1;return l.createObjectURL||(w=t.URL={}),w.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof r?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):m?e+";base64,"+m(t.data):e+","+encodeURIComponent(t.data)):f?f.call(l,t):void 0},w.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&d&&d.call(l,t)},s.append=function(t){var n=this.data;if(v&&(t instanceof h||t instanceof v)){for(var s="",o=new v(t),u=0,c=o.length;c>u;u++)s+=String.fromCharCode(o[u]);n.push(s)}else if("Blob"===e(t)||"File"===e(t)){if(!i)throw new a("NOT_READABLE_ERR");var l=new i;n.push(l.readAsBinaryString(t))}else t instanceof r?"base64"===t.encoding&&p?n.push(p(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},s.getBlob=function(t){return arguments.length||(t=null),new r(this.data.join(""),t,"raw")},s.toString=function(){return"[object BlobBuilder]"},o.slice=function(t,e,n){var s=arguments.length;return 3>s&&(n=null),new r(this.data.slice(t,s>1?e:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},n}(t);return function(t,n){var r=n?n.type||"":"",s=new e;if(t)for(var o=0,i=t.length;i>o;o++)s.append(t[o]);return s.getBlob(r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);else self.URL=webkitURL;var r=r||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=t.URL||t.webkitURL||t,s=e.createElementNS("http://www.w3.org/1999/xhtml","a"),o=!t.externalHost&&"download"in s,i=t.webkitRequestFileSystem,a=t.requestFileSystem||i||t.mozRequestFileSystem,u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},c="application/octet-stream",l=0,f=[],d=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?r.revokeObjectURL(e):e.remove()}f.length=0},w=function(t,e,n){e=[].concat(e);for(var r=e.length;r--;){var s=t["on"+e[r]];if("function"==typeof s)try{s.call(t,n||t)}catch(o){u(o)}}},m=function(r,u){var d,m,p,h=this,v=r.type,y=!1,g=function(){var t=n().createObjectURL(r);return f.push(t),t},q=function(){w(h,"writestart progress write writeend".split(" "))},b=function(){(y||!d)&&(d=g(r)),m?m.location.href=d:window.open(d,"_blank"),h.readyState=h.DONE,q()},x=function(t){return function(){return h.readyState!==h.DONE?t.apply(this,arguments):void 0}},k={create:!0,exclusive:!1};if(h.readyState=h.INIT,u||(u="download"),o){d=g(r),e=t.document,s=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s.href=d,s.download=u;var _=e.createEvent("MouseEvents");return _.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),s.dispatchEvent(_),h.readyState=h.DONE,q(),void 0}return t.chrome&&v&&v!==c&&(p=r.slice||r.webkitSlice,r=p.call(r,0,r.size,c),y=!0),i&&"download"!==u&&(u+=".download"),(v===c||i)&&(m=t),a?(l+=r.size,a(t.TEMPORARY,l,x(function(t){t.root.getDirectory("saved",k,x(function(t){var e=function(){t.getFile(u,k,x(function(t){t.createWriter(x(function(e){e.onwriteend=function(e){m.location.href=t.toURL(),f.push(t),h.readyState=h.DONE,w(h,"writeend",e)},e.onerror=function(){var t=e.error;t.code!==t.ABORT_ERR&&b()},"writestart progress write abort".split(" ").forEach(function(t){e["on"+t]=h["on"+t]}),e.write(r),h.abort=function(){e.abort(),h.readyState=h.DONE},h.readyState=h.WRITING}),b)}),b)};t.getFile(u,{create:!1},x(function(t){t.remove(),e()}),x(function(t){t.code===t.NOT_FOUND_ERR?e():b()}))}),b)}),b),void 0):(b(),void 0)},p=m.prototype,h=function(t,e){return new m(t,e)};return p.abort=function(){var t=this;t.readyState=t.DONE,w(t,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,t.addEventListener("unload",d,!1),h.unload=function(){d(),t.removeEventListener("unload",d,!1)},h}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&(module.exports=r),void function(t,e){"object"==typeof module?module.exports=e():"function"==typeof define?define(e):t.adler32cs=e()}(this,function(){var t="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,e=null,n=function(){if(!t)return function(){return!1};try{var n=require("buffer");"function"==typeof n.Buffer&&(e=n.Buffer)}catch(r){}return function(t){return t instanceof ArrayBuffer||null!==e&&t instanceof e}}(),r=function(){return null!==e?function(t){return new e(t,"utf8").toString("binary")}:function(t){return unescape(encodeURIComponent(t))}}(),s=65521,o=function(t,e){for(var n=65535&t,r=t>>>16,o=0,i=e.length;i>o;o++)n=(n+(255&e.charCodeAt(o)))%s,r=(r+n)%s;return(r<<16|n)>>>0},i=function(t,e){for(var n=65535&t,r=t>>>16,o=0,i=e.length;i>o;o++)n=(n+e[o])%s,r=(r+n)%s;return(r<<16|n)>>>0},a={},u=a.Adler32=function(){var e=function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(t=null==t?1:+t))throw new Error("First arguments needs to be a finite number.");this.checksum=t>>>0},s=e.prototype={};return s.constructor=e,e.from=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");this.checksum=o(1,t.toString())}),e.fromUtf8=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");var n=r(t.toString());this.checksum=o(1,n)}),t&&(e.fromBuffer=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!n(t))throw new Error("First argument needs to be ArrayBuffer.");var r=new Uint8Array(t);return this.checksum=i(1,r)})),s.update=function(t){if(null==t)throw new Error("First argument needs to be a string.");return t=t.toString(),this.checksum=o(this.checksum,t)},s.updateUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=r(t.toString());return this.checksum=o(this.checksum,e)},t&&(s.updateBuffer=function(t){if(!n(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=i(this.checksum,e)}),s.clone=function(){return new u(this.checksum)},e}();return a.from=function(t){if(null==t)throw new Error("First argument needs to be a string.");return o(1,t.toString())},a.fromUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=r(t.toString());return o(1,e)},t&&(a.fromBuffer=function(t){if(!n(t))throw new Error("First argument need to be ArrayBuffer.");var e=new Uint8Array(t);return i(1,e)}),a});var s=function(){function t(){function t(t){var e,n,s,o,a,u,c=r.dyn_tree,l=r.stat_desc.static_tree,f=r.stat_desc.extra_bits,w=r.stat_desc.extra_base,m=r.stat_desc.max_length,p=0;for(o=0;i>=o;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;d>e;e++)n=t.heap[e],o=c[2*c[2*n+1]+1]+1,o>m&&(o=m,p++),c[2*n+1]=o,n>r.max_code||(t.bl_count[o]++,a=0,n>=w&&(a=f[n-w]),u=c[2*n],t.opt_len+=u*(o+a),l&&(t.static_len+=u*(l[2*n+1]+a)));if(0!==p){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,p-=2}while(p>0);for(o=m;0!==o;o--)for(n=t.bl_count[o];0!==n;)s=t.heap[--e],s>r.max_code||(c[2*s+1]!=o&&(t.opt_len+=(o-c[2*s+1])*c[2*s],c[2*s+1]=o),n--)}}function e(t,e){var n=0;do n|=1&t,t>>>=1,n<<=1;while(--e>0);return n>>>1}function n(t,n,r){var s,o,a,u=[],c=0;for(s=1;i>=s;s++)u[s]=c=c+r[s-1]<<1;for(o=0;n>=o;o++)a=t[2*o+1],0!==a&&(t[2*o]=e(u[a]++,a))}var r=this;r.build_tree=function(e){var s,o,i,a=r.dyn_tree,u=r.stat_desc.static_tree,c=r.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=d,s=0;c>s;s++)0!==a[2*s]?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):a[2*s+1]=0;for(;e.heap_len<2;)i=e.heap[++e.heap_len]=2>l?++l:0,a[2*i]=1,e.depth[i]=0,e.opt_len--,u&&(e.static_len-=u[2*i+1]);for(r.max_code=l,s=Math.floor(e.heap_len/2);s>=1;s--)e.pqdownheap(a,s);i=c;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],e.pqdownheap(a,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,a[2*i]=a[2*s]+a[2*o],e.depth[i]=Math.max(e.depth[s],e.depth[o])+1,a[2*s+1]=a[2*o+1]=i,e.heap[1]=i++,e.pqdownheap(a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],t(e),n(a,r.max_code,e.bl_count)}}function e(t,e,n,r,s){var o=this;o.static_tree=t,o.extra_bits=e,o.extra_base=n,o.elems=r,o.max_length=s}function n(t,e,n,r,s){var o=this;o.good_length=t,o.max_lazy=e,o.nice_length=n,o.max_chain=r,o.func=s}function r(t,e,n,r){var s=t[2*e],o=t[2*n];return o>s||s==o&&r[e]<=r[n]}function s(){function n(){var t;for(Ee=2*Se,Te[Pe-1]=0,t=0;Pe-1>t;t++)Te[t]=0;Ve=L[$e].max_lazy,Ye=L[$e].good_length,Ke=L[$e].nice_length,Ge=L[$e].max_chain,He=0,Ue=0,Je=0,Le=We=Z-1,De=0,je=0}function s(){var t;for(t=0;f>t;t++)Xe[2*t]=0;for(t=0;a>t;t++)Ze[2*t]=0;for(t=0;u>t;t++)tn[2*t]=0;Xe[2*w]=1,en.opt_len=en.static_len=0,un=ln=0}function o(){nn.dyn_tree=Xe,nn.stat_desc=e.static_l_desc,rn.dyn_tree=Ze,rn.stat_desc=e.static_d_desc,sn.dyn_tree=tn,sn.stat_desc=e.static_bl_desc,dn=0,wn=0,fn=8,s()}function i(t,e){var n,r,s=-1,o=t[1],i=0,a=7,u=4;for(0===o&&(a=138,u=3),t[2*(e+1)+1]=65535,n=0;e>=n;n++)r=o,o=t[2*(n+1)+1],++ii?tn[2*r]+=i:0!==r?(r!=s&&tn[2*r]++,tn[2*p]++):10>=i?tn[2*h]++:tn[2*v]++,i=0,s=r,0===o?(a=138,u=3):r==o?(a=6,u=3):(a=7,u=4))}function c(){var e;for(i(Xe,nn.max_code),i(Ze,rn.max_code),sn.build_tree(en),e=u-1;e>=3&&0===tn[2*t.bl_order[e]+1];e--);return en.opt_len+=3*(e+1)+5+5+4,e}function d(t){en.pending_buf[en.pending++]=t}function m(t){d(255&t),d(t>>>8&255)}function j(t){d(t>>8&255),d(255&t&255)}function ne(t,e){var n,r=e;wn>y-r?(n=t,dn|=n<>>y-wn,wn+=r-y):(dn|=t<=n;n++)if(r=o,o=t[2*(n+1)+1],!(++ii){do re(r,tn);while(0!==--i)}else 0!==r?(r!=s&&(re(r,tn),i--),re(p,tn),ne(i-3,2)):10>=i?(re(h,tn),ne(i-3,3)):(re(v,tn),ne(i-11,7));i=0,s=r,0===o?(a=138,u=3):r==o?(a=6,u=3):(a=7,u=4)}}function oe(e,n,r){var s;for(ne(e-257,5),ne(n-1,5),ne(r-4,4),s=0;r>s;s++)ne(tn[2*t.bl_order[s]+1],3);se(Xe,e-1),se(Ze,n-1)}function ie(){16==wn?(m(dn),dn=0,wn=0):wn>=8&&(d(255&dn),dn>>>=8,wn-=8)}function ae(){ne(K<<1,3),re(w,e.static_ltree),ie(),9>1+fn+10-wn&&(ne(K<<1,3),re(w,e.static_ltree),ie()),fn=7}function ue(e,n){var r,s,o;if(en.pending_buf[cn+2*un]=e>>>8&255,en.pending_buf[cn+2*un+1]=255&e,en.pending_buf[on+un]=255&n,un++,0===e?Xe[2*n]++:(ln++,e--,Xe[2*(t._length_code[n]+l+1)]++,Ze[2*t.d_code(e)]++),0===(8191&un)&&$e>2){for(r=8*un,s=He-Ue,o=0;a>o;o++)r+=Ze[2*o]*(5+t.extra_dbits[o]);if(r>>>=3,lna);re(w,e),fn=e[2*w+1]}function le(){wn>8?m(dn):wn>0&&d(255&dn),dn=0,wn=0}function fe(t,e,n){le(),fn=8,n&&(m(e),m(~e)),en.pending_buf.set(Re.subarray(t,t+e),en.pending),en.pending+=e}function de(t,e,n){ne((Y<<1)+(n?1:0),3),fe(t,e,!0)}function we(t,n,r){var o,i,a=0;$e>0?(nn.build_tree(en),rn.build_tree(en),a=c(),o=en.opt_len+3+7>>>3,i=en.static_len+3+7>>>3,o>=i&&(o=i)):o=i=n+5,o>=n+4&&-1!=t?de(t,n,r):i==o?(ne((K<<1)+(r?1:0),3),ce(e.static_ltree,e.static_dtree)):(ne((X<<1)+(r?1:0),3),oe(nn.max_code+1,rn.max_code+1,a+1),ce(Xe,Ze)),s(),r&&le()}function me(t){we(Ue>=0?Ue:-1,He-Ue,t),Ue=He,be.flush_pending()}function pe(){var t,e,n,r;do{if(r=Ee-Je-He,0===r&&0===He&&0===Je)r=Se;else if(-1==r)r--;else if(He>=Se+Se-ee){Re.set(Re.subarray(Se,Se+Se),0),Me-=Se,He-=Se,Ue-=Se,t=Pe,n=t;do e=65535&Te[--n],Te[n]=e>=Se?e-Se:0;while(0!==--t);t=Se,n=t;do e=65535&Fe[--n],Fe[n]=e>=Se?e-Se:0;while(0!==--t);r+=Se}if(0===be.avail_in)return;t=be.read_buf(Re,He+Je,r),Je+=t,Je>=Z&&(je=255&Re[He],je=(je<Je&&0!==be.avail_in)}function he(t){var e,n=65535;for(n>ke-5&&(n=ke-5);;){if(1>=Je){if(pe(),0===Je&&t==k)return D;if(0===Je)break}if(He+=Je,Je=0,e=Ue+n,(0===He||He>=e)&&(Je=He-e,He=e,me(!1),0===be.avail_out))return D;if(He-Ue>=Se-ee&&(me(!1),0===be.avail_out))return D}return me(t==S),0===be.avail_out?t==S?M:D:t==S?J:H}function ve(t){var e,n,r=Ge,s=He,o=We,i=He>Se-ee?He-(Se-ee):0,a=Ke,u=Ce,c=He+te,l=Re[s+o-1],f=Re[s+o];We>=Ye&&(r>>=2),a>Je&&(a=Je);do if(e=t,Re[e+o]==f&&Re[e+o-1]==l&&Re[e]==Re[s]&&Re[++e]==Re[s+1]){s+=2,e++;do;while(Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&Re[++s]==Re[++e]&&c>s);if(n=te-(c-s),s=c-te,n>o){if(Me=t,o=n,n>=a)break;l=Re[s+o-1],f=Re[s+o]}}while((t=65535&Fe[t&u])>i&&0!==--r);return Je>=o?o:Je}function ye(t){for(var e,n=0;;){if(ee>Je){if(pe(),ee>Je&&t==k)return D;if(0===Je)break}if(Je>=Z&&(je=(je<=(He-n&65535)&&Qe!=b&&(Le=ve(n)),Le>=Z)if(e=ue(He-Me,Le-Z),Je-=Le,Ve>=Le&&Je>=Z){Le--;do He++,je=(je<Je){if(pe(),ee>Je&&t==k)return D;if(0===Je)break}if(Je>=Z&&(je=(je<We&&Se-ee>=(He-r&65535)&&(Qe!=b&&(Le=ve(r)),5>=Le&&(Qe==q||Le==Z&&He-Me>4096)&&(Le=Z-1)),We>=Z&&We>=Le){n=He+Je-Z,e=ue(He-1-Ne,We-Z),Je-=We-1,We-=2;do++He<=n&&(je=(je<s||s>P||r!=Q||9>n||n>15||0>e||e>9||0>o||o>b?E:(t.dstate=en,Ae=n,Se=1<e||e>9||0>n||n>b?E:(L[$e].func!=L[e].func&&0!==t.total_in&&(r=t.deflate(_)),$e!=e&&($e=e,Ve=L[$e].max_lazy,Ye=L[$e].good_length,Ke=L[$e].nice_length,Ge=L[$e].max_chain),Qe=n,r)},en.deflateSetDictionary=function(t,e,n){var r,s=n,o=0;if(!e||xe!=G)return E;if(Z>s)return A;for(s>Se-ee&&(s=Se-ee,o=n-s),Re.set(e.subarray(o,o+s),0),He=s,Ue=s,je=255&Re[0],je=(je<=r;r++)je=(je<S||0>e)return E;if(!t.next_out||!t.next_in&&0!==t.avail_in||xe==$&&e!=S)return t.msg=N[R-E],E;if(0===t.avail_out)return t.msg=N[R-T],T;if(be=t,o=ze,ze=e,xe==G&&(r=Q+(Ae-8<<4)<<8,s=($e-1&255)>>1,s>3&&(s=3),r|=s<<6,0!==He&&(r|=W),r+=31-r%31,xe=V,j(r)),0!==en.pending){if(be.flush_pending(),0===be.avail_out)return ze=-1,A}else if(0===be.avail_in&&o>=e&&e!=S)return be.msg=N[R-T],T;if(xe==$&&0!==be.avail_in)return t.msg=N[R-T],T;if(0!==be.avail_in||0!==Je||e!=k&&xe!=$){switch(i=-1,L[$e].func){case I:i=he(e);break;case B:i=ye(e);break;case U:i=ge(e)}if((i==M||i==J)&&(xe=$),i==D||i==M)return 0===be.avail_out&&(ze=-1),A;if(i==H){if(e==_)ae();else if(de(0,0,!1),e==z)for(n=0;Pe>n;n++)Te[n]=0;if(be.flush_pending(),0===be.avail_out)return ze=-1,A}}return e!=S?A:C}}function o(){var t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}var i=15,a=30,u=19,c=29,l=256,f=l+1+c,d=2*f+1,w=256,m=7,p=16,h=17,v=18,y=16,g=-1,q=1,b=2,x=0,k=0,_=1,z=3,S=4,A=0,C=1,R=2,E=-2,F=-3,T=-5,j=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];t._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],t.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],t.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],t.d_code=function(t){return 256>t?j[t]:j[256+(t>>>7)]},t.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],t.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],t.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],t.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],e.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],e.static_l_desc=new e(e.static_ltree,t.extra_lbits,l+1,f,i),e.static_d_desc=new e(e.static_dtree,t.extra_dbits,0,a,i),e.static_bl_desc=new e(null,t.extra_blbits,0,u,m);var P=9,O=8,I=0,B=1,U=2,L=[new n(0,0,0,0,I),new n(4,4,8,4,B),new n(4,5,16,8,B),new n(4,6,32,32,B),new n(4,4,16,16,U),new n(8,16,32,32,U),new n(8,16,128,128,U),new n(8,32,128,256,U),new n(32,128,258,1024,U),new n(32,258,258,4096,U)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],D=0,H=1,M=2,J=3,W=32,G=42,V=113,$=666,Q=8,Y=0,K=1,X=2,Z=3,te=258,ee=te+Z+1;return o.prototype={deflateInit:function(t,e){var n=this;return n.dstate=new s,e||(e=i),n.dstate.deflateInit(n,t,e)},deflate:function(t){var e=this;return e.dstate?e.dstate.deflate(e,t):E},deflateEnd:function(){var t=this;if(!t.dstate)return E;var e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){var n=this;return n.dstate?n.dstate.deflateParams(n,t,e):E},deflateSetDictionary:function(t,e){var n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):E},read_buf:function(t,e,n){var r=this,s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),e),r.next_in_index+=s,r.total_in+=s,s)},flush_pending:function(){var t=this,e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}},function(t){var e=this,n=new o,r=512,s=k,i=new Uint8Array(r);"undefined"==typeof t&&(t=g),n.deflateInit(t),n.next_out=i,e.append=function(t,e){var o,a,u=[],c=0,l=0,f=0;if(t.length){n.next_in_index=0,n.next_in=t,n.avail_in=t.length;do{if(n.next_out_index=0,n.avail_out=r,o=n.deflate(s),o!=A)throw"deflating: "+n.msg;n.next_out_index&&(n.next_out_index==r?u.push(new Uint8Array(i)):u.push(new Uint8Array(i.subarray(0,n.next_out_index)))),f+=n.next_out_index,e&&n.next_in_index>0&&n.next_in_index!=c&&(e(n.next_in_index),c=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return a=new Uint8Array(f),u.forEach(function(t){a.set(t,l),l+=t.length}),a}},e.flush=function(){var t,e,s=[],o=0,a=0;do{if(n.next_out_index=0,n.avail_out=r,t=n.deflate(S),t!=C&&t!=A)throw"deflating: "+n.msg;r-n.avail_out>0&&s.push(new Uint8Array(i.subarray(0,n.next_out_index))),a+=n.next_out_index}while(n.avail_in>0||0===n.avail_out);return n.deflateEnd(),e=new Uint8Array(a),s.forEach(function(t){e.set(t,o),o+=t.length}),e}}}(this);!function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";"undefined"==typeof t.btoa&&(t.btoa=function(t){var n,r,s,o,i,a,u,c,l=0,f=0,d="",w=[];if(!t)return t;do n=t.charCodeAt(l++),r=t.charCodeAt(l++),s=t.charCodeAt(l++),c=n<<16|r<<8|s,o=c>>18&63,i=c>>12&63,a=c>>6&63,u=63&c,w[f++]=e.charAt(o)+e.charAt(i)+e.charAt(a)+e.charAt(u);while(l>16&255,r=c>>8&255,s=255&c,w[f++]=64==a?String.fromCharCode(n):64==u?String.fromCharCode(n,r):String.fromCharCode(n,r,s);while(l>>0,r=new Array(n),s=arguments.length>1?arguments[1]:void 0,o=0;n>o;o++)o in e&&(r[o]=t.call(s,e[o],o,e));return r}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){"use strict";if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=Object(this),r=n.length>>>0,s=0;r>s;s++)s in n&&t.call(e,n[s],s,n)}),Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(s){if("object"!=typeof s&&("function"!=typeof s||null===s))throw new TypeError;var o,i,a=[];for(o in s)t.call(s,o)&&a.push(o);if(e)for(i=0;r>i;i++)t.call(s,n[i])&&a.push(n[i]);return a}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")})}(self);var o=function(t){"use strict";function e(e){var n={};this.subscribe=function(t,e,r){if("function"!=typeof e)return!1;n.hasOwnProperty(t)||(n[t]={});var s=Math.random().toString(35);return n[t][s]=[e,!!r],s},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],!0;return!1},this.publish=function(r){if(n.hasOwnProperty(r)){var s=Array.prototype.slice.call(arguments,1),o=[];for(var i in n[r]){var a=n[r][i];try{a[0].apply(e,s)}catch(u){t.console&&console.error("jsPDF PubSub Error",u.message,u)}a[1]&&o.push(i)}o.length&&o.forEach(this.unsubscribe)}}}function o(u,c,l,f){var d={};"object"==typeof u&&(d=u,u=d.orientation,c=d.unit||c,l=d.format||l,f=d.compress||d.compressPdf||f),c=c||"mm",l=l||"a4",u=(""+(u||"P")).toLowerCase();var w,m,p,h,v,y=(""+l).toLowerCase(),g=!!f&&"function"==typeof Uint8Array,q=d.textColor||"0 g",b=d.drawColor||"0 G",x=d.fontSize||16,k=d.lineHeight||1.15,_=d.lineWidth||.200025,z=2,S=!1,A=[],C={},R={},E=0,F=[],T=[],j=0,P=0,O=0,I={title:"",subject:"",author:"",keywords:"",creator:""},B={},U=new e(B),L=function(t){return t.toFixed(2)},N=function(t){return t.toFixed(3)},D=function(t){return("0"+parseInt(t)).slice(-2)},H=function(t){S?F[E].push(t):(O+=t.length+1,T.push(t))},M=function(){return z++,A[z]=O,H(z+" 0 obj"),z},J=function(t){H("stream"),H(t),H("endstream")},W=function(){var t,e,n,r,o,i,a=h*m,u=v*m;for(t=1;E>=t;t++){if(M(),H("<>"),H("endobj"),e=F[t].join("\n"),M(),g){for(n=[],r=e.length;r--;)n[r]=e.charCodeAt(r);i=adler32cs.from(e),o=new s(6),o.append(new Uint8Array(n)),e=o.flush(),n=[new Uint8Array([120,156]),new Uint8Array(e),new Uint8Array([255&i,i>>8&255,i>>16&255,i>>24&255])],e="";for(r in n)n.hasOwnProperty(r)&&(e+=String.fromCharCode.apply(null,n[r]));H("<>")}else H("<>");J(e),H("endobj")}A[1]=O,H("1 0 obj"),H("<r;r++)c+=3+2*r+" 0 R ";H(c+"]"),H("/Count "+E),H("/MediaBox [0 0 "+L(a)+" "+L(u)+"]"),H(">>"),H("endobj")},G=function(t){t.objectNumber=M(),H("<>"),H("endobj")},V=function(){for(var t in C)C.hasOwnProperty(t)&&G(C[t])},$=function(){U.publish("putXobjectDict")},Q=function(){H("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),H("/Font <<");for(var t in C)C.hasOwnProperty(t)&&H("/"+t+" "+C[t].objectNumber+" 0 R");H(">>"),H("/XObject <<"),$(),H(">>")},Y=function(){V(),U.publish("putResources"),A[2]=O,H("2 0 obj"),H("<<"),Q(),H(">>"),H("endobj"),U.publish("postPutResources")},K=function(t,e,n){R.hasOwnProperty(e)||(R[e]={}),R[e][n]=t},X=function(t,e,n,r){var s="F"+(Object.keys(C).length+1).toString(10),o=C[s]={id:s,PostScriptName:t,fontName:e,fontStyle:n,encoding:r,metadata:{}};return K(s,e,n),U.publish("addFont",o),s},Z=function(){for(var t="helvetica",e="times",n="courier",r="normal",s="bold",o="italic",i="bolditalic",a="StandardEncoding",u=[["Helvetica",t,r],["Helvetica-Bold",t,s],["Helvetica-Oblique",t,o],["Helvetica-BoldOblique",t,i],["Courier",n,r],["Courier-Bold",n,s],["Courier-Oblique",n,o],["Courier-BoldOblique",n,i],["Times-Roman",e,r],["Times-Bold",e,s],["Times-Italic",e,o],["Times-BoldItalic",e,i]],c=0,l=u.length;l>c;c++){var f=X(u[c][0],u[c][1],u[c][2],a),d=u[c][0].split("-");K(f,d[0],d[1]||"")}U.publish("addFonts",{fonts:C,dictionary:R})},te=function(e){return e.foo=function(){try{return e.apply(this,arguments)}catch(n){var r="Error in function "+this+"."+e.name+": "+n.message;if(!t.console)throw new Error(r);var s=(n.stack||(new Error).stack||"").split("\n");console.log(r,s.map(function(t){return t.replace(/^(.*@).+\//,"$1")}).join("\n"),n),t.alert&&alert(r)}},e.foo.bar=e,e.foo},ee=function(t,e){var n,r,s,o,i,a,u,c,l;if(e=e||{},s=e.sourceEncoding||"Unicode",i=e.outputEncoding,(e.autoencode||i)&&C[w].metadata&&C[w].metadata[s]&&C[w].metadata[s].encoding&&(o=C[w].metadata[s].encoding,!i&&C[w].encoding&&(i=C[w].encoding),!i&&o.codePages&&(i=o.codePages[0]),"string"==typeof i&&(i=o[i]),i)){for(u=!1,a=[],n=0,r=t.length;r>n;n++)c=i[t.charCodeAt(n)],c?a.push(String.fromCharCode(c)):a.push(t[n]),a[n].charCodeAt(0)>>8&&(u=!0);t=a.join("")}for(n=t.length;void 0===u&&0!==n;)t.charCodeAt(n-1)>>8&&(u=!0),n--;if(!u)return t;for(a=e.noBOM?[]:[254,255],n=0,r=t.length;r>n;n++){if(c=t.charCodeAt(n),l=c>>8,l>>8)throw new Error("Character at position "+n.toString(10)+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(l),a.push(c-(l<<8))}return String.fromCharCode.apply(void 0,a) },ne=function(t,e){return ee(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},re=function(){H("/Producer (jsPDF "+o.version+")");for(var t in I)I.hasOwnProperty(t)&&H("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+ne(I[t])+")");var e=new Date;H(["/CreationDate (D:",e.getFullYear(),D(e.getMonth()+1),D(e.getDate()),D(e.getHours()),D(e.getMinutes()),D(e.getSeconds()),")"].join(""))},se=function(){H("/Type /Catalog"),H("/Pages 1 0 R"),H("/OpenAction [3 0 R /FitH null]"),H("/PageLayout /OneColumn"),U.publish("putCatalog")},oe=function(){H("/Size "+(z+1)),H("/Root "+z+" 0 R"),H("/Info "+(z-1)+" 0 R")},ie=function(){E++,S=!0,F[E]=[]},ae=function(){ie(),H(L(_*m)+" w"),H(b),0!==j&&H(j.toString(10)+" J"),0!==P&&H(P.toString(10)+" j"),U.publish("addPage",{pageNumber:E})},ue=function(t,e){var n;t=void 0!==t?t:C[w].fontName,e=void 0!==e?e:C[w].fontStyle;try{n=R[t][e]}catch(r){}if(!n)throw new Error("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts.");return n},ce=function(){S=!1,z=2,T=[],A=[],H("%PDF-"+i),W(),Y(),M(),H("<<"),re(),H(">>"),H("endobj"),M(),H("<<"),se(),H(">>"),H("endobj");var t,e=O,n="0000000000";for(H("xref"),H("0 "+(z+1)),H(n+" 65535 f "),t=1;z>=t;t++)H((n+A[t]).slice(-10)+" 00000 n ");return H("trailer"),H("<<"),oe(),H(">>"),H("startxref"),H(e),H("%%EOF"),S=!0,T.join("\n")},le=function(t){var e="S";return"F"===t?e="f":("FD"===t||"DF"===t)&&(e="B"),e},fe=function(){for(var t=ce(),e=t.length,r=new ArrayBuffer(e),s=new Uint8Array(r);e--;)s[e]=t.charCodeAt(e);return new n([r],{type:"application/pdf"})},de=te(function(e,n){switch(e){case void 0:return ce();case"save":if(navigator.getUserMedia&&(void 0===t.URL||void 0===t.URL.createObjectURL))return B.output("dataurlnewwindow");r(fe(),n),"function"==typeof r.unload&&r.unload();break;case"blob":return fe();case"datauristring":case"dataurlstring":return"data:application/pdf;base64,"+btoa(ce());case"datauri":case"dataurl":t.document.location.href="data:application/pdf;base64,"+btoa(ce());break;case"dataurlnewwindow":t.open("data:application/pdf;base64,"+btoa(ce()));break;default:throw new Error('Output type "'+e+'" is not supported.')}});if("pt"===c)m=1;else if("mm"===c)m=72/25.4;else if("cm"===c)m=72/2.54;else{if("in"!==c)throw"Invalid unit: "+c;m=72}if(a.hasOwnProperty(y))v=a[y][1]/m,h=a[y][0]/m;else try{v=l[1],h=l[0]}catch(we){throw new Error("Invalid format: "+l)}if("p"===u||"portrait"===u)u="p",h>v&&(p=h,h=v,v=p);else{if("l"!==u&&"landscape"!==u)throw"Invalid orientation: "+u;u="l",v>h&&(p=h,h=v,v=p)}B.internal={pdfEscape:ne,getStyle:le,getFont:function(){return C[ue.apply(B,arguments)]},getFontSize:function(){return x},getLineHeight:function(){return x*k},write:function(t){H(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return L(t*m)},getVerticalCoordinateString:function(t){return L((v-t)*m)},collections:{},newObject:M,putStream:J,events:U,scaleFactor:m,pageSize:{width:h,height:v},output:function(t,e){return de(t,e)},getNumberOfPages:function(){return F.length-1},pages:F},B.addPage=function(){return ae(),this},B.text=function(t,e,n,r,s){"number"==typeof t&&(p=n,n=e,e=t,t=p),"string"==typeof t&&t.match(/[\n\r]/)&&(t=t.split(/\r\n|\r|\n/g)),"number"==typeof r&&(s=r,r=null);var o="",i="Td";if(s){s*=Math.PI/180;var a=Math.cos(s),u=Math.sin(s);o=[L(a),L(u),L(-1*u),L(a),""].join(" "),i="Tm"}if(r=r||{},"noBOM"in r||(r.noBOM=!0),"autoencode"in r||(r.autoencode=!0),"string"==typeof t)t=ne(t,r);else{if(!(t instanceof Array))throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');for(var c=t.concat(),l=[],f=c.length;f--;)l.push(ne(c.shift(),r));t=l.join(") Tj\nT* (")}return H("BT\n/"+w+" "+x+" Tf\n"+x*k+" TL\n"+q+"\n"+o+L(e*m)+" "+L((v-n)*m)+" "+i+"\n("+t+") Tj\nET"),this},B.line=function(t,e,n,r){return H(L(t*m)+" "+L((v-e)*m)+" m "+L(n*m)+" "+L((v-r)*m)+" l S"),this},B.lines=function(t,e,n,r,s,o){var i,a,u,c,l,f,d,w,h,y,g;for("number"==typeof t&&(p=n,n=e,e=t,t=p),r=r||[1,1],H(N(e*m)+" "+N((v-n)*m)+" m "),i=r[0],a=r[1],c=t.length,y=e,g=n,u=0;c>u;u++)l=t[u],2===l.length?(y=l[0]*i+y,g=l[1]*a+g,H(N(y*m)+" "+N((v-g)*m)+" l")):(f=l[0]*i+y,d=l[1]*a+g,w=l[2]*i+y,h=l[3]*a+g,y=l[4]*i+y,g=l[5]*a+g,H(N(f*m)+" "+N((v-d)*m)+" "+N(w*m)+" "+N((v-h)*m)+" "+N(y*m)+" "+N((v-g)*m)+" c"));return o&&H(" h"),s&&H(le(s)),this},B.rect=function(t,e,n,r,s){var o=le(s);return H([L(t*m),L((v-e)*m),L(n*m),L(-r*m),"re",o].join(" ")),this},B.triangle=function(t,e,n,r,s,o,i){return this.lines([[n-t,r-e],[s-n,o-r],[t-s,e-o]],t,e,[1,1],i,!0),this},B.roundedRect=function(t,e,n,r,s,o,i){var a=4/3*(Math.SQRT2-1);return this.lines([[n-2*s,0],[s*a,0,s,o-o*a,s,o],[0,r-2*o],[0,o*a,-(s*a),o,-s,o],[-n+2*s,0],[-(s*a),0,-s,-(o*a),-s,-o],[0,-r+2*o],[0,-(o*a),s*a,-o,s,-o]],t+s,e,[1,1],i),this},B.ellipse=function(t,e,n,r,s){var o=le(s),i=4/3*(Math.SQRT2-1)*n,a=4/3*(Math.SQRT2-1)*r;return H([L((t+n)*m),L((v-e)*m),"m",L((t+n)*m),L((v-(e-a))*m),L((t+i)*m),L((v-(e-r))*m),L(t*m),L((v-(e-r))*m),"c"].join(" ")),H([L((t-i)*m),L((v-(e-r))*m),L((t-n)*m),L((v-(e-a))*m),L((t-n)*m),L((v-e)*m),"c"].join(" ")),H([L((t-n)*m),L((v-(e+a))*m),L((t-i)*m),L((v-(e+r))*m),L(t*m),L((v-(e+r))*m),"c"].join(" ")),H([L((t+i)*m),L((v-(e+r))*m),L((t+n)*m),L((v-(e+a))*m),L((t+n)*m),L((v-e)*m),"c",o].join(" ")),this},B.circle=function(t,e,n,r){return this.ellipse(t,e,n,n,r)},B.setProperties=function(t){for(var e in I)I.hasOwnProperty(e)&&t[e]&&(I[e]=t[e]);return this},B.setFontSize=function(t){return x=t,this},B.setFont=function(t,e){return w=ue(t,e),this},B.setFontStyle=B.setFontType=function(t){return w=ue(void 0,t),this},B.getFontList=function(){var t,e,n,r={};for(t in R)if(R.hasOwnProperty(t)){r[t]=n=[];for(e in R[t])R[t].hasOwnProperty(e)&&n.push(e)}return r},B.setLineWidth=function(t){return H((t*m).toFixed(2)+" w"),this},B.setDrawColor=function(t,e,n,r){var s;return s=void 0===e||void 0===r&&t===e===n?"string"==typeof t?t+" G":L(t/255)+" G":void 0===r?"string"==typeof t?[t,e,n,"RG"].join(" "):[L(t/255),L(e/255),L(n/255),"RG"].join(" "):"string"==typeof t?[t,e,n,r,"K"].join(" "):[L(t),L(e),L(n),L(r),"K"].join(" "),H(s),this},B.setFillColor=function(t,e,n,r){var s;return s=void 0===e||void 0===r&&t===e===n?"string"==typeof t?t+" g":L(t/255)+" g":void 0===r?"string"==typeof t?[t,e,n,"rg"].join(" "):[L(t/255),L(e/255),L(n/255),"rg"].join(" "):"string"==typeof t?[t,e,n,r,"k"].join(" "):[L(t),L(e),L(n),L(r),"k"].join(" "),H(s),this},B.setTextColor=function(t,e,n){if("string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t)){var r=parseInt(t.substr(1),16);t=r>>16&255,e=r>>8&255,n=255&r}return q=0===t&&0===e&&0===n||"undefined"==typeof e?N(t/255)+" g":[N(t/255),N(e/255),N(n/255),"rg"].join(" "),this},B.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},B.setLineCap=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return j=e,H(e.toString(10)+" J"),this},B.setLineJoin=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return P=e,H(e.toString(10)+" j"),this},B.output=de,B.save=function(t){B.output("save",t)};for(var me in o.API)o.API.hasOwnProperty(me)&&("events"===me&&o.API.events.length?!function(t,e){var n,r,s;for(s=e.length-1;-1!==s;s--)n=e[s][0],r=e[s][1],t.subscribe.apply(t,[n].concat("function"==typeof r?[r]:r))}(U,o.API.events):B[me]=o.API[me]);return Z(),w="F1",ae(),U.publish("initialized"),B}var i="1.3",a={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224]};o.API={events:[]},o.version="1.0.0-trunk 2014-03-10T05:30";var u={jsPDF:o};return"object"==typeof module?module.exports=u:"function"==typeof define?define(function(){return u}):t.jsPDF=o,o}(self);!function(t){"use strict";var e="addImage_",n=function(t){var e,n;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary jpeg file");for(var r=256*t.charCodeAt(4)+t.charCodeAt(5),s=4,o=t.length;o>s;){if(s+=r,255!==t.charCodeAt(s))throw new Error("getJpegSize could not find the size of the image");if(192===t.charCodeAt(s+1)||193===t.charCodeAt(s+1)||194===t.charCodeAt(s+1)||195===t.charCodeAt(s+1)||196===t.charCodeAt(s+1)||197===t.charCodeAt(s+1)||198===t.charCodeAt(s+1)||199===t.charCodeAt(s+1))return n=256*t.charCodeAt(s+5)+t.charCodeAt(s+6),e=256*t.charCodeAt(s+7)+t.charCodeAt(s+8),[e,n];s+=2,r=256*t.charCodeAt(s)+t.charCodeAt(s+1)}},r=function(t){var e=this.internal.newObject(),n=this.internal.write,r=this.internal.putStream;if(t.n=e,n("<>"),"trns"in t&&t.trns.constructor==Array)for(var s="",o=0;o>"),r(t.data),n("endobj")},s=function(){var t=this.internal.collections[e+"images"];for(var n in t)r.call(this,t[n])},o=function(){var t,n=this.internal.collections[e+"images"],r=this.internal.write;for(var s in n)t=n[s],r("/I"+t.i,t.n,"0","R")};t.addImage=function(t,r,i,a,u,c,l){var f,d=this.internal.collections[e+"images"];if("number"==typeof r){var w=c;c=u,u=a,a=i,i=r,r=w||"JPEG"}if("string"==typeof t)if(255!==t.charCodeAt(0)&&"data:"!==t.substr(0,5)){if(d)for(var m in d)if(t===d[m].alias){f=d[m];break}}else"data:image/jpg"===t.substr(0,14)&&(t=t.replace("data:image/jpg","data:image/jpeg"));if("object"==typeof t&&1===t.nodeType){var p=document.createElement("canvas");p.width=t.clientWidth||t.width,p.height=t.clientHeight||t.height;var h=p.getContext("2d");if(!h)throw"addImage requires canvas to be supported by browser.";h.drawImage(t,0,0,p.width,p.height),t=p.toDataURL("image/jpeg"),r="JPEG"}if("JPEG"!==r.toUpperCase())throw new Error("addImage currently only supports format 'JPEG', not '"+r+"'");var v,y=this.internal.getCoordinateString,g=this.internal.getVerticalCoordinateString;"data:image/jpeg;base64,"===t.substring(0,23)&&(t=atob(t.replace("data:image/jpeg;base64,",""))),d?v=Object.keys?Object.keys(d).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(d):(v=0,this.internal.collections[e+"images"]=d={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",o));var q=f||function(e){return d[v]={alias:l,w:e[0],h:e[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:v,data:t}}(n(t));return u||c||(u=-96,c=-96),0>u&&(u=-1*q.w*72/u/this.internal.scaleFactor),0>c&&(c=-1*q.h*72/c/this.internal.scaleFactor),0===u&&(u=c*q.w/q.h),0===c&&(c=u*q.h/q.w),this.internal.write("q",y(u),"0 0",y(c),y(i),g(a+c),"cm /I"+q.i,"Do Q"),this}}(o.API),function(t){"use strict";t.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this}}(o.API),function(t){"use strict";var e,n,r,s,o=3,i=13,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,c=function(t,e,n,r,s){a={x:t,y:e,w:n,h:r,ln:s}},l=function(){return a};t.setHeaderFunction=function(t){s=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,n=this.table_font_size||this.internal.getFontSize(),r=this.internal.getFont().fontStyle;var s,o,i=19.049976/25.4;return o=document.createElement("font"),o.id="jsPDFCell",o.style.fontStyle=r,o.style.fontName=e,o.style.fontSize=n+"pt",o.innerText=t,document.body.appendChild(o),s={w:(o.offsetWidth+1)*i,h:(o.offsetHeight+1)*i},document.body.removeChild(o),s},t.cellAddPage=function(){this.addPage(),c(this.margins.left,this.margins.top,void 0,void 0),u+=1},t.cellInitialize=function(){a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1},t.cell=function(t,e,n,r,s,a,u){var f=l();if(void 0!==f.ln&&(f.ln===a?(t=f.x+f.w,e=f.y):(f.y+f.h+r+i>=this.internal.pageSize.height-this.margins.bottom&&(this.cellAddPage(),this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(a,!0)),e=l().y+l().h)),void 0!==s[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===u){if(s instanceof Array)for(var d=0;dn;n+=1)s=t[n],e?-1===e(o,s)&&(o=s):s>o&&(o=s);return o},t.table=function(e,n,r,s,o){if(!r)throw"No data for PDF table";var i,c,l,f,d,w,m,p,h,v,y=[],g=[],q={},b={},x=[],k=[],_=!1,z=!0,S=12,A={left:0,top:0,bottom:0,width:this.internal.pageSize.width};if(o&&(o.autoSize===!0&&(_=!0),o.printHeaders===!1&&(z=!1),o.fontSize&&(S=o.fontSize),o.margins&&(A=o.margins)),this.lnMod=0,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,this.printHeaders=z,this.margins=A,this.setFontSize(S),this.table_font_size=S,void 0===s||null===s)y=Object.keys(r[0]);else if(s[0]&&"string"!=typeof s[0]){var C=19.049976/25.4;for(c=0,l=s.length;l>c;c+=1)i=s[c],y.push(i.name),g.push(i.prompt),b[i.name]=i.width*C}else y=s;if(_)for(v=function(t){return t[i]},c=0,l=y.length;l>c;c+=1){for(i=y[c],q[i]=r.map(v),x.push(this.getTextDimensions(g[c]||i).w),w=q[i],m=0,f=w.length;f>m;m+=1)d=w[m],x.push(this.getTextDimensions(d).w);b[i]=t.arrayMax(x)}if(z){var R=this.calculateLineHeight(y,b,g.length?g:y);for(c=0,l=y.length;l>c;c+=1)i=y[c],k.push([e,n,b[i],R,String(g.length?g[c]:i)]);this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}for(c=0,l=r.length;l>c;c+=1){var R;for(p=r[c],R=this.calculateLineHeight(y,b,p),m=0,h=y.length;h>m;m+=1)i=y[m],this.cell(e,n,b[i],R,p[i],c+2,i.align)}return this.lastCellPos=a,this.table_x=e,this.table_y=n,this},t.calculateLineHeight=function(t,e,n){for(var r,s=0,i=0;is&&(s=a)}return s},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,r,o,i;if(this.printingHeaderRow=!0,void 0!==s){var a=s(this,u);c(a[0],a[1],a[2],a[3],-1)}this.setFontStyle("bold");var l=[];for(o=0,i=this.tableHeaderRow.length;i>o;o+=1)this.setFillColor(200,200,200),n=this.tableHeaderRow[o],e&&(n[1]=this.margins.top,l.push(n)),r=[].concat(n),this.cell.apply(this,r.concat(t));l.length>0&&this.setTableHeaderRow(l),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(o.API),function(t){var e,n,r,s,o,i,a,u,c,l,f,d,w,m,p;i=function(t){var e,n,r,s,o,i,a;for(n=0,r=t.length,e=void 0,s=!1,i=!1;!s&&n!==r;)e=t[n]=t[n].trimLeft(),e&&(s=!0),n++;for(n=r-1;r&&!i&&-1!==n;)e=t[n]=t[n].trimRight(),e&&(i=!0),n--;for(o=/\s+$/g,a=!0,n=0;n!==r;)e=t[n].replace(/\s+/g," "),a&&(e=e.trimLeft()),e&&(a=o.test(e)),t[n]=e,n++;return t},a=function(t,e,n,r){return this.pdf=t,this.x=e,this.y=n,this.settings=r,this.init(),this},u=function(t){var e,r,s;for(e=void 0,s=t.split(","),r=s.shift();!e&&r;)e=n[r.trim().toLowerCase()],r=s.shift();return e},c=function(t){var e,n,r;return n=void 0,e=16,(r=l[t])?r:(r={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}],r!==n?l[t]=r/e:(r=parseFloat(t))?l[t]=r/e:(r=t.match(/([\d\.]+)(px)/),l[t]=3===r.length?parseFloat(r[1])/e:1))},o=function(t){var e,n,o;return e=$(t),n={},o=void 0,n["font-family"]=u(e.css("font-family"))||"times",n["font-style"]=r[e.css("font-style")]||"normal",o=s[e.css("font-weight")]||"normal","bold"===o&&(n["font-style"]="normal"===n["font-style"]?o:o+n["font-style"]),n["font-size"]=c(e.css("font-size"))||1,n["line-height"]=c(e.css("line-height"))||1,n.display="inline"===e.css("display")?"inline":"block","block"===n.display&&(n["margin-top"]=c(e.css("margin-top"))||0,n["margin-bottom"]=c(e.css("margin-bottom"))||0,n["padding-top"]=c(e.css("padding-top"))||0,n["padding-bottom"]=c(e.css("padding-bottom"))||0,n["margin-left"]=c(e.css("margin-left"))||0,n["margin-right"]=c(e.css("margin-right"))||0,n["padding-left"]=c(e.css("padding-left"))||0,n["padding-right"]=c(e.css("padding-right"))||0),n},f=function(t,e,n){var r,s,o,i,a;if(o=!1,s=void 0,i=void 0,a=void 0,r=n["#"+t.id])if("function"==typeof r)o=r(t,e);else for(s=0,i=r.length;!o&&s!==i;)o=r[s](t,e),s++;if(r=n[t.nodeName],!o&&r)if("function"==typeof r)o=r(t,e);else for(s=0,i=r.length;!o&&s!==i;)o=r[s](t,e),s++;return o},p=function(t,e){var n,r,s,o,i,a,u,c;for(n=[],r=[],s=0,c=t.clientWidth;su;)s=i[u],"object"==typeof s&&(8===s.nodeType&&"#comment"===s.nodeName?s.textContent.match("ADD_PAGE")&&(n.pdf.addPage(),n.y=n.pdf.margins_doc.top):1!==s.nodeType||h[s.nodeName]?3===s.nodeType?n.addText(s.nodeValue,a):"string"==typeof s&&n.addText(s,a):"IMG"===s.nodeName&&d[s.getAttribute("src")]?(n.pdf.internal.pageSize.height-n.pdf.margins_doc.bottomn.pdf.margins_doc.top&&(n.pdf.addPage(),n.y=n.pdf.margins_doc.top),n.pdf.addImage(d[s.getAttribute("src")],n.x,n.y,s.width,s.height),n.y+=s.height):"TABLE"===s.nodeName?(m=p(s,n),n.y+=10,n.pdf.table(n.x,n.y,m.rows,m.headers,{autoSize:!1,printHeaders:!0,margins:n.pdf.margins_doc}),n.y=n.pdf.lastCellPos.y+n.pdf.lastCellPos.h+20):f(s,n,r)||e(s,n,r)),u++;return c?n.setBlockBoundary():void 0},d={},w=function(t,n,r,s){function o(){e(t,n,r),s(n.dispose())}function i(t){if(t){var e=new Image;++c,e.crossOrigin="",e.onerror=e.onload=function(){e.complete&&e.width+e.height&&(d[t]=d[t]||e),--c||o()},e.src=t}}for(var a=t.getElementsByTagName("img"),u=a.length,c=0;u--;)i(a[u].getAttribute("src"));return s=s||function(){},c||o()},m=function(t,e,n,r,s,o){var i,u;return"string"==typeof e&&(e=function(t){var e,n,r,s;return r="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),s="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n=$('