@dbp-topics/formalize
Version:
[GitLab Repository](https://gitlab.tugraz.at/dbp/formalize/formalize) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/formalize) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/formalize/) | [Formalize Bundle](https://gitlab.tugraz.at/dbp/f
115 lines • 360 kB
JavaScript
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/common: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* event-target-shim: MIT
* @dbp-toolkit/notification: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* path-to-regexp: MIT
* universal-router: MIT
* generateUrls: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
* @tugraz/web-components: LGPL-2.1-or-later
* @babel/runtime: MIT
* i18next: MIT
* @lit/reactive-element: BSD-3-Clause
* lit-html: BSD-3-Clause
* lit-element: BSD-3-Clause
* @open-wc/dedupe-mixin: MIT
* @open-wc/scoped-elements: MIT
* tabulator-tables: MIT
* xss: MIT
* cssfilter: MIT
* xlsx: Apache-2.0
* fflate: MIT
* jspdf: MIT
*/
import{_ as t}from"./notification.a9c25969.es.js";var e=Uint8Array,r=Uint16Array,n=Uint32Array,i=new e([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,0,0,0]),a=new e([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,0,0]),o=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new r(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var o=new n(i[30]);for(a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return[i,o]},u=s(i,2),c=u[0],h=u[1];c[28]=258,h[258]=28;for(var l=s(a,0),f=l[0],d=l[1],p=new r(32768),g=0;g<32768;++g){var m=(43690&g)>>>1|(21845&g)<<1;m=(61680&(m=(52428&m)>>>2|(13107&m)<<2))>>>4|(3855&m)<<4,p[g]=((65280&m)>>>8|(255&m)<<8)>>>1}var v=function(t,e,n){for(var i=t.length,a=0,o=new r(e);a<i;++a)++o[t[a]-1];var s,u=new r(e);for(a=0;a<e;++a)u[a]=u[a-1]+o[a-1]<<1;if(n){s=new r(1<<e);var c=15-e;for(a=0;a<i;++a)if(t[a])for(var h=a<<4|t[a],l=e-t[a],f=u[t[a]-1]++<<l,d=f|(1<<l)-1;f<=d;++f)s[p[f]>>>c]=h}else for(s=new r(i),a=0;a<i;++a)s[a]=p[u[t[a]-1]++]>>>15-t[a];return s},b=new e(288);for(g=0;g<144;++g)b[g]=8;for(g=144;g<256;++g)b[g]=9;for(g=256;g<280;++g)b[g]=7;for(g=280;g<288;++g)b[g]=8;var y=new e(32);for(g=0;g<32;++g)y[g]=5;var w=v(b,9,0),N=v(b,9,1),L=v(y,5,0),A=v(y,5,1),x=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},S=function(t,e,r){var n=e/8>>0;return(t[n]|t[n+1]<<8)>>>(7&e)&r},_=function(t,e){var r=e/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(7&e)},P=function(t){return(t/8>>0)+(7&t&&1)},k=function(t,i,a){(null==i||i<0)&&(i=0),(null==a||a>t.length)&&(a=t.length);var o=new(t instanceof r?r:t instanceof n?n:e)(a-i);return o.set(t.subarray(i,a)),o},F=function(t,e,r){r<<=7&e;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8},I=function(t,e,r){r<<=7&e;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8,t[n+2]|=r>>>16},C=function(t,n){for(var i=[],a=0;a<t.length;++a)t[a]&&i.push({s:a,f:t[a]});var o=i.length,s=i.slice();if(!o)return[new e(0),0];if(1==o){var u=new e(i[0].s+1);return u[i[0].s]=1,[u,1]}i.sort((function(t,e){return t.f-e.f})),i.push({s:-1,f:25001});var c=i[0],h=i[1],l=0,f=1,d=2;for(i[0]={s:-1,f:c.f+h.f,l:c,r:h};f!=o-1;)c=i[i[l].f<i[d].f?l++:d++],h=i[l!=f&&i[l].f<i[d].f?l++:d++],i[f++]={s:-1,f:c.f+h.f,l:c,r:h};var p=s[0].s;for(a=1;a<o;++a)s[a].s>p&&(p=s[a].s);var g=new r(p+1),m=j(i[f-1],g,0);if(m>n){a=0;var v=0,b=m-n,y=1<<b;for(s.sort((function(t,e){return g[e.s]-g[t.s]||t.f-e.f}));a<o;++a){var w=s[a].s;if(!(g[w]>n))break;v+=y-(1<<m-g[w]),g[w]=n}for(v>>>=b;v>0;){var N=s[a].s;g[N]<n?v-=1<<n-g[N]++-1:++a}for(;a>=0&&v;--a){var L=s[a].s;g[L]==n&&(--g[L],++v)}m=n}return[new e(g),m]},j=function t(e,r,n){return-1==e.s?Math.max(t(e.l,r,n+1),t(e.r,r,n+1)):r[e.s]=n},O=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new r(++e),i=0,a=t[0],o=1,s=function(t){n[i++]=t},u=1;u<=e;++u)if(t[u]==a&&u!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=t[u]}return[n.subarray(0,i),e]},B=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},M=function(t,e,r){var n=r.length,i=P(e+2);t[i]=255&n,t[i+1]=n>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<n;++a)t[i+a+4]=r[a];return 8*(i+4+n)},E=function(t,e,n,s,u,c,h,l,f,d,p){F(e,p++,n),++u[256];for(var g=C(u,15),m=g[0],N=g[1],A=C(c,15),x=A[0],S=A[1],_=O(m),P=_[0],k=_[1],j=O(x),E=j[0],q=j[1],D=new r(19),R=0;R<P.length;++R)D[31&P[R]]++;for(R=0;R<E.length;++R)D[31&E[R]]++;for(var T=C(D,7),U=T[0],z=T[1],H=19;H>4&&!U[o[H-1]];--H);var W,V,G,Y,J=d+5<<3,X=B(u,b)+B(c,y)+h,K=B(u,m)+B(c,x)+h+14+3*H+B(D,U)+(2*D[16]+3*D[17]+7*D[18]);if(J<=X&&J<=K)return M(e,p,t.subarray(f,f+d));if(F(e,p,1+(K<X)),p+=2,K<X){W=v(m,N,0),V=m,G=v(x,S,0),Y=x;var Z=v(U,z,0);F(e,p,k-257),F(e,p+5,q-1),F(e,p+10,H-4),p+=14;for(R=0;R<H;++R)F(e,p+3*R,U[o[R]]);p+=3*H;for(var $=[P,E],Q=0;Q<2;++Q){var tt=$[Q];for(R=0;R<tt.length;++R){var et=31&tt[R];F(e,p,Z[et]),p+=U[et],et>15&&(F(e,p,tt[R]>>>5&127),p+=tt[R]>>>12)}}}else W=w,V=b,G=L,Y=y;for(R=0;R<l;++R)if(s[R]>255){et=s[R]>>>18&31;I(e,p,W[et+257]),p+=V[et+257],et>7&&(F(e,p,s[R]>>>23&31),p+=i[et]);var rt=31&s[R];I(e,p,G[rt]),p+=Y[rt],rt>3&&(I(e,p,s[R]>>>5&8191),p+=a[rt])}else I(e,p,W[s[R]]),p+=V[s[R]];return I(e,p,W[256]),p+V[256]},q=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new e(0),R=function(t,o,s,u,c){return function(t,o,s,u,c,l){var f=t.length,p=new e(u+f+5*(1+Math.floor(f/7e3))+c),g=p.subarray(u,p.length-c),m=0;if(!o||f<8)for(var v=0;v<=f;v+=65535){var b=v+65535;b<f?m=M(g,m,t.subarray(v,b)):(g[v]=l,m=M(g,m,t.subarray(v,f)))}else{for(var y=q[o-1],w=y>>>13,N=8191&y,L=(1<<s)-1,A=new r(32768),x=new r(L+1),S=Math.ceil(s/3),_=2*S,F=function(e){return(t[e]^t[e+1]<<S^t[e+2]<<_)&L},I=new n(25e3),C=new r(288),j=new r(32),O=0,B=0,R=(v=0,0),T=0,U=0;v<f;++v){var z=F(v),H=32767&v,W=x[z];if(A[H]=W,x[z]=H,T<=v){var V=f-v;if((O>7e3||R>24576)&&V>423){m=E(t,g,0,I,C,j,B,R,U,v-U,m),R=O=B=0,U=v;for(var G=0;G<286;++G)C[G]=0;for(G=0;G<30;++G)j[G]=0}var Y=2,J=0,X=N,K=H-W&32767;if(V>2&&z==F(v-K))for(var Z=Math.min(w,V)-1,$=Math.min(32767,v),Q=Math.min(258,V);K<=$&&--X&&H!=W;){if(t[v+Y]==t[v+Y-K]){for(var tt=0;tt<Q&&t[v+tt]==t[v+tt-K];++tt);if(tt>Y){if(Y=tt,J=K,tt>Z)break;var et=Math.min(K,tt-2),rt=0;for(G=0;G<et;++G){var nt=v-K+G+32768&32767,it=nt-A[nt]+32768&32767;it>rt&&(rt=it,W=nt)}}}K+=(H=W)-(W=A[H])+32768&32767}if(J){I[R++]=268435456|h[Y]<<18|d[J];var at=31&h[Y],ot=31&d[J];B+=i[at]+a[ot],++C[257+at],++j[ot],T=v+Y,++O}else I[R++]=t[v],++C[t[v]]}}m=E(t,g,l,I,C,j,B,R,U,v-U,m),l||(m=M(g,m,D))}return k(p,0,u+P(m)+c)}(t,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+o.mem,s,u,!c)};function T(t,e){void 0===e&&(e={});var r=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,a=r.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<s;++o)i+=n+=r[o];n%=65521,i%=65521}t=n,e=i},d:function(){return(t>>>8<<16|(255&e)<<8|e>>>8)+2*((255&t)<<23)}}}();r.p(t);var n=R(t,e,2,4);return function(t,e){var r=e.level,n=0==r?0:r<6?1:9==r?3:2;t[0]=120,t[1]=n<<6|(n?32-2*n:1)}(n,e),function(t,e,r){for(;r;++e)t[e]=r,r>>>=8}(n,n.length-4,r.d()),n}function U(t,r){return function(t,r,n){var s=t.length,u=!r||n,h=!n||n.i;n||(n={}),r||(r=new e(3*s));var l=function(t){var n=r.length;if(t>n){var i=new e(Math.max(2*n,t));i.set(r),r=i}},d=n.f||0,p=n.p||0,g=n.b||0,m=n.l,b=n.d,y=n.m,w=n.n,L=8*s;do{if(!m){n.f=d=S(t,p,1);var F=S(t,p+1,3);if(p+=3,!F){var I=t[(U=P(p)+4)-4]|t[U-3]<<8,C=U+I;if(C>s){if(h)throw"unexpected EOF";break}u&&l(g+I),r.set(t.subarray(U,C),g),n.b=g+=I,n.p=p=8*C;continue}if(1==F)m=N,b=A,y=9,w=5;else{if(2!=F)throw"invalid block type";var j=S(t,p,31)+257,O=S(t,p+10,15)+4,B=j+S(t,p+5,31)+1;p+=14;for(var M=new e(B),E=new e(19),q=0;q<O;++q)E[o[q]]=S(t,p+3*q,7);p+=3*O;var D=x(E),R=(1<<D)-1;if(!h&&p+B*(D+7)>L)break;var T=v(E,D,1);for(q=0;q<B;){var U,z=T[S(t,p,R)];if(p+=15&z,(U=z>>>4)<16)M[q++]=U;else{var H=0,W=0;for(16==U?(W=3+S(t,p,3),p+=2,H=M[q-1]):17==U?(W=3+S(t,p,7),p+=3):18==U&&(W=11+S(t,p,127),p+=7);W--;)M[q++]=H}}var V=M.subarray(0,j),G=M.subarray(j);y=x(V),w=x(G),m=v(V,y,1),b=v(G,w,1)}if(p>L)throw"unexpected EOF"}u&&l(g+131072);for(var Y=(1<<y)-1,J=(1<<w)-1,X=y+w+18;h||p+X<L;){var K=(H=m[_(t,p)&Y])>>>4;if((p+=15&H)>L)throw"unexpected EOF";if(!H)throw"invalid length/literal";if(K<256)r[g++]=K;else{if(256==K){m=null;break}var Z=K-254;if(K>264){var $=i[q=K-257];Z=S(t,p,(1<<$)-1)+c[q],p+=$}var Q=b[_(t,p)&J],tt=Q>>>4;if(!Q)throw"invalid distance";if(p+=15&Q,G=f[tt],tt>3&&($=a[tt],G+=_(t,p)&(1<<$)-1,p+=$),p>L)throw"unexpected EOF";u&&l(g+131072);for(var et=g+Z;g<et;g+=4)r[g]=r[g-G],r[g+1]=r[g+1-G],r[g+2]=r[g+2-G],r[g+3]=r[g+3-G];g=et}}n.l=m,n.p=p,n.b=g,m&&(d=1,n.m=y,n.d=b,n.n=w)}while(!d);return g==r.length?r:k(r,0,g)}((function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"}(t),t.subarray(2,-4)),r)}
/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
* 2015-2021 yWorks GmbH, http://www.yworks.com
* 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
* 2010 Aaron Spike, https://github.com/acspike
* 2012 Willow Systems Corporation, https://github.com/willowsystems
* 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
* 2014 Steven Spungin, https://github.com/Flamenco
* 2014 Kenneth Glassey, https://github.com/Gavvers
*
* 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, Flamenco
*/var z=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function H(){z.console&&"function"==typeof z.console.log&&z.console.log.apply(z.console,arguments)}var W={log:H,warn:function(t){z.console&&("function"==typeof z.console.warn?z.console.warn.apply(z.console,arguments):H.call(null,arguments))},error:function(t){z.console&&("function"==typeof z.console.error?z.console.error.apply(z.console,arguments):H(t))}};function V(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){K(n.response,e,r)},n.onerror=function(){W.error("could not download file")},n.send()}function G(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function Y(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var J,X,K=z.saveAs||("object"!==("undefined"==typeof window?"undefined":t(window))||window!==z?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var n=z.URL||z.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?G(i.href)?V(t,e,r):Y(i,i.target="_blank"):Y(i)):(i.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(i.href)}),4e4),setTimeout((function(){Y(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,n){if(r=r||e.name||"download","string"==typeof e)if(G(e))V(e,r,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){Y(i)}))}else navigator.msSaveOrOpenBlob(function(e,r){return void 0===r?r={autoBom:!1}:"object"!==t(r)&&(W.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),r)}:function(e,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return V(e,r,n);var a="application/octet-stream"===e.type,o=/constructor/i.test(z.HTMLElement)||z.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&o)&&"object"===("undefined"==typeof FileReader?"undefined":t(FileReader))){var u=new FileReader;u.onloadend=function(){var t=u.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},u.readAsDataURL(e)}else{var c=z.URL||z.webkitURL,h=c.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});
/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function Z(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,a=r[n].process,o=i.exec(t);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r}}
/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function $(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=tt(r,n,i,a,e[0],7,-680876936),a=tt(a,r,n,i,e[1],12,-389564586),i=tt(i,a,r,n,e[2],17,606105819),n=tt(n,i,a,r,e[3],22,-1044525330),r=tt(r,n,i,a,e[4],7,-176418897),a=tt(a,r,n,i,e[5],12,1200080426),i=tt(i,a,r,n,e[6],17,-1473231341),n=tt(n,i,a,r,e[7],22,-45705983),r=tt(r,n,i,a,e[8],7,1770035416),a=tt(a,r,n,i,e[9],12,-1958414417),i=tt(i,a,r,n,e[10],17,-42063),n=tt(n,i,a,r,e[11],22,-1990404162),r=tt(r,n,i,a,e[12],7,1804603682),a=tt(a,r,n,i,e[13],12,-40341101),i=tt(i,a,r,n,e[14],17,-1502002290),r=et(r,n=tt(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=et(a,r,n,i,e[6],9,-1069501632),i=et(i,a,r,n,e[11],14,643717713),n=et(n,i,a,r,e[0],20,-373897302),r=et(r,n,i,a,e[5],5,-701558691),a=et(a,r,n,i,e[10],9,38016083),i=et(i,a,r,n,e[15],14,-660478335),n=et(n,i,a,r,e[4],20,-405537848),r=et(r,n,i,a,e[9],5,568446438),a=et(a,r,n,i,e[14],9,-1019803690),i=et(i,a,r,n,e[3],14,-187363961),n=et(n,i,a,r,e[8],20,1163531501),r=et(r,n,i,a,e[13],5,-1444681467),a=et(a,r,n,i,e[2],9,-51403784),i=et(i,a,r,n,e[7],14,1735328473),r=rt(r,n=et(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=rt(a,r,n,i,e[8],11,-2022574463),i=rt(i,a,r,n,e[11],16,1839030562),n=rt(n,i,a,r,e[14],23,-35309556),r=rt(r,n,i,a,e[1],4,-1530992060),a=rt(a,r,n,i,e[4],11,1272893353),i=rt(i,a,r,n,e[7],16,-155497632),n=rt(n,i,a,r,e[10],23,-1094730640),r=rt(r,n,i,a,e[13],4,681279174),a=rt(a,r,n,i,e[0],11,-358537222),i=rt(i,a,r,n,e[3],16,-722521979),n=rt(n,i,a,r,e[6],23,76029189),r=rt(r,n,i,a,e[9],4,-640364487),a=rt(a,r,n,i,e[12],11,-421815835),i=rt(i,a,r,n,e[15],16,530742520),r=nt(r,n=rt(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=nt(a,r,n,i,e[7],10,1126891415),i=nt(i,a,r,n,e[14],15,-1416354905),n=nt(n,i,a,r,e[5],21,-57434055),r=nt(r,n,i,a,e[12],6,1700485571),a=nt(a,r,n,i,e[3],10,-1894986606),i=nt(i,a,r,n,e[10],15,-1051523),n=nt(n,i,a,r,e[1],21,-2054922799),r=nt(r,n,i,a,e[8],6,1873313359),a=nt(a,r,n,i,e[15],10,-30611744),i=nt(i,a,r,n,e[6],15,-1560198380),n=nt(n,i,a,r,e[13],21,1309151649),r=nt(r,n,i,a,e[4],6,-145523070),a=nt(a,r,n,i,e[11],10,-1120210379),i=nt(i,a,r,n,e[2],15,718787259),n=nt(n,i,a,r,e[9],21,-343485551),t[0]=lt(r,t[0]),t[1]=lt(n,t[1]),t[2]=lt(i,t[2]),t[3]=lt(a,t[3])}function Q(t,e,r,n,i,a){return e=lt(lt(e,t),lt(n,a)),lt(e<<i|e>>>32-i,r)}function tt(t,e,r,n,i,a,o){return Q(e&r|~e&n,t,e,i,a,o)}function et(t,e,r,n,i,a,o){return Q(e&n|r&~n,t,e,i,a,o)}function rt(t,e,r,n,i,a,o){return Q(e^r^n,t,e,i,a,o)}function nt(t,e,r,n,i,a,o){return Q(r^(e|~n),t,e,i,a,o)}function it(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)$(n,at(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for($(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,$(n,i),n}function at(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}J=z.atob.bind(z),X=z.btoa.bind(z);var ot="0123456789abcdef".split("");function st(t){for(var e="",r=0;r<4;r++)e+=ot[t>>8*r+4&15]+ot[t>>8*r&15];return e}function ut(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function ct(t){return it(t).map(ut).join("")}var ht="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=st(t[e]);return t.join("")}(it("hello"));function lt(t,e){if(ht){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}
/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function ft(t,e){var r,n,i,a;if(t!==r){for(var o=(i=t,a=1+(256/t.length>>0),new Array(a+1).join(i)),s=[],u=0;u<256;u++)s[u]=u;var c=0;for(u=0;u<256;u++){var h=s[u];c=(c+h+o.charCodeAt(u))%256,s[u]=s[c],s[c]=h}r=t,n=s}else s=n;var l=e.length,f=0,d=0,p="";for(u=0;u<l;u++)d=(d+(h=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=h,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(u)^o);return p}
/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var dt={print:4,modify:8,copy:16,"annot-forms":32};function pt(t,e,r,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==dt.perm)throw new Error("Invalid permission: "+t);i+=dt[t]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=ct(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=ft(this.encryptionKey,this.padding)}function gt(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n<r;n++){var i=t.charCodeAt(n);e+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[n]}return e}function mt(e){if("object"!==t(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(t,e,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[e,!!n],i},this.unsubscribe=function(t){for(var e in r)if(r[e][t])return delete r[e][t],0===Object.keys(r[e]).length&&delete r[e],!0;return!1},this.publish=function(t){if(r.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in r[t]){var o=r[t][a];try{o[0].apply(e,n)}catch(t){z.console&&W.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function vt(t){if(!(this instanceof vt))return new vt(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function bt(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function yt(t,e,r,n,i){if(!(this instanceof yt))return new yt(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,bt.call(this,n,i)}function wt(t,e,r,n,i){if(!(this instanceof wt))return new wt(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,bt.call(this,n,i)}function Nt(e){var r,n="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],a=arguments[2],o=arguments[3],s=[],u=1,c=16,h="S",l=null;"object"===t(e=e||{})&&(n=e.orientation,i=e.unit||i,a=e.format||a,o=e.compress||e.compressPdf||o,null!==(l=e.encryption||null)&&(l.userPassword=l.userPassword||"",l.ownerPassword=l.ownerPassword||"",l.userPermissions=l.userPermissions||[]),u="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(r=e.precision),void 0!==e.floatPrecision&&(c=e.floatPrecision),h=e.defaultPathOperation||"S"),s=e.filters||(!0===o?["FlateEncode"]:s),i=i||"mm",n=(""+(n||"P")).toLowerCase();var f=e.putOnlyUsedFonts||!1,d={},p={internal:{},__private__:{}};p.__private__.PubSub=mt;var g="1.3",m=p.__private__.getPdfVersion=function(){return g};p.__private__.setPdfVersion=function(t){g=t};var v={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],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return v};var b=p.__private__.getPageFormat=function(t){return v[t]};a=a||"a4";var y={COMPAT:"compat",ADVANCED:"advanced"},w=y.COMPAT;function N(){this.saveGraphicsState(),it(new Vt(_t,0,0,-_t,0,Rr()*_t).toString()+" cm"),this.setFontSize(this.getFontSize()/_t),h="n",w=y.ADVANCED}function L(){this.restoreGraphicsState(),h="S",w=y.COMPAT}var A=p.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};p.advancedAPI=function(t){var e=w===y.COMPAT;return e&&N.call(this),"function"!=typeof t||(t(this),e&&L.call(this)),this},p.compatAPI=function(t){var e=w===y.ADVANCED;return e&&L.call(this),"function"!=typeof t||(t(this),e&&N.call(this)),this},p.isAdvancedAPI=function(){return w===y.ADVANCED};var x,S=function(t){if(w!==y.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},_=p.roundToPrecision=p.__private__.roundToPrecision=function(t,e){var n=r||e;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};x=p.hpf=p.__private__.hpf="number"==typeof c?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,c)}:"smart"===c?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,16)};var P=p.f2=p.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return _(t,2)},k=p.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return _(t,3)},F=p.scale=p.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return w===y.COMPAT?t*_t:w===y.ADVANCED?t:void 0},I=function(t){return w===y.COMPAT?Rr()-t:w===y.ADVANCED?t:void 0},C=function(t){return F(I(t))};p.__private__.setPrecision=p.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var j,O="00000000000000000000000000000000",B=p.__private__.getFileId=function(){return O},M=p.__private__.setFileId=function(t){return O=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():O.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==l&&(Ye=new pt(l.userPermissions,l.userPassword,l.ownerPassword,O)),O};p.setFileId=function(t){return M(t),this},p.getFileId=function(){return B()};var E=p.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),a=[r,U(n),"'",U(i),"'"].join("");return["D:",t.getFullYear(),U(t.getMonth()+1),U(t.getDate()),U(t.getHours()),U(t.getMinutes()),U(t.getSeconds()),a].join("")},q=p.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,r,n,i,a,o,0)},D=p.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=E(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return j=e},R=p.__private__.getCreationDate=function(t){var e=j;return"jsDate"===t&&(e=q(j)),e};p.setCreationDate=function(t){return D(t),this},p.getCreationDate=function(t){return R(t)};var T,U=p.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},H=p.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},V=0,G=[],Y=[],J=0,$=[],Q=[],tt=!1,et=Y,rt=function(){V=0,J=0,Y=[],G=[],$=[],Qt=Kt(),te=Kt()};p.__private__.setCustomOutputDestination=function(t){tt=!0,et=t};var nt=function(t){tt||(et=t)};p.__private__.resetCustomOutputDestination=function(){tt=!1,et=Y};var it=p.__private__.out=function(t){return t=t.toString(),J+=t.length+1,et.push(t),et},at=p.__private__.write=function(t){return it(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ot=p.__private__.getArrayBuffer=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},st=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return st};var ut=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(t){return ut=w===y.ADVANCED?t/_t:t,this};var ct,ht=p.__private__.getFontSize=p.getFontSize=function(){return w===y.COMPAT?ut:ut*_t},lt=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(t){return lt=t,this},p.__private__.getR2L=p.getR2L=function(){return lt};var ft,dt=p.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))ct=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');ct=t}else ct=parseInt(t,10)};p.__private__.getZoomMode=function(){return ct};var bt,Lt=p.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ft=t};p.__private__.getPageMode=function(){return ft};var At=p.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');bt=t};p.__private__.getLayoutMode=function(){return bt},p.__private__.setDisplayMode=p.setDisplayMode=function(t,e,r){return dt(t),At(e),Lt(r),this};var xt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(t){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return xt[t]},p.__private__.getDocumentProperties=function(){return xt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(t){for(var e in xt)xt.hasOwnProperty(e)&&t[e]&&(xt[e]=t[e]);return this},p.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return xt[t]=e};var St,_t,Pt,kt,Ft,It={},Ct={},jt=[],Ot={},Bt={},Mt={},Et={},qt=null,Dt=0,Rt=[],Tt=new mt(p),Ut=e.hotfixes||[],zt={},Ht={},Wt=[],Vt=function t(e,r,n,i,a,o){if(!(this instanceof t))return new t(e,r,n,i,a,o);isNaN(e)&&(e=1),isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[e,r,n,i,a,o]};Object.defineProperty(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Vt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(x).join(t)},Vt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,r=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,a=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Vt(e,r,n,i,a,o)},Vt.prototype.decompose=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*r+(e/=o)*n;r-=t*s,n-=e*s;var u=Math.sqrt(r*r+n*n);return s/=u,t*(n/=u)<e*(r/=u)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Vt(o,0,0,u,0,0),translate:new Vt(1,0,0,1,i,a),rotate:new Vt(t,e,-e,t,0,0),skew:new Vt(1,0,s,1,0,0)}},Vt.prototype.toString=function(t){return this.join(" ")},Vt.prototype.inversed=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty,o=1/(t*n-e*r),s=n*o,u=-e*o,c=-r*o,h=t*o;return new Vt(s,u,c,h,-s*i-c*a,-u*i-h*a)},Vt.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,r=t.x*this.shy+t.y*this.sy+this.ty;return new Cr(e,r)},Vt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new Cr(t.x+t.w,t.y+t.h));return new jr(e.x,e.y,r.x-e.x,r.y-e.y)},Vt.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty;return new Vt(t,e,r,n,i,a)},p.Matrix=Vt;var Gt=p.matrixMult=function(t,e){return e.multiply(t)},Yt=new Vt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Yt;var Jt=function(t,e){if(!Bt[t]){var r=(e instanceof yt?"Sh":"P")+(Object.keys(Ot).length+1).toString(10);e.id=r,Bt[t]=r,Ot[r]=e,Tt.publish("addPattern",e)}};p.ShadingPattern=yt,p.TilingPattern=wt,p.addShadingPattern=function(t,e){return S("addShadingPattern()"),Jt(t,e),this},p.beginTilingPattern=function(t){S("beginTilingPattern()"),Br(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},p.endTilingPattern=function(t,e){S("endTilingPattern()"),e.stream=Q[T].join("\n"),Jt(t,e),Tt.publish("endTilingPattern",e),Wt.pop().restore()};var Xt=p.__private__.newObject=function(){var t=Kt();return Zt(t,!0),t},Kt=p.__private__.newObjectDeferred=function(){return V++,G[V]=function(){return J},V},Zt=function(t,e){return e="boolean"==typeof e&&e,G[t]=J,e&&it(t+" 0 obj"),t},$t=p.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return $.push(t),t},Qt=Kt(),te=Kt(),ee=p.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var r=parseFloat(e[0]);e=[r,r,r,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return n},re=p.__private__.encodeColorString=function(e){var r;"string"==typeof e&&(e={ch1:e});var n=e.ch1,i=e.ch2,a=e.ch3,o=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var u=new Z(n);if(u.ok)n=u.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,i=c>>8&255,a=255&c}if(void 0===i||void 0===o&&n===i&&i===a)if("string"==typeof n)r=n+" "+s[0];else if(2===e.precision)r=P(n/255)+" "+s[0];else r=k(n/255)+" "+s[0];else if(void 0===o||"object"===t(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)r=[n,i,a,s[1]].join(" ");else if(2===e.precision)r=[P(n/255),P(i/255),P(a/255),s[1]].join(" ");else r=[k(n/255),k(i/255),k(a/255),s[1]].join(" ")}else if("string"==typeof n)r=[n,i,a,o,s[2]].join(" ");else if(2===e.precision)r=[P(n),P(i),P(a),P(o),s[2]].join(" ");else r=[k(n),k(i),k(a),k(o),s[2]].join(" ");return r},ne=p.__private__.getFilters=function(){return s},ie=p.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||ne(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==l&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==l&&(s=Ye.encryptor(o,0));var u={};!0===r&&(r=["FlateEncode"]);var c=t.additionalKeyValues||[],h=(u=void 0!==Nt.API.processDataByFilters?Nt.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(c.push({key:"Length",value:u.data.length}),!0===i&&c.push({key:"Length1",value:a})),0!=h.length)if(h.split("/").length-1==1)c.push({key:"Filter",value:h});else{c.push({key:"Filter",value:"["+h+"]"});for(var f=0;f<c.length;f+=1)if("DecodeParms"===c[f].key){for(var d=[],p=0;p<u.reverseChain.split("/").length-1;p+=1)d.push("null");d.push(c[f].value),c[f].value="["+d.join(" ")+"]"}}it("<<");for(var g=0;g<c.length;g++)it("/"+c[g].key+" "+c[g].value);it(">>"),0!==u.data.length&&(it("stream"),it(s(u.data)),it("endstream"))},ae=p.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Zt(n,!0),it("<</Type /Page"),it("/Parent "+t.rootDictionaryObjId+" 0 R"),it("/Resources "+t.resourceDictionaryObjId+" 0 R"),it("/MediaBox ["+parseFloat(x(t.mediaBox.bottomLeftX))+" "+parseFloat(x(t.mediaBox.bottomLeftY))+" "+x(t.mediaBox.topRightX)+" "+x(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&it("/CropBox ["+x(t.cropBox.bottomLeftX)+" "+x(t.cropBox.bottomLeftY)+" "+x(t.cropBox.topRightX)+" "+x(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&it("/BleedBox ["+x(t.bleedBox.bottomLeftX)+" "+x(t.bleedBox.bottomLeftY)+" "+x(t.bleedBox.topRightX)+" "+x(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&it("/TrimBox ["+x(t.trimBox.bottomLeftX)+" "+x(t.trimBox.bottomLeftY)+" "+x(t.trimBox.topRightX)+" "+x(t.trimBox.topRightY)+"]"),null!==t.artBox&&it("/ArtBox ["+x(t.artBox.bottomLeftX)+" "+x(t.artBox.bottomLeftY)+" "+x(t.artBox.topRightX)+" "+x(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&it("/UserUnit "+t.userUnit),Tt.publish("putPage",{objId:n,pageContext:Rt[e],pageNumber:e,page:r}),it("/Contents "+i+" 0 R"),it(">>"),it("endobj");var a=r.join("\n");return w===y.ADVANCED&&(a+="\nQ"),Zt(i,!0),ie({data:a,filters:ne(),objectId:i}),it("endobj"),n},oe=p.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Dt;t++)Rt[t].objId=Kt(),Rt[t].contentsObjId=Kt();for(t=1;t<=Dt;t++)r.push(ae({number:t,data:Q[t],objId:Rt[t].objId,contentsObjId:Rt[t].contentsObjId,mediaBox:Rt[t].mediaBox,cropBox:Rt[t].cropBox,bleedBox:Rt[t].bleedBox,trimBox:Rt[t].trimBox,artBox:Rt[t].artBox,userUnit:Rt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:te}));Zt(Qt,!0),it("<</Type /Pages");var n="/Kids [";for(e=0;e<Dt;e++)n+=r[e]+" 0 R ";it(n+"]"),it("/Count "+Dt),it(">>"),it("endobj"),Tt.publish("postPutPages")},se=function(t){Tt.publish("putFont",{font:t,out:it,newObject:Xt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Xt(),it("<<"),it("/Type /Font"),it("/BaseFont /"+gt(t.postScriptName)),it("/Subtype /Type1"),"string"==typeof t.encoding&&it("/Encoding /"+t.encoding),it("/FirstChar 32"),it("/LastChar 255"),it(">>"),it("endobj"))},ue=function(){for(var t in It)It.hasOwnProperty(t)&&(!1===f||!0===f&&d.hasOwnProperty(t))&&se(It[t])},ce=function(t){t.objectNumber=Xt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[x(t.x),x(t.y),x(t.x+t.width),x(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var r=t.pages[1].join("\n");ie({data:r,additionalKeyValues:e,objectId:t.objectNumber}),it("endobj")},he=function(){for(var t in zt)zt.hasOwnProperty(t)&&ce(zt[t])},le=function(t,e){var r,n=[],i=1/(e-1);for(r=0;r<1;r+=i)n.push(r);if(n.push(1),0!=t[0].offset){var a={offset:0,color:t[0].color};t.unshift(a)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",u=0,c=0;c<n.length;c++){for(r=n[c];r>t[u+1].offset;)u++;var h=t[u].offset,l=(r-h)/(t[u+1].offset-h),f=t[u].color,d=t[u+1].color;s+=H(Math.round((1-l)*f[0]+l*d[0]).toString(16))+H(Math.round((1-l)*f[1]+l*d[1]).toString(16))+H(Math.round((1-l)*f[2]+l*d[2]).toString(16))}return s.trim()},fe=function(t,e){e||(e=21);var r=Xt(),n=le(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ie({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),it("endobj"),t.objectNumber=Xt(),it("<< /ShadingType "+t.type),it("/ColorSpace /DeviceRGB");var a="/Coords ["+x(parseFloat(t.coords[0]))+" "+x(parseFloat(t.coords[1]))+" ";2===t.type?a+=x(parseFloat(t.coords[2]))+" "+x(parseFloat(t.coords[3])):a+=x(parseFloat(t.coords[2]))+" "+x(parseFloat(t.coords[3]))+" "+x(parseFloat(t.coords[4]))+" "+x(parseFloat(t.coords[5])),it(a+="]"),t.matrix&&it("/Matrix ["+t.matrix.toString()+"]"),it("/Function "+r+" 0 R"),it("/Extend [true true]"),it(">>"),it("endobj")},de=function(t,e){var r=Kt(),n=Xt();e.push({resourcesOid:r,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(x).join(" ")+"]"}),i.push({key:"XStep",value:x(t.xStep)}),i.push({key:"YStep",value:x(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ie({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),it("endobj")},pe=function(t){var e;for(e in Ot)Ot.hasOwnProperty(e)&&(Ot[e]instanceof yt?fe(Ot[e]):Ot[e]instanceof wt&&de(Ot[e],t))},ge=function(t){for(var e in t.objectNumber=Xt(),it("<<"),t)switch(e){case"opacity":it("/ca "+P(t[e]));break;case"stroke-opacity":it("/CA "+P(t[e]))}it(">>"),it("endobj")},me=function(){var t;for(t in Mt)Mt.hasOwnProperty(t)&&ge(Mt[t])},ve=function(){for(var t in it("/XObject <<"),zt)zt.hasOwnProperty(t)&&zt[t].objectNumber>=0&&it("/"+t+" "+zt[t].objectNumber+" 0 R");Tt.publish("putXobjectDict"),it(">>")},be=function(){Ye.oid=Xt(),it("<<"),it("/Filter /Standard"),it("/V "+Ye.v),it("/R "+Ye.r),it("/U <"+Ye.toHexString(Ye.U)+">"),it("/O <"+Ye.toHexString(Ye.O)+">"),it("/P "+Ye.P),it(">>"),it("endobj")},ye=function(){for(var t in it("/Font <<"),It)It.hasOwnProperty(t)&&(!1===f||!0===f&&d.hasOwnProperty(t))&&it("/"+t+" "+It[t].objectNumber+" 0 R");it(">>")},we=function(){if(Object.keys(Ot).length>0){for(var t in it("/Shading <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t]instanceof yt&&Ot[t].objectNumber>=0&&it("/"+t+" "+Ot[t].objectNumber+" 0 R");Tt.publish("putShadingPatternDict"),it(">>")}},Ne=function(t){if(Object.keys(Ot).length>0){for(var e in it("/Pattern <<"),Ot)Ot.hasOwnProperty(e)&&Ot[e]instanceof p.TilingPattern&&Ot[e].objectNumber>=0&&Ot[e].objectNumber<t&&it("/"+e+" "+Ot[e].objectNumber+" 0 R");Tt.publish("putTilingPatternDict"),it(">>")}},Le=function(){if(Object.keys(Mt).length>0){var t;for(t in it("/ExtGState <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&it("/"+t+" "+Mt[t].objectNumber+" 0 R");Tt.publish("putGStateDict"),it(">>")}},Ae=function(t){Zt(t.resourcesOid,!0),it("<<"),it("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ye(),we(),Ne(t.objectOid),Le(),ve(),it(">>"),it("endobj")},xe=function(){var t=[];ue(),me(),he(),pe(t),Tt.publish("putResources"),t.forEach(Ae),Ae({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Tt.publish("postPutResources")},Se=function(){Tt.publish("putAdditionalObjects");for(var t=0;t<$.length;t++){var e=$[t];Zt(e.objId,!0),it(e.content),it("endobj")}Tt.publish("postPutAdditionalObjects")},_e=function(t){Ct[t.fontName]=Ct[t.fontName]||{},Ct[t.fontName][t.fontStyle]=t.id},Pe=function(t,e,r,n,i){var a={id:"F"+(Object.keys(It).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Tt.publish("addFont",{font:a,instance:this}),It[a.id]=a,_e(a),a.id},ke=function(t){for(var e=0,r=st.length;e<r;e++){var n=Pe.call(this,t[e][0],t[e][1],t[e][2],st[e][3],!0);!1===f&&(d[n]=!0);var i=t[e][0].split("-");_e({id:n,fontName:i[0],fontStyle:i[1]||""})}Tt.publish("addFonts",{fonts:It,dictionary:Ct})},Fe=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var r="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!z.console)throw new Error(r);z.console.error(r,t),z.alert&&alert(r)}},t.foo.bar=t,t.foo},Ie=function(t,e){var r,n,i,a,o,s,u,c,h;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&It[St].metadata&&It[St].metadata[i]&&It[St].metadata[i].encoding&&(a=It[St].metadata[i].encoding,!o&&It[St].encoding&&(o=It[St].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(u=!1,s=[],r=0,n=t.length;r<n;r++)(c=o[t.charCodeAt(r)])?s.push(String.fromCharCode(c)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(u=!0);t=s.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(s=e.noBOM?[]