"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[637],{898478:function(t,e,r){var n=r(733940),i=r(236782),a=function(){return"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:this}();function o(){a.console&&"function"==typeof a.console.log&&a.console.log.apply(a.console,arguments)}var s={log:o,warn:function(t){a.console&&("function"==typeof a.console.warn?a.console.warn.apply(a.console,arguments):o.call(null,arguments))},error:function(t){a.console&&("function"==typeof a.console.error?a.console.error.apply(a.console,arguments):o(t))}};function c(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){d(n.response,e,r)},n.onerror=function(){s.error("could not download file")},n.send()}function u(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function h(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 l,f,d=a.saveAs||("object"!==("undefined"==typeof window?"undefined":(0,n.Z)(window))||window!==a?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var n=a.URL||a.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?u(i.href)?c(t,e,r):h(i,i.target="_blank"):h(i)):(i.href=n.createObjectURL(t),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){h(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download","string"==typeof t){if(u(t))c(t,e,r);else{var i,a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){h(a)})}}else navigator.msSaveOrOpenBlob((void 0===(i=r)?i={autoBom:!1}:"object"!==(0,n.Z)(i)&&(s.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t),e)}:function(t,e,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return c(t,e,r);var o="application/octet-stream"===t.type,s=/constructor/i.test(a.HTMLElement)||a.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"===("undefined"==typeof FileReader?"undefined":(0,n.Z)(FileReader))){var h=new FileReader;h.onloadend=function(){var t=h.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},h.readAsDataURL(t)}else{var l=a.URL||a.webkitURL,f=l.createObjectURL(t);i?i.location=f:location.href=f,i=null,setTimeout(function(){l.revokeObjectURL(f)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function p(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;n255?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 g(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=v(r,n,i,a,e[0],7,-680876936),a=v(a,r,n,i,e[1],12,-389564586),i=v(i,a,r,n,e[2],17,606105819),n=v(n,i,a,r,e[3],22,-1044525330),r=v(r,n,i,a,e[4],7,-176418897),a=v(a,r,n,i,e[5],12,1200080426),i=v(i,a,r,n,e[6],17,-1473231341),n=v(n,i,a,r,e[7],22,-45705983),r=v(r,n,i,a,e[8],7,1770035416),a=v(a,r,n,i,e[9],12,-1958414417),i=v(i,a,r,n,e[10],17,-42063),n=v(n,i,a,r,e[11],22,-1990404162),r=v(r,n,i,a,e[12],7,1804603682),a=v(a,r,n,i,e[13],12,-40341101),i=v(i,a,r,n,e[14],17,-1502002290),r=b(r,n=v(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=b(a,r,n,i,e[6],9,-1069501632),i=b(i,a,r,n,e[11],14,643717713),n=b(n,i,a,r,e[0],20,-373897302),r=b(r,n,i,a,e[5],5,-701558691),a=b(a,r,n,i,e[10],9,38016083),i=b(i,a,r,n,e[15],14,-660478335),n=b(n,i,a,r,e[4],20,-405537848),r=b(r,n,i,a,e[9],5,568446438),a=b(a,r,n,i,e[14],9,-1019803690),i=b(i,a,r,n,e[3],14,-187363961),n=b(n,i,a,r,e[8],20,1163531501),r=b(r,n,i,a,e[13],5,-1444681467),a=b(a,r,n,i,e[2],9,-51403784),i=b(i,a,r,n,e[7],14,1735328473),r=y(r,n=b(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=y(a,r,n,i,e[8],11,-2022574463),i=y(i,a,r,n,e[11],16,1839030562),n=y(n,i,a,r,e[14],23,-35309556),r=y(r,n,i,a,e[1],4,-1530992060),a=y(a,r,n,i,e[4],11,1272893353),i=y(i,a,r,n,e[7],16,-155497632),n=y(n,i,a,r,e[10],23,-1094730640),r=y(r,n,i,a,e[13],4,681279174),a=y(a,r,n,i,e[0],11,-358537222),i=y(i,a,r,n,e[3],16,-722521979),n=y(n,i,a,r,e[6],23,76029189),r=y(r,n,i,a,e[9],4,-640364487),a=y(a,r,n,i,e[12],11,-421815835),i=y(i,a,r,n,e[15],16,530742520),r=w(r,n=y(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=w(a,r,n,i,e[7],10,1126891415),i=w(i,a,r,n,e[14],15,-1416354905),n=w(n,i,a,r,e[5],21,-57434055),r=w(r,n,i,a,e[12],6,1700485571),a=w(a,r,n,i,e[3],10,-1894986606),i=w(i,a,r,n,e[10],15,-1051523),n=w(n,i,a,r,e[1],21,-2054922799),r=w(r,n,i,a,e[8],6,1873313359),a=w(a,r,n,i,e[15],10,-30611744),i=w(i,a,r,n,e[6],15,-1560198380),n=w(n,i,a,r,e[13],21,1309151649),r=w(r,n,i,a,e[4],6,-145523070),a=w(a,r,n,i,e[11],10,-1120210379),i=w(i,a,r,n,e[2],15,718787259),n=w(n,i,a,r,e[9],21,-343485551),t[0]=_(r,t[0]),t[1]=_(n,t[1]),t[2]=_(i,t[2]),t[3]=_(a,t[3])}function m(t,e,r,n,i,a){return e=_(_(e,t),_(n,a)),_(e<>>32-i,r)}function v(t,e,r,n,i,a,o){return m(e&r|~e&n,t,e,i,a,o)}function b(t,e,r,n,i,a,o){return m(e&n|r&~n,t,e,i,a,o)}function y(t,e,r,n,i,a,o){return m(e^r^n,t,e,i,a,o)}function w(t,e,r,n,i,a,o){return m(r^(e|~n),t,e,i,a,o)}function N(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)g(n,function(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}(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>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(g(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,g(n,i),n}l=a.atob.bind(a),f=a.btoa.bind(a);var L="0123456789abcdef".split("");function x(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function A(t){return N(t).map(x).join("")}var S="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e>8*r+4&15]+L[t>>8*r&15];return e}(t[e]);return t.join("")}(N("hello"));function _(t,e){if(S){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 P(t,e){if(t!==r){for(var r,n,i=Array(1+(256/t.length>>0)+1).join(t),a=[],o=0;o<256;o++)a[o]=o;var s=0;for(o=0;o<256;o++){var c=a[o];s=(s+c+i.charCodeAt(o))%256,a[o]=a[s],a[s]=c}r=t,n=a}else a=n;var u=e.length,h=0,l=0,f="";for(o=0;o\x80/\f\xa9\xfedSiz";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=A(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=P(this.encryptionKey,this.padding)}function F(t){if(/[^\u0000-\u00ff]/.test(t))throw Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n126?e+="#"+("0"+i.toString(16)).slice(-2):e+=t[n]}return e}function C(t){if("object"!==(0,n.Z)(t))throw Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],0===Object.keys(e[r]).length&&delete e[r],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var o in e[r]){var c=e[r][o];try{c[0].apply(t,n)}catch(t){a.console&&s.error("jsPDF PubSub Error",t.message,t)}c[1]&&i.push(o)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function j(t){if(!(this instanceof j))return new j(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 O(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function B(t,e,r,n,i){if(!(this instanceof B))return new B(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,O.call(this,n,i)}function M(t,e,r,n,i){if(!(this instanceof M))return new M(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,O.call(this,n,i)}function E(t){var e,r="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],o=arguments[2],c=arguments[3],u=[],h=1,l=16,g="S",m=null;"object"===(0,n.Z)(t=t||{})&&(r=t.orientation,i=t.unit||i,o=t.format||o,c=t.compress||t.compressPdf||c,null!==(m=t.encryption||null)&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),h="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(l=t.floatPrecision),g=t.defaultPathOperation||"S"),u=t.filters||(!0===c?["FlateEncode"]:u),i=i||"mm",r=(""+(r||"P")).toLowerCase();var v=t.putOnlyUsedFonts||!1,b={},y={internal:{},__private__:{}};y.__private__.PubSub=C;var w="1.3",N=y.__private__.getPdfVersion=function(){return w};y.__private__.setPdfVersion=function(t){w=t};var L={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]};y.__private__.getPageFormats=function(){return L};var x=y.__private__.getPageFormat=function(t){return L[t]};o=o||"a4";var A={COMPAT:"compat",ADVANCED:"advanced"},S=A.COMPAT;function _(){this.saveGraphicsState(),th(new tW(tS,0,0,-tS,0,rm()*tS).toString()+" cm"),this.setFontSize(this.getFontSize()/tS),g="n",S=A.ADVANCED}function P(){this.restoreGraphicsState(),g="S",S=A.COMPAT}var k=y.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw 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};y.advancedAPI=function(t){var e=S===A.COMPAT;return e&&_.call(this),"function"!=typeof t||(t(this),e&&P.call(this)),this},y.compatAPI=function(t){var e=S===A.ADVANCED;return e&&P.call(this),"function"!=typeof t||(t(this),e&&_.call(this)),this},y.isAdvancedAPI=function(){return S===A.ADVANCED};var O,q=function(t){if(S!==A.ADVANCED)throw Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},D=y.roundToPrecision=y.__private__.roundToPrecision=function(t,r){var n=e||r;if(isNaN(t)||isNaN(n))throw Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};O=y.hpf=y.__private__.hpf="number"==typeof l?function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return D(t,l)}:"smart"===l?function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return D(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.hpf");return D(t,16)};var R=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.f2");return D(t,2)},T=y.__private__.f3=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.f3");return D(t,3)},U=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw Error("Invalid argument passed to jsPDF.scale");return S===A.COMPAT?t*tS:S===A.ADVANCED?t:void 0},z=function(t){return U(S===A.COMPAT?rm()-t:S===A.ADVANCED?t:void 0)};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var H,W="00000000000000000000000000000000",V=y.__private__.getFileId=function(){return W},G=y.__private__.setFileId=function(t){return W=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():W.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==m&&(eB=new I(m.userPermissions,m.userPassword,m.ownerPassword,W)),W};y.setFileId=function(t){return G(t),this},y.getFileId=function(){return V()};var Y=y.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=[e<0?"+":"-",$(Math.floor(Math.abs(e/60))),"'",$(Math.abs(e%60)),"'"].join("");return["D:",t.getFullYear(),$(t.getMonth()+1),$(t.getDate()),$(t.getHours()),$(t.getMinutes()),$(t.getSeconds()),r].join("")},J=y.__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)},X=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=Y(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 Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return H=e},K=y.__private__.getCreationDate=function(t){var e=H;return"jsDate"===t&&(e=J(H)),e};y.setCreationDate=function(t){return X(t),this},y.getCreationDate=function(t){return K(t)};var Z,$=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},Q=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},tt=0,te=[],tr=[],tn=0,ti=[],ta=[],to=!1,ts=tr,tc=function(){tt=0,tn=0,tr=[],te=[],ti=[],t$=tX(),tQ=tX()};y.__private__.setCustomOutputDestination=function(t){to=!0,ts=t};var tu=function(t){to||(ts=t)};y.__private__.resetCustomOutputDestination=function(){to=!1,ts=tr};var th=y.__private__.out=function(t){return tn+=(t=t.toString()).length+1,ts.push(t),ts},tl=y.__private__.write=function(t){return th(1==arguments.length?t.toString():Array.prototype.join.call(arguments," "))},tf=y.__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},td=[["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]];y.__private__.getStandardFonts=function(){return td};var tp=t.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return tp=S===A.ADVANCED?t/tS:t,this};var tg,tm=y.__private__.getFontSize=y.getFontSize=function(){return S===A.COMPAT?tp:tp*tS},tv=t.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return tv=t,this},y.__private__.getR2L=y.getR2L=function(){return tv};var tb,ty=y.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))tg=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');tg=t}else tg=parseInt(t,10)};y.__private__.getZoomMode=function(){return tg};var tw,tN=y.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');tb=t};y.__private__.getPageMode=function(){return tb};var tL=y.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');tw=t};y.__private__.getLayoutMode=function(){return tw},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,r){return ty(t),tL(e),tN(r),this};var tx={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(tx).indexOf(t))throw Error("Invalid argument passed to jsPDF.getDocumentProperty");return tx[t]},y.__private__.getDocumentProperties=function(){return tx},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in tx)tx.hasOwnProperty(e)&&t[e]&&(tx[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(tx).indexOf(t))throw Error("Invalid arguments passed to jsPDF.setDocumentProperty");return tx[t]=e};var tA,tS,t_,tP,tk,tI={},tF={},tC=[],tj={},tO={},tB={},tM={},tE=null,tq=0,tD=[],tR=new C(y),tT=t.hotfixes||[],tU={},tz={},tH=[],tW=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(tW.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(tW.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(tW.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(tW.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(tW.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(tW.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(tW.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(tW.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(tW.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(tW.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(tW.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(tW.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(tW.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(tW.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(tW.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(tW.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),tW.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(O).join(t)},tW.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 tW(e,r,n,i,a,o)},tW.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,c=Math.sqrt((r-=t*s)*r+(n-=e*s)*n);return s/=c,t*(n/=c)>16&255,i=u>>8&255,a=255&u}if(void 0===i||void 0===o&&r===i&&i===a)e="string"==typeof r?r+" "+s[0]:2===t.precision?R(r/255)+" "+s[0]:T(r/255)+" "+s[0];else if(void 0===o||"object"===(0,n.Z)(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");e="string"==typeof r?[r,i,a,s[1]].join(" "):2===t.precision?[R(r/255),R(i/255),R(a/255),s[1]].join(" "):[T(r/255),T(i/255),T(a/255),s[1]].join(" ")}else e="string"==typeof r?[r,i,a,o,s[2]].join(" "):2===t.precision?[R(r),R(i),R(a),R(o),s[2]].join(" "):[T(r),T(i),T(a),T(o),s[2]].join(" ");return e},t5=y.__private__.getFilters=function(){return u},t0=y.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||t5(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==m&&void 0===o)throw Error("ObjectId must be passed to putStream for file encryption");null!==m&&(s=eB.encryptor(o,0));var c={};!0===r&&(r=["FlateEncode"]);var u=t.additionalKeyValues||[],h=(c=void 0!==E.API.processDataByFilters?E.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=h.length){if(h.split("/").length-1==1)u.push({key:"Filter",value:h});else{u.push({key:"Filter",value:"["+h+"]"});for(var l=0;l>"),0!==c.data.length&&(th("stream"),th(s(c.data)),th("endstream"))},t3=y.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;tK(n,!0),th("<>"),th("endobj");var a=r.join("\n");return S===A.ADVANCED&&(a+="\nQ"),tK(i,!0),t0({data:a,filters:t5(),objectId:i}),th("endobj"),n},t4=y.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=tq;t++)tD[t].objId=tX(),tD[t].contentsObjId=tX();for(t=1;t<=tq;t++)r.push(t3({number:t,data:ta[t],objId:tD[t].objId,contentsObjId:tD[t].contentsObjId,mediaBox:tD[t].mediaBox,cropBox:tD[t].cropBox,bleedBox:tD[t].bleedBox,trimBox:tD[t].trimBox,artBox:tD[t].artBox,userUnit:tD[t].userUnit,rootDictionaryObjId:t$,resourceDictionaryObjId:tQ}));tK(t$,!0),th("<>"),th("endobj"),tR.publish("postPutPages")},t6=function(t){tR.publish("putFont",{font:t,out:th,newObject:tJ,putStream:t0}),!0!==t.isAlreadyPutted&&(t.objectNumber=tJ(),th("<<"),th("/Type /Font"),th("/BaseFont /"+F(t.postScriptName)),th("/Subtype /Type1"),"string"==typeof t.encoding&&th("/Encoding /"+t.encoding),th("/FirstChar 32"),th("/LastChar 255"),th(">>"),th("endobj"))},t8=function(){for(var t in tI)tI.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&t6(tI[t])},t7=function(t){t.objectNumber=tJ();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[O(t.x),O(t.y),O(t.x+t.width),O(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),t0({data:t.pages[1].join("\n"),additionalKeyValues:e,objectId:t.objectNumber}),th("endobj")},t9=function(){for(var t in tU)tU.hasOwnProperty(t)&&t7(tU[t])},et=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="",c=0,u=0;ut[c+1].offset;)c++;var h=t[c].offset,l=(r-h)/(t[c+1].offset-h),f=t[c].color,d=t[c+1].color;s+=Q(Math.round((1-l)*f[0]+l*d[0]).toString(16))+Q(Math.round((1-l)*f[1]+l*d[1]).toString(16))+Q(Math.round((1-l)*f[2]+l*d[2]).toString(16))}return s.trim()},ee=function(t,e){e||(e=21);var r=tJ(),n=et(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]"}),t0({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),th("endobj"),t.objectNumber=tJ(),th("<< /ShadingType "+t.type),th("/ColorSpace /DeviceRGB");var a="/Coords ["+O(parseFloat(t.coords[0]))+" "+O(parseFloat(t.coords[1]))+" ";2===t.type?a+=O(parseFloat(t.coords[2]))+" "+O(parseFloat(t.coords[3])):a+=O(parseFloat(t.coords[2]))+" "+O(parseFloat(t.coords[3]))+" "+O(parseFloat(t.coords[4]))+" "+O(parseFloat(t.coords[5])),th(a+="]"),t.matrix&&th("/Matrix ["+t.matrix.toString()+"]"),th("/Function "+r+" 0 R"),th("/Extend [true true]"),th(">>"),th("endobj")},er=function(t,e){var r=tX(),n=tJ();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(O).join(" ")+"]"}),i.push({key:"XStep",value:O(t.xStep)}),i.push({key:"YStep",value:O(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),t0({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),th("endobj")},en=function(t){var e;for(e in tj)tj.hasOwnProperty(e)&&(tj[e]instanceof B?ee(tj[e]):tj[e]instanceof M&&er(tj[e],t))},ei=function(t){for(var e in t.objectNumber=tJ(),th("<<"),t)switch(e){case"opacity":th("/ca "+R(t[e]));break;case"stroke-opacity":th("/CA "+R(t[e]))}th(">>"),th("endobj")},ea=function(){var t;for(t in tB)tB.hasOwnProperty(t)&&ei(tB[t])},eo=function(){for(var t in th("/XObject <<"),tU)tU.hasOwnProperty(t)&&tU[t].objectNumber>=0&&th("/"+t+" "+tU[t].objectNumber+" 0 R");tR.publish("putXobjectDict"),th(">>")},es=function(){eB.oid=tJ(),th("<<"),th("/Filter /Standard"),th("/V "+eB.v),th("/R "+eB.r),th("/U <"+eB.toHexString(eB.U)+">"),th("/O <"+eB.toHexString(eB.O)+">"),th("/P "+eB.P),th(">>"),th("endobj")},ec=function(){for(var t in th("/Font <<"),tI)tI.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&th("/"+t+" "+tI[t].objectNumber+" 0 R");th(">>")},eu=function(){if(Object.keys(tj).length>0){for(var t in th("/Shading <<"),tj)tj.hasOwnProperty(t)&&tj[t]instanceof B&&tj[t].objectNumber>=0&&th("/"+t+" "+tj[t].objectNumber+" 0 R");tR.publish("putShadingPatternDict"),th(">>")}},eh=function(t){if(Object.keys(tj).length>0){for(var e in th("/Pattern <<"),tj)tj.hasOwnProperty(e)&&tj[e]instanceof y.TilingPattern&&tj[e].objectNumber>=0&&tj[e].objectNumber>")}},el=function(){if(Object.keys(tB).length>0){var t;for(t in th("/ExtGState <<"),tB)tB.hasOwnProperty(t)&&tB[t].objectNumber>=0&&th("/"+t+" "+tB[t].objectNumber+" 0 R");tR.publish("putGStateDict"),th(">>")}},ef=function(t){tK(t.resourcesOid,!0),th("<<"),th("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ec(),eu(),eh(t.objectOid),el(),eo(),th(">>"),th("endobj")},ed=function(){var t=[];t8(),ea(),t9(),en(t),tR.publish("putResources"),t.forEach(ef),ef({resourcesOid:tQ,objectOid:Number.MAX_SAFE_INTEGER}),tR.publish("postPutResources")},ep=function(){tR.publish("putAdditionalObjects");for(var t=0;t>8&&(c=!0);t=s.join("")}for(r=t.length;void 0===c&&0!==r;)t.charCodeAt(r-1)>>8&&(c=!0),r--;if(!c)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r>8)>>8)throw Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(h),s.push(u-(h<<8))}return String.fromCharCode.apply(void 0,s)},eb=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return ev(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ey=y.__private__.beginPage=function(t){ta[++tq]=[],tD[tq]={objId:0,contentsObjId:0,userUnit:Number(h),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},eL(tq),tu(ta[Z])},ew=function(t,e){var n,i,a;switch(r=e||r,"string"==typeof t&&Array.isArray(n=x(t.toLowerCase()))&&(i=n[0],a=n[1]),Array.isArray(t)&&(i=t[0]*tS,a=t[1]*tS),isNaN(i)&&(i=o[0],a=o[1]),(i>14400||a>14400)&&(s.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),a=Math.min(14400,a)),o=[i,a],r.substr(0,1)){case"l":a>i&&(o=[a,i]);break;case"p":i>a&&(o=[a,i])}ey(o),e2(eQ),th(e9),0!==ra&&th(ra+" J"),0!==ro&&th(ro+" j"),tR.publish("addPage",{pageNumber:tq})},eN=function(t){t>0&&t<=tq&&(ta.splice(t,1),tD.splice(t,1),Z>--tq&&(Z=tq),this.setPage(Z))},eL=function(t){t>0&&t<=tq&&(Z=t)},ex=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return ta.length-1},eA=function(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:tI[tA].fontName,e=void 0!==e?e:tI[tA].fontStyle,void 0!==tF[n=t.toLowerCase()]&&void 0!==tF[n][e]?i=tF[n][e]:void 0!==tF[t]&&void 0!==tF[t][e]?i=tF[t][e]:!1===r.disableWarning&&s.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=tF.times[e])&&(i=tF.times.normal),i},eS=y.__private__.putInfo=function(){var t=tJ(),e=function(t){return t};for(var r in null!==m&&(e=eB.encryptor(t,0)),th("<<"),th("/Producer ("+eb(e("jsPDF "+E.version))+")"),tx)tx.hasOwnProperty(r)&&tx[r]&&th("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+eb(e(tx[r]))+")");th("/CreationDate ("+eb(e(H))+")"),th(">>"),th("endobj")},e_=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||t$;switch(tJ(),th("<<"),th("/Type /Catalog"),th("/Pages "+e+" 0 R"),tg||(tg="fullwidth"),tg){case"fullwidth":th("/OpenAction [3 0 R /FitH null]");break;case"fullheight":th("/OpenAction [3 0 R /FitV null]");break;case"fullpage":th("/OpenAction [3 0 R /Fit]");break;case"original":th("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+tg;"%"===r.substr(r.length-1)&&(tg=parseInt(tg)/100),"number"==typeof tg&&th("/OpenAction [3 0 R /XYZ null null "+R(tg)+"]")}switch(tw||(tw="continuous"),tw){case"continuous":th("/PageLayout /OneColumn");break;case"single":th("/PageLayout /SinglePage");break;case"two":case"twoleft":th("/PageLayout /TwoColumnLeft");break;case"tworight":th("/PageLayout /TwoColumnRight")}tb&&th("/PageMode /"+tb),tR.publish("putCatalog"),th(">>"),th("endobj")},eP=y.__private__.putTrailer=function(){th("trailer"),th("<<"),th("/Size "+(tt+1)),th("/Root "+tt+" 0 R"),th("/Info "+(tt-1)+" 0 R"),null!==m&&th("/Encrypt "+eB.oid+" 0 R"),th("/ID [ <"+W+"> <"+W+"> ]"),th(">>")},ek=y.__private__.putHeader=function(){th("%PDF-"+w),th("%\xba\xdf\xac\xe0")},eI=y.__private__.putXRef=function(){var t="0000000000";th("xref"),th("0 "+(tt+1)),th("0000000000 65535 f ");for(var e=1;e<=tt;e++)"function"==typeof te[e]?th((t+te[e]()).slice(-10)+" 00000 n "):void 0!==te[e]?th((t+te[e]).slice(-10)+" 00000 n "):th("0000000000 00000 n ")},eF=y.__private__.buildDocument=function(){tc(),tu(tr),tR.publish("buildDocument"),ek(),t4(),ep(),ed(),null!==m&&es(),eS(),e_();var t=tn;return eI(),eP(),th("startxref"),th(""+t),th("%%EOF"),tu(ta[Z]),tr.join("\n")},eC=y.__private__.getBlob=function(t){return new Blob([tf(t)],{type:"application/pdf"})},ej=y.output=y.__private__.output=((eZ=function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return eF();case"save":y.save(e.filename);break;case"arraybuffer":return tf(eF());case"blob":return eC(eF());case"bloburi":case"bloburl":if(void 0!==a.URL&&"function"==typeof a.URL.createObjectURL)return a.URL&&a.URL.createObjectURL(eC(eF()))||void 0;s.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",n=eF();try{r=f(n)}catch(t){r=f(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+e.filename+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(a)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",o=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(i=e.pdfObjectUrl,o="");var c='",u=a.open();return null!==u&&u.document.write(c),u}throw Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(a)){var h='',g=a.open();if(null!==g&&(g.document.write(p),g.document.title=e.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return a.document.location.href=this.output("datauristring",e);default:return null}}).foo=function(){try{return eZ.apply(this,arguments)}catch(r){var t=r.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var e="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message;if(!a.console)throw Error(e);a.console.error(e,r),a.alert&&alert(e)}},eZ.foo.bar=eZ,eZ.foo),eO=function(t){return!0===Array.isArray(tT)&&tT.indexOf(t)>-1};switch(i){case"pt":tS=1;break;case"mm":tS=72/25.4;break;case"cm":tS=72/2.54;break;case"in":tS=72;break;case"px":tS=1==eO("px_scaling")?.75:96/72;break;case"pc":case"em":tS=12;break;case"ex":tS=6;break;default:if("number"!=typeof i)throw Error("Invalid unit: "+i);tS=i}var eB=null;X(),G();var eM=y.__private__.getPageInfo=y.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:tD[t].objId,pageNumber:t,pageContext:tD[t]}},eE=y.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in tD)if(tD[e].objId===t)break;return eM(e)},eq=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:tD[Z].objId,pageNumber:Z,pageContext:tD[Z]}};y.addPage=function(){return ew.apply(this,arguments),this},y.setPage=function(){return eL.apply(this,arguments),tu.call(this,ta[Z]),this},y.insertPage=function(t){return this.addPage(),this.movePage(Z,t),this},y.movePage=function(t,e){var r,n;if(t>e){r=ta[t],n=tD[t];for(var i=t;i>e;i--)ta[i]=ta[i-1],tD[i]=tD[i-1];ta[e]=r,tD[e]=n,this.setPage(e)}else if(t0&&("string"==typeof t?t=g.splitTextToSize(t,l):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(g.splitTextToSize(e,l))},[]))),o={text:t,x:e,y:r,options:i,mutex:{pdfEscape:eb,activeFontKey:tA,fonts:tI,activeFontSize:tp}},tR.publish("preProcessText",o),t=o.text,c=(i=o.options).angle,p instanceof tW==!1&&c&&"number"==typeof c){c*=Math.PI/180,0===i.rotationDirection&&(c=-c),S===A.ADVANCED&&(c=-c);var B=Math.cos(c),M=Math.sin(c);p=new tW(B,M,-M,B,0,0)}else c&&c instanceof tW&&(p=c);S!==A.ADVANCED||p||(p=tG),void 0!==(h=i.charSpace||rn)&&(v+=O(U(h))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=i.horizontalScale)&&(v+=O(100*d)+" Tz\n"),i.lang;var E=-1,D=void 0!==i.renderingMode?i.renderingMode:i.stroke,R=g.internal.getCurrentPageInfo().pageContext;switch(D){case 0:case!1:case"fill":E=0;break;case 1:case!0:case"stroke":E=1;break;case 2:case"fillThenStroke":E=2;break;case 3:case"invisible":E=3;break;case 4:case"fillAndAddForClipping":E=4;break;case 5:case"strokeAndAddPathForClipping":E=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":E=6;break;case 7:case"addToPathForClipping":E=7}var T=void 0!==R.usedRenderingMode?R.usedRenderingMode:-1;-1!==E?v+=E+" Tr\n":-1!==T&&(v+="0 Tr\n"),-1!==E&&(R.usedRenderingMode=E),u=i.align||"left";var z,H=tp*w,W=g.internal.pageSize.getWidth(),V=tI[tA];h=i.charSpace||rn,l=i.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},i.flags);var G=[];if("[object Array]"===Object.prototype.toString.call(t)){s=L(t),"left"!==u&&(z=s.map(function(t){return g.getStringUnitWidth(t,{font:V,charSpace:h,fontSize:tp,doKerning:!1})*tp/N}));var Y,J,X=0;if("right"===u){e-=z[0],t=[],F=s.length;for(var K=0;K":")"),te=parseFloat(s[ts][1]),tr=parseFloat(s[ts][2]);break;case 0:tn=(y?"<":"(")+s[ts]+(y?">":")"),te=e4(e),tr=e6(r)}void 0!==G&&void 0!==G[ts]&&(ta=G[ts]+" Tw\n"),0===ts?t.push(ta+to(te,tr,p)+tn):0===ti?t.push(ta+tn):1===ti&&t.push(ta+to(te,tr,p)+tn)}t=(0===ti?t.join(" Tj\nT* "):t.join(" Tj\n"))+" Tj\n";var tc="BT\n/";return th(tc+=tA+" "+tp+" Tf\n"+O(tp*w)+" TL\n"+re+"\n"+v+t+"ET"),b[tA]=!0,g};var eD=y.__private__.clip=y.clip=function(t){return th("evenodd"===t?"W*":"W"),this};y.clipEvenOdd=function(){return eD("evenodd")},y.__private__.discardPath=y.discardPath=function(){return th("n"),this};var eR=y.__private__.isValidStyle=function(t){var e=!1;return -1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(t){return eR(t)&&(g=t),this};var eT=y.__private__.getStyle=y.getStyle=function(t){var e=g;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},eU=y.close=function(){return th("h"),this};y.stroke=function(){return th("S"),this},y.fill=function(t){return ez("f",t),this},y.fillEvenOdd=function(t){return ez("f*",t),this},y.fillStroke=function(t){return ez("B",t),this},y.fillStrokeEvenOdd=function(t){return ez("B*",t),this};var ez=function(t,e){"object"===(0,n.Z)(e)?eV(e,t):th(t)},eH=function(t){null===t||S===A.ADVANCED&&void 0===t||th(t=eT(t))};function eW(t,e,r,n,i){var a=new M(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);return a.stream=this.stream,tY(t+"$$"+this.cloneIndex+++"$$",a),a}var eV=function(t,e){var r=tO[t.key],n=tj[r];if(n instanceof B)th("q"),th(eG(e)),n.gState&&y.setGState(n.gState),th(t.matrix.toString()+" cm"),th("/"+r+" sh"),th("Q");else if(n instanceof M){var i=new tW(1,0,0,-1,0,rm());t.matrix&&(i=i.multiply(t.matrix||tG),r=eW.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),th("q"),th("/Pattern cs"),th("/"+r+" scn"),n.gState&&y.setGState(n.gState),th(e),th("Q")}},eG=function(t){switch(t){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},eY=y.moveTo=function(t,e){return th(O(U(t))+" "+O(z(e))+" m"),this},eJ=y.lineTo=function(t,e){return th(O(U(t))+" "+O(z(e))+" l"),this},eX=y.curveTo=function(t,e,r,n,i,a){return th([O(U(t)),O(z(e)),O(U(r)),O(z(n)),O(U(i)),O(z(a)),"c"].join(" ")),this};y.__private__.line=y.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!eR(i))throw Error("Invalid arguments passed to jsPDF.line");return S===A.COMPAT?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},y.__private__.lines=y.lines=function(t,e,r,n,i,a){var o,s,c,u,h,l,f,d,p,g,m;if("number"==typeof t&&(m=r,r=e,e=t,t=m),n=n||[1,1],a=a||!1,isNaN(e)||isNaN(r)||!Array.isArray(t)||!Array.isArray(n)||!eR(i)||"boolean"!=typeof a)throw Error("Invalid arguments passed to jsPDF.lines");for(eY(e,r),o=n[0],s=n[1],u=t.length,p=e,g=r,c=0;c>0&255,t>>8&255,t>>16&255,t>>24&255)},I.prototype.toHexString=function(t){return t.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},I.prototype.hexToBytes=function(t){for(var e=[],r=0;r>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return P(r,t)}},j.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||(0,n.Z)(t)!==(0,n.Z)(this))return!1;var i=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;i++}for(e in t)t.hasOwnProperty(e)&&0>r.indexOf(e)&&i--;return 0===i},E.API={events:[]},E.version="2.5.1";var q=E.API,D=1,R=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},T=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},U=function(t){return t.toFixed(2)},z=function(t){return t.toFixed(5)};q.__acroform__={};var H=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},W=function(t){return t*D},V=function(t){var e=new tu,r=tx.internal.getHeight(t)||0,n=tx.internal.getWidth(t)||0;return e.BBox=[0,0,Number(U(n)),Number(U(r))],e},G=q.__acroform__.setBit=function(t,e){if(e=e||0,isNaN(t=t||0)||isNaN(e))throw Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<0;){e="";var c,u,h=te("3",t,--a).height,l=t.multiline?o-a:(o-h)/2,f=l+=2,d=0,p=0,g=0;if(a<=0){e="(...) Tj\n",e+="% Width of Text: "+te(e,t,a=12).width+", FieldWidth:"+s+"\n";break}for(var m="",v=0,b=0;bo)continue t;m+=i[b][g],y=!0,p=b,b--}else{m=" "==(m+=i[b][g]+" ").substr(m.length-1)?m.substr(0,m.length-1):m;var w,N,L=parseInt(b),x=(w=m,N=a,L+1=i.length-1;if(x&&!A){m+=" ",g=0;continue}if(x||A){if(A)p=L;else if(t.multiline&&(h+2)*(v+2)+2>o)continue t}else{if(!t.multiline||(h+2)*(v+2)+2>o)continue t;p=L}}for(var S="",_=d;_<=p;_++){var P=i[_];if(t.multiline){if(_===p){S+=P[g]+" ",g=(g+1)%P.length;continue}if(_===d){S+=P[P.length-1]+" ";continue}}S+=P[0]+" "}switch(u=te(S=" "==S.substr(S.length-1)?S.substr(0,S.length-1):S,t,a).width,t.textAlign){case"right":c=s-u-2;break;case"center":c=(s-u)/2;break;default:c=2}e+=U(c)+" "+U(f)+" Td\n("+R(S)+") Tj\n"+-U(c)+" 0 Td\n",f=-(a+2),u=0,d=y?p:p+1,v++,m=""}break}return n.text=e,n.fontSize=a,n},te=function(t,e,r){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},tr={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},tn=function(t,e){var r={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===r.type&&t.object===r.object})&&e.internal.getPageInfo(t.page).pageContext.annotations.push(r)},ti=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){var i=r,a=t[r];e.internal.newObjectDeferredBegin(a.objId,!0),"object"===(0,n.Z)(a)&&"function"==typeof a.putStream&&a.putStream(),delete t[i]}},ta=function(t,e){if(e.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(tl.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(tr)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw Error("Exception while creating AcroformDictionary");D=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new th,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){var e;(e=t).internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0}),t.internal.events.subscribe("buildDocument",function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.objId=void 0,n.hasAnnotation&&tn(n,t)}}(t)}),t.internal.events.subscribe("putCatalog",function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(t)}),t.internal.events.subscribe("postPutPages",function(e){!function(t,e){var r=!t;for(var i in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(i)){var a=t[i],o=[],s=a.Rect;if(a.Rect&&(a.Rect=$(a.Rect,e)),e.internal.newObjectDeferredBegin(a.objId,!0),a.DA=tx.createDefaultAppearanceStream(a),"object"===(0,n.Z)(a)&&"function"==typeof a.getKeyValueListForStream&&(o=a.getKeyValueListForStream()),a.Rect=s,a.hasAppearanceStream&&!a.appearanceStreamContent){var c=Q(a);o.push({key:"AP",value:"<>"}),e.internal.acroformPlugin.xForms.push(c)}if(a.appearanceStreamContent){var u="";for(var h in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(h)){var l=a.appearanceStreamContent[h];if(u+="/"+h+" <<",Object.keys(l).length>=1||Array.isArray(l)){for(var i in l)if(l.hasOwnProperty(i)){var f=l[i];"function"==typeof f&&(f=f.call(e,a)),u+="/"+i+" "+f+" ",e.internal.acroformPlugin.xForms.indexOf(f)>=0||e.internal.acroformPlugin.xForms.push(f)}}else"function"==typeof(f=l)&&(f=f.call(e,a)),u+="/"+i+" "+f,e.internal.acroformPlugin.xForms.indexOf(f)>=0||e.internal.acroformPlugin.xForms.push(f);u+=">>"}o.push({key:"AP",value:"<<\n"+u+">>"})}e.internal.putStream({additionalKeyValues:o,objectId:a.objId}),e.internal.out("endobj")}r&&ti(e.internal.acroformPlugin.xForms,e)}(e,t)}),t.internal.acroformPlugin.isInitialized=!0}},to=q.__acroform__.arrayToPdfArray=function(t,e,r){var i=function(t){return t};if(Array.isArray(t)){for(var a="[",o=0;o0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+R(e(t))+")"}},set:function(e){t=e}})};H(th,tc);var tl=function t(){tc.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(e,3))},set:function(t){!0===Boolean(t)?this.F=K(e,3):this.F=Z(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){if(isNaN(t))throw Error('Invalid value "'+t+'" for attribute Ff supplied.');r=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof ty)return;a="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+R(e(a))+")"},set:function(t){a=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(t){a=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/D:u},set:function(t){u=t}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(t){h=t}});var l="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!l||this instanceof ty||this instanceof tN))return ts(l,this.objId,this.scope)},set:function(t){l=t=t.toString()}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof tm==!1?ts(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof tm==!1?"("===t.substr(0,1)?T(t.substr(1,t.length-2)):T(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof tm==!0?T(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof tm==!0?"/"+t:t}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof tm==!1?ts(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof tm==!1?"("===t.substr(0,1)?T(t.substr(1,t.length-2)):T(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof tm==!0?T(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof tm==!0?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){g=t=Boolean(t)}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(t){p=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,1):this.Ff=Z(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,2):this.Ff=Z(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,3):this.Ff=Z(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};H(tl,tc);var tf=function(){tl.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return to(e,this.objId,this.scope)},set:function(t){var r;r=[],"string"==typeof t&&(r=function(t,e,r){r||(r=1);for(var n,i=[];n=e.exec(t);)i.push(n[r]);return i}(t,/\((.*?)\)/g)),e=r}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,r){for(r=r||!1,t=(t=t||"").toString();-1!==e.indexOf(t)&&(e.splice(e.indexOf(t),1),!1!==r););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,18):this.Ff=Z(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=K(this.Ff,19):this.Ff=Z(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=K(this.Ff,20),e.sort()):this.Ff=Z(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,22):this.Ff=Z(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,23):this.Ff=Z(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,27):this.Ff=Z(this.Ff,27)}}),this.hasAppearanceStream=!1};H(tf,tl);var td=function(){tf.call(this),this.fontName="helvetica",this.combo=!1};H(td,tf);var tp=function(){td.call(this),this.combo=!0};H(tp,td);var tg=function(){tp.call(this),this.edit=!0};H(tg,tp);var tm=function(){tl.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,15):this.Ff=Z(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,16):this.Ff=Z(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,17):this.Ff=Z(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,26):this.Ff=Z(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+R(t(e[r]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===(0,n.Z)(t)&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};H(tm,tl);var tv=function(){tm.call(this),this.pushButton=!0};H(tv,tm);var tb=function(){tm.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};H(tb,tm);var ty=function(){tl.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var t,e,r,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var e,r=[];for(e in r.push("<<"),i)r.push("/"+e+" ("+R(t(i[e]))+")");return r.push(">>"),r.join("\n")},set:function(t){"object"===(0,n.Z)(t)&&(i=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=tx.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};H(ty,tl),tb.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},tb.prototype.createOption=function(t){var e=new ty;return e.Parent=this,e.optionName=t,this.Kids.push(e),tA.call(this.scope,e),e};var tw=function(){tm.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=tx.CheckBox.createAppearanceStream()};H(tw,tm);var tN=function(){tl.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,13):this.Ff=Z(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,21):this.Ff=Z(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,23):this.Ff=Z(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,24):this.Ff=Z(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,25):this.Ff=Z(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,26):this.Ff=Z(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};H(tN,tl);var tL=function(){tN.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,14):this.Ff=Z(this.Ff,14)}}),this.password=!0};H(tL,tN);var tx={CheckBox:{createAppearanceStream:function(){return{N:{On:tx.CheckBox.YesNormal},D:{On:tx.CheckBox.YesPushDown,Off:tx.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),a=tt(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+U(tx.internal.getWidth(t))+" "+U(tx.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+U(a.fontSize)+" Tf "+i),r.push("BT"),r.push(a.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join("\n"),e},YesNormal:function(t){var e=V(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=[],a=tx.internal.getHeight(t),o=tx.internal.getWidth(t),s=tt(t,t.caption);return i.push("1 g"),i.push("0 0 "+U(o)+" "+U(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+U(o-1)+" "+U(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+U(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+U(tx.internal.getWidth(t))+" "+U(tx.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:tx.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=tx.RadioButton.Circle.YesNormal,e.D[t]=tx.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=V(t);e.scope=t.scope;var r=[],n=tx.internal.getWidth(t)<=tx.internal.getHeight(t)?tx.internal.getWidth(t)/4:tx.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((n*tx.internal.Bezier_C).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+z(tx.internal.getWidth(t)/2)+" "+z(tx.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),r.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),r.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),r.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[],n=tx.internal.getWidth(t)<=tx.internal.getHeight(t)?tx.internal.getWidth(t)/4:tx.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*tx.internal.Bezier_C).toFixed(5)),o=Number((n*tx.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+z(tx.internal.getWidth(t)/2)+" "+z(tx.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+z(tx.internal.getWidth(t)/2)+" "+z(tx.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[],n=tx.internal.getWidth(t)<=tx.internal.getHeight(t)?tx.internal.getWidth(t)/4:tx.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*tx.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+z(tx.internal.getWidth(t)/2)+" "+z(tx.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:tx.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=tx.RadioButton.Cross.YesNormal,e.D[t]=tx.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=V(t);e.scope=t.scope;var r=[],n=tx.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+U(tx.internal.getWidth(t)-2)+" "+U(tx.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(U(n.x1.x)+" "+U(n.x1.y)+" m"),r.push(U(n.x2.x)+" "+U(n.x2.y)+" l"),r.push(U(n.x4.x)+" "+U(n.x4.y)+" m"),r.push(U(n.x3.x)+" "+U(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=V(t);e.scope=t.scope;var r=tx.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+U(tx.internal.getWidth(t))+" "+U(tx.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+U(tx.internal.getWidth(t)-2)+" "+U(tx.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(U(r.x1.x)+" "+U(r.x1.y)+" m"),n.push(U(r.x2.x)+" "+U(r.x2.y)+" l"),n.push(U(r.x4.x)+" "+U(r.x4.y)+" m"),n.push(U(r.x3.x)+" "+U(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+U(tx.internal.getWidth(t))+" "+U(tx.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};tx.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=tx.internal.getWidth(t),r=tx.internal.getHeight(t),n=Math.min(e,r);return{x1:{x:(e-n)/2,y:(r-n)/2+n},x2:{x:(e-n)/2+n,y:(r-n)/2},x3:{x:(e-n)/2,y:(r-n)/2},x4:{x:(e-n)/2+n,y:(r-n)/2+n}}}},tx.internal.getWidth=function(t){var e=0;return"object"===(0,n.Z)(t)&&(e=W(t.Rect[2])),e},tx.internal.getHeight=function(t){var e=0;return"object"===(0,n.Z)(t)&&(e=W(t.Rect[3])),e};var tA=q.addField=function(t){var e;if(ta(this,t),!(t instanceof tl))throw Error("Invalid argument passed to jsPDF.addField.");return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};function tS(t){return t.reduce(function(t,e,r){return t[e]=r,t},{})}q.AcroFormChoiceField=tf,q.AcroFormListBox=td,q.AcroFormComboBox=tp,q.AcroFormEditBox=tg,q.AcroFormButton=tm,q.AcroFormPushButton=tv,q.AcroFormRadioButton=tb,q.AcroFormCheckBox=tw,q.AcroFormTextField=tN,q.AcroFormPasswordField=tL,q.AcroFormAppearance=tx,q.AcroForm={ChoiceField:tf,ListBox:td,ComboBox:tp,EditBox:tg,Button:tm,PushButton:tv,RadioButton:tb,CheckBox:tw,TextField:tN,PasswordField:tL,Appearance:tx},E.AcroForm={ChoiceField:tf,ListBox:td,ComboBox:tp,EditBox:tg,Button:tm,PushButton:tv,RadioButton:tb,CheckBox:tw,TextField:tN,PasswordField:tL,Appearance:tx},E.AcroForm,(tq=E.API).__addimage__={},tD="UNKNOWN",tR={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},tT=tq.__addimage__.getImageFileTypeByImageData=function(t,e){var r,n,i,a,o,s=tD;if("RGBA"===(e=e||tD)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(t4(t))for(o in tR)for(i=tR[o],r=0;r>"}),"transparency"in e&&Array.isArray(e.transparency)){for(var o="",s=0,c=e.transparency.length;s>",d.content=n;var v=d.objId+" 0 R";n="<>",this.internal.write(n);break;case"link":if(e.options.name){var y=this.annotations._nameMap[e.options.name];e.options.pageNumber=y.page,e.options.top=y.y}else e.options.top||(e.options.top=0);if(r="/Rect ["+e.finalBounds.x+" "+e.finalBounds.y+" "+e.finalBounds.w+" "+e.finalBounds.h+"] ",n="",e.options.url)n="<>";else if(e.options.pageNumber)switch(n="<>",this.internal.write(n))}}this.internal.write("]")}}]),et.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},et.link=function(t,e,r,n,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(t),y:s(e),w:o(t+r),h:s(e+n)},options:i,type:"link"})},et.textWithLink=function(t,e,r,n){var i,a,o=this.getTextWidth(t),s=this.internal.getLineHeight()/this.internal.scaleFactor;return void 0!==n.maxWidth?(a=n.maxWidth,i=Math.ceil(s*this.splitTextToSize(t,a).length)):(a=o,i=s),this.text(t,e,r,n),r+=.2*s,"center"===n.align&&(e-=o/2),"right"===n.align&&(e-=o),this.link(e,r-s,a,i,n),o},et.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},/** * @license * Copyright (c) 2017 Aras Abbasi * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},o=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},s=t.__arabicParser__.isArabicEndLetter=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length<=2},c=t.__arabicParser__.isArabicAlfLetter=function(t){return o(t)&&i.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=1};var u=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=3};var h=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&a(t)&&4==e[t.charCodeAt(0)].length},l=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=r,i="",a=0;for(e=0;e>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},er=E.API,(en=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"parentNode",{})}).prototype.getContext=function(t,e){var r;if("2d"!==(t=t||"2d"))return null;for(r in e)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=e[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},en.prototype.toDataURL=function(){throw Error("toDataURL is not implemented.")},er.events.push(["initialized",function(){this.canvas=new en,this.canvas.pdf=this}]),ei=E.API,ea={left:0,top:0,bottom:0,right:0},eo=!1,es=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},ea),this.internal.__cell__.margins.width=this.getPageWidth(),ec.call(this))},ec=function(){this.internal.__cell__.lastCell=new eu,this.internal.__cell__.pages=1},(eu=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var e=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var r=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(t){a=t}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),this}).prototype.clone=function(){return new eu(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},eu.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},ei.setHeaderFunction=function(t){return es.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},ei.getTextDimensions=function(t,e){es.call(this);var r=(e=e||{}).fontSize||this.getFontSize(),n=e.font||this.getFont(),i=e.scaleFactor||this.internal.scaleFactor,a=0,o=0,s=0,c=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}var u=e.maxWidth;u>0?"string"==typeof t?t=this.splitTextToSize(t,u):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(c.splitTextToSize(e,u))},[])):t=Array.isArray(t)?t:[t];for(var h=0;hthis.getPageHeight()?(this.cellAddPage(),t.y=n.top,a&&i&&(this.printHeaderRow(t.lineNumber,!0),t.y+=i[0].height)):t.y=e.y+e.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===eo?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-r,t.y+r,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+r,{align:"center",baseline:"top",maxWidth:t.width-r-r}):this.text(t.text,t.x+r,t.y+r,{align:"left",baseline:"top",maxWidth:t.width-r-r})),this.internal.__cell__.lastCell=t,this},ei.table=function(t,e,r,i,a){if(es.call(this),!r)throw Error("No data for PDF table.");var o,s,c,u,h=[],l=[],f=[],d={},p={},g=[],m=[],v=(a=a||{}).autoSize||!1,b=!1!==a.printHeaders,y=a.css&&void 0!==a.css["font-size"]?16*a.css["font-size"]:a.fontSize||12,w=a.margins||Object.assign({width:this.getPageWidth()},ea),N="number"==typeof a.padding?a.padding:3,L=a.headerBackgroundColor||"#c8c8c8",x=a.headerTextColor||"#000";if(ec.call(this),this.internal.__cell__.printHeaders=b,this.internal.__cell__.margins=w,this.internal.__cell__.table_font_size=y,this.internal.__cell__.padding=N,this.internal.__cell__.headerBackgroundColor=L,this.internal.__cell__.headerTextColor=x,this.setFontSize(y),null==i)l=h=Object.keys(r[0]),f=h.map(function(){return"left"});else if(Array.isArray(i)&&"object"===(0,n.Z)(i[0]))for(h=i.map(function(t){return t.name}),l=i.map(function(t){return t.prompt||t.name||""}),f=i.map(function(t){return t.align||"left"}),o=0;o0&&this.setTableHeaderRow(i),this.setFont(void 0,"normal"),eo=!1};var t_={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},tP=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],tk=tS(tP),tI=[100,200,300,400,500,600,700,800,900],tF=tS(tI);function tC(t){var e,r,n,i=t.family.replace(/"|'/g,"").toLowerCase(),a=t_[r=(r=t.style)||"normal"]?r:"normal",o=(e=t.weight)?"number"==typeof e?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):"bold"===e?700:400:400,s="number"==typeof tk[n=(n=t.stretch)||"normal"]?n:"normal";return{family:i,style:a,weight:o,stretch:s,src:t.src||[],ref:t.ref||{name:i,style:[s,a,o].join(" ")}}}function tj(t,e,r,n){var i;for(i=r;i>=0&&i=0&&i=2?t[1]:e[0],e[2]=t.length>=3?t[2]:e[0],e[3]=t.length>=4?t[3]:e[1]),l.margin=e}});var a=!1;Object.defineProperty(this,"autoPaging",{get:function(){return a},set:function(t){a=t}});var o=0;Object.defineProperty(this,"lastBreak",{get:function(){return o},set:function(t){o=t}});var s=[];Object.defineProperty(this,"pageBreaks",{get:function(){return s},set:function(t){s=t}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(t){t instanceof f&&(l=t)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(t){l.path=t}});var c=[];Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=g(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=g(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var u=null,h=null;Object.defineProperty(this,"fontFaces",{get:function(){return h},set:function(t){u=null,h=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))){var r=e[1],n=(e[2],e[3]),i=e[4],a=(e[5],e[6]),o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===o?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(t){var e,r,n=[],i=t.trim();if(""===i)return ep;if(i in tB)return[tB[i]];for(;""!==i;){switch(r=null,e=(i=tE(i)).charAt(0)){case'"':case"'":r=function(t,e){for(var r=0;r=700||"bold"===r)&&(h="bold"),"italic"===r&&(h+="italic"),0===h.length&&(h="normal");for(var l="",f={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},d=0;d=2*Math.PI&&(n=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:r,startAngle:n,endAngle:i,counterclockwise:a})},d.prototype.arcTo=function(t,e,r,n,i){throw Error("arcTo not implemented.")},d.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw s.error("jsPDF.context2d.rect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+r,e),this.lineTo(t,e)},d.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw s.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,r,n),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},d.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw s.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.strokeRect");v.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},d.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw s.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,r,n))},d.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(t,e,r,n,i,a,o,s,c){var l=this.pdf.getImageProperties(t),f=1,d=1,p=1,g=1;void 0!==n&&void 0!==s&&(p=s/n,g=c/i,f=l.width/n*s/n,d=l.height/i*c/i),void 0===a&&(a=e,o=r,e=0,r=0),void 0!==n&&void 0===s&&(s=n,c=i),void 0===n&&void 0===s&&(s=l.width,c=l.height);for(var m,v=this.ctx.transform.decompose(),w=q(v.rotate.shx),x=new h,S=(x=(x=(x=x.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new u(a-e*p,o-r*g,n*f,i*d)),_=y.call(this,S),P=[],k=0;k<_.length;k+=1)-1===P.indexOf(_[k])&&P.push(_[k]);if(L(P),this.autoPaging)for(var I=P[0],F=P[P.length-1],C=I;CI||Cv||S0)){for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(r),i[c-1].abs.push(s);break}}break;case"bct":r=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(r);break;case"qct":var u=a[o-1].x+2/3*(s.x1-a[o-1].x),h=a[o-1].y+2/3*(s.y1-a[o-1].y),l=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),d=s.x,p=s.y;r=[u-a[o-1].x,h-a[o-1].y,l-a[o-1].x,f-a[o-1].y,d-a[o-1].x,p-a[o-1].y],i[i.length-1].deltas.push(r);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}n=e?null:"stroke"===t?"stroke":"fill";for(var g=!1,b=0;b=.01&&(f=this.pdf.internal.getFontSize(),this.pdf.setFontSize(f*t.scale),d=this.lineWidth,this.lineWidth=d*t.scale);var D="text"!==this.autoPaging;if(D||q.y+q.h<=C){if(D||q.y>=I&&q.x<=O){var R=D?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||O-q.x)[0],T=N([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-M+I+this.ctx.prevPageLastElemOffset)[0],U=D&&(k>x||k=.01&&(this.pdf.setFontSize(f),this.lineWidth=d)}else t.scale>=.01&&(f=this.pdf.internal.getFontSize(),this.pdf.setFontSize(f*t.scale),d=this.lineWidth,this.lineWidth=d*t.scale),this.pdf.text(t.text,i.x+this.posX,i.y+this.posY,{angle:t.angle,align:s,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(f),this.lineWidth=d)},j=function(t,e,n,a){n=n||0,a=a||0,this.pdf.internal.out(r(t+n)+" "+i(e+a)+" l")},O=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},B=function(t,r,n,i,s,c,u,h){this.pdf.internal.out([e(a(n+t)),e(o(i+r)),e(a(s+t)),e(o(c+r)),e(a(u+t)),e(o(h+r)),"c"].join(" "))},M=function(t,e,r,n){for(var i=2*Math.PI,a=Math.PI/2;e>r;)e-=i;var o=Math.abs(r-e);o1e-5;){var h=u+c*Math.min(o,a);s.push(E.call(this,t,u,h)),o-=Math.abs(h-u),u=h}return s},E=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=-a,s=i*i+o*o,c=s+i*i+o*a,u=4/3*(Math.sqrt(2*s*c)-c)/(i*a-o*i),h=i-u*o,l=o+u*i,f=-l,d=n+e,p=Math.cos(d),g=Math.sin(d);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:h*p-l*g,y2:h*g+l*p,x3:h*p-f*g,y3:h*g+f*p,x4:t*Math.cos(r),y4:t*Math.sin(r)}},q=function(t){return 180*t/Math.PI},D=function(t,e,r,n,i,a){var o=t+.5*(r-t),s=e+.5*(n-e),c=i+.5*(r-i),h=a+.5*(n-a),l=Math.min(t,i,o,c),f=Math.min(e,a,s,h);return new u(l,f,Math.max(t,i,o,c)-l,Math.max(e,a,s,h)-f)},R=function(t,e,r,n,i,a,o,s){var c,h,l,f,d,p,g,m,v,b,y,w,N,L,x=r-t,A=n-e,S=i-r,_=a-n,P=o-i,k=s-a;for(h=0;h<41;h++)v=(g=(l=t+(c=h/40)*x)+c*((d=r+c*S)-l))+c*(d+c*(i+c*P-d)-g),b=(m=(f=e+c*A)+c*((p=n+c*_)-f))+c*(p+c*(a+c*k-p)-m),0==h?(y=v,w=b,N=v,L=b):(y=Math.min(y,v),w=Math.min(w,b),N=Math.max(N,v),L=Math.max(L,b));return new u(Math.round(y),Math.round(w),Math.round(N-y),Math.round(L-w))},T=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t=JSON.stringify({lineDash:this.ctx.lineDash,lineDashOffset:this.ctx.lineDashOffset});this.prevLineDash!==t&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=t)}}}(E.API),eg=E.API,em=function(t){var e,r,n,i,a,o,s,c,u,h;for(/[^\x00-\xFF]/.test(t),r=[],n=0,i=(t+=e="\x00\x00\x00\x00".slice(t.length%4||4)).length;i>n;n+=4)0!==(a=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(o=(a=((a=((a=((a=(a-(h=a%85))/85)-(u=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,c+33,u+33,h+33)):r.push(122);return function(t,e){for(var r=e;r>0;r--)t.pop()}(r,e.length),String.fromCharCode.apply(String,r)+"~>"},ev=function(t){var e,r,n,i,a,o=String,s="length",c="charCodeAt",u="slice",h="replace";for(t[u](-2),t=t[u](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[u](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[c](i)-33)+614125*(t[c](i+1)-33)+7225*(t[c](i+2)-33)+85*(t[c](i+3)-33)+(t[c](i+4)-33),n.push(255&r>>24,255&r>>16,255&r>>8,255&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),o.fromCharCode.apply(o,n)},eb=function(t){var e=RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var r="",n=0;n",i.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":n=ey(n),i.push("/FlateDecode");break;default:throw Error('The filter: "'+e[r]+'" is not implemented')}return{data:n,reverseChain:i.reverse().join(" ")}},(ew=E.API).loadFile=function(t,e,r){return function(t,e,r){e=!1!==e,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,e,r){var n=new XMLHttpRequest,i=0,a=function(t){var e=t.length,r=[],n=String.fromCharCode;for(i=0;iu&&(c=h,h=u,u=c);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",u>h&&(c=h,h=u,u=c)}return{width:h,height:u,unit:e,k:a,orientation:t}},t.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(tC):null;var r=new c(e);return e.worker?r:r.from(t).doCallback()}}(E.API),E.API.addJS=function(t){return this.internal.events.subscribe("postPutResources",function(){ef=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ef+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ed=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+t+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==ef&&void 0!==ed&&this.internal.out("/Names <>")}),this},(eN=E.API).events.push(["postPutResources",function(){var t=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var e=this.outline.render().split(/\r\n/),r=0;r> endobj")}var h=this.internal.newObject();for(this.internal.write("<< /Names [ "),r=0;r>","endobj"),eL=this.internal.newObject(),this.internal.write("<< /Dests "+h+" 0 R"),this.internal.write(">>","endobj")}}]),eN.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+eL+" 0 R"))}]),eN.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,r){var n={title:e,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var r=0;r0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(e){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line("/Count "+a),i.options&&i.options.pageNumber){var o=t.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var s=0;s> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var r=0;re;0<=e?++f:--f)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>n)throw Error("More transparent colors than palette size");if((h=n-this.transparency.indexed.length)>0)for(d=0;0<=h?dh;0<=h?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(l=this.read(e)).indexOf(0),c=String.fromCharCode.apply(String,l.slice(0,s)),this.text[c]=String.fromCharCode.apply(String,l.slice(s+1));break;case"IEND":return o&&this.animation.frames.push(o),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw Error("Incomplete or corrupt PNG file")}}t.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?et;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},t.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},t.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},t.prototype.decodePixels=function(t){var e=this.pixelBitlength/8,r=new Uint8Array(this.width*this.height*e),n=0,a=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function o(i,o,s,c){var u,h,l,f,d,p,g,m,v,b,y,w,N,L,x,A,S,_,P,k,I,F=Math.ceil((a.width-i)/s),C=Math.ceil((a.height-o)/c),j=a.width==F&&a.height==C;for(L=e*F,w=j?r:new Uint8Array(L*C),p=t.length,N=0,h=0;N1&&r/i, 2013. * * https://github.com/deanm/omggif * * 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. * * omggif is a JavaScript implementation of a GIF 89a encoder and decoder, * including animation and compression. It does not rely on any specific * underlying system, so should run in the browser, Node, or Plask. */function eC(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,i=t[e++],a=1<<(7&i)+1;t[e++],t[e++];var o=null,s=null;i>>7&&(o=e,s=a,e+=3*a);var c=!0,u=[],h=0,l=null,f=0,d=null;for(this.width=r,this.height=n;c&&e=0))throw Error("Invalid block size");if(0===g)break;e+=g}break;case 249:if(4!==t[e++]||0!==t[e+4])throw Error("Invalid graphics extension block.");var p=t[e++];h=t[e++]|t[e++]<<8,l=t[e++],0==(1&p)&&(l=null),f=p>>2&7,e++;break;case 254:for(;;){if(!((g=t[e++])>=0))throw Error("Invalid block size");if(0===g)break;e+=g}break;default:throw Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var g,m=t[e++]|t[e++]<<8,v=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++],N=w>>6&1,L=1<<(7&w)+1,x=o,A=s,S=!1;w>>7&&(S=!0,x=e,A=L,e+=3*L);var _=e;for(e++;;){if(!((g=t[e++])>=0))throw Error("Invalid block size");if(0===g)break;e+=g}u.push({x:m,y:v,width:b,height:y,has_local_palette:S,palette_offset:x,palette_size:A,data_offset:_,data_length:e-_,transparent_index:l,interlaced:!!N,delay:h,disposal:f});break;case 59:c=!1;break;default:throw Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return d},this.frameInfo=function(t){if(t<0||t>=u.length)throw Error("Frame index out of range.");return u[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);ej(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!0===i.interlaced&&(g+=4*r*7);for(var m=8,v=0,b=o.length;v=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=L,n[p++]=N,n[p++]=w,n[p++]=255}--l}},this.decodeAndBlitFrameRGBA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);ej(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!0===i.interlaced&&(g+=4*r*7);for(var m=8,v=0,b=o.length;v=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=w,n[p++]=N,n[p++]=L,n[p++]=255}--l}}}function ej(t,e,r,n){for(var i=t[e++],a=1<>=u,l-=u,v!==a){if(v===o)break;for(var b=va;)w=g[w]>>8,++y;var N=w;if(d+y+(b!==v?1:0)>n)return void s.log("Warning, gif stream longer than expected.");r[d++]=N;var L=d+=y;for(b!==v&&(r[d++]=N),w=b;y--;)w=g[w],r[--L]=255&w,w>>=8;null!==m&&c<4096&&(g[c++]=m<<8|N,c>=h+1&&u<12&&(++u,h=h<<1|1)),m=v}else c=o+1,h=(1<<(u=i+1))-1,m=null}return d!==n&&s.log("Warning, gif stream shorter than expected."),r}/** * @license Copyright (c) 2008, Adobe Systems Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of Adobe Systems Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 THE COPYRIGHT OWNER OR CONTRIBUTORS 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. */function eO(t){var e,r,n,i,a,o=Math.floor,s=Array(64),c=Array(64),u=Array(64),h=Array(64),l=Array(65535),f=Array(65535),d=Array(64),p=Array(64),g=[],m=0,v=7,b=Array(64),y=Array(64),w=Array(64),N=Array(256),L=Array(2048),x=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],A=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function j(t,e){for(var r=0,n=0,i=[],a=1;a<=16;a++){for(var o=1;o<=t[a];o++)i[e[n]]=[],i[e[n]][0]=r,i[e[n]][1]=a,n++,r++;r*=2}return i}function O(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<>8&255),B(255&t)}function E(t,e,r,n,i){for(var a,o=i[0],s=i[240],c=function(t,e){var r,n,i,a,o,s,c,u,h,l,f=0;for(h=0;h<8;++h){r=t[f],n=t[f+1],i=t[f+2],a=t[f+3],o=t[f+4],s=t[f+5],c=t[f+6];var p=r+(u=t[f+7]),g=r-u,m=n+c,v=n-c,b=i+s,y=i-s,w=a+o,N=a-o,L=p+w,x=p-w,A=m+b,S=m-b;t[f]=L+A,t[f+4]=L-A;var _=.707106781*(S+x);t[f+2]=x+_,t[f+6]=x-_;var P=.382683433*((L=N+y)-(S=v+g)),k=.5411961*L+P,I=1.306562965*S+P,F=.707106781*(A=y+v),C=g+F,j=g-F;t[f+5]=j+k,t[f+3]=j-k,t[f+1]=C+I,t[f+7]=C-I,f+=8}for(f=0,h=0;h<8;++h){r=t[f],n=t[f+8],i=t[f+16],a=t[f+24],o=t[f+32],s=t[f+40],c=t[f+48];var O=r+(u=t[f+56]),B=r-u,M=n+c,E=n-c,q=i+s,D=i-s,R=a+o,T=a-o,U=O+R,z=O-R,H=M+q,W=M-q;t[f]=U+H,t[f+32]=U-H;var V=.707106781*(W+z);t[f+16]=z+V,t[f+48]=z-V;var G=.382683433*((U=T+D)-(W=E+B)),Y=.5411961*U+G,J=1.306562965*W+G,X=.707106781*(H=D+E),K=B+X,Z=B-X;t[f+40]=Z+Y,t[f+24]=Z-Y,t[f+8]=K+J,t[f+56]=K-J,f++}for(h=0;h<64;++h)l=t[h]*e[h],d[h]=l>0?l+.5|0:l-.5|0;return d}(t,e),u=0;u<64;++u)p[x[u]]=c[u];var h=p[0]-r;r=p[0],0==h?O(n[0]):(O(n[f[a=32767+h]]),O(l[a]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return O(o),r;for(var m,v=1;v<=g;){for(var b=v;0==p[v]&&v<=g;)++v;var y=v-b;if(y>=16){m=y>>4;for(var w=1;w<=m;++w)O(s);y&=15}O(i[(y<<4)+f[a=32767+p[v]]]),O(l[a]),v++}return 63!=g&&O(o),r}function q(t){a!=(t=Math.min(Math.max(t,1),100))&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=o((e[r]*t+50)/100);n=Math.min(Math.max(n,1),255),s[x[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var l=o((i[a]*t+50)/100);l=Math.min(Math.max(l,1),255),c[x[a]]=l}for(var f=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,p=0;p<8;p++)for(var g=0;g<8;g++)u[d]=1/(s[x[d]]*f[p]*f[g]*8),h[d]=1/(c[x[d]]*f[p]*f[g]*8),d++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),a=t)}this.encode=function(t,a){a&&q(a),g=[],m=0,v=7,M(65496),M(65504),M(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),M(1),M(1),B(0),B(0),function(){M(65499),M(132),B(0);for(var t=0;t<64;t++)B(s[t]);B(1);for(var e=0;e<64;e++)B(c[e])}(),d=t.width,p=t.height,M(65472),M(17),B(8),M(p),M(d),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1),function(){M(65476),M(418),B(0);for(var t=0;t<16;t++)B(A[t+1]);for(var e=0;e<=11;e++)B(S[e]);B(16);for(var r=0;r<16;r++)B(_[r+1]);for(var n=0;n<=161;n++)B(P[n]);B(1);for(var i=0;i<16;i++)B(k[i+1]);for(var a=0;a<=11;a++)B(I[a]);B(17);for(var o=0;o<16;o++)B(F[o+1]);for(var s=0;s<=161;s++)B(C[s])}(),M(65498),M(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,l=0,f=0;m=0,v=7,this.encode.displayName="_encode_";for(var d,p,N,x,j,D,R,T,U,z,H,W=t.data,V=t.width,G=t.height,Y=4*V,J=0;J>3)*Y+(U=4*(7&H)),J+z>=G&&(T-=Y*(J+1+z-G)),N+U>=Y&&(T-=N+U-Y+4),x=W[T++],j=W[T++],D=W[T++],b[H]=(L[x]+L[j+256>>0]+L[D+512>>0]>>16)-128,y[H]=(L[x+768>>0]+L[j+1024>>0]+L[D+1280>>0]>>16)-128,w[H]=(L[x+1280>>0]+L[j+1536>>0]+L[D+1792>>0]>>16)-128;o=E(b,u,o,e,n),l=E(y,h,l,r,i),f=E(w,h,f,r,i),N+=32}J+=8}if(v>=0){var X=[];X[1]=v+1,X[0]=(1<>0]=38470*t,L[t+512>>0]=7471*t+32768,L[t+768>>0]=-11059*t,L[t+1024>>0]=-21709*t,L[t+1280>>0]=32768*t+8421375,L[t+1536>>0]=-27439*t,L[t+1792>>0]=-5329*t}(),q(t)}/** * @license * Copyright (c) 2017 Aras Abbasi * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */function eB(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function eM(t){function e(t){if(!t)throw Error("assert :P")}function r(t,e,r){for(var n=0;4>n;n++)if(t[e+n]!=r.charCodeAt(n))return!0;return!1}function n(t,e,r,n,i){for(var a=0;an+1?[]:new e),!(i.length>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do t[r+(i-=n)]=a;while(0=o),512>=o)var s=a(512);else if(null==(s=a(o)))return 0;return function(t,r,n,i,o,s){var h,f,d=r,p=1<h;++h){if(g[h]>1<(L-=g[h]))return 0;for(;0=h;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0b&&!(0>=(v-=g[b]));)++b,v<<=1;p+=x=1<<(v=b-n),t[r+(b=w&y)].g=v+n,t[r+b].value=d-r-b}i.g=h-n,i.value=s[f++],u(t,d+(w>>n),o,x,i),w=c(w,h)}}return N!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function l(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,l),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(rm,f)}function p(t,r,n,i){e(null!=t),e(null!=r),e(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,_(t)}function g(t,e){for(var r=0;0i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4>>=8,t.Ra+=t.oa[t.pa+t.bb]<>>0,++t.bb,t.u-=8;x(t)&&(t.h=1,t.u=0)}function y(t,r){if(e(0<=r),!t.h&&r<=rb){var n=L(t)&rv[r];return t.u+=r,b(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(t){return t.Ra>>>(t.u&ry-1)>>>0}function x(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>ry}function A(t,e){t.u=e,t.h=x(t)}function S(t){t.u>=rw&&(e(t.u>=rw),b(t))}function _(t){e(null!=t&&null!=t.oa),t.pa>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pat.b&&_(t);var n=t.b,i=r*e>>>8,a=(t.I>>>n>i)+0;for(a?(r-=i,t.I-=i+1<>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+rN[n],t.b-=n,t.Ca=(r<>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255}function F(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return F(t,e)|t[e+2]<<16}function j(t,e){return F(t,e)|F(t,e+2)<<16}function O(t,r){return e(null!=t),e(0=a||0>=o?0:(n[0]=a,i[0]=o,1)}function q(t,e){return t+(1<>>e}function D(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function R(e,r){t[r]=function(r,n,i,a,o,s,c){var u;for(u=0;u>>1)+(t&e)>>>0}function z(t){return 0<=t&&256>t?t:0>t?0:255>1))}function W(t,e,r){return Math.abs(e-r)-Math.abs(t-r)}function V(t,e,r,n,i,a,o){for(n=a[o-1],r=0;r>8&255,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o>>8,u=s,h=255&(h=(h=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u+=(t.hd<<24>>24)*(c<<24>>24)>>>5)+((t.ud<<24>>24)*(h<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(h<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,h){for(n=c;n>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>l)for(e=(1<>=l}else t["VP8LMapColor"+n](s,c,d,p,u,h,r,o,f)}}function K(t,e,r,n,i){for(r=e+r;e>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255}}function Z(t,e,r,n,i){for(r=e+r;e>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(t,e,r,n,i){for(r=e+r;e>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=a,n[i++]=o}}function tt(t,e,r,n,i){for(r=e+r;e>0&255,n[i++]=a>>8&255,n[i++]=a>>16&255}}function te(t,e,r,i,a,o){if(0==o)for(r=e+r;e>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else n(i,a,t,e,r)}function tr(e,r){t[r][0]=t[e+"0"],t[r][1]=t[e+"1"],t[r][2]=t[e+"2"],t[r][3]=t[e+"3"],t[r][4]=t[e+"4"],t[r][5]=t[e+"5"],t[r][6]=t[e+"6"],t[r][7]=t[e+"7"],t[r][8]=t[e+"8"],t[r][9]=t[e+"9"],t[r][10]=t[e+"10"],t[r][11]=t[e+"11"],t[r][12]=t[e+"12"],t[r][13]=t[e+"13"],t[r][14]=t[e+"0"],t[r][15]=t[e+"0"]}function tn(t){return t==nh||t==nl||t==nf||t==nd}function ti(){this.eb=[],this.size=this.A=this.fb=0}function ta(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function to(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ti,this.f.kb=new ta,this.sd=null}function ts(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function tc(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function tu(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function th(t,e){var r=t.T,i=e.ba.f.RGBA,a=i.eb,o=i.fb+t.ka*i.A,s=nD[e.ba.S],c=t.y,u=t.O,h=t.f,l=t.N,f=t.ea,d=t.W,p=e.cc,g=e.dc,m=e.Mc,v=e.Nc,b=t.ka,y=t.ka+t.T,w=t.U,N=w+1>>1;for(0==b?s(c,u,null,null,h,l,f,d,h,l,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w),++r);b+2r,i=r==ni||r==no||r==ns||r==nc||12==r||tn(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!rd(e.Oa,t,i?11:12))return 0;if(i&&tn(r)&&e6(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=tu,t.Kb){if(r=t.U+1>>1,e.memory=a(t.U+2*r),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+r,e.Ib=th,e6()}}else alert("todo:EmitYUV");i&&(e.Jb=tl,n&&e3())}if(n&&!n$){for(t=0;256>t;++t)nQ[t]=89858*(t-128)+nY>>nG,n5[t]=-22014*(t-128)+nY,n2[t]=-45773*(t-128),n1[t]=113618*(t-128)+nY>>nG;for(t=nJ;t>nG,n0[t-nJ]=tV(e,255),n3[t-nJ]=tV(e+8>>4,15);n$=1}return 1}function td(t){var r=t.ma,n=t.U,i=t.T;return e(!(1&t.ka)),0>=n||0>=i?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function tp(t){t.ma.memory=null}function tg(t,e,r,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,r[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function tm(t,e){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<>4)*t+(8-(15&r)))?r:1}function tb(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0>>0,e(8>=n.g),t.g}function tw(t,r,n){var i=t.xc;return e((r=0==i?0:t.vc[t.md*(n>>i)+(r>>i)])>_.b)*A;vN&&(F=N),(0,rI[P[k++]>>8&15])(p,g+ +I,y,w+I-N,F-I,y,w+I),I=F}g+=N,w+=N,++v&x||(_+=A)}d!=l.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=l.Ea)-(w=p&~(y=(g=1<>l.b)*v;f=a),0o.o&&(i=o.o),n=i?n=0:(a[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=i-n,n=1),n){if(c=c[0],11>(n=t.ca).S){var l=n.f.RGBA,f=(i=n.S,a=o.U,o=o.T,h=l.eb,l.A),d=o;for(l=l.fb+t.Ma*l.A;0i){var a=t.l.width,o=n.ca,s=n.tb+a*i,c=t.V,u=t.Ba+t.c*i,h=t.gc;e(1==t.ab),e(3==h[0].hc),rP(h[0],i,r,c,u,o,s),tA(n,i,r,o,s,a)}t.C=t.Ma=r}function t_(t,r,n,i,a,o,s){var c=t.$/i,u=t.$%i,h=t.m,l=t.s,f=n+t.$,d=f;a=n+i*a;var p=n+i*o,g=280+l.ua,m=t.Pb?c:16777216,v=0=m){var _=f-n;e((m=t).Pb),m.wd=m.m,m.xd=_,0k.g?(A(N,N.u+k.g),_[P]=k.value,N=0):(A(N,N.u+k.g-256),e(256<=k.value),N=k.value),0==N&&(w=!0)}else N=tb(y.G[0],y.H[0],h)}if(h.h)break;if(w||256>N){if(!w){if(y.nd)r[f]=(y.qb|N<<8)>>>0;else{if(S(h),w=tb(y.G[1],y.H[1],h),S(h),_=tb(y.G[2],y.H[2],h),P=tb(y.G[3],y.H[3],h),h.h)break;r[f]=(P<<24|w<<16|N<<8|_)>>>0}}if(w=!1,++f,++u>=i&&(u=0,++c,null!=s&&c<=o&&!(c%16)&&s(t,c),null!=v))for(;d>>v.Mb]=N}else if(280>N){if(N=tm(N-256,h),_=tb(y.G[4],y.H[4],h),S(h),_=tv(i,_=tm(_,h)),h.h)break;if(f-n<_||a-f=i;)u-=i,++c,null!=s&&c<=o&&!(c%16)&&s(t,c);if(e(f<=a),u&b&&(y=tw(l,u,c)),null!=v)for(;d>>v.Mb]=N}else{if(!(N>>v.Mb]=N;N=f,e(!(w>>>(_=v).Xa)),r[N]=_.X[w],w=!0}w||e(h.h==x(h))}if(t.Pb&&h.h&&fo?o:c),t.a=0,t.$=f-n}return 1}return t.a=3,0}function tP(t){e(null!=t),t.vc=null,t.yc=null,t.Ya=null;var r=t.Wa;null!=r&&(r.X=null),t.vb=null,e(null!=t)}function tk(){var e=new eX;return null==e?null:(e.a=0,e.xb=nE,tr("Predictor","VP8LPredictors"),tr("Predictor","VP8LPredictors_C"),tr("PredictorAdd","VP8LPredictorsAdd"),tr("PredictorAdd","VP8LPredictorsAdd_C"),rA=G,rF=J,rC=K,rj=Z,rO=$,rB=Q,rM=tt,t.VP8LMapColor32b=r_,t.VP8LMapColor8b=rk,e)}function tI(t,r,n,s,c){var u=1,f=[t],p=[r],g=s.m,m=s.s,v=null,b=0;t:for(;;){if(n)for(;u&&y(g,1);){var w=f,N=p,x=s,_=1,P=x.m,k=x.gc[x.ab],I=y(P,2);if(x.Oc&1<=x.ab),I){case 0:case 1:k.b=y(P,3)+2,_=tI(q(k.Ea,k.b),q(k.nc,k.b),0,x,k.K),k.K=k.K[0];break;case 3:var F,C=y(P,8)+1,j=16>M.b),R=a(E);if(null==R)F=0;else{var T=M.K[0],U=M.w;for(R[0]=M.K[0][0],B=1;B<1*C;++B)R[B]=D(T[U+B],R[B-1]);for(;B<4*E;++B)R[B]=0;M.K[0]=null,M.K[0]=R,F=1}}_=F;break;case 2:break;default:e(0)}u=_}}if(f=f[0],p=p[0],u&&y(g,1)&&!(u=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}if(z=u)e:{var z,H,W,V,G=s,Y=f,J=p,X=b,K=G.m,Z=G.s,$=[null],Q=1,tt=0,te=nw[X];r:for(;;){if(n&&y(K,1)){var tr=y(K,3)+2,tn=q(Y,tr),ti=q(J,tr),ta=tn*ti;if(!tI(tn,ti,0,G,$))break r;for($=$[0],Z.xc=tr,H=0;H>8&65535;$[H]=to,to>=Q&&(Q=to+1)}}if(K.h)break r;for(W=0;5>W;++W){var ts=nm[W];!W&&0=tu),tl=th;var tf=a(tt);if(null==tl||null==tf||null==tc){G.a=1;break r}for(H=V=0;HW;++W){ts=nm[W],tg[W]=tc,tm[W]=V,!W&&0tL)break i}else tR=tL;for(tT=0;tTtX)tz[tT++]=tX,0!=tX&&(tV=tX);else{var tK=16==tX,tZ=tX-16,t$=ng[tZ],tQ=y(tW,np[tZ])+t$;if(tT+tQ>tL)break i;for(var t1=tK?tV:0;0=W){var t2,t5=tf[0];for(t2=1;t2t5&&(t5=tf[t2]);tw+=t5}}if(tp.nd=tb,tp.Qb=0,tb&&(tp.qb=(tg[3][tm[3]+0].value<<24|tg[1][tm[1]+0].value<<16|tg[2][tm[2]+0].value)>>>0,0==tv&&256>tg[0][tm[0]+0].value&&(tp.Qb=1,tp.qb+=tg[0][tm[0]+0].value<<8)),tp.jc=!tp.Qb&&6>tw,tp.jc)for(td=0;td>=ty(t4,8,t3),t0>>=ty(tp.G[1][tp.H[1]+t0],16,t3),t0>>=ty(tp.G[2][tp.H[2]+t0],0,t3),ty(tp.G[3][tp.H[3]+t0],24,t3))}}Z.vc=$,Z.Wb=Q,Z.Ya=tl,Z.yc=tc,z=1;break e}z=0}if(!(u=z)){s.a=3;break t}if(0r+1?[]:0),!(n.lengtht?0:t>e?e:t}function tG(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function tY(){var t=new tW;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,nA||(nA=tZ)),t}function tJ(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function tX(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function tK(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return tJ(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,a=r.w,o=r.ha;if(4>o)return tJ(t,7,"Truncated header.");var s=n[a+0]|n[a+1]<<8|n[a+2]<<16,c=t.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3o)return tJ(t,7,"cannot parse picture header");if(!tX(n,a,o))return tJ(t,3,"Bad code word");u.c=16383&(n[a+4]<<8|n[a+3]),u.Td=n[a+4]>>6,u.i=16383&(n[a+6]<<8|n[a+5]),u.Ud=n[a+6]>>6,a+=7,o-=7,t.za=u.c+15>>4,t.Ub=u.i+15>>4,r.width=u.c,r.height=u.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,i((s=t.Pa).jb,0,255,s.jb.length),e(null!=(s=t.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(c.ub>o)return tJ(t,7,"bad partition length");p(s=t.m,n,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(u.Ld=P(s),u.Kd=P(s)),u=t.Qa;var h,l=t.Pa;if(e(null!=s),e(null!=u),u.Cb=P(s),u.Cb){if(u.Bb=P(s),P(s)){for(u.Fb=P(s),h=0;4>h;++h)u.Zb[h]=P(s)?m(s,7):0;for(h=0;4>h;++h)u.Lb[h]=P(s)?m(s,6):0}if(u.Bb)for(h=0;3>h;++h)l.jb[h]=P(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return tJ(t,3,"cannot parse segment header");if((u=t.ed).zd=P(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=P(s),u.Pc&&P(s)){for(l=0;4>l;++l)P(s)&&(u.vd[l]=m(s,6));for(l=0;4>l;++l)P(s)&&(u.od[l]=m(s,6))}if(t.L=0==u.Tb?0:u.zd?1:2,s.Ka)return tJ(t,3,"cannot parse filter header");var f=o;if(o=h=a,a=h+f,u=f,t.Xb=(1<u&&(d=u),p(t.Jc[+f],n,h,d),h+=d,u-=d,o+=3}p(t.Jc[+l],n,h,u),n=hd;++d){if(f.Cb){var v=f.Zb[d];f.Fb||(v+=n)}else{if(0>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=nL[tV(v+l,117)],b.Qc[1]=nx[tV(v+h,127)],b.lc=v+h}if(!c.Rb)return tJ(t,4,"Not a key frame.");for(P(s),c=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)l=k(s,nF[n][o][a][u])?g(s,8):nk[n][o][a][u],c.Wc[n][o].Yb[a][u]=l;for(o=0;17>o;++o)c.Xc[n][o]=c.Wc[n][nC[o]]}return t.kc=P(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function tZ(t,e,r,n,i,a,o){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!k(t,s[r+0]))return i;for(;!k(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var c=e[i+1].Yb;if(k(t,s[r+2])){var u=t,h=0;if(k(u,(f=s)[(l=r)+3])){if(k(u,f[l+6])){for(s=0,l=2*(h=k(u,f[l+8]))+(f=k(u,f[l+9+h])),h=0,f=nS[l];f[s];++s)h+=h+k(u,f[s]);h+=3+(8<(u=t).b&&_(u);var l,f=u.b,d=(l=u.Ca>>1)-(u.I>>f)>>31;--u.b,u.Ca+=d,u.Ca|=1,u.I-=(l+1&d)<>3),t[e+r+32*n]=-256&i?0>i?0:255:i}function t1(t,e,r,n,i,a){tQ(t,e,0,r,n+i),tQ(t,e,1,r,n+a),tQ(t,e,2,r,n-a),tQ(t,e,3,r,n-i)}function t2(t){return(20091*t>>16)+t}function t5(t,e,r,n){var i,o=0,s=a(16);for(i=0;4>i;++i){var c=t[e+0]+t[e+8],u=t[e+0]-t[e+8],h=(35468*t[e+4]>>16)-t2(t[e+12]),l=t2(t[e+4])+(35468*t[e+12]>>16);s[o+0]=c+l,s[o+1]=u+h,s[o+2]=u-h,s[o+3]=c-l,o+=4,e++}for(i=o=0;4>i;++i)c=(t=s[o+0]+4)+s[o+8],u=t-s[o+8],h=(35468*s[o+4]>>16)-t2(s[o+12]),tQ(r,n,0,0,c+(l=t2(s[o+4])+(35468*s[o+12]>>16))),tQ(r,n,1,0,u+h),tQ(r,n,2,0,u-h),tQ(r,n,3,0,c-l),o++,n+=32}function t0(t,e,r,n){var i=t[e+0]+4,a=35468*t[e+4]>>16,o=t2(t[e+4]),s=35468*t[e+1]>>16;t1(r,n,0,i+o,t=t2(t[e+1]),s),t1(r,n,1,i+a,t,s),t1(r,n,2,i-a,t,s),t1(r,n,3,i-o,t,s)}function t3(t,e,r,n,i){t5(t,e,r,n),i&&t5(t,e+16,r,n+4)}function t4(t,e,r,n){rq(t,e+0,r,n,1),rq(t,e+32,r,n+128,1)}function t6(t,e,r,n){var i;for(t=t[e+0]+4,i=0;4>i;++i)for(e=0;4>e;++e)tQ(r,n,e,i,t)}function t8(t,e,r,n){t[e+0]&&rT(t,e+0,r,n),t[e+16]&&rT(t,e+16,r,n+4),t[e+32]&&rT(t,e+32,r,n+128),t[e+48]&&rT(t,e+48,r,n+128+4)}function t7(t,e,r,n){var i,o=a(16);for(i=0;4>i;++i){var s=t[e+0+i]+t[e+12+i],c=t[e+4+i]+t[e+8+i],u=t[e+4+i]-t[e+8+i],h=t[e+0+i]-t[e+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=h+u,o[12+i]=h-u}for(i=0;4>i;++i)s=(t=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],h=t-o[3+4*i],r[n+0]=s+c>>3,r[n+16]=h+u>>3,r[n+32]=s-c>>3,r[n+48]=h-u>>3,n+=64}function t9(t,e,r){var n,i=e-32,a=255-t[i-1];for(n=0;nr;++r)n(t,e+32*r,t,e-32,16)}function ei(t,e){var r;for(r=16;0n;++n)i(e,r+32*n,t,16)}function eo(t,e){var r,n=16;for(r=0;16>r;++r)n+=t[e-1+32*r]+t[e+r-32];ea(n>>5,t,e)}function es(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e-1+32*r];ea(n>>4,t,e)}function ec(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e+r-32];ea(n>>4,t,e)}function eu(t,e){ea(128,t,e)}function eh(t,e,r){return t+2*e+r+2>>2}function el(t,e){var r,i=e-32;for(r=0,i=new Uint8Array([eh(t[i-1],t[i+0],t[i+1]),eh(t[i+0],t[i+1],t[i+2]),eh(t[i+1],t[i+2],t[i+3]),eh(t[i+2],t[i+3],t[i+4])]);4>r;++r)n(t,e+32*r,i,0,i.length)}function ef(t,e){var r=t[e-1],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96];I(t,e+0,16843009*eh(t[e-1-32],r,n)),I(t,e+32,16843009*eh(r,n,i)),I(t,e+64,16843009*eh(n,i,a)),I(t,e+96,16843009*eh(i,a,a))}function ed(t,e){var r,n=4;for(r=0;4>r;++r)n+=t[e+r-32]+t[e-1+32*r];for(n>>=3,r=0;4>r;++r)i(t,e+32*r,n,4)}function ep(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1-32],o=t[e+0-32],s=t[e+1-32],c=t[e+2-32],u=t[e+3-32];t[e+0+96]=eh(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=eh(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=eh(a,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=eh(o,a,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=eh(s,o,a),t[e+3+32]=t[e+2+0]=eh(c,s,o),t[e+3+0]=eh(u,c,s)}function eg(t,e){var r=t[e+1-32],n=t[e+2-32],i=t[e+3-32],a=t[e+4-32],o=t[e+5-32],s=t[e+6-32],c=t[e+7-32];t[e+0+0]=eh(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=eh(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=eh(n,i,a),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=eh(i,a,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=eh(a,o,s),t[e+3+64]=t[e+2+96]=eh(o,s,c),t[e+3+96]=eh(s,c,c)}function em(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1-32],o=t[e+0-32],s=t[e+1-32],c=t[e+2-32],u=t[e+3-32];t[e+0+0]=t[e+1+64]=a+o+1>>1,t[e+1+0]=t[e+2+64]=o+s+1>>1,t[e+2+0]=t[e+3+64]=s+c+1>>1,t[e+3+0]=c+u+1>>1,t[e+0+96]=eh(i,n,r),t[e+0+64]=eh(n,r,a),t[e+0+32]=t[e+1+96]=eh(r,a,o),t[e+1+32]=t[e+2+96]=eh(a,o,s),t[e+2+32]=t[e+3+96]=eh(o,s,c),t[e+3+32]=eh(s,c,u)}function ev(t,e){var r=t[e+0-32],n=t[e+1-32],i=t[e+2-32],a=t[e+3-32],o=t[e+4-32],s=t[e+5-32],c=t[e+6-32],u=t[e+7-32];t[e+0+0]=r+n+1>>1,t[e+1+0]=t[e+0+64]=n+i+1>>1,t[e+2+0]=t[e+1+64]=i+a+1>>1,t[e+3+0]=t[e+2+64]=a+o+1>>1,t[e+0+32]=eh(r,n,i),t[e+1+32]=t[e+0+96]=eh(n,i,a),t[e+2+32]=t[e+1+96]=eh(i,a,o),t[e+3+32]=t[e+2+96]=eh(a,o,s),t[e+3+64]=eh(o,s,c),t[e+3+96]=eh(s,c,u)}function eb(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96];t[e+0+0]=r+n+1>>1,t[e+2+0]=t[e+0+32]=n+i+1>>1,t[e+2+32]=t[e+0+64]=i+a+1>>1,t[e+1+0]=eh(r,n,i),t[e+3+0]=t[e+1+32]=eh(n,i,a),t[e+3+32]=t[e+1+64]=eh(i,a,a),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=a}function ey(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96],o=t[e-1-32],s=t[e+0-32],c=t[e+1-32],u=t[e+2-32];t[e+0+0]=t[e+2+32]=r+o+1>>1,t[e+0+32]=t[e+2+64]=n+r+1>>1,t[e+0+64]=t[e+2+96]=i+n+1>>1,t[e+0+96]=a+i+1>>1,t[e+3+0]=eh(s,c,u),t[e+2+0]=eh(o,s,c),t[e+1+0]=t[e+3+32]=eh(r,o,s),t[e+1+32]=t[e+3+64]=eh(n,r,o),t[e+1+64]=t[e+3+96]=eh(i,n,r),t[e+1+96]=eh(a,i,n)}function ew(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function eN(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function eL(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function ex(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];eL(n>>4,t,e)}function eA(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];eL(n>>3,t,e)}function eS(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];eL(n>>3,t,e)}function e_(t,e){eL(128,t,e)}function eP(t,e,r){var n=t[e-r],i=t[e+0],a=3*(i-n)+r9[1020+t[e-2*r]-t[e+r]],o=nt[112+(a+4>>3)];t[e-r]=ne[255+n+nt[112+(a+3>>3)]],t[e+0]=ne[255+i-o]}function ek(t,e,r,n){var i=t[e+0],a=t[e+r];return nr[255+t[e-2*r]-t[e-r]]>n||nr[255+a-i]>n}function eI(t,e,r,n){return 4*nr[255+t[e-r]-t[e+0]]+nr[255+t[e-2*r]-t[e+r]]<=n}function eF(t,e,r,n,i){var a=t[e-3*r],o=t[e-2*r],s=t[e-r],c=t[e+0],u=t[e+r],h=t[e+2*r],l=t[e+3*r];return 4*nr[255+s-c]+nr[255+o-u]>n?0:nr[255+t[e-4*r]-a]<=i&&nr[255+a-o]<=i&&nr[255+o-s]<=i&&nr[255+l-h]<=i&&nr[255+h-u]<=i&&nr[255+u-c]<=i}function eC(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)eI(t,e+n,r,i)&&eP(t,e+n,r)}function ej(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)eI(t,e+n*r,1,i)&&eP(t,e+n*r,1)}function eO(t,e,r,n){var i;for(i=3;0>7,m=18*v+63>>7,v=9*v+63>>7;c[u-3*r]=ne[255+c[u-3*r]+v],c[u-2*r]=ne[255+h+m],c[u-r]=ne[255+l+g],c[u+0]=ne[255+f-g],c[u+r]=ne[255+d-m],c[u+2*r]=ne[255+p-v]}}e+=n}}function eE(t,e,r,n,i,a,o,s){for(a=2*a+1;0>3)],p=nt[112+(p+3>>3)],g=d+1>>1;c[u-2*r]=ne[255+c[u-2*r]+g],c[u-r]=ne[255+h+p],c[u+0]=ne[255+l-d],c[u+r]=ne[255+f-g]}}e+=n}}function eq(t,e,r,n,i,a){eM(t,e,r,1,16,n,i,a)}function eD(t,e,r,n,i,a){eM(t,e,1,r,16,n,i,a)}function eR(t,e,r,n,i,a){var o;for(o=3;0u?0:255:u)&255,u=c,i[a+s]=h}}function e1(t,e,r,n,i,a){for(;0>23,s[c+4*o+1]=s[c+4*o+1]*h>>23,s[c+4*o+2]=s[c+4*o+2]*h>>23)}e+=a}}function e2(t,e,r,n,i){for(;0>4)*c>>16;t[e+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,t[e+2*a+1]=240&u|s}e+=i}}function e5(t,e,r,n,i,a,o,s){var c,u,h=255;for(u=0;u>8}function e3(){r1=e1,r2=e2,r5=e5,r0=e0}function e4(r,n,i){t[r]=function(t,r,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y){var w,N=y-1>>1,L=s[c+0]|u[h+0]<<16,x=l[f+0]|d[p+0]<<16;e(null!=t);var A=3*L+x+131074>>2;for(n(t[r+0],255&A,A>>16,g,m),null!=a&&(A=3*x+L+131074>>2,n(a[o+0],255&A,A>>16,v,b)),w=1;w<=N;++w){var S=s[c+w]|u[h+w]<<16,_=l[f+w]|d[p+w]<<16,P=L+S+x+_+524296,k=P+2*(S+x)>>3;A=k+L>>1,L=(P=P+2*(L+_)>>3)+S>>1,n(t[r+2*w-1],255&A,A>>16,g,m+(2*w-1)*i),n(t[r+2*w-0],255&L,L>>16,g,m+(2*w-0)*i),null!=a&&(A=P+x>>1,L=k+_>>1,n(a[o+2*w-1],255&A,A>>16,v,b+(2*w-1)*i),n(a[o+2*w+0],255&L,L>>16,v,b+(2*w+0)*i)),L=S,x=_}1&y||(A=3*L+x+131074>>2,n(t[r+y-1],255&A,A>>16,g,m+(y-1)*i),null!=a&&(A=3*x+L+131074>>2,n(a[o+y-1],255&A,A>>16,v,b+(y-1)*i)))}}function e6(){nD[nn]=nR,nD[ni]=nU,nD[na]=nT,nD[no]=nz,nD[ns]=nH,nD[nc]=nW,nD[nu]=nV,nD[nh]=nU,nD[nl]=nz,nD[nf]=nH,nD[nd]=nW}function e8(t){return t&~nZ?0>t?0:255:t>>nK}function e7(t,e){return e8((19077*t>>8)+(26149*e>>8)-14234)}function e9(t,e,r){return e8((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function rt(t,e){return e8((19077*t>>8)+(33050*e>>8)-17685)}function re(t,e,r,n,i){n[i+0]=e7(t,r),n[i+1]=e9(t,e,r),n[i+2]=rt(t,e)}function rr(t,e,r,n,i){n[i+0]=rt(t,e),n[i+1]=e9(t,e,r),n[i+2]=e7(t,r)}function rn(t,e,r,n,i){var a=e9(t,e,r);e=a<<3&224|rt(t,e)>>3,n[i+0]=248&e7(t,r)|a>>5,n[i+1]=e}function ri(t,e,r,n,i){var a=240&rt(t,e)|15;n[i+0]=240&e7(t,r)|e9(t,e,r)>>4,n[i+1]=a}function ra(t,e,r,n,i){n[i+0]=255,re(t,e,r,n,i+1)}function ro(t,e,r,n,i){rr(t,e,r,n,i),n[i+3]=255}function rs(t,e,r,n,i){re(t,e,r,n,i),n[i+3]=255}function tV(t,e){return 0>t?0:t>e?e:t}function rc(e,r,n){t[e]=function(t,e,i,a,o,s,c,u,h){for(var l=u+(-2&h)*n;u!=l;)r(t[e+0],i[a+0],o[s+0],c,u),r(t[e+1],i[a+0],o[s+0],c,u+n),e+=2,++a,++s,u+=2*n;1&h&&r(t[e+0],i[a+0],o[s+0],c,u)}}function ru(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function rh(t,e,r,n,i){switch(t>>>30){case 3:rq(e,r,n,i,0);break;case 2:rD(e,r,n,i);break;case 1:rT(e,r,n,i)}}function rl(t,e){var r,a,o=e.M,s=e.Nb,c=t.oc,u=t.pc+40,h=t.oc,l=t.pc+584,f=t.oc,d=t.pc+600;for(r=0;16>r;++r)c[u+32*r-1]=129;for(r=0;8>r;++r)h[l+32*r-1]=129,f[d+32*r-1]=129;for(0r;++r)n(c,u+32*r-4,c,u+32*r+12,4);for(r=-1;8>r;++r)n(h,l+32*r-4,h,l+32*r+4,4),n(f,d+32*r-4,f,d+32*r+4,4)}var g=t.Gd,m=t.Hd+a,v=p.ad,b=p.Hc;if(0=t.za-1?i(y,w,g[m].y[15],4):n(y,w,g[m+1].y,0,4)),r=0;4>r;r++)y[w+128+r]=y[w+256+r]=y[w+384+r]=y[w+0+r];for(r=0;16>r;++r,b<<=2)y=c,w=u+n4[r],nO[p.Ob[r]](y,w),rh(b,v,16*+r,y,w)}else if(nj[y=ru(a,o,p.Ob[0])](c,u),0!=b)for(r=0;16>r;++r,b<<=2)rh(b,v,16*+r,c,u+n4[r]);for(r=p.Gc,nB[y=ru(a,o,p.Dd)](h,l),nB[y](f,d),b=v,y=h,w=l,255&(p=r>>0)&&(170&p?rR(b,256,y,w):rU(b,256,y,w)),p=f,b=d,255&(r>>=8)&&(170&r?rR(v,320,p,b):rU(v,320,p,b)),or;++r)n(g,m+r*t.R,c,u+32*r,16);for(r=0;8>r;++r)n(v,p+r*t.B,h,l+32*r,8),n(b,y+r*t.B,f,d+32*r,8)}}function rf(t,n,i,a,o,s,c,u,h){var l=[0],f=[0],d=0,p=null!=h?h.kd:0,g=null!=h?h:new eG;if(null==t||12>i)return 7;g.data=t,g.w=n,g.ha=i,n=[n],i=[i],g.gb=[g.gb];t:{var m=n,b=i,y=g.gb;if(e(null!=t),e(null!=b),e(null!=y),y[0]=0,12<=b[0]&&!r(t,m[0],"RIFF")){if(r(t,m[0]+8,"WEBP")){y=3;break t}var w=j(t,m[0]+4);if(12>w||4294967286b[0]-8){y=7;break t}y[0]=w,m[0]+=12,b[0]-=12}y=0}if(0!=y)return y;for(w=0y[0])y=7;else{if(!r(L,b[0],"VP8X")){if(10!=j(L,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var _=j(L,b[0]+8),P=1+C(L,b[0]+12);if(2147483648<=P*(L=1+C(L,b[0]+15))){y=3;break t}null!=S&&(S[0]=_),null!=x&&(x[0]=P),null!=A&&(A[0]=L),b[0]+=18,y[0]-=18,k[0]=1}y=0}}if(d=d[0],m=m[0],0!=y)return y;if(b=!!(2&m),!w&&d)return 3;if(null!=s&&(s[0]=!!(16&m)),null!=c&&(c[0]=b),null!=u&&(u[0]=0),c=l[0],m=f[0],d&&b&&null==h){y=0;break}if(4>i){y=7;break}if(w&&d||!w&&!d&&!r(t,n[0],"ALPH")){i=[i],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{_=t,y=n,w=i;var k=g.gb;x=g.na,A=g.P,S=g.Sa,P=22,e(null!=_),e(null!=w),L=y[0];var I=w[0];for(e(null!=x),e(null!=S),x[0]=null,A[0]=null,S[0]=0;;){if(y[0]=L,w[0]=I,8>I){y=7;break t}var F=j(_,L+4);if(4294967286k){y=3;break t}if(!r(_,L,"VP8 ")||!r(_,L,"VP8L")){y=0;break t}if(I[0]w[0])y=7;else{if(L||P){if(k=j(k,_+4),12<=x&&k>x-12){y=3;break t}if(p&&k>w[0]-8){y=7;break t}A[0]=k,y[0]+=8,w[0]-=8,S[0]=P}else S[0]=5<=w[0]&&47==k[_+0]&&!(k[_+4]>>5),A[0]=w[0];y=0}if(i=i[0],g.Ja=g.Ja[0],g.xa=g.xa[0],n=n[0],0!=y)break;if(4294967286i){y=7;break}u=c,p=m,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],k=[0],x=[0],v(A=new N,t,n,i),tg(A,w,k,x)?(null!=u&&(u[0]=w[0]),null!=p&&(p[0]=k[0]),null!=b&&(b[0]=x[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}u=m,null==t||10>i||!tX(t,n+3,i-3)?t=0:(p=t[n+0]|t[n+1]<<8|t[n+2]<<16,b=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=g.Ja||!b||!t?t=0:(c&&(c[0]=b),u&&(u[0]=t),t=1))}if(!t||(c=c[0],m=m[0],d&&(l[0]!=c||f[0]!=m)))return 3;null!=h&&(h[0]=g,h.offset=n-h.w,e(4294967286>n-h.w),e(h.offset==h.ha-i));break}return 0==y||7==y&&d&&null==h?(null!=s&&(s[0]|=null!=g.na&&0r||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>n||o+c>i))return 0;if(e.v=a,e.j=o,e.va=a+s,e.o=o+c,e.U=s,e.T=c,e.da=null!=t&&0t.S){var e=t.f.RGBA;e.fb+=(t.height-1)*e.A,e.A=-e.A}else e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb);return 0}function rg(t,e,r,n){if(null==n||0>=t||0>=e)return 2;if(null!=r){if(r.Da){var i=r.cd,o=r.bd,s=-2&r.v,c=-2&r.j;if(0>s||0>c||0>=i||0>=o||s+i>t||c+o>e)return 2;t=i,e=o}if(r.da){if(!E(t,e,i=[r.ib],o=[r.hb]))return 2;t=i[0],e=o[0]}}n.width=t,n.height=e;t:{var u=n.width,h=n.height;if(t=n.S,0>=u||0>=h||!(t>=nn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=o=i=e=0;var l=(c=u*n7[t])*h;if(11>t||(o=(h+1)/2*(e=(u+1)/2),12==t&&(s=(i=u)*h)),null==(h=a(l+2*o+s))){t=1;break t}n.sd=h,11>t?((u=n.f.RGBA).eb=h,u.fb=0,u.A=c,u.size=l):((u=n.f.kb).y=h,u.O=0,u.fa=c,u.Fd=l,u.f=h,u.N=0+l,u.Ab=e,u.Cd=o,u.ea=h,u.W=0+l+o,u.Db=e,u.Ed=o,12==t&&(u.F=h,u.J=0+l+2*o),u.Tc=s,u.lb=i)}if(e=1,i=n.S,o=n.width,s=n.height,i>=nn&&13>i){if(11>i)t=n.f.RGBA,e&=(c=Math.abs(t.A))*(s-1)+o<=t.size,e&=c>=o*n7[i],e&=null!=t.eb;else{t=n.f.kb,c=(o+1)/2,l=(s+1)/2,u=Math.abs(t.fa),h=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(s-1)+o;e&=u*(s-1)+o<=t.Fd,e&=h*(l-1)+c<=t.Cd,e=(e&=f*(l-1)+c<=t.Ed)&u>=o&h>=c&f>=c&null!=t.y&null!=t.f&null!=t.ea,12==i&&(e&=d>=o,e&=p<=t.Tc,e&=null!=t.F)}}else e=0;t=e?0:2}}return 0!=t||null!=r&&r.fd&&(t=rp(n)),t}var rm=64,rv=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],rb=24,ry=32,rw=8,rN=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];R("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,e,r){return e[r+0]},t.Predictor3=function(t,e,r){return e[r+1]},t.Predictor4=function(t,e,r){return e[r-1]},t.Predictor5=function(t,e,r){return U(U(t,e[r+1]),e[r+0])},t.Predictor6=function(t,e,r){return U(t,e[r-1])},t.Predictor7=function(t,e,r){return U(t,e[r+0])},t.Predictor8=function(t,e,r){return U(e[r-1],e[r+0])},t.Predictor9=function(t,e,r){return U(e[r+0],e[r+1])},t.Predictor10=function(t,e,r){return U(U(t,e[r-1]),U(e[r+0],e[r+1]))},t.Predictor11=function(t,e,r){var n=e[r+0];return 0>=W(n>>24&255,t>>24&255,(e=e[r-1])>>24&255)+W(n>>16&255,t>>16&255,e>>16&255)+W(n>>8&255,t>>8&255,e>>8&255)+W(255&n,255&t,255&e)?n:t},t.Predictor12=function(t,e,r){var n=e[r+0];return(z((t>>24&255)+(n>>24&255)-((e=e[r-1])>>24&255))<<24|z((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|z((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|z((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,r){var n=e[r-1];return(H((t=U(t,e[r+0]))>>24&255,n>>24&255)<<24|H(t>>16&255,n>>16&255)<<16|H(t>>8&255,n>>8&255)<<8|H(t>>0&255,n>>0&255))>>>0};var rL=t.PredictorAdd0;t.PredictorAdd1=V,R("Predictor2","PredictorAdd2"),R("Predictor3","PredictorAdd3"),R("Predictor4","PredictorAdd4"),R("Predictor5","PredictorAdd5"),R("Predictor6","PredictorAdd6"),R("Predictor7","PredictorAdd7"),R("Predictor8","PredictorAdd8"),R("Predictor9","PredictorAdd9"),R("Predictor10","PredictorAdd10"),R("Predictor11","PredictorAdd11"),R("Predictor12","PredictorAdd12"),R("Predictor13","PredictorAdd13");var rx=t.PredictorAdd2;X("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var rA,rS=t.ColorIndexInverseTransform,r_=t.MapARGB,rP=t.VP8LColorIndexInverseTransformAlpha,rk=t.MapAlpha,rI=t.VP8LPredictorsAdd=[];rI.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var rF,rC,rj,rO,rB,rM,rE,rq,rD,rR,rT,rU,rz,rH,rW,rV,rG,rY,rJ,rX,rK,rZ,r$,rQ,r1,r2,r5,r0,r3=a(511),r4=a(2041),r6=a(225),r8=a(767),r7=0,r9=r4,nt=r6,ne=r8,nr=r3,nn=0,ni=1,na=2,no=3,ns=4,nc=5,nu=6,nh=7,nl=8,nf=9,nd=10,np=[2,3,7],ng=[3,3,11],nm=[280,256,256,256,40],nv=[0,1,1,1,0],nb=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],ny=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],nw=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],nN=8,nL=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],nx=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],nA=null,nS=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],n_=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],nP=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],nk=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],nI=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],nF=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],nC=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],nj=[],nO=[],nB=[],nM=1,nE=2,nq=[],nD=[];e4("UpsampleRgbLinePair",re,3),e4("UpsampleBgrLinePair",rr,3),e4("UpsampleRgbaLinePair",rs,4),e4("UpsampleBgraLinePair",ro,4),e4("UpsampleArgbLinePair",ra,4),e4("UpsampleRgba4444LinePair",ri,2),e4("UpsampleRgb565LinePair",rn,2);var nR=t.UpsampleRgbLinePair,nT=t.UpsampleBgrLinePair,nU=t.UpsampleRgbaLinePair,nz=t.UpsampleBgraLinePair,nH=t.UpsampleArgbLinePair,nW=t.UpsampleRgba4444LinePair,nV=t.UpsampleRgb565LinePair,nG=16,nY=32768,nJ=-227,nX=482,nK=6,nZ=16383,n$=0,nQ=a(256),n1=a(256),n2=a(256),n5=a(256),n0=a(nX-nJ),n3=a(nX-nJ);rc("YuvToRgbRow",re,3),rc("YuvToBgrRow",rr,3),rc("YuvToRgbaRow",rs,4),rc("YuvToBgraRow",ro,4),rc("YuvToArgbRow",ra,4),rc("YuvToRgba4444Row",ri,2),rc("YuvToRgb565Row",rn,2);var n4=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],n6=[0,2,8],n8=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(t,r,s,c,u){var h=ni,l=new eV,f=new to;l.ba=f,f.S=h,f.width=[f.width],f.height=[f.height];var d=f.width,p=f.height,g=new ts;if(null==g||null==t)var m=2;else e(null!=g),m=rf(t,r,s,g.width,g.height,g.Pd,g.Qd,g.format,null);if(0!=m?d=0:(null!=d&&(d[0]=g.width[0]),null!=p&&(p[0]=g.height[0]),d=1),d){f.width=f.width[0],f.height=f.height[0],null!=c&&(c[0]=f.width),null!=u&&(u[0]=f.height);t:{if(c=new tG,(u=new eG).data=t,u.w=r,u.ha=s,u.kd=1,r=[0],e(null!=u),(0==(t=rf(u.data,u.w,u.ha,null,null,null,r,null,u))||7==t)&&r[0]&&(t=4),0==(r=t)){if(e(null!=l),c.data=u.data,c.w=u.w+u.offset,c.ha=u.ha-u.offset,c.put=td,c.ac=tf,c.bc=tp,c.ma=l,u.xa){if(null==(t=tk())){l=1;break t}if(function(t,r){var n=[0],i=[0],a=[0];e:for(;;){if(null==t)return 0;if(null==r)return t.a=2,0;if(t.l=r,t.a=0,v(t.m,r.data,r.w,r.ha),!tg(t.m,n,i,a)){t.a=3;break e}if(t.xb=nE,r.width=n[0],r.height=i[0],!tI(n[0],i[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,c)){if(c=0==(r=rg(c.width,c.height,l.Oa,l.ba))){e:{c=t;r:for(;;){if(null==c){c=0;break e}if(e(null!=c.s.yc),e(null!=c.s.Ya),e(0c.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=c.ca.f.kb.F&&e3()),c.Pb&&0(d=s.Md)?0:100p;++p)12>(m=u.pb[p]).lc&&(m.ia=d*n8[0>m.lc?0:m.lc]>>3),g|=m.ia;g&&(alert("todo:VP8InitRandom"),u.ia=1)}u.Ga=s.Id,100u.Ga&&(u.Ga=0)}(function(t,r){if(null==t)return 0;if(null==r)return tJ(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!tK(t,r))return 0;if(e(t.cb),null==r.ac||r.ac(r)){r.ob&&(t.L=0);var s=n6[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=r.v-s>>4,t.zb=r.j-s>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=r.o+15+s>>4,t.Hb=r.va+15+s>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0s;++s){if(t.Qa.Cb){var h=t.Qa.Lb[s];t.Qa.Fb||(h+=u.Tb)}else h=u.Tb;for(c=0;1>=c;++c){var l=t.gd[s][c],f=h;if(u.Pc&&(f+=u.vd[0],c&&(f+=u.od[0])),0<(f=0>f?0:63>2:d>>1)>9-u.wb&&(d=9-u.wb),1>d&&(d=1),l.dd=d,l.tc=2*f+d,l.ld=40<=f?2:15<=f?1:0}else l.tc=0;l.La=c}}}s=0}else tJ(t,6,"Frame setup failed"),s=t.a;if(s=0==s){if(s){t.$c=0,0t.Vb){if(t.Vb=0,t.Ec=a(l),t.Fc=0,null==t.Ec){s=tJ(t,1,"no memory during frame initialization.");break t}t.Vb=l}l=t.Ec,f=t.Fc,t.Ac=l,t.Bc=f,f+=u,t.Gd=o(p,tH),t.Hd=0,t.rb=o(g+1,tR),t.sb=1,t.wa=m?o(m,tD):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0=s;++s)r3[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)r4[1020+s]=-128>s?-128:127=s;++s)r6[112+s]=-16>s?-16:15=s;++s)r8[255+s]=0>s?0:255l;++l){var y,w=p[0+l];for(y=0;4>y;++y){w=nI[f[d+y]][w];for(var N=nP[k(h,w[0])];0>3;for(N=0;256>N;N+=16)l[m+N]=F}_=1,P=d[0]}var C=15&h.la,j=15&b.la;for(N=0;4>N;++N){var O=1&j;for(F=A=0;4>F;++F)C=C>>1|(O=(I=nA(f,P,I=O+(1&C),g.Sc,_,l,m))>_)<<7,A=A<<2|(3>=4,j=j>>1|O<<7,y=(y<<8|A)>>>0}for(P=C,_=j>>4,L=0;4>L;L+=2){for(A=0,C=h.la>>4+L,j=b.la>>4+L,N=0;2>N;++N){for(O=1&j,F=0;2>F;++F)I=O+(1&C),C=C>>1|(O=0<(I=nA(f,d[2],I,g.Qc,0,l,m)))<<3,A=A<<2|(3>=2,j=j>>1|O<<5}w|=A<<4*L,P|=C<<4<=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=h,rl(s,o),u=1,o=(A=s.D).Nb,h=(w=n6[s.L])*s.R,f=w/2*s.B,N=16*o*s.R,F=8*o*s.B,d=s.sa,p=s.ta-h+N,g=s.qa,l=s.ra-f+F,m=s.Ha,b=s.Ia-f+F,j=0==(C=A.M),y=C>=s.Va-1,2==s.Aa&&rl(s,A),A.uc)for(O=(I=s).D.M,e(I.D.uc),A=I.yb;Ac.o&&(C=c.o),c.F=null,c.J=null,null!=s.Fa&&0i||0>=o||i+o>c)return null;if(!t.Cc){if(null==t.ga){if(t.ga=new eK,(_=null==t.ga)||(_=r.width*r.o,e(0==t.Gb.length),t.Gb=a(_),t.Uc=0,null==t.Gb?_=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,_=1),_=!_),!_){_=t.ga;var u=t.Fa,h=t.P,l=t.qc,f=t.mb,d=t.nb,p=h+1,g=l-1,m=_.l;if(e(null!=u&&null!=f&&null!=r),nq[0]=null,nq[1]=eZ,nq[2]=e$,nq[3]=eQ,_.ca=f,_.tb=d,_.c=r.width,_.i=r.height,e(0<_.c&&0<_.i),1>=l)r=0;else if(_.$a=u[h+0]>>0&3,_.Z=u[h+0]>>2&3,_.Lc=u[h+0]>>4&3,h=u[h+0]>>6&3,0>_.$a||1<_.$a||4<=_.Z||1<_.Lc||h)r=0;else if(m.put=td,m.ac=tf,m.bc=tp,m.ma=_,m.width=r.width,m.height=r.height,m.Da=r.Da,m.v=r.v,m.va=r.va,m.j=r.j,m.o=r.o,_.$a)t:{e(1==_.$a),r=tk();e:for(;;){if(null==r){r=0;break t}if(e(null!=_),_.mc=r,r.c=_.c,r.i=_.i,r.l=_.l,r.l.ma=_,r.l.width=_.c,r.l.height=_.i,r.a=0,v(r.m,u,p,g),!tI(_.c,_.i,1,r,null)||(1==r.ab&&3==r.gc[0].hc&&tx(r.s)?(_.ic=1,u=r.c*r.i,r.Ta=null,r.Ua=0,r.V=a(u),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(_.ic=0,r=tF(r,_.c)),!r))break e;r=1;break t}_.mc=null,r=0}else r=g>=_.c*_.i;_=!r}if(_)return null;1!=t.ga.Lc?t.Ga=0:o=c-i}e(null!=t.ga),e(i+o<=c);t:{if(r=(u=t.ga).c,c=u.l.o,0==u.$a){if(p=t.rc,g=t.Vc,m=t.Fa,h=t.P+1+i*r,l=t.mb,f=t.nb+i*r,e(h<=t.P+t.qc),0!=u.Z)for(e(null!=nq[u.Z]),_=0;_=r)r=1;else if(u.ic||e3(),u.ic){u=_.V,p=_.Ba,g=_.c;var b=_.i,y=(m=1,h=_.$/g,l=_.$%g,f=_.m,d=_.s,_.$),w=g*b,N=g*r,L=d.wc,A=y(b=tb(A.G[0],A.H[0],f)))u[p+y]=b,++y,++l>=g&&(l=0,++h<=r&&!(h%16)&&tS(_,h));else{if(!(280>b)){m=0;break e}b=tm(b-256,f);var _,P,k=tb(A.G[4],A.H[4],f);if(S(f),!(y>=(k=tv(g,k=tm(k,f)))&&w-y>=b)){m=0;break e}for(P=0;P=g;)l-=g,++h<=r&&!(h%16)&&tS(_,h);yr?r:h);break e}!m||f.h&&y=c&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0>1),c.W+=s.B*(w>>1),null!=c.F&&(c.J+=c.width*w)),A>1,c.W+=c.v>>1,null!=c.F&&(c.J+=c.v),c.ka=A-c.j,c.U=c.va-c.v,c.T=C-A,u=c.put(c))}o+1!=s.Ic||y||(n(s.sa,s.ta-h,d,p+16*s.R,h),n(s.qa,s.ra-f,g,l+8*s.B,f),n(s.Ha,s.Ia-f,m,b+8*s.B,f))}if(!u)return tJ(t,6,"Output aborted.")}return 1}(t,r)),null!=r.bc&&r.bc(r),s&=1}return s?(t.cb=0,s):0})(t,c)||(r=t.a)}}else r=t.a;0==r&&null!=l.Oa&&l.Oa.fd&&(r=rp(l.ba))}l=r}h=0!=l?null:11>h?f.f.RGBA.eb:f.f.kb.y}else h=null;return h};var n7=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function h(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new c;var l=[0],f=[0],d=[],p=new c,g=function(t,e){var r={},n=0,i=!1,a=0,o=0;if(r.frames=[],!/** @license * Copyright (c) 2017 Dominik Homberger 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. https://webpjs.appspot.com WebPRiffParser dominikhlbg@gmail.com */function(t,e,r,n){for(var i=0;i<4;i++)if(t[e+i]!=r.charCodeAt(i))return!0;return!1}(t,e,"RIFF",0)){for(h(t,e+=4),e+=8;e>1&1}"ANMF"!=f&&(e+=p)}return r}}(t,0);g.response=t,g.rgbaoutput=!0,g.dataurl=!1;var m=g.header?g.header:null,v=g.frames?g.frames:null;if(m){m.loop_counter=m.loop_count,l=[m.canvas_height],f=[m.canvas_width];for(var b=0;b>>1)&255;return a},eH=function(t,e,r){var n,i=[],a=t.length;i[0]=4;for(var o=0;o>>L&255,L+=s.bits;p[b]=v>>>L&255}}if(16===s.bits){d=(f=new Uint32Array(s.decodePixels().buffer)).length,g=new Uint8Array(d*(32/s.pixelBitlength)*s.colors),p=new Uint8Array(d*(32/s.pixelBitlength)),m=s.colors>1,b=0,y=0;for(var A=0;b>>0&255,m&&(g[y++]=v>>>16&255,v=f[b++],g[y++]=v>>>0&255),p[A++]=v>>>16&255;o=8}n!==eE.image_compression.NONE&&"function"==typeof i.iZ?(t=eq(g,s.width*s.colors,s.colors,n),l=eq(p,s.width,1,n)):(t=g,l=p,w=void 0)}if(3===s.colorType&&(a=this.color_spaces.INDEXED,h=s.palette,s.transparency.indexed)){var S=s.transparency.indexed,_=0;for(b=0,d=S.length;b=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},eB.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>4,c=15&a,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*i+1>=this.width)break;u=this.palette[c],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},eB.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>5&e)/e*255|0,c=(a>>10&e)/e*255|0,u=a>>15?255:0,h=n*this.width*4+4*i;this.data[h]=c,this.data[h+1]=s,this.data[h+2]=o,this.data[h+3]=u}this.pos+=t}},eB.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a>5&r)/r*255|0,u=(o>>11)/e*255|0,h=i*this.width*4+4*a;this.data[h]=u,this.data[h+1]=c,this.data[h+2]=s,this.data[h+3]=255}this.pos+=t}},eB.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;rn&&(i.push(t.slice(c,a)),s=0,c=a),s+=e[a],a++;return c!==a&&i.push(t.slice(c,a)),i},eI=function(t,e,r){r||(r={});var n,i,a,o,s,c,u,h=[],l=[h],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=e_.apply(this,[" ",r])[0];if(c=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(c).join(" "),b=[];g.map(function(t){(t=t.split(/\s*\n/)).length>1?b=b.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):b.push(t[0])}),g=b,c=eP.apply(this,[v,r])}for(a=0,o=g.length;ae||y){if(p>e){for(s=ek.apply(this,[n,i,e-(f+d),e]),h.push(s.shift()),h=[s.pop()];s.length;)l.push([s.shift()]);p=i.slice(n.length-(h[0]?h[0].length:0)).reduce(function(t,e){return t+e},0)}else h=[n];l.push(h),f=p+c,d=m}else h.push(n),f+=d+p,d=m}return u=c?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},l.map(u)},eS.splitTextToSize=function(t,e,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=(function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle);return e.metadata.Unicode?{widths:e.metadata.Unicode.widths||{0:1},kerning:e.metadata.Unicode.kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var s,c,u=[];for(s=0,c=n.length;sparseInt(this.internal.getFont().id.substr(1),10)?(e=RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i1){for(l=0;l>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},eK=E.API,eZ=function(){var t='',e=unescape(encodeURIComponent('')),r=unescape(encodeURIComponent(t)),n=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("")),a=unescape(encodeURIComponent("")),o=r.length+n.length+i.length+e.length+a.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(e+r+n+i+a),this.internal.write("endstream"),this.internal.write("endobj")},e$=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")},eK.addMetadata=function(t,e){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceuri:e||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",e$),this.internal.events.subscribe("postPutResources",eZ)),this},e1=(eQ=E.API).pdfEscape16=function(t,e){for(var r,n=e.metadata.Unicode.widths,i=["","0","00","000","0000"],a=[""],o=0,s=t.length;o=100&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(i=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+i+">"));return n.length&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),a+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},eQ.events.push(["putFont",function(t){!function(t){var e=t.font,r=t.out,n=t.newObject,i=t.putStream;if(e.metadata instanceof E.API.TTFFont&&"Identity-H"===e.encoding){for(var a=e.metadata.Unicode.widths,o=e.metadata.subset.encode(e.metadata.glyIdsUsed,1),s="",c=0;c>"),r("endobj");var f=n();r("<<"),r("/Type /Font"),r("/BaseFont /"+F(e.fontName)),r("/FontDescriptor "+l+" 0 R"),r("/W "+E.API.PDFObject.convert(a)),r("/CIDToGIDMap /Identity"),r("/DW 1000"),r("/Subtype /CIDFontType2"),r("/CIDSystemInfo"),r("<<"),r("/Supplement 0"),r("/Registry (Adobe)"),r("/Ordering ("+e.encoding+")"),r(">>"),r(">>"),r("endobj"),e.objectNumber=n(),r("<<"),r("/Type /Font"),r("/Subtype /Type0"),r("/ToUnicode "+h+" 0 R"),r("/BaseFont /"+F(e.fontName)),r("/Encoding /"+e.encoding),r("/DescendantFonts ["+f+" 0 R]"),r(">>"),r("endobj"),e.isAlreadyPutted=!0}}(t)}]),eQ.events.push(["putFont",function(t){!function(t){var e=t.font,r=t.out,n=t.newObject,i=t.putStream;if(e.metadata instanceof E.API.TTFFont&&"WinAnsiEncoding"===e.encoding){for(var a=e.metadata.rawData,o="",s=0;s>"),r("endobj"),e.objectNumber=n();for(var l=0;l>"),r("endobj"),e.isAlreadyPutted=!0}}(t)}]),e5=function(t){var e,r=t.text||"",n=t.x,i=t.y,a=t.options||{},o=t.mutex||{},s=o.pdfEscape,c=o.activeFontKey,u=o.fonts,h=c,l="",f=0,d="",p=u[h].encoding;if("Identity-H"!==u[h].encoding)return{text:r,x:n,y:i,options:a,mutex:o};for(d=r,h=c,Array.isArray(r)&&(d=r[0]),f=0;fd[f].charCodeAt(0)&&u[h].metadata.hasOwnProperty("Unicode")?l+=d[f]:l+="";var g="";return 14>parseInt(h.slice(1))||"WinAnsiEncoding"===p?g=s(l,h).split("").map(function(t){return t.charCodeAt(0).toString(16)}).join(""):"Identity-H"===p&&(g=e1(l,u[h])),o.isHex=!0,{text:g,x:n,y:i,options:a,mutex:o}},eQ.events.push(["postProcessText",function(t){var e=t.text||"",r=[],n={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){var i=0;for(i=0;i","<","[","]","[","{","}","{","\xab","\xbb","\xab","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],p=RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,m=0;this.__bidiEngine__={};var v=function(t){var r=t.charCodeAt(),n=r>>8,i=f[n];return void 0!==i?e[256*i+(255&r)]:252===n||253===n?"AL":p.test(n)?"L":8===n?"R":"N"},b=function(t){for(var e,r=0;r=e.length||"EN"!==(c=o[s-1])&&"AN"!==c||"EN"!==(u=e[s+1])&&"AN"!==u?f="N":g&&(u="AN"),f=u===c?u:"N";break;case"ES":f="EN"===(c=s>0?o[s-1]:"B")&&s+10&&"EN"===o[s-1]){f="EN";break}if(g){f="N";break}for(h=s+1,l=e.length;h=1425&&d<=2303||64286===d)&&("R"===c||"AL"===c)){f="R";break}}}f=s<1||"B"===(c=e[s-1])?"N":o[s-1];break;case"B":g=!1,r=!0,f=m;break;case"S":n=!0,f="N"}return f},w=function(t,e,r){var n=t.split("");return r&&N(n,r,{hiLevel:m}),n.reverse(),e&&e.reverse(),n.join("")},N=function(t,e,i){var a,o,s,c,f,d=-1,p=t.length,b=0,w=[],N=m?h:u,L=[];for(g=!1,r=!1,n=!1,o=0;o0){if(16===a){for(o=d;o-1){for(o=d;o=0&&"WS"===t[i];i--)e[i]=m}}(L,e,p)},L=function(t,e,n,i,a){if(!(a.hiLevel=t){for(c=l+1;c=t;)c++;for(u=l,s=c-1;u=0&&(t[i]=d[n+1])}(n,r,i),L(2,n,e,r,i),L(1,n,e,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r>16))&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,r){var n,i,a,o;for(a=0,i=0,o=(t=""+t).length;0<=o?io;i=0<=o?++i:--i)n=t.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return a*(e/1e3)},t.prototype.lineHeight=function(t,e){var r;return null==e&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},t}();var eE,eq,eD,eR,eT,eU,ez,eH,eW,eV,eG,eY,eJ,eX,eK,eZ,e$,eQ,e1,e2,e5,e0,e3,e4,e6=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?et;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(t){var e,r,n;for(n=[],e=0,r=t.length;0<=r?er;e=0<=r?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,r,n,i,a,o,s;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*i+65536*a+256*o+s},t.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?rt;r=0<=t?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;rn;r=0<=n?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var r,n,i,a,o,s,c,u,h,l,f,d,p;for(p in a=Math.floor((h=16*Math.floor(Math.log(f=Object.keys(e).length)/(s=Math.log(2))))/s),u=16*f-h,(n=new e6).writeInt(this.scalarType),n.writeShort(f),n.writeShort(h),n.writeShort(a),n.writeShort(u),i=16*f,c=n.pos+i,o=null,d=[],e)for(l=e[p],n.writeString(p),n.writeInt(t(l)),n.writeInt(c),n.writeInt(l.length),d=d.concat(l),"head"===p&&(o=c),c+=l.length;c%4;)d.push(0),c++;return n.write(d),r=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(r),n.data},t=function(t){var e,r,n,i;for(t=rh.call(t);t.length%4;)t.push(0);for(n=new e6(t),r=0,e=0,i=t.length;el;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,d=function(){var e,r;for(r=[],s=e=0;0<=l?el;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),c=function(){var e,r;for(r=[],s=e=0;0<=l?el;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=l?el;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),n=(this.length-t.pos+this.offset)/2,o=function(){var e,r;for(r=[],s=e=0;0<=n?en;s=0<=n?++e:--e)r.push(t.readUInt16());return r}(),s=g=0,v=i.length;g=p;r=f<=p?++m:--m)0===u[s]?a=r+c[s]:0!==(a=o[u[s]/2+(r-f)-(l-s)]||0)&&(a+=c[s]),this.codeMap[r]=65535&a}t.pos=h}return t.encode=function(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y,w,N,L,x,A,S,_,P,k,I,F,C,j,O,B,M,E,q,D,R,T,U,z,H,W,V;switch(P=new e6,a=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(d=0,p=function(){var t=[];for(f=0;f<256;++f)t.push(0);return t}(),m={0:0},i={},k=0,j=a.length;k=32768)for(s.push(0),w.push(2*(l.length+L-f)),n=C=A;A<=u?C<=u:C>=u;n=A<=u?++C:--C)l.push(r[n].new);else s.push(_-A),w.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*L+2*l.length),P.writeUInt16(0),P.writeUInt16(x),P.writeUInt16(N),P.writeUInt16(Math.log(N/2)/Math.LN2),P.writeUInt16(2*L-N),T=0,M=h.length;Tn;r=0<=n?++r:--r)e=new re(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},e.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=re.encode(t,e),(n=new e6).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(),rn=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return e9(e,e4),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),ri=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return e9(e,e4),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),ra=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return e9(e,e4),e.prototype.tag="post",e.prototype.parse=function(t){var e,r,n,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:for(r=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?ir;i=0<=r?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.posr;i=0<=r?++e:--e)n.push(t.readUInt32());return n}).call(this)}},e}(),ro=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},rs=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return e9(e,e4),e.prototype.tag="name",e.prototype.parse=function(t){var e,r,n,i,a,o,s,c,u,h,l;for(t.pos=this.offset,t.readShort(),e=t.readShort(),o=t.readShort(),r=[],i=0;0<=e?ie;i=0<=e?++i:--i)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(s={},i=u=0,h=r.length;uo;e=0<=o?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,i;for(i=[],e=r=0;0<=n?rn;e=0<=n?++r:--r)i.push(t.readInt16());return i}(),this.widths=(function(){var t,e,r,n;for(n=[],t=0,e=(r=this.metrics).length;tn;e=0<=n?++a:--a)s.push(this.widths.push(r));return s},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),rh=[].slice,rl=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return e9(e,e4),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,c,u,h;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+r,a=(o=new e6(e.read(n))).readShort(),c=o.readShort(),h=o.readShort(),s=o.readShort(),u=o.readShort(),this.cache[t]=-1===a?new rd(o,c,h,s,u):new rf(o,a,c,h,s,u),this.cache[t]))},e.prototype.encode=function(t,e,r){var n,i,a,o,s;for(a=[],i=[],o=0,s=e.length;o0&&(n+=s)}for(var c=Array(4*r.length),u=0;u>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},e}(),rg=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,r,n,i;for(e in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=n[r];return t},t.prototype.glyphsFor=function(t){var e,r,n,i,a,o,s;for(n={},a=0,o=t.length;a0)for(i in s=this.glyphsFor(e))r=s[i],n[i]=r;return n},t.prototype.encode=function(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m;for(n in r=rr.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),f={0:0},m=r.charMap)f[(s=m[n]).old]=s.new;for(d in l=r.maxGlyphID,a)d in f||(f[d]=l++);return h=Object.keys(u=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f)).sort(function(t,e){return t-e}),p=function(){var t,e,r;for(r=[],t=0,e=h.length;t>"),a.join("\n")}return""+r},e}(),e.ZP=E}}]);