webpackJsonp([4],{"3h9r":function(t,A,e){"use strict";(function(t){var r=e("VdNW"),n=function(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this}();
/** @license
 *
 * jsPDF - PDF Document creation from JavaScript
 * Version 2.3.1 Built on 2021-03-08T15:44:11.674Z
 *                      CommitID 00000000
 *
 * Copyright (c) 2010-2020 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
 *               2015-2020 yWorks GmbH, http://www.yworks.com
 *               2015-2020 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
 *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
 *               2010 Aaron Spike, https://github.com/acspike
 *               2012 Willow Systems Corporation, willow-systems.com
 *               2012 Pablo Hess, https://github.com/pablohess
 *               2012 Florian Jenett, https://github.com/fjenett
 *               2013 Warren Weckesser, https://github.com/warrenweckesser
 *               2013 Youssef Beddad, https://github.com/lifof
 *               2013 Lee Driscoll, https://github.com/lsdriscoll
 *               2013 Stefan Slonevskiy, https://github.com/stefslon
 *               2013 Jeremy Morel, https://github.com/jmorel
 *               2013 Christoph Hartmann, https://github.com/chris-rock
 *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
 *               2014 James Makes, https://github.com/dollaruw
 *               2014 Diego Casorran, https://github.com/diegocr
 *               2014 Steven Spungin, https://github.com/Flamenco
 *               2014 Kenneth Glassey, https://github.com/Gavvers
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Contributor(s):
 *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
 *    kim3er, mfo, alnorth, Flamenco
 */function i(){n.console&&"function"==typeof n.console.log&&n.console.log.apply(n.console,arguments)}var o={log:i,warn:function(t){n.console&&("function"==typeof n.console.warn?n.console.warn.apply(n.console,arguments):i.call(null,arguments))},error:function(t){n.console&&("function"==typeof n.console.error?n.console.error.apply(n.console,arguments):i(t))}};
/**
 * @license
 * FileSaver.js
 * A saveAs() FileSaver implementation.
 *
 * By Eli Grey, http://eligrey.com
 *
 * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
 * source  : http://purl.eligrey.com/github/FileSaver.js
 */function s(t,A,e){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){h(r.response,A,e)},r.onerror=function(){o.error("could not download file")},r.send()}function a(t){var A=new XMLHttpRequest;A.open("HEAD",t,!1);try{A.send()}catch(t){}return A.status>=200&&A.status<=299}function c(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(A)}}var u,l,h=n.saveAs||("object"!=typeof window||window!==n?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,A,e){var r=n.URL||n.webkitURL,i=document.createElement("a");A=A||t.name||"download",i.download=A,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?a(i.href)?s(t,A,e):c(i,i.target="_blank"):c(i)):(i.href=r.createObjectURL(t),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){c(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,A,e){if(A=A||t.name||"download","string"==typeof t)if(a(t))s(t,A,e);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){c(r)})}else navigator.msSaveOrOpenBlob(function(t,A){return void 0===A?A={autoBom:!1}:"object"!=typeof A&&(o.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.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}(t,e),A)}:function(t,A,e,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return s(t,A,e);var i="application/octet-stream"===t.type,o=/constructor/i.test(n.HTMLElement)||n.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||i&&o)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=a?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},c.readAsDataURL(t)}else{var u=n.URL||n.webkitURL,l=u.createObjectURL(t);r?r.location=l:location.href=l,r=null,setTimeout(function(){u.revokeObjectURL(l)},4e4)}});
/**
 * A class to parse color values
 * @author Stoyan Stefanov <sstoo@gmail.com>
 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
 * @license Use it if you like it
 */function f(t){var A;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 e=[{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)]}}],r=0;r<e.length;r++){var n=e[r].re,i=e[r].process,o=n.exec(t);o&&(A=i(o),this.r=A[0],this.g=A[1],this.b=A[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),A=this.g.toString(16),e=this.b.toString(16);return 1==t.length&&(t="0"+t),1==A.length&&(A="0"+A),1==e.length&&(e="0"+e),"#"+t+A+e
/**
 * @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 d(t,A){var e=t[0],r=t[1],n=t[2],i=t[3];e=m(e=w(e=w(e=w(e=w(e=g(e=g(e=g(e=g(e=B(e=B(e=B(e=B(e,r,n,i,A[0],7,-680876936),r=B(r,n=B(n,i=B(i,e,r,n,A[1],12,-389564586),e,r,A[2],17,606105819),i,e,A[3],22,-1044525330),n,i,A[4],7,-176418897),r=B(r,n=B(n,i=B(i,e,r,n,A[5],12,1200080426),e,r,A[6],17,-1473231341),i,e,A[7],22,-45705983),n,i,A[8],7,1770035416),r=B(r,n=B(n,i=B(i,e,r,n,A[9],12,-1958414417),e,r,A[10],17,-42063),i,e,A[11],22,-1990404162),n,i,A[12],7,1804603682),r=B(r,n=B(n,i=B(i,e,r,n,A[13],12,-40341101),e,r,A[14],17,-1502002290),i,e,A[15],22,1236535329),n,i,A[1],5,-165796510),r=g(r,n=g(n,i=g(i,e,r,n,A[6],9,-1069501632),e,r,A[11],14,643717713),i,e,A[0],20,-373897302),n,i,A[5],5,-701558691),r=g(r,n=g(n,i=g(i,e,r,n,A[10],9,38016083),e,r,A[15],14,-660478335),i,e,A[4],20,-405537848),n,i,A[9],5,568446438),r=g(r,n=g(n,i=g(i,e,r,n,A[14],9,-1019803690),e,r,A[3],14,-187363961),i,e,A[8],20,1163531501),n,i,A[13],5,-1444681467),r=g(r,n=g(n,i=g(i,e,r,n,A[2],9,-51403784),e,r,A[7],14,1735328473),i,e,A[12],20,-1926607734),n,i,A[5],4,-378558),r=w(r,n=w(n,i=w(i,e,r,n,A[8],11,-2022574463),e,r,A[11],16,1839030562),i,e,A[14],23,-35309556),n,i,A[1],4,-1530992060),r=w(r,n=w(n,i=w(i,e,r,n,A[4],11,1272893353),e,r,A[7],16,-155497632),i,e,A[10],23,-1094730640),n,i,A[13],4,681279174),r=w(r,n=w(n,i=w(i,e,r,n,A[0],11,-358537222),e,r,A[3],16,-722521979),i,e,A[6],23,76029189),n,i,A[9],4,-640364487),r=w(r,n=w(n,i=w(i,e,r,n,A[12],11,-421815835),e,r,A[15],16,530742520),i,e,A[2],23,-995338651),n,i,A[0],6,-198630844),r=m(r=m(r=m(r=m(r,n=m(n,i=m(i,e,r,n,A[7],10,1126891415),e,r,A[14],15,-1416354905),i,e,A[5],21,-57434055),n=m(n,i=m(i,e=m(e,r,n,i,A[12],6,1700485571),r,n,A[3],10,-1894986606),e,r,A[10],15,-1051523),i,e,A[1],21,-2054922799),n=m(n,i=m(i,e=m(e,r,n,i,A[8],6,1873313359),r,n,A[15],10,-30611744),e,r,A[6],15,-1560198380),i,e,A[13],21,1309151649),n=m(n,i=m(i,e=m(e,r,n,i,A[4],6,-145523070),r,n,A[11],10,-1120210379),e,r,A[2],15,718787259),i,e,A[9],21,-343485551),t[0]=y(e,t[0]),t[1]=y(r,t[1]),t[2]=y(n,t[2]),t[3]=y(i,t[3])}function p(t,A,e,r,n,i){return A=y(y(A,t),y(r,i)),y(A<<n|A>>>32-n,e)}function B(t,A,e,r,n,i,o){return p(A&e|~A&r,t,A,n,i,o)}function g(t,A,e,r,n,i,o){return p(A&r|e&~r,t,A,n,i,o)}function w(t,A,e,r,n,i,o){return p(A^e^r,t,A,n,i,o)}function m(t,A,e,r,n,i,o){return p(e^(A|~r),t,A,n,i,o)}function v(t){var A,e=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(A=64;A<=t.length;A+=64)d(r,b(t.substring(A-64,A)));t=t.substring(A-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(A=0;A<t.length;A++)n[A>>2]|=t.charCodeAt(A)<<(A%4<<3);if(n[A>>2]|=128<<(A%4<<3),A>55)for(d(r,n),A=0;A<16;A++)n[A]=0;return n[14]=8*e,d(r,n),r}function b(t){var A,e=[];for(A=0;A<64;A+=4)e[A>>2]=t.charCodeAt(A)+(t.charCodeAt(A+1)<<8)+(t.charCodeAt(A+2)<<16)+(t.charCodeAt(A+3)<<24);return e}u=n.atob.bind(n),l=n.btoa.bind(n);var Q="0123456789abcdef".split("");function C(t){for(var A="",e=0;e<4;e++)A+=Q[t>>8*e+4&15]+Q[t>>8*e&15];return A}function F(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function U(t){return v(t).map(F).join("")}function y(t,A){return t+A&4294967295}if("5d41402abc4b2a76b9719d911017c592"!=function(t){for(var A=0;A<t.length;A++)t[A]=C(t[A]);return t.join("")}(v("hello"))){function y(t,A){var e=(65535&t)+(65535&A);return(t>>16)+(A>>16)+(e>>16)<<16|65535&e}}
/**
 * @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 N(t,A){var e,r,n,i;if(t!==e){for(var o=(n=t,i=1+(256/t.length>>0),new Array(i+1).join(n)),s=[],a=0;a<256;a++)s[a]=a;var c=0;for(a=0;a<256;a++){var u=s[a];c=(c+u+o.charCodeAt(a))%256,s[a]=s[c],s[c]=u}e=t,r=s}else s=r;var l=A.length,h=0,f=0,d="";for(a=0;a<l;a++)f=(f+(u=s[h=(h+1)%256]))%256,s[h]=s[f],s[f]=u,o=s[(s[h]+s[f])%256],d+=String.fromCharCode(A.charCodeAt(a)^o);return d}
/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 * Author: Owen Leong (@owenl131)
 * Date: 15 Oct 2020
 * References:
 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
 * http://www.fpdf.org/en/script/script37.php
 */var E={print:4,modify:8,copy:16,"annot-forms":32};function L(t,A,e,r){this.v=1,this.r=2;let n=192;t.forEach(function(t){if(void 0!==E.perm)throw new Error("Invalid permission: "+t);n+=E[t]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";let i=(A+this.padding).substr(0,32),o=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^n)),this.encryptionKey=U(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=N(this.encryptionKey,this.padding)}function H(t){if("object"!=typeof t)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var A={};this.subscribe=function(t,e,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");A.hasOwnProperty(t)||(A[t]={});var n=Math.random().toString(35);return A[t][n]=[e,!!r],n},this.unsubscribe=function(t){for(var e in A)if(A[e][t])return delete A[e][t],0===Object.keys(A[e]).length&&delete A[e],!0;return!1},this.publish=function(e){if(A.hasOwnProperty(e)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var s in A[e]){var a=A[e][s];try{a[0].apply(t,r)}catch(t){n.console&&o.error("jsPDF PubSub Error",t.message,t)}a[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return A}}function _(t){if(!(this instanceof _))return new _(t);var A="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&A.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function S(t,A){this.gState=t,this.matrix=A,this.id="",this.objectNumber=-1}function x(t,A,e,r,n){if(!(this instanceof x))return new x(t,A,e,r,n);this.type="axial"===t?2:3,this.coords=A,this.colors=e,S.call(this,r,n)}function I(t,A,e,r,n){if(!(this instanceof I))return new I(t,A,e,r,n);this.boundingBox=t,this.xStep=A,this.yStep=e,this.stream="",this.cloneIndex=0,S.call(this,r,n)}function P(t){var A,e="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],i=arguments[2],s=arguments[3],a=[],c=1,u=16,d="S",p=null;"object"==typeof(t=t||{})&&(e=t.orientation,r=t.unit||r,i=t.format||i,s=t.compress||t.compressPdf||s,null!==(p=t.encryption||null)&&(p.userPassword=p.userPassword||"",p.ownerPassword=p.ownerPassword||"",p.userPermissions=p.userPermissions||[]),c="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(A=t.precision),void 0!==t.floatPrecision&&(u=t.floatPrecision),d=t.defaultPathOperation||"S"),a=t.filters||(!0===s?["FlateEncode"]:a),r=r||"mm",e=(""+(e||"P")).toLowerCase();var B=t.putOnlyUsedFonts||!1,g={},w={internal:{},__private__:{}};w.__private__.PubSub=H;var m="1.3",v=w.__private__.getPdfVersion=function(){return m};w.__private__.setPdfVersion=function(t){m=t};var b={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]};w.__private__.getPageFormats=function(){return b};var Q=w.__private__.getPageFormat=function(t){return b[t]};i=i||"a4";var C={COMPAT:"compat",ADVANCED:"advanced"},F=C.COMPAT;function U(){this.saveGraphicsState(),st(new kt(Qt,0,0,-Qt,0,pe()*Qt).toString()+" cm"),this.setFontSize(this.getFontSize()/Qt),d="n",F=C.ADVANCED}function y(){this.restoreGraphicsState(),d="S",F=C.COMPAT}var N=function(t,A){if("bold"==t&&"normal"==A||"bold"==t&&400==A||"normal"==t&&"italic"==A||"bold"==t&&"italic"==A)throw new Error("Invalid Combination of fontweight and fontstyle");return A&&t!==A&&(t=400==A?"italic"==t?"italic":"normal":700==A&&"italic"!==t?"bold":t+""+A),t};w.advancedAPI=function(t){var A=F===C.COMPAT;return A&&U.call(this),"function"!=typeof t||(t(this),A&&y.call(this)),this},w.compatAPI=function(t){var A=F===C.ADVANCED;return A&&y.call(this),"function"!=typeof t||(t(this),A&&U.call(this)),this},w.isAdvancedAPI=function(){return F===C.ADVANCED};var E,S=function(t){if(F!==C.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},T=w.roundToPrecision=w.__private__.roundToPrecision=function(t,e){var r=A||e;if(isNaN(t)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(r).replace(/0+$/,"")};E=w.hpf=w.__private__.hpf="number"==typeof u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return T(t,u)}:"smart"===u?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return T(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return T(t,16)};var R=w.f2=w.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return T(t,2)},O=w.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return T(t,3)},K=w.scale=w.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return F===C.COMPAT?t*Qt:F===C.ADVANCED?t:void 0},M=function(t){return K(function(t){return F===C.COMPAT?pe()-t:F===C.ADVANCED?t:void 0}(t))};w.__private__.setPrecision=w.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(A=parseInt(t,10))};var k,D="00000000000000000000000000000000",z=w.__private__.getFileId=function(){return D},j=w.__private__.setFileId=function(t){return D=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():D.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==p&&(NA=new L(p.userPermissions,p.userPassword,p.ownerPassword,D)),D};w.setFileId=function(t){return j(t),this},w.getFileId=function(){return z()};var V=w.__private__.convertDateToPDFDate=function(t){var A=t.getTimezoneOffset(),e=A<0?"+":"-",r=Math.floor(Math.abs(A/60)),n=Math.abs(A%60),i=[e,W(r),"'",W(n),"'"].join("");return["D:",t.getFullYear(),W(t.getMonth()+1),W(t.getDate()),W(t.getHours()),W(t.getMinutes()),W(t.getSeconds()),i].join("")},q=w.__private__.convertPDFDateToDate=function(t){var A=parseInt(t.substr(2,4),10),e=parseInt(t.substr(6,2),10)-1,r=parseInt(t.substr(8,2),10),n=parseInt(t.substr(10,2),10),i=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(A,e,r,n,i,o,0)},G=w.__private__.setCreationDate=function(t){var A;if(void 0===t&&(t=new Date),t instanceof Date)A=V(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");A=t}return k=A},X=w.__private__.getCreationDate=function(t){var A=k;return"jsDate"===t&&(A=q(k)),A};w.setCreationDate=function(t){return G(t),this},w.getCreationDate=function(t){return X(t)};var J,W=w.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},Y=w.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},Z=0,$=[],tt=[],At=0,et=[],rt=[],nt=!1,it=tt;w.__private__.setCustomOutputDestination=function(t){nt=!0,it=t};var ot=function(t){nt||(it=t)};w.__private__.resetCustomOutputDestination=function(){nt=!1,it=tt};var st=w.__private__.out=function(t){return t=t.toString(),At+=t.length+1,it.push(t),it},at=w.__private__.write=function(t){return st(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ct=w.__private__.getArrayBuffer=function(t){for(var A=t.length,e=new ArrayBuffer(A),r=new Uint8Array(e);A--;)r[A]=t.charCodeAt(A);return e},ut=[["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]];w.__private__.getStandardFonts=function(){return ut};var lt=t.fontSize||16;w.__private__.setFontSize=w.setFontSize=function(t){return lt=F===C.ADVANCED?t/Qt:t,this};var ht,ft=w.__private__.getFontSize=w.getFontSize=function(){return F===C.COMPAT?lt:lt*Qt},dt=t.R2L||!1;w.__private__.setR2L=w.setR2L=function(t){return dt=t,this},w.__private__.getR2L=w.getR2L=function(){return dt};var pt,Bt=w.__private__.setZoomMode=function(t){if(/^\d*\.?\d*%$/.test(t))ht=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');ht=t}else ht=parseInt(t,10)};w.__private__.getZoomMode=function(){return ht};var gt,wt=w.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');pt=t};w.__private__.getPageMode=function(){return pt};var mt=w.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');gt=t};w.__private__.getLayoutMode=function(){return gt},w.__private__.setDisplayMode=w.setDisplayMode=function(t,A,e){return Bt(t),mt(A),wt(e),this};var vt={title:"",subject:"",author:"",keywords:"",creator:""};w.__private__.getDocumentProperty=function(t){if(-1===Object.keys(vt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return vt[t]},w.__private__.getDocumentProperties=function(){return vt},w.__private__.setDocumentProperties=w.setProperties=w.setDocumentProperties=function(t){for(var A in vt)vt.hasOwnProperty(A)&&t[A]&&(vt[A]=t[A]);return this},w.__private__.setDocumentProperty=function(t,A){if(-1===Object.keys(vt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return vt[t]=A};var bt,Qt,Ct,Ft,Ut,yt={},Nt={},Et=[],Lt={},Ht={},_t={},St={},xt=null,It=0,Pt=[],Tt=new H(w),Rt=t.hotfixes||[],Ot={},Kt={},Mt=[],kt=function(t,A,e,r,n,i){if(!(this instanceof kt))return new kt(t,A,e,r,n,i);isNaN(t)&&(t=1),isNaN(A)&&(A=0),isNaN(e)&&(e=0),isNaN(r)&&(r=1),isNaN(n)&&(n=0),isNaN(i)&&(i=0),this._matrix=[t,A,e,r,n,i]};Object.defineProperty(kt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(kt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(kt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(kt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(kt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(kt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(kt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(kt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(kt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(kt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(kt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(kt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(kt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(kt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(kt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(kt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),kt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(E).join(t)},kt.prototype.multiply=function(t){var A=t.sx*this.sx+t.shy*this.shx,e=t.sx*this.shy+t.shy*this.sy,r=t.shx*this.sx+t.sy*this.shx,n=t.shx*this.shy+t.sy*this.sy,i=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new kt(A,e,r,n,i,o)},kt.prototype.decompose=function(){var t=this.sx,A=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,o=Math.sqrt(t*t+A*A),s=(t/=o)*e+(A/=o)*r;e-=t*s,r-=A*s;var a=Math.sqrt(e*e+r*r);return s/=a,t*(r/=a)<A*(e/=a)&&(t=-t,A=-A,s=-s,o=-o),{scale:new kt(o,0,0,a,0,0),translate:new kt(1,0,0,1,n,i),rotate:new kt(t,A,-A,t,0,0),skew:new kt(1,0,s,1,0,0)}},kt.prototype.toString=function(t){return this.join(" ")},kt.prototype.inversed=function(){var t=this.sx,A=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty,o=1/(t*r-A*e),s=r*o,a=-A*o,c=-e*o,u=t*o;return new kt(s,a,c,u,-s*n-c*i,-a*n-u*i)},kt.prototype.applyToPoint=function(t){var A=t.x*this.sx+t.y*this.shx+this.tx,e=t.x*this.shy+t.y*this.sy+this.ty;return new ae(A,e)},kt.prototype.applyToRectangle=function(t){var A=this.applyToPoint(t),e=this.applyToPoint(new ae(t.x+t.w,t.y+t.h));return new ce(A.x,A.y,e.x-A.x,e.y-A.y)},kt.prototype.clone=function(){var t=this.sx,A=this.shy,e=this.shx,r=this.sy,n=this.tx,i=this.ty;return new kt(t,A,e,r,n,i)},w.Matrix=kt;var Dt=w.matrixMult=function(t,A){return A.multiply(t)},zt=new kt(1,0,0,1,0,0);w.unitMatrix=w.identityMatrix=zt;var jt=function(t,A){if(!Ht[t]){var e=(A instanceof x?"Sh":"P")+(Object.keys(Lt).length+1).toString(10);A.id=e,Ht[t]=e,Lt[e]=A,Tt.publish("addPattern",A)}};w.ShadingPattern=x,w.TilingPattern=I,w.addShadingPattern=function(t,A){return S("addShadingPattern()"),jt(t,A),this},w.beginTilingPattern=function(t){S("beginTilingPattern()"),le(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},w.endTilingPattern=function(t,A){S("endTilingPattern()"),A.stream=rt[J].join("\n"),jt(t,A),Tt.publish("endTilingPattern",A),Mt.pop().restore()};var Vt=w.__private__.newObject=function(){var t=qt();return Gt(t,!0),t},qt=w.__private__.newObjectDeferred=function(){return $[++Z]=function(){return At},Z},Gt=function(t,A){return A="boolean"==typeof A&&A,$[t]=At,A&&st(t+" 0 obj"),t},Xt=w.__private__.newAdditionalObject=function(){var t={objId:qt(),content:""};return et.push(t),t},Jt=qt(),Wt=qt(),Yt=w.__private__.decodeColorString=function(t){var A=t.split(" ");if(2!==A.length||"g"!==A[1]&&"G"!==A[1])5!==A.length||"k"!==A[4]&&"K"!==A[4]||(A=[(1-A[0])*(1-A[3]),(1-A[1])*(1-A[3]),(1-A[2])*(1-A[3]),"r"]);else{var e=parseFloat(A[0]);A=[e,e,e,"r"]}for(var r="#",n=0;n<3;n++)r+=("0"+Math.floor(255*parseFloat(A[n])).toString(16)).slice(-2);return r},Zt=w.__private__.encodeColorString=function(t){var A;"string"==typeof t&&(t={ch1:t});var e=t.ch1,r=t.ch2,n=t.ch3,i=t.ch4,o="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof e&&"#"!==e.charAt(0)){var s=new f(e);if(s.ok)e=s.toHex();else if(!/^\d*\.?\d*$/.test(e))throw new Error('Invalid color "'+e+'" passed to jsPDF.encodeColorString.')}if("string"==typeof e&&/^#[0-9A-Fa-f]{3}$/.test(e)&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),"string"==typeof e&&/^#[0-9A-Fa-f]{6}$/.test(e)){var a=parseInt(e.substr(1),16);e=a>>16&255,r=a>>8&255,n=255&a}if(void 0===r||void 0===i&&e===r&&r===n)if("string"==typeof e)A=e+" "+o[0];else switch(t.precision){case 2:A=R(e/255)+" "+o[0];break;case 3:default:A=O(e/255)+" "+o[0]}else if(void 0===i||"object"==typeof i){if(i&&!isNaN(i.a)&&0===i.a)return["1.","1.","1.",o[1]].join(" ");if("string"==typeof e)A=[e,r,n,o[1]].join(" ");else switch(t.precision){case 2:A=[R(e/255),R(r/255),R(n/255),o[1]].join(" ");break;default:case 3:A=[O(e/255),O(r/255),O(n/255),o[1]].join(" ")}}else if("string"==typeof e)A=[e,r,n,i,o[2]].join(" ");else switch(t.precision){case 2:A=[R(e),R(r),R(n),R(i),o[2]].join(" ");break;case 3:default:A=[O(e),O(r),O(n),O(i),o[2]].join(" ")}return A},$t=w.__private__.getFilters=function(){return a},tA=w.__private__.putStream=function(t){var A=(t=t||{}).data||"",e=t.filters||$t(),r=t.alreadyAppliedFilters||[],n=t.addLength1||!1,i=A.length,o=t.objectId,s=function(t){return t};if(null!==p&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==p&&(s=NA.encryptor(o,0));var a={};!0===e&&(e=["FlateEncode"]);var c=t.additionalKeyValues||[],u=(a=void 0!==P.API.processDataByFilters?P.API.processDataByFilters(A,e):{data:A,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==a.data.length&&(c.push({key:"Length",value:a.data.length}),!0===n&&c.push({key:"Length1",value:i})),0!=u.length)if(u.split("/").length-1==1)c.push({key:"Filter",value:u});else{c.push({key:"Filter",value:"["+u+"]"});for(var l=0;l<c.length;l+=1)if("DecodeParms"===c[l].key){for(var h=[],f=0;f<a.reverseChain.split("/").length-1;f+=1)h.push("null");h.push(c[l].value),c[l].value="["+h.join(" ")+"]"}}st("<<");for(var d=0;d<c.length;d++)st("/"+c[d].key+" "+c[d].value);st(">>"),0!==a.data.length&&(st("stream"),st(s(a.data)),st("endstream"))},AA=w.__private__.putPage=function(t){var A=t.number,e=t.data,r=t.objId,n=t.contentsObjId;Gt(r,!0),st("<</Type /Page"),st("/Parent "+t.rootDictionaryObjId+" 0 R"),st("/Resources "+t.resourceDictionaryObjId+" 0 R"),st("/MediaBox ["+parseFloat(E(t.mediaBox.bottomLeftX))+" "+parseFloat(E(t.mediaBox.bottomLeftY))+" "+E(t.mediaBox.topRightX)+" "+E(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&st("/CropBox ["+E(t.cropBox.bottomLeftX)+" "+E(t.cropBox.bottomLeftY)+" "+E(t.cropBox.topRightX)+" "+E(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&st("/BleedBox ["+E(t.bleedBox.bottomLeftX)+" "+E(t.bleedBox.bottomLeftY)+" "+E(t.bleedBox.topRightX)+" "+E(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&st("/TrimBox ["+E(t.trimBox.bottomLeftX)+" "+E(t.trimBox.bottomLeftY)+" "+E(t.trimBox.topRightX)+" "+E(t.trimBox.topRightY)+"]"),null!==t.artBox&&st("/ArtBox ["+E(t.artBox.bottomLeftX)+" "+E(t.artBox.bottomLeftY)+" "+E(t.artBox.topRightX)+" "+E(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&st("/UserUnit "+t.userUnit),Tt.publish("putPage",{objId:r,pageContext:Pt[A],pageNumber:A,page:e}),st("/Contents "+n+" 0 R"),st(">>"),st("endobj");var i=e.join("\n");return F===C.ADVANCED&&(i+="\nQ"),Gt(n,!0),tA({data:i,filters:$t(),objectId:n}),st("endobj"),r},eA=w.__private__.putPages=function(){var t,A,e=[];for(t=1;t<=It;t++)Pt[t].objId=qt(),Pt[t].contentsObjId=qt();for(t=1;t<=It;t++)e.push(AA({number:t,data:rt[t],objId:Pt[t].objId,contentsObjId:Pt[t].contentsObjId,mediaBox:Pt[t].mediaBox,cropBox:Pt[t].cropBox,bleedBox:Pt[t].bleedBox,trimBox:Pt[t].trimBox,artBox:Pt[t].artBox,userUnit:Pt[t].userUnit,rootDictionaryObjId:Jt,resourceDictionaryObjId:Wt}));Gt(Jt,!0),st("<</Type /Pages");var r="/Kids [";for(A=0;A<It;A++)r+=e[A]+" 0 R ";st(r+"]"),st("/Count "+It),st(">>"),st("endobj"),Tt.publish("postPutPages")},rA=function(t){var A=function(t,A){return-1!==t.indexOf(" ")?"("+hA(t,A)+")":hA(t,A)};Tt.publish("putFont",{font:t,out:st,newObject:Vt,putStream:tA,pdfEscapeWithNeededParanthesis:A}),!0!==t.isAlreadyPutted&&(t.objectNumber=Vt(),st("<<"),st("/Type /Font"),st("/BaseFont /"+A(t.postScriptName)),st("/Subtype /Type1"),"string"==typeof t.encoding&&st("/Encoding /"+t.encoding),st("/FirstChar 32"),st("/LastChar 255"),st(">>"),st("endobj"))},nA=function(t){t.objectNumber=Vt();var A=[];A.push({key:"Type",value:"/XObject"}),A.push({key:"Subtype",value:"/Form"}),A.push({key:"BBox",value:"["+[E(t.x),E(t.y),E(t.x+t.width),E(t.y+t.height)].join(" ")+"]"}),A.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var e=t.pages[1].join("\n");tA({data:e,additionalKeyValues:A,objectId:t.objectNumber}),st("endobj")},iA=function(t,A){A||(A=21);var e=Vt(),r=function(t,A){var e,r=[],n=1/(A-1);for(e=0;e<1;e+=n)r.push(e);if(r.push(1),0!=t[0].offset){var i={offset:0,color:t[0].color};t.unshift(i)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",a=0,c=0;c<r.length;c++){for(e=r[c];e>t[a+1].offset;)a++;var u=t[a].offset,l=(e-u)/(t[a+1].offset-u),h=t[a].color,f=t[a+1].color;s+=Y(Math.round((1-l)*h[0]+l*f[0]).toString(16))+Y(Math.round((1-l)*h[1]+l*f[1]).toString(16))+Y(Math.round((1-l)*h[2]+l*f[2]).toString(16))}return s.trim()}(t.colors,A),n=[];n.push({key:"FunctionType",value:"0"}),n.push({key:"Domain",value:"[0.0 1.0]"}),n.push({key:"Size",value:"["+A+"]"}),n.push({key:"BitsPerSample",value:"8"}),n.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),n.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),tA({data:r,additionalKeyValues:n,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:e}),st("endobj"),t.objectNumber=Vt(),st("<< /ShadingType "+t.type),st("/ColorSpace /DeviceRGB");var i="/Coords ["+E(parseFloat(t.coords[0]))+" "+E(parseFloat(t.coords[1]))+" ";2===t.type?i+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3])):i+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3]))+" "+E(parseFloat(t.coords[4]))+" "+E(parseFloat(t.coords[5])),st(i+="]"),t.matrix&&st("/Matrix ["+t.matrix.toString()+"]"),st("/Function "+e+" 0 R"),st("/Extend [true true]"),st(">>"),st("endobj")},oA=function(t,A){var e=qt(),r=Vt();A.push({resourcesOid:e,objectOid:r}),t.objectNumber=r;var n=[];n.push({key:"Type",value:"/Pattern"}),n.push({key:"PatternType",value:"1"}),n.push({key:"PaintType",value:"1"}),n.push({key:"TilingType",value:"1"}),n.push({key:"BBox",value:"["+t.boundingBox.map(E).join(" ")+"]"}),n.push({key:"XStep",value:E(t.xStep)}),n.push({key:"YStep",value:E(t.yStep)}),n.push({key:"Resources",value:e+" 0 R"}),t.matrix&&n.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),tA({data:t.stream,additionalKeyValues:n,objectId:t.objectNumber}),st("endobj")},sA=function(t){for(var A in t.objectNumber=Vt(),st("<<"),t)switch(A){case"opacity":st("/ca "+R(t[A]));break;case"stroke-opacity":st("/CA "+R(t[A]))}st(">>"),st("endobj")},aA=function(t){Gt(t.resourcesOid,!0),st("<<"),st("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in st("/Font <<"),yt)yt.hasOwnProperty(t)&&(!1===B||!0===B&&g.hasOwnProperty(t))&&st("/"+t+" "+yt[t].objectNumber+" 0 R");st(">>")}(),function(){if(Object.keys(Lt).length>0){for(var t in st("/Shading <<"),Lt)Lt.hasOwnProperty(t)&&Lt[t]instanceof x&&Lt[t].objectNumber>=0&&st("/"+t+" "+Lt[t].objectNumber+" 0 R");Tt.publish("putShadingPatternDict"),st(">>")}}(),function(t){if(Object.keys(Lt).length>0){for(var A in st("/Pattern <<"),Lt)Lt.hasOwnProperty(A)&&Lt[A]instanceof w.TilingPattern&&Lt[A].objectNumber>=0&&Lt[A].objectNumber<t&&st("/"+A+" "+Lt[A].objectNumber+" 0 R");Tt.publish("putTilingPatternDict"),st(">>")}}(t.objectOid),function(){if(Object.keys(_t).length>0){var t;for(t in st("/ExtGState <<"),_t)_t.hasOwnProperty(t)&&_t[t].objectNumber>=0&&st("/"+t+" "+_t[t].objectNumber+" 0 R");Tt.publish("putGStateDict"),st(">>")}}(),function(){for(var t in st("/XObject <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t].objectNumber>=0&&st("/"+t+" "+Ot[t].objectNumber+" 0 R");Tt.publish("putXobjectDict"),st(">>")}(),st(">>"),st("endobj")},cA=function(){var t=[];(function(){for(var t in yt)yt.hasOwnProperty(t)&&(!1===B||!0===B&&g.hasOwnProperty(t))&&rA(yt[t])})(),function(){var t;for(t in _t)_t.hasOwnProperty(t)&&sA(_t[t])}(),function(){for(var t in Ot)Ot.hasOwnProperty(t)&&nA(Ot[t])}(),function(t){var A;for(A in Lt)Lt.hasOwnProperty(A)&&(Lt[A]instanceof x?iA(Lt[A]):Lt[A]instanceof I&&oA(Lt[A],t))}(t),Tt.publish("putResources"),t.forEach(aA),aA({resourcesOid:Wt,objectOid:Number.MAX_SAFE_INTEGER}),Tt.publish("postPutResources")},uA=function(t){Nt[t.fontName]=Nt[t.fontName]||{},Nt[t.fontName][t.fontStyle]=t.id},lA=function(t,A,e,r,n){var i={id:"F"+(Object.keys(yt).length+1).toString(10),postScriptName:t,fontName:A,fontStyle:e,encoding:r,isStandardFont:n||!1,metadata:{}};return Tt.publish("addFont",{font:i,instance:this}),yt[i.id]=i,uA(i),i.id},hA=w.__private__.pdfEscape=w.pdfEscape=function(t,A){return function(t,A){var e,r,n,i,o,s,a,c,u;if(n=(A=A||{}).sourceEncoding||"Unicode",o=A.outputEncoding,(A.autoencode||o)&&yt[bt].metadata&&yt[bt].metadata[n]&&yt[bt].metadata[n].encoding&&(i=yt[bt].metadata[n].encoding,!o&&yt[bt].encoding&&(o=yt[bt].encoding),!o&&i.codePages&&(o=i.codePages[0]),"string"==typeof o&&(o=i[o]),o)){for(a=!1,s=[],e=0,r=t.length;e<r;e++)(c=o[t.charCodeAt(e)])?s.push(String.fromCharCode(c)):s.push(t[e]),s[e].charCodeAt(0)>>8&&(a=!0);t=s.join("")}for(e=t.length;void 0===a&&0!==e;)t.charCodeAt(e-1)>>8&&(a=!0),e--;if(!a)return t;for(s=A.noBOM?[]:[254,255],e=0,r=t.length;e<r;e++){if((u=(c=t.charCodeAt(e))>>8)>>8)throw new Error("Character at position "+e+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(c-(u<<8))}return String.fromCharCode.apply(void 0,s)}(t,A).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},fA=w.__private__.beginPage=function(t){rt[++It]=[],Pt[It]={objId:0,contentsObjId:0,userUnit:Number(c),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},pA(It),ot(rt[J])},dA=function(t,A){var r,n,s;switch(e=A||e,"string"==typeof t&&(r=Q(t.toLowerCase()),Array.isArray(r)&&(n=r[0],s=r[1])),Array.isArray(t)&&(n=t[0]*Qt,s=t[1]*Qt),isNaN(n)&&(n=i[0],s=i[1]),(n>14400||s>14400)&&(o.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),s=Math.min(14400,s)),i=[n,s],e.substr(0,1)){case"l":s>n&&(i=[s,n]);break;case"p":n>s&&(i=[s,n])}fA(i),VA(jA),st($A),0!==ie&&st(ie+" J"),0!==oe&&st(oe+" j"),Tt.publish("addPage",{pageNumber:It})},pA=function(t){t>0&&t<=It&&(J=t)},BA=w.__private__.getNumberOfPages=w.getNumberOfPages=function(){return rt.length-1},gA=function(t,A,e){var r,n=void 0;return e=e||{},t=void 0!==t?t:yt[bt].fontName,A=void 0!==A?A:yt[bt].fontStyle,r=t.toLowerCase(),void 0!==Nt[r]&&void 0!==Nt[r][A]?n=Nt[r][A]:void 0!==Nt[t]&&void 0!==Nt[t][A]?n=Nt[t][A]:!1===e.disableWarning&&o.warn("Unable to look up font label for font '"+t+"', '"+A+"'. Refer to getFontList() for available fonts."),n||e.noFallback||null==(n=Nt.times[A])&&(n=Nt.times.normal),n},wA=w.__private__.putInfo=function(){var t=Vt(),A=function(t){return t};for(var e in null!==p&&(A=NA.encryptor(t,0)),st("<<"),st("/Producer ("+hA(A("jsPDF "+P.version))+")"),vt)vt.hasOwnProperty(e)&&vt[e]&&st("/"+e.substr(0,1).toUpperCase()+e.substr(1)+" ("+hA(A(vt[e]))+")");st("/CreationDate ("+hA(A(k))+")"),st(">>"),st("endobj")},mA=w.__private__.putCatalog=function(t){var A=(t=t||{}).rootDictionaryObjId||Jt;switch(Vt(),st("<<"),st("/Type /Catalog"),st("/Pages "+A+" 0 R"),ht||(ht="fullwidth"),ht){case"fullwidth":st("/OpenAction [3 0 R /FitH null]");break;case"fullheight":st("/OpenAction [3 0 R /FitV null]");break;case"fullpage":st("/OpenAction [3 0 R /Fit]");break;case"original":st("/OpenAction [3 0 R /XYZ null null 1]");break;default:var e=""+ht;"%"===e.substr(e.length-1)&&(ht=parseInt(ht)/100),"number"==typeof ht&&st("/OpenAction [3 0 R /XYZ null null "+R(ht)+"]")}switch(gt||(gt="continuous"),gt){case"continuous":st("/PageLayout /OneColumn");break;case"single":st("/PageLayout /SinglePage");break;case"two":case"twoleft":st("/PageLayout /TwoColumnLeft");break;case"tworight":st("/PageLayout /TwoColumnRight")}pt&&st("/PageMode /"+pt),Tt.publish("putCatalog"),st(">>"),st("endobj")},vA=w.__private__.putTrailer=function(){st("trailer"),st("<<"),st("/Size "+(Z+1)),st("/Root "+Z+" 0 R"),st("/Info "+(Z-1)+" 0 R"),null!==p&&st("/Encrypt "+NA.oid+" 0 R"),st("/ID [ <"+D+"> <"+D+"> ]"),st(">>")},bA=w.__private__.putHeader=function(){st("%PDF-"+m),st("%ºß¬à")},QA=w.__private__.putXRef=function(){var t="0000000000";st("xref"),st("0 "+(Z+1)),st("0000000000 65535 f ");for(var A=1;A<=Z;A++)"function"==typeof $[A]?st((t+$[A]()).slice(-10)+" 00000 n "):void 0!==$[A]?st((t+$[A]).slice(-10)+" 00000 n "):st("0000000000 00000 n ")},CA=w.__private__.buildDocument=function(){Z=0,At=0,tt=[],$=[],et=[],Jt=qt(),Wt=qt(),ot(tt),Tt.publish("buildDocument"),bA(),eA(),function(){Tt.publish("putAdditionalObjects");for(var t=0;t<et.length;t++){var A=et[t];Gt(A.objId,!0),st(A.content),st("endobj")}Tt.publish("postPutAdditionalObjects")}(),cA(),null!==p&&(NA.oid=Vt(),st("<<"),st("/Filter /Standard"),st("/V "+NA.v),st("/R "+NA.r),st("/U <"+NA.toHexString(NA.U)+">"),st("/O <"+NA.toHexString(NA.O)+">"),st("/P "+NA.P),st(">>"),st("endobj")),wA(),mA();var t=At;return QA(),vA(),st("startxref"),st(""+t),st("%%EOF"),ot(rt[J]),tt.join("\n")},FA=w.__private__.getBlob=function(t){return new Blob([ct(t)],{type:"application/pdf"})},UA=w.output=w.__private__.output=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var A=t.stack||"";~A.indexOf(" at ")&&(A=A.split(" at ")[1]);var e="Error in function "+A.split("\n")[0].split("<")[0]+": "+t.message;if(!n.console)throw new Error(e);n.console.error(e,t),n.alert&&alert(e)}},t.foo.bar=t,t.foo}(function(t,A){switch("string"==typeof(A=A||{})?A={filename:A}:A.filename=A.filename||"generated.pdf",t){case void 0:return CA();case"save":w.save(A.filename);break;case"arraybuffer":return ct(CA());case"blob":return FA(CA());case"bloburi":case"bloburl":if(void 0!==n.URL&&"function"==typeof n.URL.createObjectURL)return n.URL&&n.URL.createObjectURL(FA(CA()))||void 0;o.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var e="",r=CA();try{e=l(r)}catch(t){e=l(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+A.filename+";base64,"+e;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var i='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+(A.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(A)+");<\/script></body></html>",s=n.open();return null!==s&&s.document.write(i),s}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var a='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(A.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+A.filename+'" width="500px" height="400px" /></body></html>',c=n.open();if(null!==c){c.document.write(a);var u=this;c.document.documentElement.querySelector("#pdfViewer").onload=function(){c.document.title=A.filename,c.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(u.output("bloburl"))}}return c}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(n))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",A)+'"></iframe></body></html>',f=n.open();if(null!==f&&(f.document.write(h),f.document.title=A.filename),f||"undefined"==typeof safari)return f;break;case"datauri":case"dataurl":return n.document.location.href=this.output("datauristring",A);default:return null}}),yA=function(t){return!0===Array.isArray(Rt)&&Rt.indexOf(t)>-1};switch(r){case"pt":Qt=1;break;case"mm":Qt=72/25.4;break;case"cm":Qt=72/2.54;break;case"in":Qt=72;break;case"px":Qt=1==yA("px_scaling")?.75:96/72;break;case"pc":case"em":Qt=12;break;case"ex":Qt=6;break;default:throw new Error("Invalid unit: "+r)}var NA=null;G(),j();var EA=w.__private__.getPageInfo=w.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Pt[t].objId,pageNumber:t,pageContext:Pt[t]}},LA=w.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var A in Pt)if(Pt[A].objId===t)break;return EA(A)},HA=w.__private__.getCurrentPageInfo=w.getCurrentPageInfo=function(){return{objId:Pt[J].objId,pageNumber:J,pageContext:Pt[J]}};w.addPage=function(){return dA.apply(this,arguments),this},w.setPage=function(){return pA.apply(this,arguments),ot.call(this,rt[J]),this},w.insertPage=function(t){return this.addPage(),this.movePage(J,t),this},w.movePage=function(t,A){var e,r;if(t>A){e=rt[t],r=Pt[t];for(var n=t;n>A;n--)rt[n]=rt[n-1],Pt[n]=Pt[n-1];rt[A]=e,Pt[A]=r,this.setPage(A)}else if(t<A){e=rt[t],r=Pt[t];for(var i=t;i<A;i++)rt[i]=rt[i+1],Pt[i]=Pt[i+1];rt[A]=e,Pt[A]=r,this.setPage(A)}return this},w.deletePage=function(){return function(t){t>0&&t<=It&&(rt.splice(t,1),Pt.splice(t,1),J>--It&&(J=It),this.setPage(J))}.apply(this,arguments),this},w.__private__.text=w.text=function(t,A,e,r,n){var i,o,s,a,c,u,l,h,f=(r=r||{}).scope||this;if("number"==typeof t&&"number"==typeof A&&("string"==typeof e||Array.isArray(e))){var d=e;e=A,A=t,t=d}if(arguments[3]instanceof kt==0?(s=arguments[4],a=arguments[5],"object"==typeof(l=arguments[3])&&null!==l||("string"==typeof s&&(a=s,s=null),"string"==typeof l&&(a=l,l=null),"number"==typeof l&&(s=l,l=null),r={flags:l,angle:s,align:a})):(S("The transform parameter of text() with a Matrix value"),h=n),isNaN(A)||isNaN(e)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return f;var p,B="",w="number"==typeof r.lineHeightFactor?r.lineHeightFactor:zA,m=f.internal.scaleFactor;function v(t){for(var A,e=t.concat(),r=[],n=e.length;n--;)"string"==typeof(A=e.shift())?r.push(A):Array.isArray(t)&&(1===A.length||void 0===A[1]&&void 0===A[2])?r.push(A[0]):r.push([A[0],A[1],A[2]]);return r}function b(t,A){var e;if("string"==typeof t)e=A(t)[0];else if(Array.isArray(t)){for(var r,n,i=t.concat(),o=[],s=i.length;s--;)"string"==typeof(r=i.shift())?o.push(A(r)[0]):Array.isArray(r)&&"string"==typeof r[0]&&(n=A(r[0],r[1],r[2]),o.push([n[0],n[1],n[2]]));e=o}return e}var Q=!1,U=!0;if("string"==typeof t)Q=!0;else if(Array.isArray(t)){var y=t.concat();o=[];for(var N,L=y.length;L--;)("string"!=typeof(N=y.shift())||Array.isArray(N)&&"string"!=typeof N[0])&&(U=!1);Q=U}if(!1===Q)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var H=lt/f.internal.scaleFactor,_=H*(zA-1);switch(r.baseline){case"bottom":e-=_;break;case"top":e+=H-_;break;case"hanging":e+=H-2*_;break;case"middle":e+=H/2-_}if((u=r.maxWidth||0)>0&&("string"==typeof t?t=f.splitTextToSize(t,u):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,A){return t.concat(f.splitTextToSize(A,u))},[]))),i={text:t,x:A,y:e,options:r,mutex:{pdfEscape:hA,activeFontKey:bt,fonts:yt,activeFontSize:lt}},Tt.publish("preProcessText",i),t=i.text,s=(r=i.options).angle,h instanceof kt==0&&s&&"number"==typeof s){s*=Math.PI/180,0===r.rotationDirection&&(s=-s),F===C.ADVANCED&&(s=-s);var x=Math.cos(s),I=Math.sin(s);h=new kt(x,I,-I,x,0,0)}else s&&s instanceof kt&&(h=s);F!==C.ADVANCED||h||(h=zt),void 0!==(c=r.charSpace||re)&&(B+=E(K(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),r.lang;var P=-1,T=void 0!==r.renderingMode?r.renderingMode:r.stroke,R=f.internal.getCurrentPageInfo().pageContext;switch(T){case 0:case!1:case"fill":P=0;break;case 1:case!0:case"stroke":P=1;break;case 2:case"fillThenStroke":P=2;break;case 3:case"invisible":P=3;break;case 4:case"fillAndAddForClipping":P=4;break;case 5:case"strokeAndAddPathForClipping":P=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":P=6;break;case 7:case"addToPathForClipping":P=7}var O=void 0!==R.usedRenderingMode?R.usedRenderingMode:-1;-1!==P?B+=P+" Tr\n":-1!==O&&(B+="0 Tr\n"),-1!==P&&(R.usedRenderingMode=P),a=r.align||"left";var M,k=lt*w,D=f.internal.pageSize.getWidth(),z=yt[bt];c=r.charSpace||re,u=r.maxWidth||0,l=Object.assign({autoencode:!0,noBOM:!0},r.flags);var j=[];if("[object Array]"===Object.prototype.toString.call(t)){var V;o=v(t),"left"!==a&&(M=o.map(function(t){return f.getStringUnitWidth(t,{font:z,charSpace:c,fontSize:lt,doKerning:!1})*lt/m}));var q,G=0;if("right"===a){A-=M[0],t=[],L=o.length;for(var X=0;X<L;X++)0===X?(q=JA(A),V=WA(e)):(q=K(G-M[X]),V=-k),t.push([o[X],q,V]),G=M[X]}else if("center"===a){A-=M[0]/2,t=[],L=o.length;for(var J=0;J<L;J++)0===J?(q=JA(A),V=WA(e)):(q=K((G-M[J])/2),V=-k),t.push([o[J],q,V]),G=M[J]}else if("left"===a){t=[],L=o.length;for(var W=0;W<L;W++)t.push(o[W])}else{if("justify"!==a)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[],L=o.length,u=0!==u?u:D;for(var Y=0;Y<L;Y++)V=0===Y?WA(e):-k,q=0===Y?JA(A):0,Y<L-1&&j.push(E(K((u-M[Y])/(o[Y].split(" ").length-1)))),t.push([o[Y],q,V])}}!0===("boolean"==typeof r.R2L?r.R2L:dt)&&(t=b(t,function(t,A,e){return[t.split("").reverse().join(""),A,e]})),i={text:t,x:A,y:e,options:r,mutex:{pdfEscape:hA,activeFontKey:bt,fonts:yt,activeFontSize:lt}},Tt.publish("postProcessText",i),t=i.text,p=i.mutex.isHex||!1;var Z=yt[bt].encoding;"WinAnsiEncoding"!==Z&&"StandardEncoding"!==Z||(t=b(t,function(t,A,e){return[function(t){return t=t.split("\t").join(Array(r.TabLen||9).join(" ")),hA(t,l)}(t),A,e]})),o=v(t),t=[];for(var $,tt,At,et=Array.isArray(o[0])?1:0,rt="",nt=function(t,A,e){var n="";return e instanceof kt?(e="number"==typeof r.angle?Dt(e,new kt(1,0,0,1,t,A)):Dt(new kt(1,0,0,1,t,A),e),F===C.ADVANCED&&(e=Dt(new kt(1,0,0,-1,0,0),e)),n=e.join(" ")+" Tm\n"):n=E(t)+" "+E(A)+" Td\n",n},it=0;it<o.length;it++){switch(rt="",et){case 1:At=(p?"<":"(")+o[it][0]+(p?">":")"),$=parseFloat(o[it][1]),tt=parseFloat(o[it][2]);break;case 0:At=(p?"<":"(")+o[it]+(p?">":")"),$=JA(A),tt=WA(e)}void 0!==j&&void 0!==j[it]&&(rt=j[it]+" Tw\n"),0===it?t.push(rt+nt($,tt,h)+At):0===et?t.push(rt+At):1===et&&t.push(rt+nt($,tt,h)+At)}t=0===et?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var ot="BT\n/";return ot+=bt+" "+lt+" Tf\n",ot+=E(lt*w)+" TL\n",ot+=Ae+"\n",ot+=B,ot+=t,st(ot+="ET"),g[bt]=!0,f};var _A=w.__private__.clip=w.clip=function(t){return st("evenodd"===t?"W*":"W"),this};w.clipEvenOdd=function(){return _A("evenodd")},w.__private__.discardPath=w.discardPath=function(){return st("n"),this};var SA=w.__private__.isValidStyle=function(t){var A=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(A=!0),A};w.__private__.setDefaultPathOperation=w.setDefaultPathOperation=function(t){return SA(t)&&(d=t),this};var xA=w.__private__.getStyle=w.getStyle=function(t){var A=d;switch(t){case"D":case"S":A="S";break;case"F":A="f";break;case"FD":case"DF":A="B";break;case"f":case"f*":case"B":case"B*":A=t}return A},IA=w.close=function(){return st("h"),this};w.stroke=function(){return st("S"),this},w.fill=function(t){return PA("f",t),this},w.fillEvenOdd=function(t){return PA("f*",t),this},w.fillStroke=function(t){return PA("B",t),this},w.fillStrokeEvenOdd=function(t){return PA("B*",t),this};var PA=function(t,A){"object"==typeof A?RA(A,t):st(t)},TA=function(t){null===t||F===C.ADVANCED&&void 0===t||(t=xA(t),st(t))};var RA=function(t,A){var e=Ht[t.key],r=Lt[e];if(r instanceof x)st("q"),st(OA(A)),r.gState&&w.setGState(r.gState),st(t.matrix.toString()+" cm"),st("/"+e+" sh"),st("Q");else if(r instanceof I){var n=new kt(1,0,0,-1,0,pe());t.matrix&&(n=n.multiply(t.matrix||zt),e=function(t,A,e,r,n){var i=new I(A||this.boundingBox,e||this.xStep,r||this.yStep,this.gState,n||this.matrix);i.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return jt(o,i),i}.call(r,t.key,t.boundingBox,t.xStep,t.yStep,n).id),st("q"),st("/Pattern cs"),st("/"+e+" scn"),r.gState&&w.setGState(r.gState),st(A),st("Q")}},OA=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},KA=w.moveTo=function(t,A){return st(E(K(t))+" "+E(M(A))+" m"),this},MA=w.lineTo=function(t,A){return st(E(K(t))+" "+E(M(A))+" l"),this},kA=w.curveTo=function(t,A,e,r,n,i){return st([E(K(t)),E(M(A)),E(K(e)),E(M(r)),E(K(n)),E(M(i)),"c"].join(" ")),this};w.__private__.line=w.line=function(t,A,e,r,n){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||!SA(n))throw new Error("Invalid arguments passed to jsPDF.line");return F===C.COMPAT?this.lines([[e-t,r-A]],t,A,[1,1],n||"S"):this.lines([[e-t,r-A]],t,A,[1,1]).stroke()},w.__private__.lines=w.lines=function(t,A,e,r,n,i){var o,s,a,c,u,l,h,f,d,p,B,g;if("number"==typeof t&&(g=e,e=A,A=t,t=g),r=r||[1,1],i=i||!1,isNaN(A)||isNaN(e)||!Array.isArray(t)||!Array.isArray(r)||!SA(n)||"boolean"!=typeof i)throw new Error("Invalid arguments passed to jsPDF.lines");for(KA(A,e),o=r[0],s=r[1],c=t.length,p=A,B=e,a=0;a<c;a++)2===(u=t[a]).length?(p=u[0]*o+p,B=u[1]*s+B,MA(p,B)):(l=u[0]*o+p,h=u[1]*s+B,f=u[2]*o+p,d=u[3]*s+B,p=u[4]*o+p,B=u[5]*s+B,kA(l,h,f,d,p,B));return i&&IA(),TA(n),this},w.path=function(t){for(var A=0;A<t.length;A++){var e=t[A],r=e.c;switch(e.op){case"m":KA(r[0],r[1]);break;case"l":MA(r[0],r[1]);break;case"c":kA.apply(this,r);break;case"h":IA()}}return this},w.__private__.rect=w.rect=function(t,A,e,r,n){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||!SA(n))throw new Error("Invalid arguments passed to jsPDF.rect");return F===C.COMPAT&&(r=-r),st([E(K(t)),E(M(A)),E(K(e)),E(K(r)),"re"].join(" ")),TA(n),this},w.__private__.triangle=w.triangle=function(t,A,e,r,n,i,o){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||!SA(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[e-t,r-A],[n-e,i-r],[t-n,A-i]],t,A,[1,1],o,!0),this},w.__private__.roundedRect=w.roundedRect=function(t,A,e,r,n,i,o){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||!SA(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return n=Math.min(n,.5*e),i=Math.min(i,.5*r),this.lines([[e-2*n,0],[n*s,0,n,i-i*s,n,i],[0,r-2*i],[0,i*s,-n*s,i,-n,i],[2*n-e,0],[-n*s,0,-n,-i*s,-n,-i],[0,2*i-r],[0,-i*s,n*s,-i,n,-i]],t+n,A,[1,1],o,!0),this},w.__private__.ellipse=w.ellipse=function(t,A,e,r,n){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||!SA(n))throw new Error("Invalid arguments passed to jsPDF.ellipse");var i=4/3*(Math.SQRT2-1)*e,o=4/3*(Math.SQRT2-1)*r;return KA(t+e,A),kA(t+e,A-o,t+i,A-r,t,A-r),kA(t-i,A-r,t-e,A-o,t-e,A),kA(t-e,A+o,t-i,A+r,t,A+r),kA(t+i,A+r,t+e,A+o,t+e,A),TA(n),this},w.__private__.circle=w.circle=function(t,A,e,r){if(isNaN(t)||isNaN(A)||isNaN(e)||!SA(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,A,e,e,r)},w.setFont=function(t,A,e){return e&&(A=N(A,e)),bt=gA(t,A,{disableWarning:!1}),this};var DA=w.__private__.getFont=w.getFont=function(){return yt[gA.apply(w,arguments)]};w.__private__.getFontList=w.getFontList=function(){var t,A,e={};for(t in Nt)if(Nt.hasOwnProperty(t))for(A in e[t]=[],Nt[t])Nt[t].hasOwnProperty(A)&&e[t].push(A);return e},w.addFont=function(t,A,e,r,n){var i=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==i.indexOf(arguments[3])?n=arguments[3]:arguments[3]&&-1==i.indexOf(arguments[3])&&(e=N(e,r)),lA.call(this,t,A,e,n=n||"Identity-H")};var zA,jA=t.lineWidth||.200025,VA=w.__private__.setLineWidth=w.setLineWidth=function(t){return st(E(K(t))+" w"),this};w.__private__.setLineDash=P.API.setLineDash=P.API.setLineDashPattern=function(t,A){if(t=t||[],A=A||0,isNaN(A)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map(function(t){return E(K(t))}).join(" "),A=E(K(A)),st("["+t+"] "+A+" d"),this};var qA=w.__private__.getLineHeight=w.getLineHeight=function(){return lt*zA};w.__private__.getLineHeight=w.getLineHeight=function(){return lt*zA};var GA=w.__private__.setLineHeightFactor=w.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(zA=t),this},XA=w.__private__.getLineHeightFactor=w.getLineHeightFactor=function(){return zA};GA(t.lineHeight);var JA=w.__private__.getHorizontalCoordinate=function(t){return K(t)},WA=w.__private__.getVerticalCoordinate=function(t){return F===C.ADVANCED?t:Pt[J].mediaBox.topRightY-Pt[J].mediaBox.bottomLeftY-K(t)},YA=w.__private__.getHorizontalCoordinateString=w.getHorizontalCoordinateString=function(t){return E(JA(t))},ZA=w.__private__.getVerticalCoordinateString=w.getVerticalCoordinateString=function(t){return E(WA(t))},$A=t.strokeColor||"0 G";w.__private__.getStrokeColor=w.getDrawColor=function(){return Yt($A)},w.__private__.setStrokeColor=w.setDrawColor=function(t,A,e,r){return $A=Zt({ch1:t,ch2:A,ch3:e,ch4:r,pdfColorType:"draw",precision:2}),st($A),this};var te=t.fillColor||"0 g";w.__private__.getFillColor=w.getFillColor=function(){return Yt(te)},w.__private__.setFillColor=w.setFillColor=function(t,A,e,r){return te=Zt({ch1:t,ch2:A,ch3:e,ch4:r,pdfColorType:"fill",precision:2}),st(te),this};var Ae=t.textColor||"0 g",ee=w.__private__.getTextColor=w.getTextColor=function(){return Yt(Ae)};w.__private__.setTextColor=w.setTextColor=function(t,A,e,r){return Ae=Zt({ch1:t,ch2:A,ch3:e,ch4:r,pdfColorType:"text",precision:3}),this};var re=t.charSpace,ne=w.__private__.getCharSpace=w.getCharSpace=function(){return parseFloat(re||0)};w.__private__.setCharSpace=w.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return re=t,this};var ie=0;w.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},w.__private__.setLineCap=w.setLineCap=function(t){var A=w.CapJoinStyles[t];if(void 0===A)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ie=A,st(A+" J"),this};var oe=0;w.__private__.setLineJoin=w.setLineJoin=function(t){var A=w.CapJoinStyles[t];if(void 0===A)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return oe=A,st(A+" j"),this},w.__private__.setLineMiterLimit=w.__private__.setMiterLimit=w.setLineMiterLimit=w.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return st(E(K(t))+" M"),this},w.GState=_,w.setGState=function(t){(t="string"==typeof t?_t[St[t]]:se(null,t)).equals(xt)||(st("/"+t.id+" gs"),xt=t)};var se=function(t,A){if(!t||!St[t]){var e=!1;for(var r in _t)if(_t.hasOwnProperty(r)&&_t[r].equals(A)){e=!0;break}if(e)A=_t[r];else{var n="GS"+(Object.keys(_t).length+1).toString(10);_t[n]=A,A.id=n}return t&&(St[t]=A.id),Tt.publish("addGState",A),A}};w.addGState=function(t,A){return se(t,A),this},w.saveGraphicsState=function(){return st("q"),Et.push({key:bt,size:lt,color:Ae}),this},w.restoreGraphicsState=function(){st("Q");var t=Et.pop();return bt=t.key,lt=t.size,Ae=t.color,xt=null,this},w.setCurrentTransformationMatrix=function(t){return st(t.toString()+" cm"),this},w.comment=function(t){return st("#"+t),this};var ae=function(t,A){var e=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){isNaN(t)||(e=parseFloat(t))}});var r=A||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var n="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return n},set:function(t){n=t.toString()}}),this},ce=function(t,A,e,r){ae.call(this,t,A),this.type="rect";var n=e||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i=r||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}}),this},ue=function(){this.page=It,this.currentPage=J,this.pages=rt.slice(0),this.pagesContext=Pt.slice(0),this.x=Ct,this.y=Ft,this.matrix=Ut,this.width=fe(J),this.height=pe(J),this.outputDestination=it,this.id="",this.objectNumber=-1};ue.prototype.restore=function(){It=this.page,J=this.currentPage,Pt=this.pagesContext,rt=this.pages,Ct=this.x,Ft=this.y,Ut=this.matrix,de(J,this.width),Be(J,this.height),it=this.outputDestination};var le=function(t,A,e,r,n){Mt.push(new ue),It=J=0,rt=[],Ct=t,Ft=A,Ut=n,fA([e,r])};for(var he in w.beginFormObject=function(t,A,e,r,n){return le(t,A,e,r,n),this},w.endFormObject=function(t){return function(t){if(!Kt[t]){var A=new ue,e="Xo"+(Object.keys(Ot).length+1).toString(10);A.id=e,Kt[t]=e,Ot[e]=A,Tt.publish("addFormObject",A),Mt.pop().restore()}}(t),this},w.doFormObject=function(t,A){var e=Ot[Kt[t]];return st("q"),st(A.toString()+" cm"),st("/"+e.id+" Do"),st("Q"),this},w.getFormObject=function(t){var A=Ot[Kt[t]];return{x:A.x,y:A.y,width:A.width,height:A.height,matrix:A.matrix}},w.save=function(t,A){return t=t||"generated.pdf",(A=A||{}).returnPromise=A.returnPromise||!1,!1===A.returnPromise?(h(FA(CA()),t),"function"==typeof h.unload&&n.setTimeout&&setTimeout(h.unload,911),this):new Promise(function(A,e){try{var r=h(FA(CA()),t);"function"==typeof h.unload&&n.setTimeout&&setTimeout(h.unload,911),A(r)}catch(t){e(t.message)}})},P.API)P.API.hasOwnProperty(he)&&("events"===he&&P.API.events.length?function(t,A){var e,r,n;for(n=A.length-1;-1!==n;n--)e=A[n][0],r=A[n][1],t.subscribe.apply(t,[e].concat("function"==typeof r?[r]:r))}(Tt,P.API.events):w[he]=P.API[he]);var fe=w.getPageWidth=function(t){return(Pt[t=t||J].mediaBox.topRightX-Pt[t].mediaBox.bottomLeftX)/Qt},de=w.setPageWidth=function(t,A){Pt[t].mediaBox.topRightX=A*Qt+Pt[t].mediaBox.bottomLeftX},pe=w.getPageHeight=function(t){return(Pt[t=t||J].mediaBox.topRightY-Pt[t].mediaBox.bottomLeftY)/Qt},Be=w.setPageHeight=function(t,A){Pt[t].mediaBox.topRightY=A*Qt+Pt[t].mediaBox.bottomLeftY};return w.internal={pdfEscape:hA,getStyle:xA,getFont:DA,getFontSize:ft,getCharSpace:ne,getTextColor:ee,getLineHeight:qA,getLineHeightFactor:XA,write:at,getHorizontalCoordinate:JA,getVerticalCoordinate:WA,getCoordinateString:YA,getVerticalCoordinateString:ZA,collections:{},newObject:Vt,newAdditionalObject:Xt,newObjectDeferred:qt,newObjectDeferredBegin:Gt,getFilters:$t,putStream:tA,events:Tt,scaleFactor:Qt,pageSize:{getWidth:function(){return fe(J)},setWidth:function(t){de(J,t)},getHeight:function(){return pe(J)},setHeight:function(t){Be(J,t)}},encryptionOptions:p,encryption:NA,getEncryptor:function(t){return null!==p?NA.encryptor(t,0):function(t){return t}},output:UA,getNumberOfPages:BA,pages:rt,out:st,f2:R,f3:O,getPageInfo:EA,getPageInfoByObjId:LA,getCurrentPageInfo:HA,getPDFVersion:v,Point:ae,Rectangle:ce,Matrix:kt,hasHotfix:yA},Object.defineProperty(w.internal.pageSize,"width",{get:function(){return fe(J)},set:function(t){de(J,t)},enumerable:!0,configurable:!0}),Object.defineProperty(w.internal.pageSize,"height",{get:function(){return pe(J)},set:function(t){Be(J,t)},enumerable:!0,configurable:!0}),function(t){for(var A=0,e=ut.length;A<e;A++){var r=lA.call(this,t[A][0],t[A][1],t[A][2],ut[A][3],!0);!1===B&&(g[r]=!0);var n=t[A][0].split("-");uA({id:r,fontName:n[0],fontStyle:n[1]||""})}Tt.publish("addFonts",{fonts:yt,dictionary:Nt})}.call(w,ut),bt="F1",dA(i,e),Tt.publish("initialized"),w}L.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},L.prototype.toHexString=function(t){return t.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},L.prototype.hexToBytes=function(t){for(var A=[],e=0;e<t.length;e+=2)A.push(String.fromCharCode(parseInt(t.substr(e,2),16)));return A.join("")},L.prototype.processOwnerPassword=function(t,A){return N(U(A).substr(0,5),t)},L.prototype.encryptor=function(t,A){let e=U(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&A,A>>8&255)).substr(0,10);return function(t){return N(e,t)}},_.prototype.equals=function(t){var A,e="id,objectNumber,equals";if(!t||typeof t!=typeof this)return!1;var r=0;for(A in this)if(!(e.indexOf(A)>=0)){if(this.hasOwnProperty(A)&&!t.hasOwnProperty(A))return!1;if(this[A]!==t[A])return!1;r++}for(A in t)t.hasOwnProperty(A)&&e.indexOf(A)<0&&r--;return 0===r},P.API={events:[]},P.version="2.3.1";var T=P.API,R=1,O=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},K=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},M=function(t){return t.toFixed(2)},k=function(t){return t.toFixed(5)};T.__acroform__={};var D=function(t,A){t.prototype=Object.create(A.prototype),t.prototype.constructor=t},z=function(t){return t*R},j=function(t){var A=new ot,e=vt.internal.getHeight(t)||0,r=vt.internal.getWidth(t)||0;return A.BBox=[0,0,Number(M(r)),Number(M(e))],A},V=T.__acroform__.setBit=function(t,A){if(t=t||0,A=A||0,isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<A},q=T.__acroform__.clearBit=function(t,A){if(t=t||0,A=A||0,isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<A)},G=T.__acroform__.getBit=function(t,A){if(isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<A)?0:1},X=T.__acroform__.getBitForPdf=function(t,A){if(isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return G(t,A-1)},J=T.__acroform__.setBitForPdf=function(t,A){if(isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return V(t,A-1)},W=T.__acroform__.clearBitForPdf=function(t,A){if(isNaN(t)||isNaN(A))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return q(t,A-1)},Y=T.__acroform__.calculateCoordinates=function(t,A){var e=A.internal.getHorizontalCoordinate,r=A.internal.getVerticalCoordinate,n=t[0],i=t[1],o=t[2],s=t[3],a={};return a.lowerLeft_X=e(n)||0,a.lowerLeft_Y=r(i+s)||0,a.upperRight_X=e(n+o)||0,a.upperRight_Y=r(i)||0,[Number(M(a.lowerLeft_X)),Number(M(a.lowerLeft_Y)),Number(M(a.upperRight_X)),Number(M(a.upperRight_Y))]},Z=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var A=[],e=t._V||t.DV,r=$(t,e),n=t.scope.internal.getFont(t.fontName,t.fontStyle).id;A.push("/Tx BMC"),A.push("q"),A.push("BT"),A.push(t.scope.__private__.encodeColorString(t.color)),A.push("/"+n+" "+M(r.fontSize)+" Tf"),A.push("1 0 0 1 0 0 Tm"),A.push(r.text),A.push("ET"),A.push("Q"),A.push("EMC");var i=j(t);return i.scope=t.scope,i.stream=A.join("\n"),i}},$=function(t,A){var e=0===t.fontSize?t.maxFontSize:t.fontSize,r={text:"",fontSize:""},n=(A=")"==(A="("==A.substr(0,1)?A.substr(1):A).substr(A.length-1)?A.substr(0,A.length-1):A).split(" "),i=e,o=vt.internal.getHeight(t)||0;o=o<0?-o:o;var s=vt.internal.getWidth(t)||0;s=s<0?-s:s;var a=function(A,e,r){if(A+1<n.length){var i=e+" "+n[A+1];return tt(i,t,r).width<=s-4}return!1};i++;t:for(;i>0;){A="";var c,u,l=tt("3",t,--i).height,h=t.multiline?o-i:(o-l)/2,f=h+=2,d=0,p=0;if(i<=0){A="(...) Tj\n",A+="% Width of Text: "+tt(A,t,i=12).width+", FieldWidth:"+s+"\n";break}var B="",g=0;for(var w in n)if(n.hasOwnProperty(w)){B=" "==(B+=n[w]+" ").substr(B.length-1)?B.substr(0,B.length-1):B;var m=parseInt(w),v=a(m,B,i),b=w>=n.length-1;if(v&&!b){B+=" ";continue}if(v||b){if(b)p=m;else if(t.multiline&&(l+2)*(g+2)+2>o)continue t}else{if(!t.multiline)continue t;if((l+2)*(g+2)+2>o)continue t;p=m}for(var Q="",C=d;C<=p;C++)Q+=n[C]+" ";switch(Q=" "==Q.substr(Q.length-1)?Q.substr(0,Q.length-1):Q,u=tt(Q,t,i).width,t.textAlign){case"right":c=s-u-2;break;case"center":c=(s-u)/2;break;case"left":default:c=2}A+=M(c)+" "+M(f)+" Td\n",A+="("+O(Q)+") Tj\n",A+=-M(c)+" 0 Td\n",f=-(i+2),u=0,d=p+1,g++,B=""}break}return r.text=A,r.fontSize=i,r},tt=function(t,A,e){var r=A.scope.internal.getFont(A.fontName,A.fontStyle),n=A.scope.getStringUnitWidth(t,{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e);return{height:A.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(e),charSpace:0})*parseFloat(e)*1.5,width:n}},At={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},et=function(t,A){var e={type:"reference",object:t};void 0===A.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===e.type&&t.object===e.object})&&A.internal.getPageInfo(t.page).pageContext.annotations.push(e)},rt=T.__acroform__.arrayToPdfArray=function(t,A,e){var r=function(t){return t};if(Array.isArray(t)){for(var n="[",i=0;i<t.length;i++)switch(0!==i&&(n+=" "),typeof t[i]){case"boolean":case"number":case"object":n+=t[i].toString();break;case"string":"/"!==t[i].substr(0,1)?(void 0!==A&&e&&(r=e.internal.getEncryptor(A)),n+="("+O(r(t[i].toString()))+")"):n+=t[i].toString()}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},nt=function(t,A,e){var r=function(t){return t};return void 0!==A&&e&&(r=e.internal.getEncryptor(A)),(t=t||"").toString(),"("+O(r(t))+")"},it=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};it.prototype.toString=function(){return this.objId+" 0 R"},it.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},it.prototype.getKeyValueListForStream=function(){var t=[],A=Object.getOwnPropertyNames(this).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)});for(var e in A)if(!1===Object.getOwnPropertyDescriptor(this,A[e]).configurable){var r=A[e],n=this[r];n&&(Array.isArray(n)?t.push({key:r,value:rt(n,this.objId,this.scope)}):n instanceof it?(n.scope=this.scope,t.push({key:r,value:n.objId+" 0 R"})):"function"!=typeof n&&t.push({key:r,value:n}))}return t};var ot=function(){it.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,A=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return A},set:function(t){A=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(A){t=A.trim()},get:function(){return t||null}})};D(ot,it);var st=function(){it.call(this);var t,A=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return A.length>0?A:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return A}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var A=function(t){return t};return this.scope&&(A=this.scope.internal.getEncryptor(this.objId)),"("+O(A(t))+")"}},set:function(A){t=A}})};D(st,it);var at=function(){it.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(A){if(isNaN(A))throw new Error('Invalid value "'+A+'" for attribute F supplied.');t=A}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(t,3))},set:function(A){!0===Boolean(A)?this.F=J(t,3):this.F=W(t,3)}});var A=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return A},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');A=t}});var e=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==e.length)return e},set:function(t){e=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!e||isNaN(e[0])?0:e[0]},set:function(t){e[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!e||isNaN(e[1])?0:e[1]},set:function(t){e[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!e||isNaN(e[2])?0:e[2]},set:function(t){e[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!e||isNaN(e[3])?0:e[3]},set:function(t){e[3]=t}});var r="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":r=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var n=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!n||n.length<1){if(this instanceof Bt)return;n="FieldObject"+at.FieldNum++}var t=function(t){return t};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+O(t(n))+")"},set:function(t){n=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return n},set:function(t){n=t}});var i="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return i},set:function(t){i=t}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var s=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var a=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===a?50/R:a},set:function(t){a=t}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof Bt||this instanceof wt))return nt(u,this.objId,this.scope)},set:function(t){t=t.toString(),u=t}});var l=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(l)return this instanceof ft==0?nt(l,this.objId,this.scope):l},set:function(t){t=t.toString(),l=this instanceof ft==0?"("===t.substr(0,1)?K(t.substr(1,t.length-2)):K(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ft==1?K(l.substr(1,l.length-1)):l},set:function(t){t=t.toString(),l=this instanceof ft==1?"/"+t:t}});var h=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(h)return h},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof ft==0?nt(h,this.objId,this.scope):h},set:function(t){t=t.toString(),h=this instanceof ft==0?"("===t.substr(0,1)?K(t.substr(1,t.length-2)):K(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ft==1?K(h.substr(1,h.length-1)):h},set:function(t){t=t.toString(),h=this instanceof ft==1?"/"+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 f,d=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return d},set:function(t){t=Boolean(t),d=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(f)return f},set:function(t){f=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=J(this.Ff,1):this.Ff=W(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=J(this.Ff,2):this.Ff=W(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=J(this.Ff,3):this.Ff=W(this.Ff,3)}});var p=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==p)return p},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');p=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(p){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:p=2;break;case"center":case 1:p=1;break;case"left":case 0:default:p=0}}})};D(at,it);var ct=function(){at.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(A){t=A}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(A){t=A}});var A=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return rt(A,this.objId,this.scope)},set:function(t){var e,r;r=[],"string"==typeof(e=t)&&(r=function(t,A,e){e||(e=1);for(var r,n=[];r=A.exec(t);)n.push(r[e]);return n}(e,/\((.*?)\)/g)),A=r}}),this.getOptions=function(){return A},this.setOptions=function(t){A=t,this.sort&&A.sort()},this.addOption=function(t){t=(t=t||"").toString(),A.push(t),this.sort&&A.sort()},this.removeOption=function(t,e){for(e=e||!1,t=(t=t||"").toString();-1!==A.indexOf(t)&&(A.splice(A.indexOf(t),1),!1!==e););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=J(this.Ff,18):this.Ff=W(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=J(this.Ff,19):this.Ff=W(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=J(this.Ff,20),A.sort()):this.Ff=W(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=J(this.Ff,22):this.Ff=W(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=J(this.Ff,23):this.Ff=W(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=J(this.Ff,27):this.Ff=W(this.Ff,27)}}),this.hasAppearanceStream=!1};D(ct,at);var ut=function(){ct.call(this),this.fontName="helvetica",this.combo=!1};D(ut,ct);var lt=function(){ut.call(this),this.combo=!0};D(lt,ut);var ht=function(){lt.call(this),this.edit=!0};D(ht,lt);var ft=function(){at.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=J(this.Ff,15):this.Ff=W(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=J(this.Ff,16):this.Ff=W(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=J(this.Ff,17):this.Ff=W(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=J(this.Ff,26):this.Ff=W(this.Ff,26)}});var t,A={};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(A).length){var e,r=[];for(e in r.push("<<"),A)r.push("/"+e+" ("+O(t(A[e]))+")");return r.push(">>"),r.join("\n")}},set:function(t){"object"==typeof t&&(A=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return A.CA||""},set:function(t){"string"==typeof t&&(A.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(A){t=A}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(A){t="/"+A}})};D(ft,at);var dt=function(){ft.call(this),this.pushButton=!0};D(dt,ft);var pt=function(){ft.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(A){t=void 0!==A?A:[]}})};D(pt,ft);var Bt=function(){var t,A;at.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(A){t=A}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return A},set:function(t){A=t}});var e,r={};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 A,e=[];for(A in e.push("<<"),r)e.push("/"+A+" ("+O(t(r[A]))+")");return e.push(">>"),e.join("\n")},set:function(t){"object"==typeof t&&(r=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(t){"string"==typeof t&&(r.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=vt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};D(Bt,at),pt.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var A in this.Kids)if(this.Kids.hasOwnProperty(A)){var e=this.Kids[A];e.appearanceStreamContent=t.createAppearanceStream(e.optionName),e.caption=t.getCA()}},pt.prototype.createOption=function(t){var A=new Bt;return A.Parent=this,A.optionName=t,this.Kids.push(A),bt.call(this.scope,A),A};var gt=function(){ft.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=vt.CheckBox.createAppearanceStream()};D(gt,ft);var wt=function(){at.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=J(this.Ff,13):this.Ff=W(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=J(this.Ff,21):this.Ff=W(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=J(this.Ff,23):this.Ff=W(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=J(this.Ff,24):this.Ff=W(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=J(this.Ff,25):this.Ff=W(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=J(this.Ff,26):this.Ff=W(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(A){t=A}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(A){Number.isInteger(A)&&(t=A)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};D(wt,at);var mt=function(){wt.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=J(this.Ff,14):this.Ff=W(this.Ff,14)}}),this.password=!0};D(mt,wt);var vt={CheckBox:{createAppearanceStream:function(){return{N:{On:vt.CheckBox.YesNormal},D:{On:vt.CheckBox.YesPushDown,Off:vt.CheckBox.OffPushDown}}},YesPushDown:function(t){var A=j(t);A.scope=t.scope;var e=[],r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=$(t,t.caption);return e.push("0.749023 g"),e.push("0 0 "+M(vt.internal.getWidth(t))+" "+M(vt.internal.getHeight(t))+" re"),e.push("f"),e.push("BMC"),e.push("q"),e.push("0 0 1 rg"),e.push("/"+r+" "+M(i.fontSize)+" Tf "+n),e.push("BT"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC"),A.stream=e.join("\n"),A},YesNormal:function(t){var A=j(t);A.scope=t.scope;var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color),n=[],i=vt.internal.getHeight(t),o=vt.internal.getWidth(t),s=$(t,t.caption);return n.push("1 g"),n.push("0 0 "+M(o)+" "+M(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+M(o-1)+" "+M(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+e+" "+M(s.fontSize)+" Tf "+r),n.push(s.text),n.push("ET"),n.push("Q"),A.stream=n.join("\n"),A},OffPushDown:function(t){var A=j(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+M(vt.internal.getWidth(t))+" "+M(vt.internal.getHeight(t))+" re"),e.push("f"),A.stream=e.join("\n"),A}},RadioButton:{Circle:{createAppearanceStream:function(t){var A={D:{Off:vt.RadioButton.Circle.OffPushDown},N:{}};return A.N[t]=vt.RadioButton.Circle.YesNormal,A.D[t]=vt.RadioButton.Circle.YesPushDown,A},getCA:function(){return"l"},YesNormal:function(t){var A=j(t);A.scope=t.scope;var e=[],r=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=vt.internal.Bezier_C,i=Number((r*n).toFixed(5));return e.push("q"),e.push("1 0 0 1 "+k(vt.internal.getWidth(t)/2)+" "+k(vt.internal.getHeight(t)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),e.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),e.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),e.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join("\n"),A},YesPushDown:function(t){var A=j(t);A.scope=t.scope;var e=[],r=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*vt.internal.Bezier_C).toFixed(5)),o=Number((r*vt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+k(vt.internal.getWidth(t)/2)+" "+k(vt.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),e.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),e.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),e.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),e.push("f"),e.push("Q"),e.push("0 g"),e.push("q"),e.push("1 0 0 1 "+k(vt.internal.getWidth(t)/2)+" "+k(vt.internal.getHeight(t)/2)+" cm"),e.push(r+" 0 m"),e.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),e.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),e.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),e.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join("\n"),A},OffPushDown:function(t){var A=j(t);A.scope=t.scope;var e=[],r=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var n=Number((2*r).toFixed(5)),i=Number((n*vt.internal.Bezier_C).toFixed(5));return e.push("0.749023 g"),e.push("q"),e.push("1 0 0 1 "+k(vt.internal.getWidth(t)/2)+" "+k(vt.internal.getHeight(t)/2)+" cm"),e.push(n+" 0 m"),e.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),e.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),e.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),e.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),e.push("f"),e.push("Q"),A.stream=e.join("\n"),A}},Cross:{createAppearanceStream:function(t){var A={D:{Off:vt.RadioButton.Cross.OffPushDown},N:{}};return A.N[t]=vt.RadioButton.Cross.YesNormal,A.D[t]=vt.RadioButton.Cross.YesPushDown,A},getCA:function(){return"8"},YesNormal:function(t){var A=j(t);A.scope=t.scope;var e=[],r=vt.internal.calculateCross(t);return e.push("q"),e.push("1 1 "+M(vt.internal.getWidth(t)-2)+" "+M(vt.internal.getHeight(t)-2)+" re"),e.push("W"),e.push("n"),e.push(M(r.x1.x)+" "+M(r.x1.y)+" m"),e.push(M(r.x2.x)+" "+M(r.x2.y)+" l"),e.push(M(r.x4.x)+" "+M(r.x4.y)+" m"),e.push(M(r.x3.x)+" "+M(r.x3.y)+" l"),e.push("s"),e.push("Q"),A.stream=e.join("\n"),A},YesPushDown:function(t){var A=j(t);A.scope=t.scope;var e=vt.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+M(vt.internal.getWidth(t))+" "+M(vt.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+M(vt.internal.getWidth(t)-2)+" "+M(vt.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(M(e.x1.x)+" "+M(e.x1.y)+" m"),r.push(M(e.x2.x)+" "+M(e.x2.y)+" l"),r.push(M(e.x4.x)+" "+M(e.x4.y)+" m"),r.push(M(e.x3.x)+" "+M(e.x3.y)+" l"),r.push("s"),r.push("Q"),A.stream=r.join("\n"),A},OffPushDown:function(t){var A=j(t);A.scope=t.scope;var e=[];return e.push("0.749023 g"),e.push("0 0 "+M(vt.internal.getWidth(t))+" "+M(vt.internal.getHeight(t))+" re"),e.push("f"),A.stream=e.join("\n"),A}}},createDefaultAppearanceStream:function(t){var A=t.scope.internal.getFont(t.fontName,t.fontStyle).id,e=t.scope.__private__.encodeColorString(t.color);return"/"+A+" "+t.fontSize+" Tf "+e}};vt.internal={Bezier_C:.551915024494,calculateCross:function(t){var A=vt.internal.getWidth(t),e=vt.internal.getHeight(t),r=Math.min(A,e);return{x1:{x:(A-r)/2,y:(e-r)/2+r},x2:{x:(A-r)/2+r,y:(e-r)/2},x3:{x:(A-r)/2,y:(e-r)/2},x4:{x:(A-r)/2+r,y:(e-r)/2+r}}}},vt.internal.getWidth=function(t){var A=0;return"object"==typeof t&&(A=z(t.Rect[2])),A},vt.internal.getHeight=function(t){var A=0;return"object"==typeof t&&(A=z(t.Rect[3])),A};var bt=T.addField=function(t){if(function(t,A){if(A.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(at.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(At)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");R=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new st,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}(t)}),t.internal.events.subscribe("buildDocument",function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var A=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in A)if(A.hasOwnProperty(e)){var r=A[e];r.objId=void 0,r.hasAnnotation&&et(r,t)}}(t)}),t.internal.events.subscribe("putCatalog",function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(t)}),t.internal.events.subscribe("postPutPages",function(A){!function(t,A){var e=!t;for(var r in t||(A.internal.newObjectDeferredBegin(A.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),A.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||A.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(r)){var n=t[r],i=[],o=n.Rect;if(n.Rect&&(n.Rect=Y(n.Rect,A)),A.internal.newObjectDeferredBegin(n.objId,!0),n.DA=vt.createDefaultAppearanceStream(n),"object"==typeof n&&"function"==typeof n.getKeyValueListForStream&&(i=n.getKeyValueListForStream()),n.Rect=o,n.hasAppearanceStream&&!n.appearanceStreamContent){var s=Z(n);i.push({key:"AP",value:"<</N "+s+">>"}),A.internal.acroformPlugin.xForms.push(s)}if(n.appearanceStreamContent){var a="";for(var c in n.appearanceStreamContent)if(n.appearanceStreamContent.hasOwnProperty(c)){var u=n.appearanceStreamContent[c];if(a+="/"+c+" ",a+="<<",Object.keys(u).length>=1||Array.isArray(u)){for(var r in u)if(u.hasOwnProperty(r)){var l=u[r];"function"==typeof l&&(l=l.call(A,n)),a+="/"+r+" "+l+" ",A.internal.acroformPlugin.xForms.indexOf(l)>=0||A.internal.acroformPlugin.xForms.push(l)}}else"function"==typeof(l=u)&&(l=l.call(A,n)),a+="/"+r+" "+l,A.internal.acroformPlugin.xForms.indexOf(l)>=0||A.internal.acroformPlugin.xForms.push(l);a+=">>"}i.push({key:"AP",value:"<<\n"+a+">>"})}A.internal.putStream({additionalKeyValues:i,objectId:n.objId}),A.internal.out("endobj")}e&&function(t,A){for(var e in t)if(t.hasOwnProperty(e)){var r=e,n=t[e];A.internal.newObjectDeferredBegin(n.objId,!0),"object"==typeof n&&"function"==typeof n.putStream&&n.putStream(),delete t[r]}}(A.internal.acroformPlugin.xForms,A)}(A,t)}),t.internal.acroformPlugin.isInitialized=!0}}(this,t),!(t instanceof at))throw new Error("Invalid argument passed to jsPDF.addField.");var A;return(A=t).scope.internal.acroformPlugin.printedOut&&(A.scope.internal.acroformPlugin.printedOut=!1,A.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),A.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(A),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};T.AcroFormChoiceField=ct,T.AcroFormListBox=ut,T.AcroFormComboBox=lt,T.AcroFormEditBox=ht,T.AcroFormButton=ft,T.AcroFormPushButton=dt,T.AcroFormRadioButton=pt,T.AcroFormCheckBox=gt,T.AcroFormTextField=wt,T.AcroFormPasswordField=mt,T.AcroFormAppearance=vt,T.AcroForm={ChoiceField:ct,ListBox:ut,ComboBox:lt,EditBox:ht,Button:ft,PushButton:dt,RadioButton:pt,CheckBox:gt,TextField:wt,PasswordField:mt,Appearance:vt},P.AcroForm={ChoiceField:ct,ListBox:ut,ComboBox:lt,EditBox:ht,Button:ft,PushButton:dt,RadioButton:pt,CheckBox:gt,TextField:wt,PasswordField:mt,Appearance:vt};var Qt,Ct;
/** @license
 * jsPDF addImage plugin
 * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
 *               2013 Chris Dowling, https://github.com/gingerchris
 *               2013 Trinh Ho, https://github.com/ineedfat
 *               2013 Edwin Alejandro Perez, https://github.com/eaparango
 *               2013 Norah Smith, https://github.com/burnburnrocket
 *               2014 Diego Casorran, https://github.com/diegocr
 *               2014 James Robb, https://github.com/jamesbrobb
 *
 * 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.
 */P.AcroForm;function Ft(t){return t.reduce(function(t,A,e){return t[A]=e,t},{})}!function(t){t.__addimage__={};var A="UNKNOWN",e={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]]},r=t.__addimage__.getImageFileTypeByImageData=function(t,r){var n,i;r=r||A;var o,s,a,c=A;if(b(t))for(a in e)for(o=e[a],n=0;n<o.length;n+=1){for(s=!0,i=0;i<o[n].length;i+=1)if(void 0!==o[n][i]&&o[n][i]!==t[i]){s=!1;break}if(!0===s){c=a;break}}else for(a in e)for(o=e[a],n=0;n<o.length;n+=1){for(s=!0,i=0;i<o[n].length;i+=1)if(void 0!==o[n][i]&&o[n][i]!==t.charCodeAt(i)){s=!1;break}if(!0===s){c=a;break}}return c===A&&r!==A&&(c=r),c},n=function(t){for(var A=this.internal.write,e=this.internal.putStream,r=(0,this.internal.getFilters)();-1!==r.indexOf("FlateEncode");)r.splice(r.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var i=[];if(i.push({key:"Type",value:"/XObject"}),i.push({key:"Subtype",value:"/Image"}),i.push({key:"Width",value:t.width}),i.push({key:"Height",value:t.height}),t.colorSpace===p.INDEXED?i.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(i.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===p.DEVICE_CMYK&&i.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),i.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&i.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var o="",s=0,a=t.transparency.length;s<a;s++)o+=t.transparency[s]+" "+t.transparency[s]+" ";i.push({key:"Mask",value:"["+o+"]"})}void 0!==t.sMask&&i.push({key:"SMask",value:t.objectId+1+" 0 R"});var c=void 0!==t.filter?["/"+t.filter]:void 0;if(e({data:t.data,additionalKeyValues:i,alreadyAppliedFilters:c,objectId:t.objectId}),A("endobj"),"sMask"in t&&void 0!==t.sMask){var u="/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,l={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:u,data:t.sMask};"filter"in t&&(l.filter=t.filter),n.call(this,l)}if(t.colorSpace===p.INDEXED){var h=this.internal.newObject();e({data:C(new Uint8Array(t.palette)),objectId:h}),A("endobj")}},i=function(){var t=this.internal.collections.addImage_images;for(var A in t)n.call(this,t[A])},o=function(){var t,A=this.internal.collections.addImage_images,e=this.internal.write;for(var r in A)e("/I"+(t=A[r]).index,t.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",o))},a=function(){var t=this.internal.collections.addImage_images;return s.call(this),t},c=function(A){return"function"==typeof t["process"+A.toUpperCase()]},h=function(t){return"object"==typeof t&&1===t.nodeType},f=function(A,e){if("IMG"===A.nodeName&&A.hasAttribute("src")){var r=""+A.getAttribute("src");if(0===r.indexOf("data:image/"))return u(unescape(r).split("base64,").pop());var n=t.loadFile(r,!0);if(void 0!==n)return n}if("CANVAS"===A.nodeName){var i;switch(e){case"PNG":i="image/png";break;case"WEBP":i="image/webp";break;case"JPEG":case"JPG":default:i="image/jpeg"}return u(A.toDataURL(i,1).split("base64,").pop())}},d=function(t,A,e,r,n,i){var o=function(t,A,e){return t||A||(t=-96,A=-96),t<0&&(t=-1*e.width*72/t/this.internal.scaleFactor),A<0&&(A=-1*e.height*72/A/this.internal.scaleFactor),0===t&&(t=A*e.width/e.height),0===A&&(A=t*e.height/e.width),[t,A]}.call(this,e,r,n),s=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=a.call(this);if(e=o[0],r=o[1],u[n.index]=n,i){i*=Math.PI/180;var l=Math.cos(i),h=Math.sin(i),f=function(t){return t.toFixed(4)},d=[f(l),f(h),f(-1*h),f(l),0,0,"cm"]}this.internal.write("q"),i?(this.internal.write([1,"0","0",1,s(t),c(A+r),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([s(e),"0","0",s(r),"0","0","cm"].join(" "))):this.internal.write([s(e),"0","0",s(r),s(t),c(A+r),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+n.index+" Do"),this.internal.write("Q")},p=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var B=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},g=t.__addimage__.sHashCode=function(t){var A,e,r=0;if("string"==typeof t)for(e=t.length,A=0;A<e;A++)r=(r<<5)-r+t.charCodeAt(A),r|=0;else if(b(t))for(e=t.byteLength/2,A=0;A<e;A++)r=(r<<5)-r+t[A],r|=0;return r},w=t.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var A=!0;return 0===t.length&&(A=!1),t.length%4!=0&&(A=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(A=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(A=!1),A},m=t.__addimage__.extractImageFromDataUrl=function(t){var A=(t=t||"").split("base64,"),e=null;if(2===A.length){var r=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(A[0]);Array.isArray(r)&&(e={mimeType:r[1],charset:r[2],data:A[1]})}return e},v=t.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};t.__addimage__.isArrayBuffer=function(t){return v()&&t instanceof ArrayBuffer};var b=t.__addimage__.isArrayBufferView=function(t){return v()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},Q=t.__addimage__.binaryStringToUint8Array=function(t){for(var A=t.length,e=new Uint8Array(A),r=0;r<A;r++)e[r]=t.charCodeAt(r);return e},C=t.__addimage__.arrayBufferToBinaryString=function(t){try{return u(l(String.fromCharCode.apply(null,t)))}catch(A){if("undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.reduce)return new Uint8Array(t).reduce(function(t,A){return t.push(String.fromCharCode(A)),t},[]).join("")}};t.addImage=function(){var t,e,r,n,i,o,a,c,u;if("number"==typeof arguments[1]?(e=A,r=arguments[1],n=arguments[2],i=arguments[3],o=arguments[4],a=arguments[5],c=arguments[6],u=arguments[7]):(e=arguments[1],r=arguments[2],n=arguments[3],i=arguments[4],o=arguments[5],a=arguments[6],c=arguments[7],u=arguments[8]),"object"==typeof(t=arguments[0])&&!h(t)&&"imageData"in t){var l=t;t=l.imageData,e=l.format||e||A,r=l.x||r||0,n=l.y||n||0,i=l.w||l.width||i,o=l.h||l.height||o,a=l.alias||a,c=l.compression||c,u=l.rotation||l.angle||u}var f=this.internal.getFilters();if(void 0===c&&-1!==f.indexOf("FlateEncode")&&(c="SLOW"),isNaN(r)||isNaN(n))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var p=F.call(this,t,e,a,c);return d.call(this,r,n,i,o,p,u),this};var F=function(e,n,i,o){var s,a,u;if("string"==typeof e&&r(e)===A){e=unescape(e);var l=U(e,!1);(""!==l||void 0!==(l=t.loadFile(e,!0)))&&(e=l)}if(h(e)&&(e=f(e,n)),n=r(e,n),!c(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(u=i)||0===u.length)&&(i=function(t){return"string"==typeof t||b(t)?g(t):null}(e)),(s=function(t){var A=this.internal.collections.addImage_images;if(A)for(var e in A)if(t===A[e].alias)return A[e]}.call(this,i))||(v()&&(e instanceof Uint8Array||(a=e,e=Q(e))),s=this["process"+n.toUpperCase()](e,function(){return Object.keys(this.internal.collections.addImage_images).length}.call(this),i,function(A){return A&&"string"==typeof A&&(A=A.toUpperCase()),A in t.image_compression?A:B.NONE}(o),a)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},U=t.__addimage__.convertBase64ToBinaryString=function(t,A){var e;A="boolean"!=typeof A||A;var r,n="";if("string"==typeof t){r=null!==(e=m(t))?e.data:t;try{n=u(r)}catch(t){if(A)throw w(r)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};t.getImageProperties=function(e){var n,i,o="";if(h(e)&&(e=f(e)),"string"==typeof e&&r(e)===A&&(""===(o=U(e,!1))&&(o=t.loadFile(e)||""),e=o),i=r(e),!c(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if(!v()||e instanceof Uint8Array||(e=Q(e)),!(n=this["process"+i.toUpperCase()](e)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=i,n}}(P.API),
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
Qt=P.API,Ct=function(t){if(void 0!==t&&""!=t)return!0},P.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),Qt.events.push(["putPage",function(t){for(var A,e,r,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(t.objId),s=t.pageContext.annotations,a=!1,c=0;c<s.length&&!a;c++)switch((A=s[c]).type){case"link":(Ct(A.options.url)||Ct(A.options.pageNumber))&&(a=!0);break;case"reference":case"text":case"freetext":a=!0}if(0!=a){this.internal.write("/Annots [");for(var u=0;u<s.length;u++){A=s[u];var l=this.internal.pdfEscape,h=this.internal.getEncryptor(t.objId);switch(A.type){case"reference":this.internal.write(" "+A.object.objId+" 0 R ");break;case"text":var f=this.internal.newAdditionalObject(),d=this.internal.newAdditionalObject(),p=this.internal.getEncryptor(f.objId),B=A.title||"Note";r="<</Type /Annot /Subtype /Text "+(e="/Rect ["+n(A.bounds.x)+" "+i(A.bounds.y+A.bounds.h)+" "+n(A.bounds.x+A.bounds.w)+" "+i(A.bounds.y)+"] ")+"/Contents ("+l(p(A.contents))+")",r+=" /Popup "+d.objId+" 0 R",r+=" /P "+o.objId+" 0 R",r+=" /T ("+l(p(B))+") >>",f.content=r;var g=f.objId+" 0 R";r="<</Type /Annot /Subtype /Popup "+(e="/Rect ["+n(A.bounds.x+30)+" "+i(A.bounds.y+A.bounds.h)+" "+n(A.bounds.x+A.bounds.w+30)+" "+i(A.bounds.y)+"] ")+" /Parent "+g,A.open&&(r+=" /Open true"),r+=" >>",d.content=r,this.internal.write(f.objId,"0 R",d.objId,"0 R");break;case"freetext":e="/Rect ["+n(A.bounds.x)+" "+i(A.bounds.y)+" "+n(A.bounds.x+A.bounds.w)+" "+i(A.bounds.y+A.bounds.h)+"] ";var w=A.color||"#000000";r="<</Type /Annot /Subtype /FreeText "+e+"/Contents ("+l(h(A.contents))+")",r+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+w+")",r+=" /Border [0 0 0]",r+=" >>",this.internal.write(r);break;case"link":if(A.options.name){var m=this.annotations._nameMap[A.options.name];A.options.pageNumber=m.page,A.options.top=m.y}else A.options.top||(A.options.top=0);if(e="/Rect ["+A.finalBounds.x+" "+A.finalBounds.y+" "+A.finalBounds.w+" "+A.finalBounds.h+"] ",r="",A.options.url)r="<</Type /Annot /Subtype /Link "+e+"/Border [0 0 0] /A <</S /URI /URI ("+l(h(A.options.url))+") >>";else if(A.options.pageNumber)switch(r="<</Type /Annot /Subtype /Link "+e+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(A.options.pageNumber).objId+" 0 R",A.options.magFactor=A.options.magFactor||"XYZ",A.options.magFactor){case"Fit":r+=" /Fit]";break;case"FitH":r+=" /FitH "+A.options.top+"]";break;case"FitV":A.options.left=A.options.left||0,r+=" /FitV "+A.options.left+"]";break;case"XYZ":default:var v=i(A.options.top);A.options.left=A.options.left||0,void 0===A.options.zoom&&(A.options.zoom=0),r+=" /XYZ "+A.options.left+" "+v+" "+A.options.zoom+"]"}""!=r&&(r+=" >>",this.internal.write(r))}}this.internal.write("]")}}]),Qt.createAnnotation=function(t){var A=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":A.pageContext.annotations.push(t)}},Qt.link=function(t,A,e,r,n){var i=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;i.pageContext.annotations.push({finalBounds:{x:o(t),y:s(A),w:o(t+e),h:s(A+r)},options:n,type:"link"})},Qt.textWithLink=function(t,A,e,r){var n=this.getTextWidth(t),i=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(t,A,e,r),e+=.2*i,"center"===r.align&&(A-=n/2),"right"===r.align&&(A-=n),this.link(A,e-i,n,i,r),n},Qt.getTextWidth=function(t){var A=this.internal.getFontSize();return this.getStringUnitWidth(t)*A/this.internal.scaleFactor},
/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A={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]},e={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}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var i=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==A[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)&&i(t)&&A[t.charCodeAt(0)].length<=2},a=t.__arabicParser__.isArabicAlfLetter=function(t){return o(t)&&n.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return o(t)&&i(t)&&A[t.charCodeAt(0)].length>=1};var c=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return o(t)&&i(t)&&A[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return o(t)&&i(t)&&A[t.charCodeAt(0)].length>=3};var u=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&i(t)&&4==A[t.charCodeAt(0)].length},l=t.__arabicParser__.resolveLigatures=function(t){var A=0,r=e,n="",i=0;for(A=0;A<t.length;A+=1)void 0!==r[t.charCodeAt(A)]?(i++,"number"==typeof(r=r[t.charCodeAt(A)])&&(n+=String.fromCharCode(r),r=e,i=0),A===t.length-1&&(r=e,n+=t.charAt(A-(i-1)),A-=i-1,i=0)):(r=e,n+=t.charAt(A-i),A-=i,i=0);return n};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==r[t.charCodeAt(0)]};var h=t.__arabicParser__.getCorrectForm=function(t,A,e){return o(t)?!1===i(t)?-1:!c(t)||!o(A)&&!o(e)||!o(e)&&s(A)||s(t)&&!o(A)||s(t)&&a(A)||s(t)&&s(A)?0:u(t)&&o(A)&&!s(A)&&o(e)&&c(e)?3:s(t)||!o(e)?1:2:-1},f=function(t){var e=0,r=0,n=0,i="",s="",a="",c=(t=t||"").split("\\s+"),u=[];for(e=0;e<c.length;e+=1){for(u.push(""),r=0;r<c[e].length;r+=1)i=c[e][r],s=c[e][r-1],a=c[e][r+1],o(i)?(n=h(i,s,a),u[e]+=-1!==n?String.fromCharCode(A[i.charCodeAt(0)][n]):i):u[e]+=i;u[e]=l(u[e])}return u.join(" ")},d=t.__arabicParser__.processArabic=t.processArabic=function(){var t,A="string"==typeof arguments[0]?arguments[0]:arguments[0].text,e=[];if(Array.isArray(A)){var r=0;for(e=[],r=0;r<A.length;r+=1)Array.isArray(A[r])?e.push([f(A[r][0]),A[r][1],A[r][2]]):e.push([f(A[r])]);t=e}else t=f(A);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",d])}(P.API),P.API.autoPrint=function(t){var A;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){A=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+A+" 0 R")})}return this},
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(A){t=A}});var A=150;Object.defineProperty(this,"width",{get:function(){return A},set:function(t){A=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=A+1)}});var e=300;Object.defineProperty(this,"height",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=e+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(t){r=t}});var n={};Object.defineProperty(this,"style",{get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"parentNode",{})};A.prototype.getContext=function(t,A){var e;if("2d"!==(t=t||"2d"))return null;for(e in A)this.pdf.context2d.hasOwnProperty(e)&&(this.pdf.context2d[e]=A[e]);return this.pdf.context2d._canvas=this,this.pdf.context2d},A.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new A,this.canvas.pdf=this}])}(P.API),
/**
 * @license
 * ====================================================================
 * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
 *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
 *               2013 Lee Driscoll, https://github.com/lsdriscoll
 *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
 *               2014 James Hall, james@parall.ax
 *               2014 Diego Casorran, https://github.com/diegocr
 *
 * 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.
 * ====================================================================
 */
function(t){var A={left:0,top:0,bottom:0,right:0},e=!1,r=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({},A),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(A){t=A}});var A=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return A},set:function(t){A=t}});var e=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var n=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var i=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(t){return r.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,A){r.call(this);var e=(A=A||{}).fontSize||this.getFontSize(),n=A.font||this.getFont(),i=A.scaleFactor||this.internal.scaleFactor,o=0,s=0,a=0,c=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}const u=A.maxWidth;u>0?"string"==typeof t?t=this.splitTextToSize(t,u):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,A){return t.concat(c.splitTextToSize(A,u))},[])):t=Array.isArray(t)?t:[t];for(var l=0;l<t.length;l++)o<(a=this.getStringUnitWidth(t[l],{font:n})*e)&&(o=a);return 0!==o&&(s=t.length),{w:o/=i,h:Math.max((s*e*this.getLineHeightFactor()-e*(this.getLineHeightFactor()-1))/i,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var t=this.internal.__cell__.margins||A;return this.internal.__cell__.lastCell=new i(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=t.cell=function(){var t;t=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),r.call(this);var n=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||A,a=this.internal.__cell__.tableHeaderRow,c=this.internal.__cell__.printHeaders;return void 0!==n.lineNumber&&(n.lineNumber===t.lineNumber?(t.x=(n.x||0)+(n.width||0),t.y=n.y||0):n.y+n.height+t.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=s.top,c&&a&&(this.printHeaderRow(t.lineNumber,!0),t.y+=a[0].height)):t.y=n.y+n.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===e?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-o,t.y+o,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+o,{align:"center",baseline:"top",maxWidth:t.width-o-o}):this.text(t.text,t.x+o,t.y+o,{align:"left",baseline:"top",maxWidth:t.width-o-o})),this.internal.__cell__.lastCell=t,this};t.table=function(t,e,a,c,u){if(r.call(this),!a)throw new Error("No data for PDF table.");var l,h,f,d,p=[],B=[],g=[],w={},m={},v=[],b=[],Q=(u=u||{}).autoSize||!1,C=!1!==u.printHeaders,F=u.css&&void 0!==u.css["font-size"]?16*u.css["font-size"]:u.fontSize||12,U=u.margins||Object.assign({width:this.getPageWidth()},A),y="number"==typeof u.padding?u.padding:3,N=u.headerBackgroundColor||"#c8c8c8";if(n.call(this),this.internal.__cell__.printHeaders=C,this.internal.__cell__.margins=U,this.internal.__cell__.table_font_size=F,this.internal.__cell__.padding=y,this.internal.__cell__.headerBackgroundColor=N,this.setFontSize(F),null==c)B=p=Object.keys(a[0]),g=p.map(function(){return"left"});else if(Array.isArray(c)&&"object"==typeof c[0])for(p=c.map(function(t){return t.name}),B=c.map(function(t){return t.prompt||t.name||""}),g=c.map(function(t){return t.align||"left"}),l=0;l<c.length;l+=1)m[c[l].name]=c[l].width*(19.049976/25.4);else Array.isArray(c)&&"string"==typeof c[0]&&(B=p=c,g=p.map(function(){return"left"}));if(Q||Array.isArray(c)&&"string"==typeof c[0])for(l=0;l<p.length;l+=1){for(w[d=p[l]]=a.map(function(t){return t[d]}),this.setFont(void 0,"bold"),v.push(this.getTextDimensions(B[l],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),h=w[d],this.setFont(void 0,"normal"),f=0;f<h.length;f+=1)v.push(this.getTextDimensions(h[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);m[d]=Math.max.apply(null,v)+y+y,v=[]}if(C){var E={};for(l=0;l<p.length;l+=1)E[p[l]]={},E[p[l]].text=B[l],E[p[l]].align=g[l];var L=s.call(this,E,m);b=p.map(function(A){return new i(t,e,m[A],L,E[A].text,void 0,E[A].align)}),this.setTableHeaderRow(b),this.printHeaderRow(1,!1)}var H=c.reduce(function(t,A){return t[A.name]=A.align,t},{});for(l=0;l<a.length;l+=1){var _=s.call(this,a[l],m);for(f=0;f<p.length;f+=1)o.call(this,new i(t,e,m[p[f]],_,a[l][p[f]],l+2,H[p[f]]))}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=e,this};var s=function(t,A){var e=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,n=this.internal.scaleFactor;return Object.keys(t).map(function(r){var n=t[r];return this.splitTextToSize(n.hasOwnProperty("text")?n.text:n,A[r]-e-e)},this).map(function(t){return this.getLineHeightFactor()*t.length*r/n+e+e},this).reduce(function(t,A){return Math.max(t,A)},0)};t.setTableHeaderRow=function(t){r.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,A){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var n;if(e=!0,"function"==typeof this.internal.__cell__.headerFunction){var s=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(s[0],s[1],s[2],s[3],void 0,-1)}this.setFont(void 0,"bold");for(var a=[],c=0;c<this.internal.__cell__.tableHeaderRow.length;c+=1)n=this.internal.__cell__.tableHeaderRow[c].clone(),A&&(n.y=this.internal.__cell__.margins.top||0,a.push(n)),n.lineNumber=t,this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,n);a.length>0&&this.setTableHeaderRow(a),this.setFont(void 0,"normal"),e=!1}}(P.API);var Ut={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},yt=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Nt=Ft(yt),Et=[100,200,300,400,500,600,700,800,900],Lt=Ft(Et);function Ht(t){var A=t.family.replace(/"|'/g,"").toLowerCase(),e=function(t){return Ut[t=t||"normal"]?t:"normal"}(t.style),r=function(t){if(!t)return 400;if("number"==typeof t)return t>=100&&t<=900&&t%100==0?t:400;if(/^\d00$/.test(t))return parseInt(t);switch(t){case"bold":return 700;case"normal":default:return 400}}(t.weight),n=function(t){return"number"==typeof Nt[t=t||"normal"]?t:"normal"}(t.stretch);return{family:A,style:e,weight:r,stretch:n,src:t.src||[],ref:t.ref||{name:A,style:[n,e,r].join(" ")}}}function _t(t,A,e,r){var n;for(n=e;n>=0&&n<A.length;n+=r)if(t[A[n]])return t[A[n]];for(n=e;n>=0&&n<A.length;n-=r)if(t[A[n]])return t[A[n]]}var St={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},xt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function It(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Pt(t){return t.trimLeft()}function Tt(t,A){for(var e=0;e<t.length;){if(t.charAt(e)===A)return[t.substring(0,e),t.substring(e+1)];e+=1}return null}function Rt(t){var A=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===A?null:[A[0],t.substring(A[0].length)]}var Ot,Kt,Mt,kt=["times"];!function(t){var A,e,r,n,i,s,a,c,u,l=function(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new c,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new s,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new s,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new h(this),A=this.internal.f2,e=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,s=this.internal.Point,a=this.internal.Rectangle,c=this.internal.Matrix,u=new l}]);var h=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var A=t;Object.defineProperty(this,"pdf",{get:function(){return A}});var e=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return e},set:function(t){e=Boolean(t)}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(t){r=Boolean(t)}});var n=0;Object.defineProperty(this,"posX",{get:function(){return n},set:function(t){isNaN(t)||(n=t)}});var i=0;Object.defineProperty(this,"posY",{get:function(){return i},set:function(t){isNaN(t)||(i=t)}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(t){o=Boolean(t)}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(t){s=t}});var a=[];Object.defineProperty(this,"pageBreaks",{get:function(){return a},set:function(t){a=t}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(t){t instanceof l&&(u=t)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(t){u.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 A;A=d(t),this.ctx.fillStyle=A.style,this.ctx.isFillTransparent=0===A.a,this.ctx.fillOpacity=A.a,this.pdf.setFillColor(A.r,A.g,A.b,{a:A.a}),this.pdf.setTextColor(A.r,A.g,A.b,{a:A.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var A=d(t);this.ctx.strokeStyle=A.style,this.ctx.isStrokeTransparent=0===A.a,this.ctx.strokeOpacity=A.a,0===A.a?this.pdf.setDrawColor(255,255,255):(A.a,this.pdf.setDrawColor(A.r,A.g,A.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 h=null;function f(t,A){if(null===h){var e=function(t){var A=[];return Object.keys(t).forEach(function(e){t[e].forEach(function(t){var r=null;switch(t){case"bold":r={family:e,weight:"bold"};break;case"italic":r={family:e,style:"italic"};break;case"bolditalic":r={family:e,weight:"bold",style:"italic"};break;case"":case"normal":r={family:e}}null!==r&&(r.ref={name:e,style:t},A.push(r))})}),A}(t.getFontList());h=function(t){for(var A={},e=0;e<t.length;++e){var r=Ht(t[e]),n=r.family,i=r.stretch,o=r.style,s=r.weight;A[n]=A[n]||{},A[n][i]=A[n][i]||{},A[n][i][o]=A[n][i][o]||{},A[n][i][o][s]=r}return A}(e.concat(A))}return h}var p=null;Object.defineProperty(this,"fontFaces",{get:function(){return p},set:function(t){h=null,p=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var A;if(this.ctx.font=t,null!==(A=/^\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 e=A[1],r=(A[2],A[3]),n=A[4],i=(A[5],A[6]),o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(n)[2];n="px"===o?Math.floor(parseFloat(n)*this.pdf.internal.scaleFactor):"em"===o?Math.floor(parseFloat(n)*this.pdf.getFontSize()):Math.floor(parseFloat(n)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(n);var s=function(t){var A,e,r=[],n=i.trim();if(""===n)return kt;if(n in xt)return[xt[n]];for(;""!==n;){switch(e=null,A=(n=Pt(n)).charAt(0)){case'"':case"'":e=Tt(n.substring(1),A);break;default:e=Rt(n)}if(null===e)return kt;if(r.push(e[0]),""!==(n=Pt(e[1]))&&","!==n.charAt(0))return kt;n=n.replace(/^,/,"")}return r}();if(this.fontFaces){var a=function(t,A,e){for(var r=(e=e||{}).defaultFontFamily||"times",n=Object.assign({},St,e.genericFontFamilies||{}),i=null,o=null,s=0;s<A.length;++s)if(n[(i=Ht(A[s])).family]&&(i.family=n[i.family]),t.hasOwnProperty(i.family)){o=t[i.family];break}if(!(o=o||t[r]))throw new Error("Could not find a font-family for the rule '"+It(i)+"' and default family '"+r+"'.");if(o=function(t,A){if(A[t])return A[t];var e=Nt[t],r=e<=Nt.normal?-1:1,n=_t(A,yt,e,r);if(!n)throw new Error("Could not find a matching font-stretch value for "+t);return n}(i.stretch,o),o=function(t,A){if(A[t])return A[t];for(var e=Ut[t],r=0;r<e.length;++r)if(A[e[r]])return A[e[r]];throw new Error("Could not find a matching font-style for "+t)}(i.style,o),!(o=function(t,A){if(A[t])return A[t];if(400===t&&A[500])return A[500];if(500===t&&A[400])return A[400];var e=Lt[t],r=_t(A,Et,e,t<400?-1:1);if(!r)throw new Error("Could not find a matching font-weight for value "+t);return r}(i.weight,o)))throw new Error("Failed to resolve a font for the rule '"+It(i)+"'.");return o}(f(this.pdf,this.fontFaces),s.map(function(t){return{family:t,stretch:"normal",weight:r,style:e}}));this.pdf.setFont(a.ref.name,a.ref.style)}else{var c="";("bold"===r||parseInt(r,10)>=700||"bold"===e)&&(c="bold"),"italic"===e&&(c+="italic"),0===c.length&&(c="normal");for(var u="",l={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"},h=0;h<s.length;h++){if(void 0!==this.pdf.internal.getFont(s[h],c,{noFallback:!0,disableWarning:!0})){u=s[h];break}if("bolditalic"===c&&void 0!==this.pdf.internal.getFont(s[h],"bold",{noFallback:!0,disableWarning:!0}))u=s[h],c="bold";else if(void 0!==this.pdf.internal.getFont(s[h],"normal",{noFallback:!0,disableWarning:!0})){u=s[h],c="normal";break}}if(""===u)for(var d=0;d<s.length;d++)if(l[s[d]]){u=l[s[d]];break}u=""===u?"Times":u,this.pdf.setFont(u,c)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};h.prototype.fill=function(){b.call(this,"fill",!1)},h.prototype.stroke=function(){b.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(t,A){if(isNaN(t)||isNaN(A))throw o.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var e=this.ctx.transform.applyToPoint(new s(t,A));this.path.push({type:"mt",x:e.x,y:e.y}),this.ctx.lastPoint=new s(t,A)},h.prototype.closePath=function(){var t=new s(0,0),A=0;for(A=this.path.length-1;-1!==A;A--)if("begin"===this.path[A].type&&"object"==typeof this.path[A+1]&&"number"==typeof this.path[A+1].x){t=new s(this.path[A+1].x,this.path[A+1].y),this.path.push({type:"lt",x:t.x,y:t.y});break}"object"==typeof this.path[A+2]&&"number"==typeof this.path[A+2].x&&this.path.push(JSON.parse(JSON.stringify(this.path[A+2]))),this.path.push({type:"close"}),this.ctx.lastPoint=new s(t.x,t.y)},h.prototype.lineTo=function(t,A){if(isNaN(t)||isNaN(A))throw o.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var e=this.ctx.transform.applyToPoint(new s(t,A));this.path.push({type:"lt",x:e.x,y:e.y}),this.ctx.lastPoint=new s(e.x,e.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),b.call(this,null,!0)},h.prototype.quadraticCurveTo=function(t,A,e,r){if(isNaN(e)||isNaN(r)||isNaN(t)||isNaN(A))throw o.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var n=this.ctx.transform.applyToPoint(new s(e,r)),i=this.ctx.transform.applyToPoint(new s(t,A));this.path.push({type:"qct",x1:i.x,y1:i.y,x:n.x,y:n.y}),this.ctx.lastPoint=new s(n.x,n.y)},h.prototype.bezierCurveTo=function(t,A,e,r,n,i){if(isNaN(n)||isNaN(i)||isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r))throw o.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new s(n,i)),c=this.ctx.transform.applyToPoint(new s(t,A)),u=this.ctx.transform.applyToPoint(new s(e,r));this.path.push({type:"bct",x1:c.x,y1:c.y,x2:u.x,y2:u.y,x:a.x,y:a.y}),this.ctx.lastPoint=new s(a.x,a.y)},h.prototype.arc=function(t,A,e,r,n,i){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||isNaN(n))throw o.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(i=Boolean(i),!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new s(t,A));t=a.x,A=a.y;var c=this.ctx.transform.applyToPoint(new s(0,e)),u=this.ctx.transform.applyToPoint(new s(0,0));e=Math.sqrt(Math.pow(c.x-u.x,2)+Math.pow(c.y-u.y,2))}Math.abs(n-r)>=2*Math.PI&&(r=0,n=2*Math.PI),this.path.push({type:"arc",x:t,y:A,radius:e,startAngle:r,endAngle:n,counterclockwise:i})},h.prototype.arcTo=function(t,A,e,r,n){throw new Error("arcTo not implemented.")},h.prototype.rect=function(t,A,e,r){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r))throw o.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,A),this.lineTo(t+e,A),this.lineTo(t+e,A+r),this.lineTo(t,A+r),this.lineTo(t,A),this.lineTo(t+e,A),this.lineTo(t,A)},h.prototype.fillRect=function(t,A,e,r){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r))throw o.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var n={};"butt"!==this.lineCap&&(n.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(n.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,A,e,r),this.fill(),n.hasOwnProperty("lineCap")&&(this.lineCap=n.lineCap),n.hasOwnProperty("lineJoin")&&(this.lineJoin=n.lineJoin)}},h.prototype.strokeRect=function(t,A,e,r){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r))throw o.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");B.call(this)||(this.beginPath(),this.rect(t,A,e,r),this.stroke())},h.prototype.clearRect=function(t,A,e,r){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r))throw o.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,A,e,r))},h.prototype.save=function(t){t="boolean"!=typeof t||t;for(var A=this.pdf.internal.getCurrentPageInfo().pageNumber,e=0;e<this.pdf.internal.getNumberOfPages();e++)this.pdf.setPage(e+1),this.pdf.internal.out("q");if(this.pdf.setPage(A),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new l(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},h.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var A=this.pdf.internal.getCurrentPageInfo().pageNumber,e=0;e<this.pdf.internal.getNumberOfPages();e++)this.pdf.setPage(e+1),this.pdf.internal.out("Q");this.pdf.setPage(A),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(t){var A,e,r,n;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))A=0,e=0,r=0,n=0;else{var i=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==i)A=parseInt(i[1]),e=parseInt(i[2]),r=parseInt(i[3]),n=1;else if(null!==(i=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))A=parseInt(i[1]),e=parseInt(i[2]),r=parseInt(i[3]),n=parseFloat(i[4]);else{if(n=1,"string"==typeof t&&"#"!==t.charAt(0)){var o=new f(t);t=o.ok?o.toHex():"#000000"}4===t.length?(A=t.substring(1,2),A+=A,e=t.substring(2,3),e+=e,r=t.substring(3,4),r+=r):(A=t.substring(1,3),e=t.substring(3,5),r=t.substring(5,7)),A=parseInt(A,16),e=parseInt(e,16),r=parseInt(r,16)}}return{r:A,g:e,b:r,a:n,style:t}},p=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},B=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};h.prototype.fillText=function(t,A,e,r){if(isNaN(A)||isNaN(e)||"string"!=typeof t)throw o.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(r=isNaN(r)?void 0:r,!p.call(this)){e=C.call(this,e);var n=I(this.ctx.transform.rotation),i=this.ctx.transform.scaleX;E.call(this,{text:t,x:A,y:e,scale:i,angle:n,align:this.textAlign,maxWidth:r})}},h.prototype.strokeText=function(t,A,e,r){if(isNaN(A)||isNaN(e)||"string"!=typeof t)throw o.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!B.call(this)){r=isNaN(r)?void 0:r,e=C.call(this,e);var n=I(this.ctx.transform.rotation),i=this.ctx.transform.scaleX;E.call(this,{text:t,x:A,y:e,scale:i,renderingMode:"stroke",angle:n,align:this.textAlign,maxWidth:r})}},h.prototype.measureText=function(t){if("string"!=typeof t)throw o.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var A=this.pdf,e=this.pdf.internal.scaleFactor,r=A.internal.getFontSize(),n=A.getStringUnitWidth(t)*r/A.internal.scaleFactor;return new function(t){var A=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return A}}),this}({width:n*=Math.round(96*e/72*1e4)/1e4})},h.prototype.scale=function(t,A){if(isNaN(t)||isNaN(A))throw o.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var e=new c(t,0,0,A,0,0);this.ctx.transform=this.ctx.transform.multiply(e)},h.prototype.rotate=function(t){if(isNaN(t))throw o.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var A=new c(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(A)},h.prototype.translate=function(t,A){if(isNaN(t)||isNaN(A))throw o.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var e=new c(1,0,0,1,t,A);this.ctx.transform=this.ctx.transform.multiply(e)},h.prototype.transform=function(t,A,e,r,n,i){if(isNaN(t)||isNaN(A)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw o.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new c(t,A,e,r,n,i);this.ctx.transform=this.ctx.transform.multiply(s)},h.prototype.setTransform=function(t,A,e,r,n,i){t=isNaN(t)?1:t,A=isNaN(A)?0:A,e=isNaN(e)?0:e,r=isNaN(r)?1:r,n=isNaN(n)?0:n,i=isNaN(i)?0:i,this.ctx.transform=new c(t,A,e,r,n,i)},h.prototype.drawImage=function(t,A,e,r,n,i,o,s,u){var l=this.pdf.getImageProperties(t),h=1,f=1,d=1,p=1;void 0!==r&&void 0!==s&&(d=s/r,p=u/n,h=l.width/r*s/r,f=l.height/n*u/n),void 0===i&&(i=A,o=e,A=0,e=0),void 0!==r&&void 0===s&&(s=r,u=n),void 0===r&&void 0===s&&(s=l.width,u=l.height);for(var B,w=this.ctx.transform.decompose(),b=I(w.rotate.shx),C=new c,F=(C=(C=(C=C.multiply(w.translate)).multiply(w.skew)).multiply(w.scale)).applyToRectangle(new a(i-A*d,o-e*p,r*h,n*f)),U=g.call(this,F),y=[],N=0;N<U.length;N+=1)-1===y.indexOf(U[N])&&y.push(U[N]);if(v(y),this.autoPaging)for(var E=y[0],L=y[y.length-1],H=E;H<L+1;H++){if(this.pdf.setPage(H),0!==this.ctx.clip_path.length){var _=this.path;B=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(B,this.posX,-1*this.pdf.internal.pageSize.height*(H-1)+this.posY),Q.call(this,"fill",!0),this.path=_}var S=JSON.parse(JSON.stringify(F));S=m([S],this.posX,-1*this.pdf.internal.pageSize.height*(H-1)+this.posY)[0],this.pdf.addImage(t,"JPEG",S.x,S.y,S.w,S.h,null,null,b)}else this.pdf.addImage(t,"JPEG",F.x,F.y,F.w,F.h,null,null,b)};var g=function(t,A,e){var r=[];switch(A=A||this.pdf.internal.pageSize.width,e=e||this.pdf.internal.pageSize.height,t.type){default:case"mt":case"lt":r.push(Math.floor((t.y+this.posY)/e)+1);break;case"arc":r.push(Math.floor((t.y+this.posY-t.radius)/e)+1),r.push(Math.floor((t.y+this.posY+t.radius)/e)+1);break;case"qct":var n=P(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);r.push(Math.floor(n.y/e)+1),r.push(Math.floor((n.y+n.h)/e)+1);break;case"bct":var i=T(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);r.push(Math.floor(i.y/e)+1),r.push(Math.floor((i.y+i.h)/e)+1);break;case"rect":r.push(Math.floor((t.y+this.posY)/e)+1),r.push(Math.floor((t.y+t.h+this.posY)/e)+1)}for(var o=0;o<r.length;o+=1)for(;this.pdf.internal.getNumberOfPages()<r[o];)w.call(this);return r},w=function(){var t=this.fillStyle,A=this.strokeStyle,e=this.font,r=this.lineCap,n=this.lineWidth,i=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=A,this.font=e,this.lineCap=r,this.lineWidth=n,this.lineJoin=i},m=function(t,A,e){for(var r=0;r<t.length;r++)switch(t[r].type){case"bct":t[r].x2+=A,t[r].y2+=e;case"qct":t[r].x1+=A,t[r].y1+=e;case"mt":case"lt":case"arc":default:t[r].x+=A,t[r].y+=e}return t},v=function(t){return t.sort(function(t,A){return t-A})},b=function(t,A){for(var e,r,n=this.fillStyle,i=this.strokeStyle,o=this.lineCap,s=this.lineWidth,a=s*this.ctx.transform.scaleX,c=this.lineJoin,u=JSON.parse(JSON.stringify(this.path)),l=JSON.parse(JSON.stringify(this.path)),h=[],f=0;f<l.length;f++)if(void 0!==l[f].x)for(var d=g.call(this,l[f]),p=0;p<d.length;p+=1)-1===h.indexOf(d[p])&&h.push(d[p]);for(var B=0;B<h.length;B++)for(;this.pdf.internal.getNumberOfPages()<h[B];)w.call(this);if(v(h),this.autoPaging)for(var b=h[0],C=h[h.length-1],F=b;F<C+1;F++){if(this.pdf.setPage(F),this.fillStyle=n,this.strokeStyle=i,this.lineCap=o,this.lineWidth=a,this.lineJoin=c,0!==this.ctx.clip_path.length){var U=this.path;e=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(e,this.posX,-1*this.pdf.internal.pageSize.height*(F-1)+this.posY),Q.call(this,t,!0),this.path=U}r=JSON.parse(JSON.stringify(u)),this.path=m(r,this.posX,-1*this.pdf.internal.pageSize.height*(F-1)+this.posY),!1!==A&&0!==F||Q.call(this,t,A),this.lineWidth=s}else this.lineWidth=a,Q.call(this,t,A),this.lineWidth=s;this.path=u},Q=function(t,A){if(("stroke"!==t||A||!B.call(this))&&("stroke"===t||A||!p.call(this))){for(var e,r,n=[],i=this.path,o=0;o<i.length;o++){var s=i[o];switch(s.type){case"begin":n.push({begin:!0});break;case"close":n.push({close:!0});break;case"mt":n.push({start:s,deltas:[],abs:[]});break;case"lt":var a=n.length;if(!isNaN(i[o-1].x)&&(e=[s.x-i[o-1].x,s.y-i[o-1].y],a>0))for(;a>=0;a--)if(!0!==n[a-1].close&&!0!==n[a-1].begin){n[a-1].deltas.push(e),n[a-1].abs.push(s);break}break;case"bct":e=[s.x1-i[o-1].x,s.y1-i[o-1].y,s.x2-i[o-1].x,s.y2-i[o-1].y,s.x-i[o-1].x,s.y-i[o-1].y],n[n.length-1].deltas.push(e);break;case"qct":var c=i[o-1].x+2/3*(s.x1-i[o-1].x),u=i[o-1].y+2/3*(s.y1-i[o-1].y),l=s.x+2/3*(s.x1-s.x),h=s.y+2/3*(s.y1-s.y),f=s.x,d=s.y;e=[c-i[o-1].x,u-i[o-1].y,l-i[o-1].x,h-i[o-1].y,f-i[o-1].x,d-i[o-1].y],n[n.length-1].deltas.push(e);break;case"arc":n.push({deltas:[],abs:[],arc:!0}),Array.isArray(n[n.length-1].abs)&&n[n.length-1].abs.push(s)}}r=A?null:"stroke"===t?"stroke":"fill";for(var g=0;g<n.length;g++){if(n[g].arc){for(var w=n[g].abs,m=0;m<w.length;m++){var v=w[m];"arc"===v.type?F.call(this,v.x,v.y,v.radius,v.startAngle,v.endAngle,v.counterclockwise,void 0,A):L.call(this,v.x,v.y)}U.call(this,r),this.pdf.internal.out("h")}if(!n[g].arc&&!0!==n[g].close&&!0!==n[g].begin){var b=n[g].start.x,Q=n[g].start.y;H.call(this,n[g].deltas,b,Q)}}r&&U.call(this,r),A&&y.call(this)}},C=function(t){var A=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,e=A*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-e;case"top":return t+A-e;case"hanging":return t+A-2*e;case"middle":return t+A/2-e;case"ideographic":return t;case"alphabetic":default:return t}};h.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,A){this.colorStops.push([t,A])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var F=function(t,A,e,r,n,i,o,s){for(var a=S.call(this,e,r,n,i),c=0;c<a.length;c++){var u=a[c];0===c&&N.call(this,u.x1+t,u.y1+A),_.call(this,t,A,u.x2,u.y2,u.x3,u.y3,u.x4,u.y4)}s?y.call(this):U.call(this,o)},U=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},y=function(){this.pdf.clip(),this.pdf.discardPath()},N=function(t,A){this.pdf.internal.out(e(t)+" "+r(A)+" m")},E=function(t){var A;switch(t.align){case"right":case"end":A="right";break;case"center":A="center";break;case"left":case"start":default:A="left"}var e=this.ctx.transform.applyToPoint(new s(t.x,t.y)),r=this.ctx.transform.decompose(),n=new c;n=(n=(n=n.multiply(r.translate)).multiply(r.skew)).multiply(r.scale);for(var i,o,u,l=this.pdf.getTextDimensions(t.text),h=this.ctx.transform.applyToRectangle(new a(t.x,t.y,l.w,l.h)),f=n.applyToRectangle(new a(t.x,t.y-l.h,l.w,l.h)),d=g.call(this,f),p=[],B=0;B<d.length;B+=1)-1===p.indexOf(d[B])&&p.push(d[B]);if(v(p),!0===this.autoPaging)for(var w=p[0],b=p[p.length-1],C=w;C<b+1;C++){if(this.pdf.setPage(C),0!==this.ctx.clip_path.length){var F=this.path;i=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=m(i,this.posX,-1*this.pdf.internal.pageSize.height*(C-1)+this.posY),Q.call(this,"fill",!0),this.path=F}var U=JSON.parse(JSON.stringify(h));U=m([U],this.posX,-1*this.pdf.internal.pageSize.height*(C-1)+this.posY)[0],t.scale>=.01&&(o=this.pdf.internal.getFontSize(),this.pdf.setFontSize(o*t.scale),u=this.lineWidth,this.lineWidth=u*t.scale),this.pdf.text(t.text,U.x,U.y,{angle:t.angle,align:A,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(o),this.lineWidth=u)}else t.scale>=.01&&(o=this.pdf.internal.getFontSize(),this.pdf.setFontSize(o*t.scale),u=this.lineWidth,this.lineWidth=u*t.scale),this.pdf.text(t.text,e.x+this.posX,e.y+this.posY,{angle:t.angle,align:A,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(o),this.lineWidth=u)},L=function(t,A,n,i){n=n||0,i=i||0,this.pdf.internal.out(e(t+n)+" "+r(A+i)+" l")},H=function(t,A,e){return this.pdf.lines(t,A,e,null,null)},_=function(t,e,r,o,s,a,c,u){this.pdf.internal.out([A(n(r+t)),A(i(o+e)),A(n(s+t)),A(i(a+e)),A(n(c+t)),A(i(u+e)),"c"].join(" "))},S=function(t,A,e,r){for(var n=2*Math.PI,i=Math.PI/2;A>e;)A-=n;var o=Math.abs(e-A);o<n&&r&&(o=n-o);for(var s=[],a=r?-1:1,c=A;o>1e-5;){var u=c+a*Math.min(o,i);s.push(x.call(this,t,c,u)),o-=Math.abs(u-c),c=u}return s},x=function(t,A,e){var r=(e-A)/2,n=t*Math.cos(r),i=t*Math.sin(r),o=n,s=-i,a=o*o+s*s,c=a+o*n+s*i,u=4/3*(Math.sqrt(2*a*c)-c)/(o*i-s*n),l=o-u*s,h=s+u*o,f=l,d=-h,p=r+A,B=Math.cos(p),g=Math.sin(p);return{x1:t*Math.cos(A),y1:t*Math.sin(A),x2:l*B-h*g,y2:l*g+h*B,x3:f*B-d*g,y3:f*g+d*B,x4:t*Math.cos(e),y4:t*Math.sin(e)}},I=function(t){return 180*t/Math.PI},P=function(t,A,e,r,n,i){var o=t+.5*(e-t),s=A+.5*(r-A),c=n+.5*(e-n),u=i+.5*(r-i),l=Math.min(t,n,o,c),h=Math.max(t,n,o,c),f=Math.min(A,i,s,u),d=Math.max(A,i,s,u);return new a(l,f,h-l,d-f)},T=function(t,A,e,r,n,i,o,s){var c,u,l,h,f,d,p,B,g,w,m,v,b,Q,C=e-t,F=r-A,U=n-e,y=i-r,N=o-n,E=s-i;for(u=0;u<41;u++)g=(p=(l=t+(c=u/40)*C)+c*((f=e+c*U)-l))+c*(f+c*(n+c*N-f)-p),w=(B=(h=A+c*F)+c*((d=r+c*y)-h))+c*(d+c*(i+c*E-d)-B),0==u?(m=g,v=w,b=g,Q=w):(m=Math.min(m,g),v=Math.min(v,w),b=Math.max(b,g),Q=Math.max(Q,w));return new a(Math.round(m),Math.round(v),Math.round(b-m),Math.round(Q-v))}}(P.API),
/**
 * @license
 * jsPDF filters PlugIn
 * Copyright (c) 2014 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A=function(t){var A,e,r,n,i,o,s,a,c,u;for(/[^\x00-\xFF]/.test(t),e=[],r=0,n=(t+=A="\0\0\0\0".slice(t.length%4||4)).length;n>r;r+=4)0!==(i=(t.charCodeAt(r)<<24)+(t.charCodeAt(r+1)<<16)+(t.charCodeAt(r+2)<<8)+t.charCodeAt(r+3))?(o=(i=((i=((i=((i=(i-(u=i%85))/85)-(c=i%85))/85)-(a=i%85))/85)-(s=i%85))/85)%85,e.push(o+33,s+33,a+33,c+33,u+33)):e.push(122);return function(t,A){for(var e=A;e>0;e--)t.pop()}(e,A.length),String.fromCharCode.apply(String,e)+"~>"},e=function(t){var A,e,r,n,i,o=String,s="length",a=255,c="charCodeAt",u="slice",l="replace";for(t[u](-2),t=t[u](0,-2)[l](/\s/g,"")[l]("z","!!!!!"),r=[],n=0,i=(t+=A="uuuuu"[u](t[s]%5||5))[s];i>n;n+=5)e=52200625*(t[c](n)-33)+614125*(t[c](n+1)-33)+7225*(t[c](n+2)-33)+85*(t[c](n+3)-33)+(t[c](n+4)-33),r.push(a&e>>24,a&e>>16,a&e>>8,a&e);return function(t,A){for(var e=A;e>0;e--)t.pop()}(r,A[s]),o.fromCharCode.apply(o,r)},n=function(t){var A=new 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===A.test(t))return"";for(var e="",r=0;r<t.length;r+=2)e+=String.fromCharCode("0x"+(t[r]+t[r+1]));return e},i=function(t){for(var A=new Uint8Array(t.length),e=t.length;e--;)A[e]=t.charCodeAt(e);return(A=Object(r.b)(A)).reduce(function(t,A){return t+String.fromCharCode(A)},"")};P.API.processDataByFilters=function(t,r){var o=0,s=t||"",a=[];for("string"==typeof(r=r||[])&&(r=[r]),o=0;o<r.length;o+=1)switch(r[o]){case"ASCII85Decode":case"/ASCII85Decode":s=e(s),a.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=A(s),a.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=n(s),a.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map(function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)}).join("")+">",a.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),a.push("/FlateDecode");break;default:throw new Error('The filter: "'+r[o]+'" is not implemented')}return{data:s,reverseChain:a.reverse().join(" ")}}}(),
/**
 * @license
 * jsPDF fileloading PlugIn
 * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){t.loadFile=function(t,A,e){return function(t,A,e){A=!1!==A,e="function"==typeof e?e:function(){};var r=void 0;try{r=function(t,A,e){var r=new XMLHttpRequest,n=0,i=function(t){var A=t.length,e=[],r=String.fromCharCode;for(n=0;n<A;n+=1)e.push(r(255&t.charCodeAt(n)));return e.join("")};if(r.open("GET",t,!A),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===A&&(r.onload=function(){200===r.status?e(i(this.responseText)):e(void 0)}),r.send(null),A&&200===r.status)return i(r.responseText)}(t,A,e)}catch(t){}return r}(t,A,e)},t.loadImageFile=t.loadFile}(P.API),
/**
 * @license
 * Copyright (c) 2018 Erik Koopmans
 * Released under the MIT License.
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){function A(){return(n.html2canvas?Promise.resolve(n.html2canvas):new Promise(function(t){t()}).then(e.bind(null,"eMjc"))).catch(function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))}).then(function(t){return t.default?t.default:t})}function r(){return(n.DOMPurify?Promise.resolve(n.DOMPurify):e.e(16).then(e.bind(null,"OvQW"))).catch(function(t){return Promise.reject(new Error("Could not load dompurify: "+t))}).then(function(t){return t.default?t.default:t})}var i=function(t){var A=typeof t;return"undefined"===A?"undefined":"string"===A||t instanceof String?"string":"number"===A||t instanceof Number?"number":"function"===A||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===A?"object":"unknown"},o=function(t,A){var e=document.createElement(t);for(var r in A.className&&(e.className=A.className),A.innerHTML&&A.dompurify&&(e.innerHTML=A.dompurify.sanitize(A.innerHTML)),A.style)e.style[r]=A.style[r];return e},s=function(t,A){for(var e=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),r=t.firstChild;r;r=r.nextSibling)!0!==A&&1===r.nodeType&&"SCRIPT"===r.nodeName||e.appendChild(s(r,A));return 1===t.nodeType&&("CANVAS"===t.nodeName?(e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(e.value=t.value),e.addEventListener("load",function(){e.scrollTop=t.scrollTop,e.scrollLeft=t.scrollLeft},!0)),e},a=function t(A){var e=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),r=t.convert(Promise.resolve(),e);return(r=r.setProgress(1,t,1,[t])).set(A)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(t,A){return t.__proto__=A||a.prototype,t},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(t,A){return this.then(function(){switch(A=A||function(t){switch(i(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.then(r).then(function(A){return this.set({src:o("div",{innerHTML:t,dompurify:A})})});case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}})},a.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var t={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},A=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===A.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(A),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(A).then(function(t){var A=Object.assign({},this.opt.html2canvas);return delete A.onrendered,t(this.prop.container,A)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(A).then(function(t){var A=this.opt.jsPDF,e=this.opt.fontFaces,r=Object.assign({async:!0,allowTaint:!0,scale:1,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete r.onrendered,A.context2d.autoPaging=!0,A.context2d.posX=this.opt.x,A.context2d.posY=this.opt.y,A.context2d.fontFaces=e,e)for(var n=0;n<e.length;++n){var i=e[n],o=i.src.find(function(t){return"truetype"===t.format});o&&A.addFont(o.url,i.ref.name,i.ref.style)}return r.windowHeight=r.windowHeight||0,r.windowHeight=0==r.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):r.windowHeight,t(this.prop.container,r)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(t,A,e){return"img"===(e=e||"pdf").toLowerCase()||"image"===e.toLowerCase()?this.outputImg(t,A):this.outputPdf(t,A)},a.prototype.outputPdf=function(t,A){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,A)})},a.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}})},a.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(t){if("object"!==i(t))return this;var A=Object.keys(t||{}).map(function(A){if(A in a.template.prop)return function(){this.prop[A]=t[A]};switch(A){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[A]=t[A]}}},this);return this.then(function(){return this.thenList(A)})},a.prototype.get=function(t,A){return this.then(function(){var e=t in a.template.prop?this.prop[t]:this.opt[t];return A?A(e):e})},a.prototype.setMargin=function(t){return this.then(function(){switch(i(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t}).then(this.setPageSize)},a.prototype.setPageSize=function(t){function A(t,A){return Math.floor(t*A/72*96)}return this.then(function(){(t=t||P.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:A(t.inner.width,t.k),height:A(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t})},a.prototype.setProgress=function(t,A,e,r){return null!=t&&(this.progress.val=t),null!=A&&(this.progress.state=A),null!=e&&(this.progress.n=e),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(t,A,e,r){return this.setProgress(t?this.progress.val+t:null,A||null,e?this.progress.n+e:null,r?this.progress.stack.concat(r):null)},a.prototype.then=function(t,A){var e=this;return this.thenCore(t,A,function(t,A){return e.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,function(A){return e.updateProgress(null,t),A}).then(t,A).then(function(t){return e.updateProgress(1),t})})},a.prototype.thenCore=function(t,A,e){e=e||Promise.prototype.then,t&&(t=t.bind(this)),A&&(A=A.bind(this));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:a.convert(Object.assign({},this),Promise.prototype),n=e.call(r,t,A);return a.convert(n,this.__proto__)},a.prototype.thenExternal=function(t,A){return Promise.prototype.then.call(this,t,A)},a.prototype.thenList=function(t){var A=this;return t.forEach(function(t){A=A.thenCore(t)}),A},a.prototype.catch=function(t){t&&(t=t.bind(this));var A=Promise.prototype.catch.call(this,t);return a.convert(A,this)},a.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},a.prototype.error=function(t){return this.then(function(){throw new Error(t)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,P.getPageSize=function(t,A,e){if("object"==typeof t){var r=t;t=r.orientation,A=r.unit||A,e=r.format||e}A=A||"mm",e=e||"a4",t=(""+(t||"P")).toLowerCase();var n,i=(""+e).toLowerCase(),o={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]};switch(A){case"pt":n=1;break;case"mm":n=72/25.4;break;case"cm":n=72/2.54;break;case"in":n=72;break;case"px":n=.75;break;case"pc":case"em":n=12;break;case"ex":n=6;break;default:throw"Invalid unit: "+A}var s,a=0,c=0;if(o.hasOwnProperty(i))a=o[i][1]/n,c=o[i][0]/n;else try{a=e[1],c=e[0]}catch(t){throw new Error("Invalid format: "+e)}if("p"===t||"portrait"===t)t="p",c>a&&(s=c,c=a,a=s);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",a>c&&(s=c,c=a,a=s)}return{width:c,height:a,unit:A,k:n,orientation:t}},t.html=function(t,A){(A=A||{}).callback=A.callback||function(){},A.html2canvas=A.html2canvas||{},A.html2canvas.canvas=A.html2canvas.canvas||this.canvas,A.jsPDF=A.jsPDF||this,A.fontFaces=A.fontFaces?A.fontFaces.map(Ht):null;var e=new a(A);return A.worker?e:e.from(t).doCallback()}}(P.API),P.API.addJS=function(t){return Mt=t,this.internal.events.subscribe("postPutResources",function(){Ot=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ot+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Kt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Mt+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==Ot&&void 0!==Kt&&this.internal.out("/Names <</JavaScript "+Ot+" 0 R>>")}),this
/**
 * @license
 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */},function(t){var A;t.events.push(["postPutResources",function(){var t=this,e=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=t.outline.render().split(/\r\n/),n=0;n<r.length;n++){var i=r[n],o=e.exec(i);if(null!=o){var s=o[1];t.internal.newObjectDeferredBegin(s,!1)}t.internal.write(i)}if(this.outline.createNamedDestinations){var a=this.internal.pages.length,c=[];for(n=0;n<a;n++){var u=t.internal.newObject();c.push(u);var l=t.internal.getPageInfo(n+1);t.internal.write("<< /D["+l.objId+" 0 R /XYZ null null null]>> endobj")}var h=t.internal.newObject();for(t.internal.write("<< /Names [ "),n=0;n<c.length;n++)t.internal.write("(page_"+(n+1)+")"+c[n]+" 0 R");t.internal.write(" ] >>","endobj"),A=t.internal.newObject(),t.internal.write("<< /Dests "+h+" 0 R"),t.internal.write(">>","endobj")}}]),t.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 "+A+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,A,e){var r={title:A,options:e,children:[]};return null==t&&(t=this.root),t.children.push(r),r},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(A){A.id=t.internal.newObjectDeferred();for(var e=0;e<A.children.length;e++)this.genIds_r(A.children[e])},t.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),t.children.length>0&&(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(A){for(var e=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<A.children.length;r++){var n=A.children[r];this.objStart(n),this.line("/Title "+this.makeString(n.title)),this.line("/Parent "+this.makeRef(A)),r>0&&this.line("/Prev "+this.makeRef(A.children[r-1])),r<A.children.length-1&&this.line("/Next "+this.makeRef(A.children[r+1])),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1])));var i=this.count=this.count_r({count:0},n);if(i>0&&this.line("/Count "+i),n.options&&n.options.pageNumber){var o=t.internal.getPageInfo(n.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+e(0)+" 0]")}this.objEnd()}for(var s=0;s<A.children.length;s++)this.renderItems(A.children[s])},t.outline.line=function(t){this.ctx.val+=t+"\r\n"},t.outline.makeRef=function(t){return t.id+" 0 R"},t.outline.makeString=function(A){return"("+t.internal.pdfEscape(A)+")"},t.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},t.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},t.outline.count_r=function(t,A){for(var e=0;e<A.children.length;e++)t.count++,this.count_r(t,A.children[e]);return t.count}}])}(P.API),
/**
 * @license
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A=[192,193,194,195,196,197,198,199];P.API.processJPEG=function(t,e,r,n,i,o){var s,a=this.decode.DCT_DECODE,c=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=i||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(s=function(t){for(var e,r=256*t.charCodeAt(4)+t.charCodeAt(5),n=t.length,i={width:0,height:0,numcomponents:1},o=4;o<n;o+=2){if(o+=r,-1!==A.indexOf(t.charCodeAt(o+1))){e=256*t.charCodeAt(o+5)+t.charCodeAt(o+6),i={width:256*t.charCodeAt(o+7)+t.charCodeAt(o+8),height:e,numcomponents:t.charCodeAt(o+9)};break}r=256*t.charCodeAt(o+2)+t.charCodeAt(o+3)}return i}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}c={data:t,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:a,index:e,alias:r}}return c}}();var Dt,zt,jt,Vt,qt,Gt=function(){var t,A,e;function i(t){var A,e,r,n,i,o,s,a,c,u,l,h,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(A=this.readUInt32(),c=function(){var t,A;for(A=[],t=0;t<4;++t)A.push(String.fromCharCode(this.data[this.pos++]));return A}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(A);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},i=this.readUInt16(),n=this.readUInt16()||100,o.delay=1e3*i/n,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===c&&(this.pos+=4,A-=4),t=(null!=o?o.data:void 0)||this.imgData,h=0;0<=A?h<A:h>A;0<=A?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(r=this.palette.length/3,this.transparency.indexed=this.read(A),this.transparency.indexed.length>r)throw new Error("More transparent colors than palette size");if((u=r-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(A)[0];break;case 2:this.transparency.rgb=this.read(A)}break;case"tEXt":s=(l=this.read(A)).indexOf(0),a=String.fromCharCode.apply(String,l.slice(0,s)),this.text[a]=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===(d=this.colorType)||6===d,e=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*e,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+=A}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}i.prototype.read=function(t){var A,e;for(e=[],A=0;0<=t?A<t:A>t;0<=t?++A:--A)e.push(this.data[this.pos++]);return e},i.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.decodePixels=function(t){var A=this.pixelBitlength/8,e=new Uint8Array(this.width*this.height*A),n=0,i=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function o(r,o,s,a){var c,u,l,h,f,d,p,B,g,w,m,v,b,Q,C,F,U,y,N,E,L,H=Math.ceil((i.width-r)/s),_=Math.ceil((i.height-o)/a),S=i.width==H&&i.height==_;for(Q=A*H,v=S?e:new Uint8Array(Q*_),d=t.length,b=0,u=0;b<_&&n<d;){switch(t[n++]){case 0:for(h=U=0;U<Q;h=U+=1)v[u++]=t[n++];break;case 1:for(h=y=0;y<Q;h=y+=1)c=t[n++],f=h<A?0:v[u-A],v[u++]=(c+f)%256;break;case 2:for(h=N=0;N<Q;h=N+=1)c=t[n++],l=(h-h%A)/A,C=b&&v[(b-1)*Q+l*A+h%A],v[u++]=(C+c)%256;break;case 3:for(h=E=0;E<Q;h=E+=1)c=t[n++],l=(h-h%A)/A,f=h<A?0:v[u-A],C=b&&v[(b-1)*Q+l*A+h%A],v[u++]=(c+Math.floor((f+C)/2))%256;break;case 4:for(h=L=0;L<Q;h=L+=1)c=t[n++],l=(h-h%A)/A,f=h<A?0:v[u-A],0===b?C=F=0:(C=v[(b-1)*Q+l*A+h%A],F=l&&v[(b-1)*Q+(l-1)*A+h%A]),p=f+C-F,B=Math.abs(p-f),w=Math.abs(p-C),m=Math.abs(p-F),g=B<=w&&B<=m?f:w<=m?C:F,v[u++]=(c+g)%256;break;default:throw new Error("Invalid filter algorithm: "+t[n-1])}if(!S){var x=((o+b*a)*i.width+r)*A,I=b*Q;for(h=0;h<H;h+=1){for(var P=0;P<A;P+=1)e[x++]=v[I++];x+=(s-1)*A}}b++}}return t=Object(r.a)(t),1==i.interlaceMethod?(o(0,0,8,8),o(4,0,8,8),o(0,4,4,8),o(2,0,4,4),o(0,2,2,4),o(1,0,2,2),o(0,1,1,2)):o(0,0,1,1),e},i.prototype.decodePalette=function(){var t,A,e,r,n,i,o,s,a;for(e=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+e.length),r=0,t=0,A=o=0,s=e.length;o<s;A=o+=3)n[r++]=e[A],n[r++]=e[A+1],n[r++]=e[A+2],n[r++]=null!=(a=i[t++])?a:255;return n},i.prototype.copyToImageData=function(t,A){var e,r,n,i,o,s,a,c,u,l,h;if(r=this.colors,u=null,e=this.hasAlphaChannel,this.palette.length&&(u=null!=(h=this._decodedPalette)?h:this._decodedPalette=this.decodePalette(),r=4,e=!0),c=(n=t.data||t).length,o=u||A,i=s=0,1===r)for(;i<c;)a=u?4*A[i/4]:s,l=o[a++],n[i++]=l,n[i++]=l,n[i++]=l,n[i++]=e?o[a++]:255,s=a;else for(;i<c;)a=u?4*A[i/4]:s,n[i++]=o[a++],n[i++]=o[a++],n[i++]=o[a++],n[i++]=e?o[a++]:255,s=a},i.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var o=function(){if("[object Window]"===Object.prototype.toString.call(n)){try{A=n.document.createElement("canvas"),e=A.getContext("2d")}catch(t){return!1}return!0}return!1};return o(),t=function(t){var r;if(!0===o())return e.width=t.width,e.height=t.height,e.clearRect(0,0,t.width,t.height),e.putImageData(t,0,0),(r=new Image).src=A.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},i.prototype.decodeFrames=function(A){var e,r,n,i,o,s,a,c;if(this.animation){for(c=[],r=o=0,s=(a=this.animation.frames).length;o<s;r=++o)e=a[r],n=A.createImageData(e.width,e.height),i=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(n,i),e.imageData=n,c.push(e.image=t(n));return c}},i.prototype.renderFrame=function(t,A){var e,r,n;return e=(r=this.animation.frames)[A],n=r[A-1],0===A&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===e.blendOp&&t.clearRect(e.xOffset,e.yOffset,e.width,e.height),t.drawImage(e.image,e.xOffset,e.yOffset)},i.prototype.animate=function(t){var A,e,r,n,i,o,s=this;return e=0,o=this.animation,n=o.numFrames,r=o.frames,i=o.numPlays,(A=function(){var o,a;if(o=e++%n,a=r[o],s.renderFrame(t,o),n>1&&e/n<i)return s.animation._timeout=setTimeout(A,a.delay)})()},i.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},i.prototype.render=function(t){var A,e;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,A=t.getContext("2d"),this.animation?(this.decodeFrames(A),this.animate(A)):(e=A.createImageData(this.width,this.height),this.copyToImageData(e,this.decodePixels()),A.putImageData(e,0,0))},i}();
/**
 * @license
 *
 * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
 *
 * 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.
 * ====================================================================
 */
/**
 * @license
 * (c) Dean McNamee <dean@gmail.com>, 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 Xt(t,A,e,r){for(var n=t[A++],i=1<<n,s=i+1,a=s+1,c=n+1,u=(1<<c)-1,l=0,h=0,f=0,d=t[A++],p=new Int32Array(4096),B=null;;){for(;l<16&&0!==d;)h|=t[A++]<<l,l+=8,1===d?d=t[A++]:--d;if(l<c)break;var g=h&u;if(h>>=c,l-=c,g!==i){if(g===s)break;for(var w=g<a?g:B,m=0,v=w;v>i;)v=p[v]>>8,++m;var b=v;if(f+m+(w!==g?1:0)>r)return void o.log("Warning, gif stream longer than expected.");e[f++]=b;var Q=f+=m;for(w!==g&&(e[f++]=b),v=w;m--;)v=p[v],e[--Q]=255&v,v>>=8;null!==B&&a<4096&&(p[a++]=B<<8|b,a>=u+1&&c<12&&(++c,u=u<<1|1)),B=g}else a=s+1,u=(1<<(c=n+1))-1,B=null}return f!==r&&o.log("Warning, gif stream shorter than expected."),e}
/**
 * @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 Jt(t){var A,e,r,n,i,o=Math.floor,s=new Array(64),a=new Array(64),c=new Array(64),u=new Array(64),l=new Array(65535),h=new Array(65535),f=new Array(64),d=new Array(64),p=[],B=0,g=7,w=new Array(64),m=new Array(64),v=new Array(64),b=new Array(256),Q=new Array(2048),C=[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],F=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],y=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],N=[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],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],_=[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 S(t,A){for(var e=0,r=0,n=new Array,i=1;i<=16;i++){for(var o=1;o<=t[i];o++)n[A[r]]=[],n[A[r]][0]=e,n[A[r]][1]=i,r++,e++;e*=2}return n}function x(t){for(var A=t[0],e=t[1]-1;e>=0;)A&1<<e&&(B|=1<<g),e--,--g<0&&(255==B?(I(255),I(0)):I(B),g=7,B=0)}function I(t){p.push(t)}function P(t){I(t>>8&255),I(255&t)}function T(t,A,e,r,n){for(var i,o=n[0],s=n[240],a=function(t,A){var e,r,n,i,o,s,a,c,u,l,h=0;for(u=0;u<8;++u){e=t[h],r=t[h+1],n=t[h+2],i=t[h+3],o=t[h+4],s=t[h+5],a=t[h+6];var d=e+(c=t[h+7]),p=e-c,B=r+a,g=r-a,w=n+s,m=n-s,v=i+o,b=i-o,Q=d+v,C=d-v,F=B+w,U=B-w;t[h]=Q+F,t[h+4]=Q-F;var y=.707106781*(U+C);t[h+2]=C+y,t[h+6]=C-y;var N=.382683433*((Q=b+m)-(U=g+p)),E=.5411961*Q+N,L=1.306562965*U+N,H=.707106781*(F=m+g),_=p+H,S=p-H;t[h+5]=S+E,t[h+3]=S-E,t[h+1]=_+L,t[h+7]=_-L,h+=8}for(h=0,u=0;u<8;++u){e=t[h],r=t[h+8],n=t[h+16],i=t[h+24],o=t[h+32],s=t[h+40],a=t[h+48];var x=e+(c=t[h+56]),I=e-c,P=r+a,T=r-a,R=n+s,O=n-s,K=i+o,M=i-o,k=x+K,D=x-K,z=P+R,j=P-R;t[h]=k+z,t[h+32]=k-z;var V=.707106781*(j+D);t[h+16]=D+V,t[h+48]=D-V;var q=.382683433*((k=M+O)-(j=T+I)),G=.5411961*k+q,X=1.306562965*j+q,J=.707106781*(z=O+T),W=I+J,Y=I-J;t[h+40]=Y+G,t[h+24]=Y-G,t[h+8]=W+X,t[h+56]=W-X,h++}for(u=0;u<64;++u)l=t[u]*A[u],f[u]=l>0?l+.5|0:l-.5|0;return f}(t,A),c=0;c<64;++c)d[C[c]]=a[c];var u=d[0]-e;e=d[0],0==u?x(r[0]):(x(r[h[i=32767+u]]),x(l[i]));for(var p=63;p>0&&0==d[p];)p--;if(0==p)return x(o),e;for(var B,g=1;g<=p;){for(var w=g;0==d[g]&&g<=p;)++g;var m=g-w;if(m>=16){B=m>>4;for(var v=1;v<=B;++v)x(s);m&=15}i=32767+d[g],x(n[(m<<4)+h[i]]),x(l[i]),g++}return 63!=p&&x(o),e}function R(t){t=Math.min(Math.max(t,1),100),i!=t&&(function(t){for(var A=[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],e=0;e<64;e++){var r=o((A[e]*t+50)/100);r=Math.min(Math.max(r,1),255),s[C[e]]=r}for(var n=[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],i=0;i<64;i++){var l=o((n[i]*t+50)/100);l=Math.min(Math.max(l,1),255),a[C[i]]=l}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,d=0;d<8;d++)for(var p=0;p<8;p++)c[f]=1/(s[C[f]]*h[d]*h[p]*8),u[f]=1/(a[C[f]]*h[d]*h[p]*8),f++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),i=t)}this.encode=function(t,i){i&&R(i),p=new Array,B=0,g=7,P(65496),P(65504),P(16),I(74),I(70),I(73),I(70),I(0),I(1),I(1),I(0),P(1),P(1),I(0),I(0),function(){P(65499),P(132),I(0);for(var t=0;t<64;t++)I(s[t]);I(1);for(var A=0;A<64;A++)I(a[A])}(),function(t,A){P(65472),P(17),I(8),P(A),P(t),I(3),I(1),I(17),I(0),I(2),I(17),I(1),I(3),I(17),I(1)}(t.width,t.height),function(){P(65476),P(418),I(0);for(var t=0;t<16;t++)I(F[t+1]);for(var A=0;A<=11;A++)I(U[A]);I(16);for(var e=0;e<16;e++)I(y[e+1]);for(var r=0;r<=161;r++)I(N[r]);I(1);for(var n=0;n<16;n++)I(E[n+1]);for(var i=0;i<=11;i++)I(L[i]);I(17);for(var o=0;o<16;o++)I(H[o+1]);for(var s=0;s<=161;s++)I(_[s])}(),P(65498),P(12),I(3),I(1),I(0),I(2),I(17),I(3),I(17),I(0),I(63),I(0);var o=0,l=0,h=0;B=0,g=7,this.encode.displayName="_encode_";for(var f,d,b,C,S,O,K,M,k,D=t.data,z=t.width,j=t.height,V=4*z,q=0;q<j;){for(f=0;f<V;){for(S=V*q+f,K=-1,M=0,k=0;k<64;k++)O=S+(M=k>>3)*V+(K=4*(7&k)),q+M>=j&&(O-=V*(q+1+M-j)),f+K>=V&&(O-=f+K-V+4),d=D[O++],b=D[O++],C=D[O++],w[k]=(Q[d]+Q[b+256>>0]+Q[C+512>>0]>>16)-128,m[k]=(Q[d+768>>0]+Q[b+1024>>0]+Q[C+1280>>0]>>16)-128,v[k]=(Q[d+1280>>0]+Q[b+1536>>0]+Q[C+1792>>0]>>16)-128;o=T(w,c,o,A,r),l=T(m,u,l,e,n),h=T(v,u,h,e,n),f+=32}q+=8}if(g>=0){var G=[];G[1]=g+1,G[0]=(1<<g+1)-1,x(G)}return P(65497),new Uint8Array(p)},t=t||50,function(){for(var t=String.fromCharCode,A=0;A<256;A++)b[A]=t(A)}(),A=S(F,U),e=S(E,L),r=S(y,N),n=S(H,_),function(){for(var t=1,A=2,e=1;e<=15;e++){for(var r=t;r<A;r++)h[32767+r]=e,l[32767+r]=[],l[32767+r][1]=e,l[32767+r][0]=r;for(var n=-(A-1);n<=-t;n++)h[32767+n]=e,l[32767+n]=[],l[32767+n][1]=e,l[32767+n][0]=A-1+n;t<<=1,A<<=1}}(),function(){for(var t=0;t<256;t++)Q[t]=19595*t,Q[t+256>>0]=38470*t,Q[t+512>>0]=7471*t+32768,Q[t+768>>0]=-11059*t,Q[t+1024>>0]=-21709*t,Q[t+1280>>0]=32768*t+8421375,Q[t+1536>>0]=-27439*t,Q[t+1792>>0]=-5329*t}(),R(t)}
/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function Wt(t,A){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!A,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 new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Yt(t){function A(t){if(!t)throw Error("assert :P")}function e(t,A,e){for(var r=0;4>r;r++)if(t[A+r]!=e.charCodeAt(r))return!0;return!1}function r(t,A,e,r,n){for(var i=0;i<n;i++)t[A+i]=e[r+i]}function n(t,A,e,r){for(var n=0;n<r;n++)t[A+n]=e}function i(t){return new Int32Array(t)}function o(t,A){for(var e=[],r=0;r<t;r++)e.push(new A);return e}function s(t,A){var e=[];return function t(e,r,n){for(var i=n[r],o=0;o<i&&(e.push(n.length>r+1?[]:new A),!(n.length<r+1));o++)t(e[o],r+1,n)}(e,0,t),e}function a(t,A){for(var e="",r=0;r<4;r++)e+=String.fromCharCode(t[A++]);return e}function c(t,A){return(t[A+0]<<0|t[A+1]<<8|t[A+2]<<16)>>>0}function u(t,A){return(t[A+0]<<0|t[A+1]<<8|t[A+2]<<16|t[A+3]<<24)>>>0}new(Yt=function(){var t=this;function a(t,A){for(var e=1<<A-1>>>0;t&e;)e>>>=1;return e?(t&e-1)+e:t}function c(t,e,r,n,i){A(!(n%r));do{t[e+(n-=r)]=i}while(0<n)}function u(t,e,r,n,o){if(A(2328>=o),512>=o)var s=i(512);else if(null==(s=i(o)))return 0;return function(t,e,r,n,o,s){var u,h,f=e,d=1<<r,p=i(16),B=i(16);for(A(0!=o),A(null!=n),A(null!=t),A(0<r),h=0;h<o;++h){if(15<n[h])return 0;++p[n[h]]}if(p[0]==o)return 0;for(B[1]=0,u=1;15>u;++u){if(p[u]>1<<u)return 0;B[u+1]=B[u]+p[u]}for(h=0;h<o;++h)u=n[h],0<n[h]&&(s[B[u]++]=h);if(1==B[15])return(n=new l).g=0,n.value=s[0],c(t,f,1,d,n),d;var g,w=-1,m=d-1,v=0,b=1,Q=1,C=1<<r;for(h=0,u=1,o=2;u<=r;++u,o<<=1){if(b+=Q<<=1,0>(Q-=p[u]))return 0;for(;0<p[u];--p[u])(n=new l).g=u,n.value=s[h++],c(t,f+v,o,C,n),v=a(v,u)}for(u=r+1,o=2;15>=u;++u,o<<=1){if(b+=Q<<=1,0>(Q-=p[u]))return 0;for(;0<p[u];--p[u]){if(n=new l,(v&m)!=w){for(f+=C,g=1<<(w=u)-r;15>w&&!(0>=(g-=p[w]));)++w,g<<=1;d+=C=1<<(g=w-r),t[e+(w=v&m)].g=g+r,t[e+w].value=f-e-w}n.g=u-r,n.value=s[h++],c(t,f+(v>>r),o,C,n),v=a(v,u)}}return b!=2*B[15]-1?0:d}(t,e,r,n,o,s)}function l(){this.value=this.g=0}function h(){this.value=this.g=0}function f(){this.G=o(5,l),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Ce,h)}function d(t,e,r,n){A(null!=t),A(null!=e),A(2147483648>n),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=e,t.pa=r,t.Jd=e,t.Yc=r+n,t.Zc=4<=n?r+n-4+1:r,y(t)}function p(t,A){for(var e=0;0<A--;)e|=E(t,128)<<A;return e}function B(t,A){var e=p(t,A);return N(t)?-e:e}function g(t,e,r,n){var i,o=0;for(A(null!=t),A(null!=e),A(4294967288>n),t.Sb=n,t.Ra=0,t.u=0,t.h=0,4<n&&(n=4),i=0;i<n;++i)o+=e[r+i]<<8*i;t.Ra=o,t.bb=n,t.oa=e,t.pa=r}function w(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<ye-8>>>0,++t.bb,t.u-=8;C(t)&&(t.h=1,t.u=0)}function m(t,e){if(A(0<=e),!t.h&&e<=Ue){var r=Q(t)&Fe[e];return t.u+=e,w(t),r}return t.h=1,t.u=0}function v(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function b(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Q(t){return t.Ra>>>(t.u&ye-1)>>>0}function C(t){return A(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>ye}function F(t,A){t.u=A,t.h=C(t)}function U(t){t.u>=Ne&&(A(t.u>=Ne),w(t))}function y(t){A(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(A(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function N(t){return p(t,1)}function E(t,A){var e=t.Ca;0>t.b&&y(t);var r=t.b,n=e*A>>>8,i=(t.I>>>r>n)+0;for(i?(e-=n,t.I-=n+1<<r>>>0):e=n+1,r=e,n=0;256<=r;)n+=8,r>>=8;return r=7^n+Ee[r],t.b-=r,t.Ca=(e<<r)-1,i}function L(t,A,e){t[A+0]=e>>24&255,t[A+1]=e>>16&255,t[A+2]=e>>8&255,t[A+3]=e>>0&255}function H(t,A){return t[A+0]<<0|t[A+1]<<8}function _(t,A){return H(t,A)|t[A+2]<<16}function S(t,A){return H(t,A)|H(t,A+2)<<16}function x(t,e){var r=1<<e;return A(null!=t),A(0<e),t.X=i(r),null==t.X?0:(t.Mb=32-e,t.Xa=e,1)}function I(t,e){A(null!=t),A(null!=e),A(t.Xa==e.Xa),r(e.X,0,t.X,0,1<<e.Xa)}function P(){this.X=[],this.Xa=this.Mb=0}function T(t,e,r,n){A(null!=r),A(null!=n);var i=r[0],o=n[0];return 0==i&&(i=(t*o+e/2)/e),0==o&&(o=(e*i+t/2)/t),0>=i||0>=o?0:(r[0]=i,n[0]=o,1)}function R(t,A){return t+(1<<A)-1>>>A}function O(t,A){return((4278255360&t)+(4278255360&A)>>>0&4278255360)+((16711935&t)+(16711935&A)>>>0&16711935)>>>0}function K(A,e){t[e]=function(e,r,n,i,o,s,a){var c;for(c=0;c<o;++c){var u=t[A](s[a+c-1],n,i+c);s[a+c]=O(e[r+c],u)}}}function M(){this.ud=this.hd=this.jd=0}function k(t,A){return((4278124286&(t^A))>>>1)+(t&A)>>>0}function D(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function z(t,A){return D(t+(t-A+.5>>1))}function j(t,A,e){return Math.abs(A-e)-Math.abs(t-e)}function V(t,A,e,r,n,i,o){for(r=i[o-1],e=0;e<n;++e)i[o+e]=r=O(t[A+e],r)}function q(t,A,e,r,n){var i;for(i=0;i<e;++i){var o=t[A+i],s=o>>8&255,a=16711935&(a=(a=16711935&o)+((s<<16)+s));r[n+i]=(4278255360&o)+a>>>0}}function G(t,A){A.jd=t>>0&255,A.hd=t>>8&255,A.ud=t>>16&255}function X(t,A,e,r,n,i){var o;for(o=0;o<r;++o){var s=A[e+o],a=s>>>8,c=s,u=255&(u=(u=s>>>16)+((t.jd<<24>>24)*(a<<24>>24)>>>5));c=255&(c=(c+=(t.hd<<24>>24)*(a<<24>>24)>>>5)+((t.ud<<24>>24)*(u<<24>>24)>>>5)),n[i+o]=(4278255360&s)+(u<<16)+c}}function J(A,e,r,n,i){t[e]=function(t,A,e,r,o,s,a,c,u){for(r=a;r<c;++r)for(a=0;a<u;++a)o[s++]=i(e[n(t[A++])])},t[A]=function(A,e,o,s,a,c,u){var l=8>>A.b,h=A.Ea,f=A.K[0],d=A.w;if(8>l)for(A=(1<<A.b)-1,d=(1<<l)-1;e<o;++e){var p,B=0;for(p=0;p<h;++p)p&A||(B=n(s[a++])),c[u++]=i(f[B&d]),B>>=l}else t["VP8LMapColor"+r](s,a,f,d,c,u,e,o,h)}}function W(t,A,e,r,n){for(e=A+e;A<e;){var i=t[A++];r[n++]=i>>16&255,r[n++]=i>>8&255,r[n++]=i>>0&255}}function Y(t,A,e,r,n){for(e=A+e;A<e;){var i=t[A++];r[n++]=i>>16&255,r[n++]=i>>8&255,r[n++]=i>>0&255,r[n++]=i>>24&255}}function Z(t,A,e,r,n){for(e=A+e;A<e;){var i=(o=t[A++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;r[n++]=i,r[n++]=o}}function $(t,A,e,r,n){for(e=A+e;A<e;){var i=(o=t[A++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[n++]=i,r[n++]=o}}function tt(t,A,e,r,n){for(e=A+e;A<e;){var i=t[A++];r[n++]=i>>0&255,r[n++]=i>>8&255,r[n++]=i>>16&255}}function At(t,A,e,n,i,o){if(0==o)for(e=A+e;A<e;)L(n,((o=t[A++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),i+=32;else r(n,i,t,A,e)}function et(A,e){t[e][0]=t[A+"0"],t[e][1]=t[A+"1"],t[e][2]=t[A+"2"],t[e][3]=t[A+"3"],t[e][4]=t[A+"4"],t[e][5]=t[A+"5"],t[e][6]=t[A+"6"],t[e][7]=t[A+"7"],t[e][8]=t[A+"8"],t[e][9]=t[A+"9"],t[e][10]=t[A+"10"],t[e][11]=t[A+"11"],t[e][12]=t[A+"12"],t[e][13]=t[A+"13"],t[e][14]=t[A+"0"],t[e][15]=t[A+"0"]}function rt(t){return t==Nr||t==Er||t==Lr||t==Hr}function nt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new function(){this.eb=[],this.size=this.A=this.fb=0},this.f.kb=new function(){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},this.sd=null}function it(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ot(t,A){var e=t.T,n=A.ba.f.RGBA,i=n.eb,o=n.fb+t.ka*n.A,s=An[A.ba.S],a=t.y,c=t.O,u=t.f,l=t.N,h=t.ea,f=t.W,d=A.cc,p=A.dc,B=A.Mc,g=A.Nc,w=t.ka,m=t.ka+t.T,v=t.U,b=v+1>>1;for(0==w?s(a,c,null,null,u,l,h,f,u,l,h,f,i,o,null,null,v):(s(A.ec,A.fc,a,c,d,p,B,g,u,l,h,f,i,o-n.A,i,o,v),++e);w+2<m;w+=2)d=u,p=l,B=h,g=f,l+=t.Rc,f+=t.Rc,o+=2*n.A,s(a,(c+=2*t.fa)-t.fa,a,c,d,p,B,g,u,l,h,f,i,o-n.A,i,o,v);return c+=t.fa,t.j+m<t.o?(r(A.ec,A.fc,a,c,v),r(A.cc,A.dc,u,l,b),r(A.Mc,A.Nc,h,f,b),e--):1&m||s(a,c,null,null,u,l,h,f,u,l,h,f,i,o+n.A,null,null,v),e}function st(t,e,r){var n=t.F,i=[t.J];if(null!=n){var o=t.U,s=e.ba.S,a=s==Fr||s==Lr;e=e.ba.f.RGBA;var c=[0],u=t.ka;c[0]=t.T,t.Kb&&(0==u?--c[0]:(--u,i[0]-=t.width),t.j+t.ka+t.T==t.o&&(c[0]=t.o-t.j-u));var l=e.eb;u=e.fb+u*e.A,t=cr(n,i[0],t.width,o,c,l,u+(a?0:3),e.A),A(r==c),t&&rt(s)&&sr(l,u,a,o,c,e.A)}return 0}function at(t){var A=t.ma,e=A.ba.S,r=11>e,n=e==br||e==Cr||e==Fr||e==Ur||12==e||rt(e);if(A.memory=null,A.Ib=null,A.Jb=null,A.Nd=null,!ve(A.Oa,t,n?11:12))return 0;if(n&&rt(e)&&re(),t.da)alert("todo:use_scaling");else{if(r){if(A.Ib=it,t.Kb){if(e=t.U+1>>1,A.memory=i(t.U+2*e),null==A.memory)return 0;A.ec=A.memory,A.fc=0,A.cc=A.ec,A.dc=A.fc+t.U,A.Mc=A.cc,A.Nc=A.dc+e,A.Ib=ot,re()}}else alert("todo:EmitYUV");n&&(A.Jb=st,r&&Ae())}if(r&&!Bn){for(t=0;256>t;++t)gn[t]=89858*(t-128)+ln>>un,vn[t]=-22014*(t-128)+ln,mn[t]=-45773*(t-128),wn[t]=113618*(t-128)+ln>>un;for(t=hn;t<fn;++t)A=76283*(t-16)+ln>>un,bn[t-hn]=Pt(A,255),Qn[t-hn]=Pt(A+8>>4,15);Bn=1}return 1}function ct(t){var e=t.ma,r=t.U,n=t.T;return A(!(1&t.ka)),0>=r||0>=n?0:(r=e.Ib(t,e),null!=e.Jb&&e.Jb(t,e,r),e.Dc+=r,1)}function ut(t){t.ma.memory=null}function lt(t,A,e,r){return 47!=m(t,8)?0:(A[0]=m(t,14)+1,e[0]=m(t,14)+1,r[0]=m(t,1),0!=m(t,3)?0:!t.h)}function ht(t,A){if(4>t)return t+1;var e=t-2>>1;return(2+(1&t)<<e)+m(A,e)+1}function ft(t,A){return 120<A?A-120:1<=(e=((e=Tr[A-1])>>4)*t+(8-(15&e)))?e:1;var e}function dt(t,A,e){var r=Q(e),n=t[A+=255&r].g-8;return 0<n&&(F(e,e.u+8),r=Q(e),A+=t[A].value,A+=r&(1<<n)-1),F(e,e.u+t[A].g),t[A].value}function pt(t,e,r){return r.g+=t.g,r.value+=t.value<<e>>>0,A(8>=r.g),t.g}function Bt(t,e,r){var n=t.xc;return A((e=0==n?0:t.vc[t.md*(r>>n)+(e>>n)])<t.Wb),t.Ya[e]}function gt(t,e,n,i){var o=t.ab,s=t.c*e,a=t.C;e=a+e;var c=n,u=i;for(i=t.Ta,n=t.Ua;0<o--;){var l=t.gc[o],h=a,f=e,d=c,p=u,B=(u=i,c=n,l.Ea);switch(A(h<f),A(f<=l.nc),l.hc){case 2:_e(d,p,(f-h)*B,u,c);break;case 0:var g=h,w=f,m=u,v=c,b=(y=l).Ea;0==g&&(Le(d,p,null,null,1,m,v),V(d,p+1,0,0,b-1,m,v+1),p+=b,v+=b,++g);for(var Q=1<<y.b,C=Q-1,F=R(b,y.b),U=y.K,y=y.w+(g>>y.b)*F;g<w;){var N=U,E=y,L=1;for(He(d,p,m,v-b,1,m,v);L<b;){var H=(L&~C)+Q;H>b&&(H=b),(0,Te[N[E++]>>8&15])(d,p+ +L,m,v+L-b,H-L,m,v+L),L=H}p+=b,v+=b,++g&C||(y+=F)}f!=l.nc&&r(u,c-B,u,c+(f-h-1)*B,B);break;case 1:for(B=d,w=p,b=(d=l.Ea)-(v=d&~(m=(p=1<<l.b)-1)),g=R(d,l.b),Q=l.K,l=l.w+(h>>l.b)*g;h<f;){for(C=Q,F=l,U=new M,y=w+v,N=w+d;w<y;)G(C[F++],U),Re(U,B,w,p,u,c),w+=p,c+=p;w<N&&(G(C[F++],U),Re(U,B,w,b,u,c),w+=b,c+=b),++h&m||(l+=g)}break;case 3:if(d==u&&p==c&&0<l.b){for(w=u,d=B=c+(f-h)*B-(v=(f-h)*R(l.Ea,l.b)),p=u,m=c,g=[],v=(b=v)-1;0<=v;--v)g[v]=p[m+v];for(v=b-1;0<=v;--v)w[d+v]=g[v];Se(l,h,f,u,B,u,c)}else Se(l,h,f,d,p,u,c)}c=i,u=n}u!=n&&r(i,n,c,u,s)}function wt(t,e){var r=t.V,n=t.Ba+t.c*t.C,i=e-t.C;if(A(e<=t.l.o),A(16>=i),0<i){var o=t.l,s=t.Ta,a=t.Ua,c=o.width;if(gt(t,i,r,n),i=a=[a],A((r=t.C)<(n=e)),A(o.v<o.va),n>o.o&&(n=o.o),r<o.j){var u=o.j-r;r=o.j,i[0]+=u*c}if(r>=n?r=0:(i[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=n-r,r=1),r){if(a=a[0],11>(r=t.ca).S){var l=r.f.RGBA,h=(n=r.S,i=o.U,o=o.T,u=l.eb,l.A),f=o;for(l=l.fb+t.Ma*l.A;0<f--;){var d=s,p=a,B=i,g=u,w=l;switch(n){case vr:Oe(d,p,B,g,w);break;case br:Ke(d,p,B,g,w);break;case Nr:Ke(d,p,B,g,w),sr(g,w,0,B,1,0);break;case Qr:De(d,p,B,g,w);break;case Cr:At(d,p,B,g,w,1);break;case Er:At(d,p,B,g,w,1),sr(g,w,0,B,1,0);break;case Fr:At(d,p,B,g,w,0);break;case Lr:At(d,p,B,g,w,0),sr(g,w,1,B,1,0);break;case Ur:Me(d,p,B,g,w);break;case Hr:Me(d,p,B,g,w),ar(g,w,B,1,0);break;case yr:ke(d,p,B,g,w);break;default:A(0)}a+=c,l+=h}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");A(t.Ma<=r.height)}}t.C=e,A(t.C<=t.i)}function mt(t){var A;if(0<t.ua)return 0;for(A=0;A<t.Wb;++A){var e=t.Ya[A].G,r=t.Ya[A].H;if(0<e[1][r[1]+0].g||0<e[2][r[2]+0].g||0<e[3][r[3]+0].g)return 0}return 1}function vt(t,e,r,n,i,o){if(0!=t.Z){var s=t.qd,a=t.rd;for(A(null!=tn[t.Z]);e<r;++e)tn[t.Z](s,a,n,i,n,i,o),s=n,a=i,i+=o;t.qd=s,t.rd=a}}function bt(t,e){var r=t.l.ma,n=0==r.Z||1==r.Z?t.l.j:t.C;if(n=t.C<n?n:t.C,A(e<=t.l.o),e>n){var i=t.l.width,o=r.ca,s=r.tb+i*n,a=t.V,c=t.Ba+t.c*n,u=t.gc;A(1==t.ab),A(3==u[0].hc),Ie(u[0],n,e,a,c,o,s),vt(r,n,e,o,s,i)}t.C=t.Ma=e}function Qt(t,e,r,n,i,o,s){var a=t.$/n,c=t.$%n,u=t.m,l=t.s,h=r+t.$,f=h;i=r+n*i;var d=r+n*o,p=280+l.ua,B=t.Pb?a:16777216,g=0<l.ua?l.Wa:null,w=l.wc,m=h<d?Bt(l,c,a):null;A(t.C<o),A(d<=i);var v=!1;t:for(;;){for(;v||h<d;){var b=0;if(a>=B){var y=h-r;A((B=t).Pb),B.wd=B.m,B.xd=y,0<B.s.ua&&I(B.s.Wa,B.s.vb),B=a+Or}if(c&w||(m=Bt(l,c,a)),A(null!=m),m.Qb&&(e[h]=m.qb,v=!0),!v)if(U(u),m.jc){b=u,y=e;var N=h,E=m.pd[Q(b)&Ce-1];A(m.jc),256>E.g?(F(b,b.u+E.g),y[N]=E.value,b=0):(F(b,b.u+E.g-256),A(256<=E.value),b=E.value),0==b&&(v=!0)}else b=dt(m.G[0],m.H[0],u);if(u.h)break;if(v||256>b){if(!v)if(m.nd)e[h]=(m.qb|b<<8)>>>0;else{if(U(u),v=dt(m.G[1],m.H[1],u),U(u),y=dt(m.G[2],m.H[2],u),N=dt(m.G[3],m.H[3],u),u.h)break;e[h]=(N<<24|v<<16|b<<8|y)>>>0}if(v=!1,++h,++c>=n&&(c=0,++a,null!=s&&a<=o&&!(a%16)&&s(t,a),null!=g))for(;f<h;)b=e[f++],g.X[(506832829*b&4294967295)>>>g.Mb]=b}else if(280>b){if(b=ht(b-256,u),y=dt(m.G[4],m.H[4],u),U(u),y=ft(n,y=ht(y,u)),u.h)break;if(h-r<y||i-h<b)break t;for(N=0;N<b;++N)e[h+N]=e[h+N-y];for(h+=b,c+=b;c>=n;)c-=n,++a,null!=s&&a<=o&&!(a%16)&&s(t,a);if(A(h<=i),c&w&&(m=Bt(l,c,a)),null!=g)for(;f<h;)b=e[f++],g.X[(506832829*b&4294967295)>>>g.Mb]=b}else{if(!(b<p))break t;for(v=b-280,A(null!=g);f<h;)b=e[f++],g.X[(506832829*b&4294967295)>>>g.Mb]=b;b=h,A(!(v>>>(y=g).Xa)),e[b]=y.X[v],v=!0}v||A(u.h==C(u))}if(t.Pb&&u.h&&h<i)A(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&I(t.s.vb,t.s.Wa);else{if(u.h)break t;null!=s&&s(t,a>o?o:a),t.a=0,t.$=h-r}return 1}return t.a=3,0}function Ct(t){A(null!=t),t.vc=null,t.yc=null,t.Ya=null;var e=t.Wa;null!=e&&(e.X=null),t.vb=null,A(null!=t)}function Ft(){var A=new function(){this.xb=this.a=0,this.l=new Tt,this.ca=new nt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new b,this.Pb=0,this.wd=new b,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new function(){this.ua=0,this.Wa=new P,this.vb=new P,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new f,this.yc=new l},this.ab=0,this.gc=o(4,qA),this.Oc=0};return null==A?null:(A.a=0,A.xb=$r,et("Predictor","VP8LPredictors"),et("Predictor","VP8LPredictors_C"),et("PredictorAdd","VP8LPredictorsAdd"),et("PredictorAdd","VP8LPredictorsAdd_C"),_e=q,Re=X,Oe=W,Ke=Y,Me=Z,ke=$,De=tt,t.VP8LMapColor32b=xe,t.VP8LMapColor8b=Pe,A)}function Ut(t,e,r,s,a){var c=1,h=[t],d=[e],p=s.m,B=s.s,g=null,w=0;t:for(;;){if(r)for(;c&&m(p,1);){var v=h,b=d,C=s,y=1,N=C.m,E=C.gc[C.ab],L=m(N,2);if(C.Oc&1<<L)c=0;else{switch(C.Oc|=1<<L,E.hc=L,E.Ea=v[0],E.nc=b[0],E.K=[null],++C.ab,A(4>=C.ab),L){case 0:case 1:E.b=m(N,3)+2,y=Ut(R(E.Ea,E.b),R(E.nc,E.b),0,C,E.K),E.K=E.K[0];break;case 3:var H,_=m(N,8)+1,S=16<_?0:4<_?1:2<_?2:3;if(v[0]=R(E.Ea,S),E.b=S,H=y=Ut(_,1,0,C,E.K)){var I,P=_,T=E,K=1<<(8>>T.b),M=i(K);if(null==M)H=0;else{var k=T.K[0],D=T.w;for(M[0]=T.K[0][0],I=1;I<1*P;++I)M[I]=O(k[D+I],M[I-1]);for(;I<4*K;++I)M[I]=0;T.K[0]=null,T.K[0]=M,H=1}}y=H;break;case 2:break;default:A(0)}c=y}}if(h=h[0],d=d[0],c&&m(p,1)&&!(c=1<=(w=m(p,4))&&11>=w)){s.a=3;break t}var z;if(z=c)A:{var j,V,q,G=s,X=h,J=d,W=w,Y=r,Z=G.m,$=G.s,tt=[null],At=1,et=0,rt=Rr[W];e:for(;;){if(Y&&m(Z,1)){var nt=m(Z,3)+2,it=R(X,nt),ot=R(J,nt),st=it*ot;if(!Ut(it,ot,0,G,tt))break e;for(tt=tt[0],$.xc=nt,j=0;j<st;++j){var at=tt[j]>>8&65535;tt[j]=at,at>=At&&(At=at+1)}}if(Z.h)break e;for(V=0;5>V;++V){var ct=xr[V];!V&&0<W&&(ct+=1<<W),et<ct&&(et=ct)}var ut=o(At*rt,l),lt=At,ht=o(lt,f);if(null==ht)var ft=null;else A(65536>=lt),ft=ht;var dt=i(et);if(null==ft||null==dt||null==ut){G.a=1;break e}var Bt=ut;for(j=q=0;j<At;++j){var gt=ft[j],wt=gt.G,mt=gt.H,vt=0,bt=1,Ft=0;for(V=0;5>V;++V){ct=xr[V],wt[V]=Bt,mt[V]=q,!V&&0<W&&(ct+=1<<W);r:{var yt,Nt=ct,Et=G,Lt=dt,Ht=Bt,_t=q,St=0,xt=Et.m,It=m(xt,1);if(n(Lt,0,0,Nt),It){var Pt=m(xt,1)+1,Tt=m(xt,0==m(xt,1)?1:8);Lt[Tt]=1,2==Pt&&(Lt[Tt=m(xt,8)]=1);var Rt=1}else{var Ot=i(19),Kt=m(xt,4)+4;if(19<Kt){Et.a=3;var Mt=0;break r}for(yt=0;yt<Kt;++yt)Ot[Pr[yt]]=m(xt,3);var kt=void 0,Dt=void 0,zt=Et,jt=Ot,Vt=Nt,qt=Lt,Gt=0,Xt=zt.m,Jt=8,Wt=o(128,l);n:for(;u(Wt,0,7,jt,19);){if(m(Xt,1)){if((kt=2+m(Xt,2+2*m(Xt,3)))>Vt)break n}else kt=Vt;for(Dt=0;Dt<Vt&&kt--;){U(Xt);var Yt=Wt[0+(127&Q(Xt))];F(Xt,Xt.u+Yt.g);var Zt=Yt.value;if(16>Zt)qt[Dt++]=Zt,0!=Zt&&(Jt=Zt);else{var $t=16==Zt,tA=Zt-16,AA=Sr[tA],eA=m(Xt,_r[tA])+AA;if(Dt+eA>Vt)break n;for(var rA=$t?Jt:0;0<eA--;)qt[Dt++]=rA}}Gt=1;break n}Gt||(zt.a=3),Rt=Gt}(Rt=Rt&&!xt.h)&&(St=u(Ht,_t,8,Lt,Nt)),Rt&&0!=St?Mt=St:(Et.a=3,Mt=0)}if(0==Mt)break e;if(bt&&1==Ir[V]&&(bt=0==Bt[q].g),vt+=Bt[q].g,q+=Mt,3>=V){var nA,iA=dt[0];for(nA=1;nA<ct;++nA)dt[nA]>iA&&(iA=dt[nA]);Ft+=iA}}if(gt.nd=bt,gt.Qb=0,bt&&(gt.qb=(wt[3][mt[3]+0].value<<24|wt[1][mt[1]+0].value<<16|wt[2][mt[2]+0].value)>>>0,0==vt&&256>wt[0][mt[0]+0].value&&(gt.Qb=1,gt.qb+=wt[0][mt[0]+0].value<<8)),gt.jc=!gt.Qb&&6>Ft,gt.jc){var oA,sA=gt;for(oA=0;oA<Ce;++oA){var aA=oA,cA=sA.pd[aA],uA=sA.G[0][sA.H[0]+aA];256<=uA.value?(cA.g=uA.g+256,cA.value=uA.value):(cA.g=0,cA.value=0,aA>>=pt(uA,8,cA),aA>>=pt(sA.G[1][sA.H[1]+aA],16,cA),aA>>=pt(sA.G[2][sA.H[2]+aA],0,cA),pt(sA.G[3][sA.H[3]+aA],24,cA))}}}$.vc=tt,$.Wb=At,$.Ya=ft,$.yc=ut,z=1;break A}z=0}if(!(c=z)){s.a=3;break t}if(0<w){if(B.ua=1<<w,!x(B.Wa,w)){s.a=1,c=0;break t}}else B.ua=0;var lA=s,hA=h,fA=d,dA=lA.s,pA=dA.xc;if(lA.c=hA,lA.i=fA,dA.md=R(hA,pA),dA.wc=0==pA?-1:(1<<pA)-1,r){s.xb=Zr;break t}if(null==(g=i(h*d))){s.a=1,c=0;break t}c=(c=Qt(s,g,0,h,d,d,null))&&!p.h;break t}return c?(null!=a?a[0]=g:(A(null==g),A(r)),s.$=0,r||Ct(B)):Ct(B),c}function yt(t,e){var r=t.c*t.i,n=r+e+16*e;return A(t.c<=e),t.V=i(n),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+r+e,1)}function Nt(t,e){var r=t.C,n=e-r,i=t.V,o=t.Ba+t.c*r;for(A(e<=t.l.o);0<n;){var s=16<n?16:n,a=t.l.ma,c=t.l.width,u=c*s,l=a.ca,h=a.tb+c*r,f=t.Ta,d=t.Ua;gt(t,s,i,o),ur(f,d,l,h,u),vt(a,r,r+s,l,h,c),n-=s,i+=s*t.c,r+=s}A(r==e),t.C=t.Ma=e}function Et(){var t;this.Yb=(function t(A,e,r){for(var n=r[e],i=0;i<n&&(A.push(r.length>e+1?[]:0),!(r.length<e+1));i++)t(A[i],e+1,r)}(t=[],0,[3,11]),t)}function Lt(){this.ld=this.La=this.dd=this.tc=0}function Ht(){this.Na=this.la=0}function _t(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function St(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function xt(){this.y=i(16),this.f=i(8),this.ea=i(8)}function It(){this.cb=this.a=0,this.sc="",this.m=new v,this.Od=new function(){this.ub=this.yd=this.td=this.Rb=0},this.Kc=new function(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0},this.ed=new function(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)},this.Qa=new function(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)},this.Ic=this.$c=this.Aa=0,this.D=new function(){this.uc=this.M=this.Nb=0,this.wa=Array(new Lt),this.Y=0,this.ya=Array(new St),this.aa=0,this.l=new Tt},this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,v),this.ia=0,this.pb=o(4,_t),this.Pa=new function(){this.jb=i(3),this.Wc=s([4,8],Et),this.Xc=s([4,17],Et)},this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new xt),this.Hd=0,this.rb=Array(new Ht),this.sb=0,this.wa=Array(new Lt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new St),this.L=this.aa=0,this.gd=s([4,2],Lt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Pt(t,A){return 0>t?0:t>A?A:t}function Tt(){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 Rt(t,A,e){return 0==t.a&&(t.a=A,t.sc=e,t.cb=0),0}function Ot(t,A,e){return 3<=e&&157==t[A+0]&&1==t[A+1]&&42==t[A+2]}function Kt(t,e){if(null==t)return 0;if(t.a=0,t.sc="OK",null==e)return Rt(t,2,"null VP8Io passed to VP8GetHeaders()");var r=e.data,i=e.w,o=e.ha;if(4>o)return Rt(t,7,"Truncated header.");var s=r[i+0]|r[i+1]<<8|r[i+2]<<16,a=t.Od;if(a.Rb=!(1&s),a.td=s>>1&7,a.yd=s>>4&1,a.ub=s>>5,3<a.td)return Rt(t,3,"Incorrect keyframe parameters.");if(!a.yd)return Rt(t,4,"Frame not displayable.");i+=3,o-=3;var c=t.Kc;if(a.Rb){if(7>o)return Rt(t,7,"cannot parse picture header");if(!Ot(r,i,o))return Rt(t,3,"Bad code word");c.c=16383&(r[i+4]<<8|r[i+3]),c.Td=r[i+4]>>6,c.i=16383&(r[i+6]<<8|r[i+5]),c.Ud=r[i+6]>>6,i+=7,o-=7,t.za=c.c+15>>4,t.Ub=c.i+15>>4,e.width=c.c,e.height=c.i,e.Da=0,e.j=0,e.v=0,e.va=e.width,e.o=e.height,e.da=0,e.ib=e.width,e.hb=e.height,e.U=e.width,e.T=e.height,n((s=t.Pa).jb,0,255,s.jb.length),A(null!=(s=t.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,n(s.Zb,0,0,s.Zb.length),n(s.Lb,0,0,s.Lb)}if(a.ub>o)return Rt(t,7,"bad partition length");d(s=t.m,r,i,a.ub),i+=a.ub,o-=a.ub,a.Rb&&(c.Ld=N(s),c.Kd=N(s)),c=t.Qa;var u,l=t.Pa;if(A(null!=s),A(null!=c),c.Cb=N(s),c.Cb){if(c.Bb=N(s),N(s)){for(c.Fb=N(s),u=0;4>u;++u)c.Zb[u]=N(s)?B(s,7):0;for(u=0;4>u;++u)c.Lb[u]=N(s)?B(s,6):0}if(c.Bb)for(u=0;3>u;++u)l.jb[u]=N(s)?p(s,8):255}else c.Bb=0;if(s.Ka)return Rt(t,3,"cannot parse segment header");if((c=t.ed).zd=N(s),c.Tb=p(s,6),c.wb=p(s,3),c.Pc=N(s),c.Pc&&N(s)){for(l=0;4>l;++l)N(s)&&(c.vd[l]=B(s,6));for(l=0;4>l;++l)N(s)&&(c.od[l]=B(s,6))}if(t.L=0==c.Tb?0:c.zd?1:2,s.Ka)return Rt(t,3,"cannot parse filter header");var h=o;if(o=u=i,i=u+h,c=h,t.Xb=(1<<p(t.m,2))-1,h<3*(l=t.Xb))r=7;else{for(u+=3*l,c-=3*l,h=0;h<l;++h){var f=r[o+0]|r[o+1]<<8|r[o+2]<<16;f>c&&(f=c),d(t.Jc[+h],r,u,f),u+=f,c-=f,o+=3}d(t.Jc[+l],r,u,c),r=u<i?0:5}if(0!=r)return Rt(t,r,"cannot parse partitions");for(r=p(u=t.m,7),o=N(u)?B(u,4):0,i=N(u)?B(u,4):0,c=N(u)?B(u,4):0,l=N(u)?B(u,4):0,u=N(u)?B(u,4):0,h=t.Qa,f=0;4>f;++f){if(h.Cb){var g=h.Zb[f];h.Fb||(g+=r)}else{if(0<f){t.pb[f]=t.pb[0];continue}g=r}var w=t.pb[f];w.Sc[0]=Kr[Pt(g+o,127)],w.Sc[1]=Mr[Pt(g+0,127)],w.Eb[0]=2*Kr[Pt(g+i,127)],w.Eb[1]=101581*Mr[Pt(g+c,127)]>>16,8>w.Eb[1]&&(w.Eb[1]=8),w.Qc[0]=Kr[Pt(g+l,117)],w.Qc[1]=Mr[Pt(g+u,127)],w.lc=g+u}if(!a.Rb)return Rt(t,4,"Not a key frame.");for(N(s),a=t.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(i=0;3>i;++i)for(c=0;11>c;++c)l=E(s,Gr[r][o][i][c])?p(s,8):Vr[r][o][i][c],a.Wc[r][o].Yb[i][c]=l;for(o=0;17>o;++o)a.Xc[r][o]=a.Wc[r][Xr[o]]}return t.kc=N(s),t.kc&&(t.Bd=p(s,8)),t.cb=1}function Mt(t,A,e,r,n,i,o){var s=A[n].Yb[e];for(e=0;16>n;++n){if(!E(t,s[e+0]))return n;for(;!E(t,s[e+1]);)if(s=A[++n].Yb[0],e=0,16==n)return 16;var a=A[n+1].Yb;if(E(t,s[e+2])){var c=t,u=0;if(E(c,(h=s)[(l=e)+3]))if(E(c,h[l+6])){for(s=0,l=2*(u=E(c,h[l+8]))+(h=E(c,h[l+9+u])),u=0,h=Dr[l];h[s];++s)u+=u+E(c,h[s]);u+=3+(8<<l)}else E(c,h[l+7])?(u=7+2*E(c,165),u+=E(c,145)):u=5+E(c,159);else u=E(c,h[l+4])?3+E(c,h[l+5]):2;s=a[2]}else u=1,s=a[1];a=o+zr[n],0>(c=t).b&&y(c);var l,h=c.b,f=(l=c.Ca>>1)-(c.I>>h)>>31;--c.b,c.Ca+=f,c.Ca|=1,c.I-=(l+1&f)<<h,i[a]=((u^f)-f)*r[(0<n)+0]}return 16}function kt(t){var A=t.rb[t.sb-1];A.la=0,A.Na=0,n(t.zc,0,0,t.zc.length),t.ja=0}function Dt(t,e){if(null==t)return 0;if(null==e)return Rt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Kt(t,e))return 0;if(A(t.cb),null==e.ac||e.ac(e)){e.ob&&(t.L=0);var s=Fn[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=e.v-s>>4,t.zb=e.j-s>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=e.o+15+s>>4,t.Hb=e.va+15+s>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var a=t.ed;for(s=0;4>s;++s){var c;if(t.Qa.Cb){var u=t.Qa.Lb[s];t.Qa.Fb||(u+=a.Tb)}else u=a.Tb;for(c=0;1>=c;++c){var l=t.gd[s][c],h=u;if(a.Pc&&(h+=a.vd[0],c&&(h+=a.od[0])),0<(h=0>h?0:63<h?63:h)){var f=h;0<a.wb&&(f=4<a.wb?f>>2:f>>1)>9-a.wb&&(f=9-a.wb),1>f&&(f=1),l.dd=f,l.tc=2*h+f,l.ld=40<=h?2:15<=h?1:0}else l.tc=0;l.La=c}}}s=0}else Rt(t,6,"Frame setup failed"),s=t.a;if(s=0==s){if(s){t.$c=0,0<t.Aa||(t.Ic=yn);t:{s=t.Ic,a=4*(f=t.za);var d=32*f,p=f+1,B=0<t.L?f*(0<t.Aa?2:1):0,g=(2==t.Aa?2:1)*f;if((l=a+832+(c=3*(16*s+Fn[t.L])/2*d)+(u=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=l)s=0;else{if(l>t.Vb){if(t.Vb=0,t.Ec=i(l),t.Fc=0,null==t.Ec){s=Rt(t,1,"no memory during frame initialization.");break t}t.Vb=l}l=t.Ec,h=t.Fc,t.Ac=l,t.Bc=h,h+=a,t.Gd=o(d,xt),t.Hd=0,t.rb=o(p+1,Ht),t.sb=1,t.wa=B?o(B,Lt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=f),A(!0),t.oc=l,t.pc=h,h+=832,t.ya=o(g,St),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=f),t.R=16*f,t.B=8*f,f=(d=Fn[t.L])*t.R,d=d/2*t.B,t.sa=l,t.ta=h+f,t.qa=t.sa,t.ra=t.ta+16*s*t.R+d,t.Ha=t.qa,t.Ia=t.ra+8*s*t.B+d,t.$c=0,h+=c,t.mb=u?l:null,t.nb=u?h:null,A(h+u<=t.Fc+t.Vb),kt(t),n(t.Ac,t.Bc,0,a),s=1}}if(s){if(e.ka=0,e.y=t.sa,e.O=t.ta,e.f=t.qa,e.N=t.ra,e.ea=t.Ha,e.Vd=t.Ia,e.fa=t.R,e.Rc=t.B,e.F=null,e.J=0,!pr){for(s=-255;255>=s;++s)lr[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)hr[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)fr[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)dr[255+s]=0>s?0:255<s?255:s;pr=1}ze=Zt,je=Xt,qe=Jt,Ge=Wt,Xe=Yt,Ve=Gt,Je=RA,We=OA,Ye=kA,Ze=DA,$e=KA,tr=MA,Ar=zA,er=jA,rr=_A,nr=SA,ir=xA,or=IA,Wr[0]=fA,Wr[1]=tA,Wr[2]=lA,Wr[3]=hA,Wr[4]=dA,Wr[5]=BA,Wr[6]=pA,Wr[7]=gA,Wr[8]=mA,Wr[9]=wA,Jr[0]=oA,Jr[1]=eA,Jr[2]=rA,Jr[3]=nA,Jr[4]=sA,Jr[5]=aA,Jr[6]=cA,Yr[0]=CA,Yr[1]=AA,Yr[2]=vA,Yr[3]=bA,Yr[4]=UA,Yr[5]=FA,Yr[6]=yA,s=1}else s=0}s&&(s=function(t,e){for(t.M=0;t.M<t.Va;++t.M){var o,s=t.Jc[t.M&t.Xb],a=t.m,c=t;for(o=0;o<c.za;++o){var u=a,l=c,h=l.Ac,f=l.Bc+4*o,d=l.zc,p=l.ya[l.aa+o];if(l.Qa.Bb?p.$b=E(u,l.Pa.jb[0])?2+E(u,l.Pa.jb[2]):E(u,l.Pa.jb[1]):p.$b=0,l.kc&&(p.Ad=E(u,l.Bd)),p.Za=!E(u,145)+0,p.Za){var B=p.Ob,g=0;for(l=0;4>l;++l){var w,m=d[0+l];for(w=0;4>w;++w){m=qr[h[f+w]][m];for(var v=jr[E(u,m[0])];0<v;)v=jr[2*v+E(u,m[v])];m=-v,h[f+w]=m}r(B,g,h,f,4),g+=4,d[0+l]=m}}else m=E(u,156)?E(u,128)?1:3:E(u,163)?2:0,p.Ob[0]=m,n(h,f,m,4),n(d,0,m,4);p.Dd=E(u,142)?E(u,114)?E(u,183)?1:3:2:0}if(c.m.Ka)return Rt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(c=s,u=(a=t).rb[a.sb-1],h=a.rb[a.sb+a.ja],o=a.ya[a.aa+a.ja],f=a.kc?o.Ad:0)u.la=h.la=0,o.Za||(u.Na=h.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var b,Q;if(u=h,h=c,f=a.Pa.Xc,d=a.ya[a.aa+a.ja],p=a.pb[d.$b],l=d.ad,B=0,g=a.rb[a.sb-1],m=w=0,n(l,B,0,384),d.Za)var C=0,F=f[3];else{v=i(16);var U=u.Na+g.Na;if(U=kr(h,f[1],U,p.Eb,0,v,0),u.Na=g.Na=(0<U)+0,1<U)ze(v,0,l,B);else{var y=v[0]+3>>3;for(v=0;256>v;v+=16)l[B+v]=y}C=1,F=f[0]}var N=15&u.la,L=15&g.la;for(v=0;4>v;++v){var H=1&L;for(y=Q=0;4>y;++y)N=N>>1|(H=(U=kr(h,F,U=H+(1&N),p.Sc,C,l,B))>C)<<7,Q=Q<<2|(3<U?3:1<U?2:0!=l[B+0]),B+=16;N>>=4,L=L>>1|H<<7,w=(w<<8|Q)>>>0}for(F=N,C=L>>4,b=0;4>b;b+=2){for(Q=0,N=u.la>>4+b,L=g.la>>4+b,v=0;2>v;++v){for(H=1&L,y=0;2>y;++y)U=H+(1&N),N=N>>1|(H=0<(U=kr(h,f[2],U,p.Qc,0,l,B)))<<3,Q=Q<<2|(3<U?3:1<U?2:0!=l[B+0]),B+=16;N>>=2,L=L>>1|H<<5}m|=Q<<4*b,F|=N<<4<<b,C|=(240&L)<<b}u.la=F,g.la=C,d.Hc=w,d.Gc=m,d.ia=43690&m?0:p.ia,f=!(w|m)}if(0<a.L&&(a.wa[a.Y+a.ja]=a.gd[o.$b][o.Za],a.wa[a.Y+a.ja].La|=!f),c.Ka)return Rt(t,7,"Premature end-of-file encountered.")}if(kt(t),a=e,c=1,o=(s=t).D,u=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=u,we(s,o),c=1,o=(Q=s.D).Nb,u=(m=Fn[s.L])*s.R,h=m/2*s.B,v=16*o*s.R,y=8*o*s.B,f=s.sa,d=s.ta-u+v,p=s.qa,l=s.ra-h+y,B=s.Ha,g=s.Ia-h+y,L=0==(N=Q.M),w=N>=s.Va-1,2==s.Aa&&we(s,Q),Q.uc)for(H=(U=s).D.M,A(U.D.uc),Q=U.yb;Q<U.Hb;++Q){C=Q,F=H;var _=(S=(k=U).D).Nb;b=k.R;var S=S.wa[S.Y+C],x=k.sa,I=k.ta+16*_*b+16*C,P=S.dd,T=S.tc;if(0!=T)if(A(3<=T),1==k.L)0<C&&nr(x,I,b,T+4),S.La&&or(x,I,b,T),0<F&&rr(x,I,b,T+4),S.La&&ir(x,I,b,T);else{var R=k.B,O=k.qa,K=k.ra+8*_*R+8*C,M=k.Ha,k=k.Ia+8*_*R+8*C;_=S.ld,0<C&&(We(x,I,b,T+4,P,_),Ze(O,K,M,k,R,T+4,P,_)),S.La&&(tr(x,I,b,T,P,_),er(O,K,M,k,R,T,P,_)),0<F&&(Je(x,I,b,T+4,P,_),Ye(O,K,M,k,R,T+4,P,_)),S.La&&($e(x,I,b,T,P,_),Ar(O,K,M,k,R,T,P,_))}}if(s.ia&&alert("todo:DitherRow"),null!=a.put){if(Q=16*N,N=16*(N+1),L?(a.y=s.sa,a.O=s.ta+v,a.f=s.qa,a.N=s.ra+y,a.ea=s.Ha,a.W=s.Ia+y):(Q-=m,a.y=f,a.O=d,a.f=p,a.N=l,a.ea=B,a.W=g),w||(N-=m),N>a.o&&(N=a.o),a.F=null,a.J=null,null!=s.Fa&&0<s.Fa.length&&Q<N&&(a.J=WA(s,a,Q,N-Q),a.F=s.mb,null==a.F&&0==a.F.length)){c=Rt(s,3,"Could not decode alpha data.");break t}Q<a.j&&(m=a.j-Q,Q=a.j,A(!(1&m)),a.O+=s.R*m,a.N+=s.B*(m>>1),a.W+=s.B*(m>>1),null!=a.F&&(a.J+=a.width*m)),Q<N&&(a.O+=a.v,a.N+=a.v>>1,a.W+=a.v>>1,null!=a.F&&(a.J+=a.v),a.ka=Q-a.j,a.U=a.va-a.v,a.T=N-Q,c=a.put(a))}o+1!=s.Ic||w||(r(s.sa,s.ta-u,f,d+16*s.R,u),r(s.qa,s.ra-h,p,l+8*s.B,h),r(s.Ha,s.Ia-h,B,g+8*s.B,h))}if(!c)return Rt(t,6,"Output aborted.")}return 1}(t,e)),null!=e.bc&&e.bc(e),s&=1}return s?(t.cb=0,s):0}function zt(t,A,e,r,n){n=t[A+e+32*r]+(n>>3),t[A+e+32*r]=-256&n?0>n?0:255:n}function jt(t,A,e,r,n,i){zt(t,A,0,e,r+n),zt(t,A,1,e,r+i),zt(t,A,2,e,r-i),zt(t,A,3,e,r-n)}function Vt(t){return(20091*t>>16)+t}function qt(t,A,e,r){var n,o=0,s=i(16);for(n=0;4>n;++n){var a=t[A+0]+t[A+8],c=t[A+0]-t[A+8],u=(35468*t[A+4]>>16)-Vt(t[A+12]),l=Vt(t[A+4])+(35468*t[A+12]>>16);s[o+0]=a+l,s[o+1]=c+u,s[o+2]=c-u,s[o+3]=a-l,o+=4,A++}for(n=o=0;4>n;++n)a=(t=s[o+0]+4)+s[o+8],c=t-s[o+8],u=(35468*s[o+4]>>16)-Vt(s[o+12]),zt(e,r,0,0,a+(l=Vt(s[o+4])+(35468*s[o+12]>>16))),zt(e,r,1,0,c+u),zt(e,r,2,0,c-u),zt(e,r,3,0,a-l),o++,r+=32}function Gt(t,A,e,r){var n=t[A+0]+4,i=35468*t[A+4]>>16,o=Vt(t[A+4]),s=35468*t[A+1]>>16;jt(e,r,0,n+o,t=Vt(t[A+1]),s),jt(e,r,1,n+i,t,s),jt(e,r,2,n-i,t,s),jt(e,r,3,n-o,t,s)}function Xt(t,A,e,r,n){qt(t,A,e,r),n&&qt(t,A+16,e,r+4)}function Jt(t,A,e,r){je(t,A+0,e,r,1),je(t,A+32,e,r+128,1)}function Wt(t,A,e,r){var n;for(t=t[A+0]+4,n=0;4>n;++n)for(A=0;4>A;++A)zt(e,r,A,n,t)}function Yt(t,A,e,r){t[A+0]&&Ge(t,A+0,e,r),t[A+16]&&Ge(t,A+16,e,r+4),t[A+32]&&Ge(t,A+32,e,r+128),t[A+48]&&Ge(t,A+48,e,r+128+4)}function Zt(t,A,e,r){var n,o=i(16);for(n=0;4>n;++n){var s=t[A+0+n]+t[A+12+n],a=t[A+4+n]+t[A+8+n],c=t[A+4+n]-t[A+8+n],u=t[A+0+n]-t[A+12+n];o[0+n]=s+a,o[8+n]=s-a,o[4+n]=u+c,o[12+n]=u-c}for(n=0;4>n;++n)s=(t=o[0+4*n]+3)+o[3+4*n],a=o[1+4*n]+o[2+4*n],c=o[1+4*n]-o[2+4*n],u=t-o[3+4*n],e[r+0]=s+a>>3,e[r+16]=u+c>>3,e[r+32]=s-a>>3,e[r+48]=u-c>>3,r+=64}function $t(t,A,e){var r,n=A-32,i=wr,o=255-t[n-1];for(r=0;r<e;++r){var s,a=i,c=o+t[A-1];for(s=0;s<e;++s)t[A+s]=a[c+t[n+s]];A+=32}}function tA(t,A){$t(t,A,4)}function AA(t,A){$t(t,A,8)}function eA(t,A){$t(t,A,16)}function rA(t,A){var e;for(e=0;16>e;++e)r(t,A+32*e,t,A-32,16)}function nA(t,A){var e;for(e=16;0<e;--e)n(t,A,t[A-1],16),A+=32}function iA(t,A,e){var r;for(r=0;16>r;++r)n(A,e+32*r,t,16)}function oA(t,A){var e,r=16;for(e=0;16>e;++e)r+=t[A-1+32*e]+t[A+e-32];iA(r>>5,t,A)}function sA(t,A){var e,r=8;for(e=0;16>e;++e)r+=t[A-1+32*e];iA(r>>4,t,A)}function aA(t,A){var e,r=8;for(e=0;16>e;++e)r+=t[A+e-32];iA(r>>4,t,A)}function cA(t,A){iA(128,t,A)}function uA(t,A,e){return t+2*A+e+2>>2}function lA(t,A){var e,n=A-32;for(n=new Uint8Array([uA(t[n-1],t[n+0],t[n+1]),uA(t[n+0],t[n+1],t[n+2]),uA(t[n+1],t[n+2],t[n+3]),uA(t[n+2],t[n+3],t[n+4])]),e=0;4>e;++e)r(t,A+32*e,n,0,n.length)}function hA(t,A){var e=t[A-1],r=t[A-1+32],n=t[A-1+64],i=t[A-1+96];L(t,A+0,16843009*uA(t[A-1-32],e,r)),L(t,A+32,16843009*uA(e,r,n)),L(t,A+64,16843009*uA(r,n,i)),L(t,A+96,16843009*uA(n,i,i))}function fA(t,A){var e,r=4;for(e=0;4>e;++e)r+=t[A+e-32]+t[A-1+32*e];for(r>>=3,e=0;4>e;++e)n(t,A+32*e,r,4)}function dA(t,A){var e=t[A-1+0],r=t[A-1+32],n=t[A-1+64],i=t[A-1-32],o=t[A+0-32],s=t[A+1-32],a=t[A+2-32],c=t[A+3-32];t[A+0+96]=uA(r,n,t[A-1+96]),t[A+1+96]=t[A+0+64]=uA(e,r,n),t[A+2+96]=t[A+1+64]=t[A+0+32]=uA(i,e,r),t[A+3+96]=t[A+2+64]=t[A+1+32]=t[A+0+0]=uA(o,i,e),t[A+3+64]=t[A+2+32]=t[A+1+0]=uA(s,o,i),t[A+3+32]=t[A+2+0]=uA(a,s,o),t[A+3+0]=uA(c,a,s)}function pA(t,A){var e=t[A+1-32],r=t[A+2-32],n=t[A+3-32],i=t[A+4-32],o=t[A+5-32],s=t[A+6-32],a=t[A+7-32];t[A+0+0]=uA(t[A+0-32],e,r),t[A+1+0]=t[A+0+32]=uA(e,r,n),t[A+2+0]=t[A+1+32]=t[A+0+64]=uA(r,n,i),t[A+3+0]=t[A+2+32]=t[A+1+64]=t[A+0+96]=uA(n,i,o),t[A+3+32]=t[A+2+64]=t[A+1+96]=uA(i,o,s),t[A+3+64]=t[A+2+96]=uA(o,s,a),t[A+3+96]=uA(s,a,a)}function BA(t,A){var e=t[A-1+0],r=t[A-1+32],n=t[A-1+64],i=t[A-1-32],o=t[A+0-32],s=t[A+1-32],a=t[A+2-32],c=t[A+3-32];t[A+0+0]=t[A+1+64]=i+o+1>>1,t[A+1+0]=t[A+2+64]=o+s+1>>1,t[A+2+0]=t[A+3+64]=s+a+1>>1,t[A+3+0]=a+c+1>>1,t[A+0+96]=uA(n,r,e),t[A+0+64]=uA(r,e,i),t[A+0+32]=t[A+1+96]=uA(e,i,o),t[A+1+32]=t[A+2+96]=uA(i,o,s),t[A+2+32]=t[A+3+96]=uA(o,s,a),t[A+3+32]=uA(s,a,c)}function gA(t,A){var e=t[A+0-32],r=t[A+1-32],n=t[A+2-32],i=t[A+3-32],o=t[A+4-32],s=t[A+5-32],a=t[A+6-32],c=t[A+7-32];t[A+0+0]=e+r+1>>1,t[A+1+0]=t[A+0+64]=r+n+1>>1,t[A+2+0]=t[A+1+64]=n+i+1>>1,t[A+3+0]=t[A+2+64]=i+o+1>>1,t[A+0+32]=uA(e,r,n),t[A+1+32]=t[A+0+96]=uA(r,n,i),t[A+2+32]=t[A+1+96]=uA(n,i,o),t[A+3+32]=t[A+2+96]=uA(i,o,s),t[A+3+64]=uA(o,s,a),t[A+3+96]=uA(s,a,c)}function wA(t,A){var e=t[A-1+0],r=t[A-1+32],n=t[A-1+64],i=t[A-1+96];t[A+0+0]=e+r+1>>1,t[A+2+0]=t[A+0+32]=r+n+1>>1,t[A+2+32]=t[A+0+64]=n+i+1>>1,t[A+1+0]=uA(e,r,n),t[A+3+0]=t[A+1+32]=uA(r,n,i),t[A+3+32]=t[A+1+64]=uA(n,i,i),t[A+3+64]=t[A+2+64]=t[A+0+96]=t[A+1+96]=t[A+2+96]=t[A+3+96]=i}function mA(t,A){var e=t[A-1+0],r=t[A-1+32],n=t[A-1+64],i=t[A-1+96],o=t[A-1-32],s=t[A+0-32],a=t[A+1-32],c=t[A+2-32];t[A+0+0]=t[A+2+32]=e+o+1>>1,t[A+0+32]=t[A+2+64]=r+e+1>>1,t[A+0+64]=t[A+2+96]=n+r+1>>1,t[A+0+96]=i+n+1>>1,t[A+3+0]=uA(s,a,c),t[A+2+0]=uA(o,s,a),t[A+1+0]=t[A+3+32]=uA(e,o,s),t[A+1+32]=t[A+3+64]=uA(r,e,o),t[A+1+64]=t[A+3+96]=uA(n,r,e),t[A+1+96]=uA(i,n,r)}function vA(t,A){var e;for(e=0;8>e;++e)r(t,A+32*e,t,A-32,8)}function bA(t,A){var e;for(e=0;8>e;++e)n(t,A,t[A-1],8),A+=32}function QA(t,A,e){var r;for(r=0;8>r;++r)n(A,e+32*r,t,8)}function CA(t,A){var e,r=8;for(e=0;8>e;++e)r+=t[A+e-32]+t[A-1+32*e];QA(r>>4,t,A)}function FA(t,A){var e,r=4;for(e=0;8>e;++e)r+=t[A+e-32];QA(r>>3,t,A)}function UA(t,A){var e,r=4;for(e=0;8>e;++e)r+=t[A-1+32*e];QA(r>>3,t,A)}function yA(t,A){QA(128,t,A)}function NA(t,A,e){var r=t[A-e],n=t[A+0],i=3*(n-r)+Br[1020+t[A-2*e]-t[A+e]],o=gr[112+(i+4>>3)];t[A-e]=wr[255+r+gr[112+(i+3>>3)]],t[A+0]=wr[255+n-o]}function EA(t,A,e,r){var n=t[A+0],i=t[A+e];return mr[255+t[A-2*e]-t[A-e]]>r||mr[255+i-n]>r}function LA(t,A,e,r){return 4*mr[255+t[A-e]-t[A+0]]+mr[255+t[A-2*e]-t[A+e]]<=r}function HA(t,A,e,r,n){var i=t[A-3*e],o=t[A-2*e],s=t[A-e],a=t[A+0],c=t[A+e],u=t[A+2*e],l=t[A+3*e];return 4*mr[255+s-a]+mr[255+o-c]>r?0:mr[255+t[A-4*e]-i]<=n&&mr[255+i-o]<=n&&mr[255+o-s]<=n&&mr[255+l-u]<=n&&mr[255+u-c]<=n&&mr[255+c-a]<=n}function _A(t,A,e,r){var n=2*r+1;for(r=0;16>r;++r)LA(t,A+r,e,n)&&NA(t,A+r,e)}function SA(t,A,e,r){var n=2*r+1;for(r=0;16>r;++r)LA(t,A+r*e,1,n)&&NA(t,A+r*e,1)}function xA(t,A,e,r){var n;for(n=3;0<n;--n)_A(t,A+=4*e,e,r)}function IA(t,A,e,r){var n;for(n=3;0<n;--n)SA(t,A+=4,e,r)}function PA(t,A,e,r,n,i,o,s){for(i=2*i+1;0<n--;){if(HA(t,A,e,i,o))if(EA(t,A,e,s))NA(t,A,e);else{var a=t,c=A,u=e,l=a[c-2*u],h=a[c-u],f=a[c+0],d=a[c+u],p=a[c+2*u],B=27*(w=Br[1020+3*(f-h)+Br[1020+l-d]])+63>>7,g=18*w+63>>7,w=9*w+63>>7;a[c-3*u]=wr[255+a[c-3*u]+w],a[c-2*u]=wr[255+l+g],a[c-u]=wr[255+h+B],a[c+0]=wr[255+f-B],a[c+u]=wr[255+d-g],a[c+2*u]=wr[255+p-w]}A+=r}}function TA(t,A,e,r,n,i,o,s){for(i=2*i+1;0<n--;){if(HA(t,A,e,i,o))if(EA(t,A,e,s))NA(t,A,e);else{var a=t,c=A,u=e,l=a[c-u],h=a[c+0],f=a[c+u],d=gr[112+(4+(p=3*(h-l))>>3)],p=gr[112+(p+3>>3)],B=d+1>>1;a[c-2*u]=wr[255+a[c-2*u]+B],a[c-u]=wr[255+l+p],a[c+0]=wr[255+h-d],a[c+u]=wr[255+f-B]}A+=r}}function RA(t,A,e,r,n,i){PA(t,A,e,1,16,r,n,i)}function OA(t,A,e,r,n,i){PA(t,A,1,e,16,r,n,i)}function KA(t,A,e,r,n,i){var o;for(o=3;0<o;--o)TA(t,A+=4*e,e,1,16,r,n,i)}function MA(t,A,e,r,n,i){var o;for(o=3;0<o;--o)TA(t,A+=4,1,e,16,r,n,i)}function kA(t,A,e,r,n,i,o,s){PA(t,A,n,1,8,i,o,s),PA(e,r,n,1,8,i,o,s)}function DA(t,A,e,r,n,i,o,s){PA(t,A,1,n,8,i,o,s),PA(e,r,1,n,8,i,o,s)}function zA(t,A,e,r,n,i,o,s){TA(t,A+4*n,n,1,8,i,o,s),TA(e,r+4*n,n,1,8,i,o,s)}function jA(t,A,e,r,n,i,o,s){TA(t,A+4,1,n,8,i,o,s),TA(e,r+4,1,n,8,i,o,s)}function VA(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function qA(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function GA(t,A,e,r,n,i,o){for(t=null==t?0:t[A+0],A=0;A<o;++A)n[i+A]=t+e[r+A]&255,t=n[i+A]}function XA(t,A,e,r,n,i,o){var s;if(null==t)GA(null,null,e,r,n,i,o);else for(s=0;s<o;++s)n[i+s]=t[A+s]+e[r+s]&255}function JA(t,A,e,r,n,i,o){if(null==t)GA(null,null,e,r,n,i,o);else{var s,a=t[A+0],c=a,u=a;for(s=0;s<o;++s)c=u+(a=t[A+s])-c,u=e[r+s]+(-256&c?0>c?0:255:c)&255,c=a,n[i+s]=u}}function WA(t,e,n,o){var s=e.width,a=e.o;if(A(null!=t&&null!=e),0>n||0>=o||n+o>a)return null;if(!t.Cc){if(null==t.ga){var c;if(t.ga=new function(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Tt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0},(c=null==t.ga)||(c=e.width*e.o,A(0==t.Gb.length),t.Gb=i(c),t.Uc=0,null==t.Gb?c=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,c=1),c=!c),!c){c=t.ga;var u=t.Fa,l=t.P,h=t.qc,f=t.mb,d=t.nb,p=l+1,B=h-1,w=c.l;if(A(null!=u&&null!=f&&null!=e),tn[0]=null,tn[1]=GA,tn[2]=XA,tn[3]=JA,c.ca=f,c.tb=d,c.c=e.width,c.i=e.height,A(0<c.c&&0<c.i),1>=h)e=0;else if(c.$a=u[l+0]>>0&3,c.Z=u[l+0]>>2&3,c.Lc=u[l+0]>>4&3,l=u[l+0]>>6&3,0>c.$a||1<c.$a||4<=c.Z||1<c.Lc||l)e=0;else if(w.put=ct,w.ac=at,w.bc=ut,w.ma=c,w.width=e.width,w.height=e.height,w.Da=e.Da,w.v=e.v,w.va=e.va,w.j=e.j,w.o=e.o,c.$a)t:{A(1==c.$a),e=Ft();A:for(;;){if(null==e){e=0;break t}if(A(null!=c),c.mc=e,e.c=c.c,e.i=c.i,e.l=c.l,e.l.ma=c,e.l.width=c.c,e.l.height=c.i,e.a=0,g(e.m,u,p,B),!Ut(c.c,c.i,1,e,null))break A;if(1==e.ab&&3==e.gc[0].hc&&mt(e.s)?(c.ic=1,u=e.c*e.i,e.Ta=null,e.Ua=0,e.V=i(u),e.Ba=0,null==e.V?(e.a=1,e=0):e=1):(c.ic=0,e=yt(e,c.c)),!e)break A;e=1;break t}c.mc=null,e=0}else e=B>=c.c*c.i;c=!e}if(c)return null;1!=t.ga.Lc?t.Ga=0:o=a-n}A(null!=t.ga),A(n+o<=a);t:{if(e=(u=t.ga).c,a=u.l.o,0==u.$a){if(p=t.rc,B=t.Vc,w=t.Fa,l=t.P+1+n*e,h=t.mb,f=t.nb+n*e,A(l<=t.P+t.qc),0!=u.Z)for(A(null!=tn[u.Z]),c=0;c<o;++c)tn[u.Z](p,B,w,l,h,f,e),p=h,B=f,f+=e,l+=e;else for(c=0;c<o;++c)r(h,f,w,l,e),p=h,B=f,f+=e,l+=e;t.rc=p,t.Vc=B}else{if(A(null!=u.mc),e=n+o,A(null!=(c=u.mc)),A(e<=c.i),c.C>=e)e=1;else if(u.ic||Ae(),u.ic){u=c.V,p=c.Ba,B=c.c;var m=c.i,v=(w=1,l=c.$/B,h=c.$%B,f=c.m,d=c.s,c.$),b=B*m,Q=B*e,F=d.wc,y=v<Q?Bt(d,h,l):null;A(v<=b),A(e<=m),A(mt(d));A:for(;;){for(;!f.h&&v<Q;){if(h&F||(y=Bt(d,h,l)),A(null!=y),U(f),256>(m=dt(y.G[0],y.H[0],f)))u[p+v]=m,++v,++h>=B&&(h=0,++l<=e&&!(l%16)&&bt(c,l));else{if(!(280>m)){w=0;break A}m=ht(m-256,f);var N,E=dt(y.G[4],y.H[4],f);if(U(f),!(v>=(E=ft(B,E=ht(E,f)))&&b-v>=m)){w=0;break A}for(N=0;N<m;++N)u[p+v+N]=u[p+v+N-E];for(v+=m,h+=m;h>=B;)h-=B,++l<=e&&!(l%16)&&bt(c,l);v<Q&&h&F&&(y=Bt(d,h,l))}A(f.h==C(f))}bt(c,l>e?e:l);break A}!w||f.h&&v<b?(w=0,c.a=f.h?5:3):c.$=v,e=w}else e=Qt(c,c.V,c.Ba,c.c,c.i,e,Nt);if(!e){o=0;break t}}n+o>=a&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+n*s}function YA(t,A,e,r,n,i){for(;0<n--;){var o,s=t,a=A+(e?1:0),c=t,u=A+(e?0:3);for(o=0;o<r;++o){var l=c[u+4*o];255!=l&&(l*=32897,s[a+4*o+0]=s[a+4*o+0]*l>>23,s[a+4*o+1]=s[a+4*o+1]*l>>23,s[a+4*o+2]=s[a+4*o+2]*l>>23)}A+=i}}function ZA(t,A,e,r,n){for(;0<r--;){var i;for(i=0;i<e;++i){var o=t[A+2*i+0],s=15&(c=t[A+2*i+1]),a=4369*s,c=(240&c|c>>4)*a>>16;t[A+2*i+0]=(240&o|o>>4)*a>>16&240|(15&o|o<<4)*a>>16>>4&15,t[A+2*i+1]=240&c|s}A+=n}}function $A(t,A,e,r,n,i,o,s){var a,c,u=255;for(c=0;c<n;++c){for(a=0;a<r;++a){var l=t[A+a];i[o+4*a]=l,u&=l}A+=e,o+=s}return 255!=u}function te(t,A,e,r,n){var i;for(i=0;i<n;++i)e[r+i]=t[A+i]>>8}function Ae(){sr=YA,ar=ZA,cr=$A,ur=te}function ee(e,r,n){t[e]=function(t,e,i,o,s,a,c,u,l,h,f,d,p,B,g,w,m){var v,b=m-1>>1,Q=s[a+0]|c[u+0]<<16,C=l[h+0]|f[d+0]<<16;A(null!=t);var F=3*Q+C+131074>>2;for(r(t[e+0],255&F,F>>16,p,B),null!=i&&(F=3*C+Q+131074>>2,r(i[o+0],255&F,F>>16,g,w)),v=1;v<=b;++v){var U=s[a+v]|c[u+v]<<16,y=l[h+v]|f[d+v]<<16,N=Q+U+C+y+524296,E=N+2*(U+C)>>3;F=E+Q>>1,Q=(N=N+2*(Q+y)>>3)+U>>1,r(t[e+2*v-1],255&F,F>>16,p,B+(2*v-1)*n),r(t[e+2*v-0],255&Q,Q>>16,p,B+(2*v-0)*n),null!=i&&(F=N+C>>1,Q=E+y>>1,r(i[o+2*v-1],255&F,F>>16,g,w+(2*v-1)*n),r(i[o+2*v+0],255&Q,Q>>16,g,w+(2*v+0)*n)),Q=U,C=y}1&m||(F=3*Q+C+131074>>2,r(t[e+m-1],255&F,F>>16,p,B+(m-1)*n),null!=i&&(F=3*C+Q+131074>>2,r(i[o+m-1],255&F,F>>16,g,w+(m-1)*n)))}}function re(){An[vr]=en,An[br]=nn,An[Qr]=rn,An[Cr]=on,An[Fr]=sn,An[Ur]=an,An[yr]=cn,An[Nr]=nn,An[Er]=on,An[Lr]=sn,An[Hr]=an}function ne(t){return t&~pn?0>t?0:255:t>>dn}function ie(t,A){return ne((19077*t>>8)+(26149*A>>8)-14234)}function oe(t,A,e){return ne((19077*t>>8)-(6419*A>>8)-(13320*e>>8)+8708)}function se(t,A){return ne((19077*t>>8)+(33050*A>>8)-17685)}function ae(t,A,e,r,n){r[n+0]=ie(t,e),r[n+1]=oe(t,A,e),r[n+2]=se(t,A)}function ce(t,A,e,r,n){r[n+0]=se(t,A),r[n+1]=oe(t,A,e),r[n+2]=ie(t,e)}function ue(t,A,e,r,n){var i=oe(t,A,e);A=i<<3&224|se(t,A)>>3,r[n+0]=248&ie(t,e)|i>>5,r[n+1]=A}function le(t,A,e,r,n){var i=240&se(t,A)|15;r[n+0]=240&ie(t,e)|oe(t,A,e)>>4,r[n+1]=i}function he(t,A,e,r,n){r[n+0]=255,ae(t,A,e,r,n+1)}function fe(t,A,e,r,n){ce(t,A,e,r,n),r[n+3]=255}function de(t,A,e,r,n){ae(t,A,e,r,n),r[n+3]=255}function Pt(t,A){return 0>t?0:t>A?A:t}function pe(A,e,r){t[A]=function(t,A,n,i,o,s,a,c,u){for(var l=c+(-2&u)*r;c!=l;)e(t[A+0],n[i+0],o[s+0],a,c),e(t[A+1],n[i+0],o[s+0],a,c+r),A+=2,++i,++s,c+=2*r;1&u&&e(t[A+0],n[i+0],o[s+0],a,c)}}function Be(t,A,e){return 0==e?0==t?0==A?6:5:0==A?4:0:e}function ge(t,A,e,r,n){switch(t>>>30){case 3:je(A,e,r,n,0);break;case 2:Ve(A,e,r,n);break;case 1:Ge(A,e,r,n)}}function we(t,A){var e,i,o=A.M,s=A.Nb,a=t.oc,c=t.pc+40,u=t.oc,l=t.pc+584,h=t.oc,f=t.pc+600;for(e=0;16>e;++e)a[c+32*e-1]=129;for(e=0;8>e;++e)u[l+32*e-1]=129,h[f+32*e-1]=129;for(0<o?a[c-1-32]=u[l-1-32]=h[f-1-32]=129:(n(a,c-32-1,127,21),n(u,l-32-1,127,9),n(h,f-32-1,127,9)),i=0;i<t.za;++i){var d=A.ya[A.aa+i];if(0<i){for(e=-1;16>e;++e)r(a,c+32*e-4,a,c+32*e+12,4);for(e=-1;8>e;++e)r(u,l+32*e-4,u,l+32*e+4,4),r(h,f+32*e-4,h,f+32*e+4,4)}var p=t.Gd,B=t.Hd+i,g=d.ad,w=d.Hc;if(0<o&&(r(a,c-32,p[B].y,0,16),r(u,l-32,p[B].f,0,8),r(h,f-32,p[B].ea,0,8)),d.Za){var m=a,v=c-32+16;for(0<o&&(i>=t.za-1?n(m,v,p[B].y[15],4):r(m,v,p[B+1].y,0,4)),e=0;4>e;e++)m[v+128+e]=m[v+256+e]=m[v+384+e]=m[v+0+e];for(e=0;16>e;++e,w<<=2)m=a,v=c+Cn[e],Wr[d.Ob[e]](m,v),ge(w,g,16*+e,m,v)}else if(m=Be(i,o,d.Ob[0]),Jr[m](a,c),0!=w)for(e=0;16>e;++e,w<<=2)ge(w,g,16*+e,a,c+Cn[e]);for(e=d.Gc,m=Be(i,o,d.Dd),Yr[m](u,l),Yr[m](h,f),w=g,m=u,v=l,255&(d=e>>0)&&(170&d?qe(w,256,m,v):Xe(w,256,m,v)),d=h,w=f,255&(e>>=8)&&(170&e?qe(g,320,d,w):Xe(g,320,d,w)),o<t.Ub-1&&(r(p[B].y,0,a,c+480,16),r(p[B].f,0,u,l+224,8),r(p[B].ea,0,h,f+224,8)),e=8*s*t.B,p=t.sa,B=t.ta+16*i+16*s*t.R,g=t.qa,d=t.ra+8*i+e,w=t.Ha,m=t.Ia+8*i+e,e=0;16>e;++e)r(p,B+e*t.R,a,c+32*e,16);for(e=0;8>e;++e)r(g,d+e*t.B,u,l+32*e,8),r(w,m+e*t.B,h,f+32*e,8)}}function me(t,r,n,i,o,s,a,c,u){var l=[0],h=[0],f=0,d=null!=u?u.kd:0,p=null!=u?u:new VA;if(null==t||12>n)return 7;p.data=t,p.w=r,p.ha=n,r=[r],n=[n],p.gb=[p.gb];t:{var B=r,w=n,m=p.gb;if(A(null!=t),A(null!=w),A(null!=m),m[0]=0,12<=w[0]&&!e(t,B[0],"RIFF")){if(e(t,B[0]+8,"WEBP")){m=3;break t}var v=S(t,B[0]+4);if(12>v||4294967286<v){m=3;break t}if(d&&v>w[0]-8){m=7;break t}m[0]=v,B[0]+=12,w[0]-=12}m=0}if(0!=m)return m;for(v=0<p.gb[0],n=n[0];;){t:{var Q=t;w=r,m=n;var C=l,F=h,U=B=[0];if((E=f=[f])[0]=0,8>m[0])m=7;else{if(!e(Q,w[0],"VP8X")){if(10!=S(Q,w[0]+4)){m=3;break t}if(18>m[0]){m=7;break t}var y=S(Q,w[0]+8),N=1+_(Q,w[0]+12);if(2147483648<=N*(Q=1+_(Q,w[0]+15))){m=3;break t}null!=U&&(U[0]=y),null!=C&&(C[0]=N),null!=F&&(F[0]=Q),w[0]+=18,m[0]-=18,E[0]=1}m=0}}if(f=f[0],B=B[0],0!=m)return m;if(w=!!(2&B),!v&&f)return 3;if(null!=s&&(s[0]=!!(16&B)),null!=a&&(a[0]=w),null!=c&&(c[0]=0),a=l[0],B=h[0],f&&w&&null==u){m=0;break}if(4>n){m=7;break}if(v&&f||!v&&!f&&!e(t,r[0],"ALPH")){n=[n],p.na=[p.na],p.P=[p.P],p.Sa=[p.Sa];t:{y=t,m=r,v=n;var E=p.gb;C=p.na,F=p.P,U=p.Sa,N=22,A(null!=y),A(null!=v),Q=m[0];var L=v[0];for(A(null!=C),A(null!=U),C[0]=null,F[0]=null,U[0]=0;;){if(m[0]=Q,v[0]=L,8>L){m=7;break t}var H=S(y,Q+4);if(4294967286<H){m=3;break t}var x=8+H+1&-2;if(N+=x,0<E&&N>E){m=3;break t}if(!e(y,Q,"VP8 ")||!e(y,Q,"VP8L")){m=0;break t}if(L[0]<x){m=7;break t}e(y,Q,"ALPH")||(C[0]=y,F[0]=Q+8,U[0]=H),Q+=x,L-=x}}if(n=n[0],p.na=p.na[0],p.P=p.P[0],p.Sa=p.Sa[0],0!=m)break}n=[n],p.Ja=[p.Ja],p.xa=[p.xa];t:if(E=t,m=r,v=n,C=p.gb[0],F=p.Ja,U=p.xa,y=m[0],Q=!e(E,y,"VP8 "),N=!e(E,y,"VP8L"),A(null!=E),A(null!=v),A(null!=F),A(null!=U),8>v[0])m=7;else{if(Q||N){if(E=S(E,y+4),12<=C&&E>C-12){m=3;break t}if(d&&E>v[0]-8){m=7;break t}F[0]=E,m[0]+=8,v[0]-=8,U[0]=N}else U[0]=5<=v[0]&&47==E[y+0]&&!(E[y+4]>>5),F[0]=v[0];m=0}if(n=n[0],p.Ja=p.Ja[0],p.xa=p.xa[0],r=r[0],0!=m)break;if(4294967286<p.Ja)return 3;if(null==c||w||(c[0]=p.xa?2:1),a=[a],B=[B],p.xa){if(5>n){m=7;break}c=a,d=B,w=s,null==t||5>n?t=0:5<=n&&47==t[r+0]&&!(t[r+4]>>5)?(v=[0],E=[0],C=[0],g(F=new b,t,r,n),lt(F,v,E,C)?(null!=c&&(c[0]=v[0]),null!=d&&(d[0]=E[0]),null!=w&&(w[0]=C[0]),t=1):t=0):t=0}else{if(10>n){m=7;break}c=B,null==t||10>n||!Ot(t,r+3,n-3)?t=0:(d=t[r+0]|t[r+1]<<8|t[r+2]<<16,w=16383&(t[r+7]<<8|t[r+6]),t=16383&(t[r+9]<<8|t[r+8]),1&d||3<(d>>1&7)||!(d>>4&1)||d>>5>=p.Ja||!w||!t?t=0:(a&&(a[0]=w),c&&(c[0]=t),t=1))}if(!t)return 3;if(a=a[0],B=B[0],f&&(l[0]!=a||h[0]!=B))return 3;null!=u&&(u[0]=p,u.offset=r-u.w,A(4294967286>r-u.w),A(u.offset==u.ha-n));break}return 0==m||7==m&&f&&null==u?(null!=s&&(s[0]|=null!=p.na&&0<p.na.length),null!=i&&(i[0]=a),null!=o&&(o[0]=B),0):m}function ve(t,A,e){var r=A.width,n=A.height,i=0,o=0,s=r,a=n;if(A.Da=null!=t&&0<t.Da,A.Da&&(s=t.cd,a=t.bd,i=t.v,o=t.j,11>e||(i&=-2,o&=-2),0>i||0>o||0>=s||0>=a||i+s>r||o+a>n))return 0;if(A.v=i,A.j=o,A.va=i+s,A.o=o+a,A.U=s,A.T=a,A.da=null!=t&&0<t.da,A.da){if(!T(s,a,e=[t.ib],i=[t.hb]))return 0;A.ib=e[0],A.hb=i[0]}return A.ob=null!=t&&t.ob,A.Kb=null==t||!t.Sd,A.da&&(A.ob=A.ib<3*r/4&&A.hb<3*n/4,A.Kb=0),1}function be(t){if(null==t)return 2;if(11>t.S){var A=t.f.RGBA;A.fb+=(t.height-1)*A.A,A.A=-A.A}else A=t.f.kb,t=t.height,A.O+=(t-1)*A.fa,A.fa=-A.fa,A.N+=(t-1>>1)*A.Ab,A.Ab=-A.Ab,A.W+=(t-1>>1)*A.Db,A.Db=-A.Db,null!=A.F&&(A.J+=(t-1)*A.lb,A.lb=-A.lb);return 0}function Qe(t,A,e,r){if(null==r||0>=t||0>=A)return 2;if(null!=e){if(e.Da){var n=e.cd,o=e.bd,s=-2&e.v,a=-2&e.j;if(0>s||0>a||0>=n||0>=o||s+n>t||a+o>A)return 2;t=n,A=o}if(e.da){if(!T(t,A,n=[e.ib],o=[e.hb]))return 2;t=n[0],A=o[0]}}r.width=t,r.height=A;t:{var c=r.width,u=r.height;if(t=r.S,0>=c||0>=u||!(t>=vr&&13>t))t=2;else{if(0>=r.Rd&&null==r.sd){s=o=n=A=0;var l=(a=c*Nn[t])*u;if(11>t||(o=(u+1)/2*(A=(c+1)/2),12==t&&(s=(n=c)*u)),null==(u=i(l+2*o+s))){t=1;break t}r.sd=u,11>t?((c=r.f.RGBA).eb=u,c.fb=0,c.A=a,c.size=l):((c=r.f.kb).y=u,c.O=0,c.fa=a,c.Fd=l,c.f=u,c.N=0+l,c.Ab=A,c.Cd=o,c.ea=u,c.W=0+l+o,c.Db=A,c.Ed=o,12==t&&(c.F=u,c.J=0+l+2*o),c.Tc=s,c.lb=n)}if(A=1,n=r.S,o=r.width,s=r.height,n>=vr&&13>n)if(11>n)t=r.f.RGBA,A&=(a=Math.abs(t.A))*(s-1)+o<=t.size,A&=a>=o*Nn[n],A&=null!=t.eb;else{t=r.f.kb,a=(o+1)/2,l=(s+1)/2,c=Math.abs(t.fa),u=Math.abs(t.Ab);var h=Math.abs(t.Db),f=Math.abs(t.lb),d=f*(s-1)+o;A&=c*(s-1)+o<=t.Fd,A&=u*(l-1)+a<=t.Cd,A=(A&=h*(l-1)+a<=t.Ed)&c>=o&u>=a&h>=a,A&=null!=t.y,A&=null!=t.f,A&=null!=t.ea,12==n&&(A&=f>=o,A&=d<=t.Tc,A&=null!=t.F)}else A=0;t=A?0:2}}return 0!=t||null!=e&&e.fd&&(t=be(r)),t}var Ce=64,Fe=[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],Ue=24,ye=32,Ne=8,Ee=[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];K("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,A,e){return A[e+0]},t.Predictor3=function(t,A,e){return A[e+1]},t.Predictor4=function(t,A,e){return A[e-1]},t.Predictor5=function(t,A,e){return k(k(t,A[e+1]),A[e+0])},t.Predictor6=function(t,A,e){return k(t,A[e-1])},t.Predictor7=function(t,A,e){return k(t,A[e+0])},t.Predictor8=function(t,A,e){return k(A[e-1],A[e+0])},t.Predictor9=function(t,A,e){return k(A[e+0],A[e+1])},t.Predictor10=function(t,A,e){return k(k(t,A[e-1]),k(A[e+0],A[e+1]))},t.Predictor11=function(t,A,e){var r=A[e+0];return 0>=j(r>>24&255,t>>24&255,(A=A[e-1])>>24&255)+j(r>>16&255,t>>16&255,A>>16&255)+j(r>>8&255,t>>8&255,A>>8&255)+j(255&r,255&t,255&A)?r:t},t.Predictor12=function(t,A,e){var r=A[e+0];return(D((t>>24&255)+(r>>24&255)-((A=A[e-1])>>24&255))<<24|D((t>>16&255)+(r>>16&255)-(A>>16&255))<<16|D((t>>8&255)+(r>>8&255)-(A>>8&255))<<8|D((255&t)+(255&r)-(255&A)))>>>0},t.Predictor13=function(t,A,e){var r=A[e-1];return(z((t=k(t,A[e+0]))>>24&255,r>>24&255)<<24|z(t>>16&255,r>>16&255)<<16|z(t>>8&255,r>>8&255)<<8|z(t>>0&255,r>>0&255))>>>0};var Le=t.PredictorAdd0;t.PredictorAdd1=V,K("Predictor2","PredictorAdd2"),K("Predictor3","PredictorAdd3"),K("Predictor4","PredictorAdd4"),K("Predictor5","PredictorAdd5"),K("Predictor6","PredictorAdd6"),K("Predictor7","PredictorAdd7"),K("Predictor8","PredictorAdd8"),K("Predictor9","PredictorAdd9"),K("Predictor10","PredictorAdd10"),K("Predictor11","PredictorAdd11"),K("Predictor12","PredictorAdd12"),K("Predictor13","PredictorAdd13");var He=t.PredictorAdd2;J("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),J("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var _e,Se=t.ColorIndexInverseTransform,xe=t.MapARGB,Ie=t.VP8LColorIndexInverseTransformAlpha,Pe=t.MapAlpha,Te=t.VP8LPredictorsAdd=[];Te.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Re,Oe,Ke,Me,ke,De,ze,je,Ve,qe,Ge,Xe,Je,We,Ye,Ze,$e,tr,Ar,er,rr,nr,ir,or,sr,ar,cr,ur,lr=i(511),hr=i(2041),fr=i(225),dr=i(767),pr=0,Br=hr,gr=fr,wr=dr,mr=lr,vr=0,br=1,Qr=2,Cr=3,Fr=4,Ur=5,yr=6,Nr=7,Er=8,Lr=9,Hr=10,_r=[2,3,7],Sr=[3,3,11],xr=[280,256,256,256,40],Ir=[0,1,1,1,0],Pr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Tr=[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],Rr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Or=8,Kr=[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],Mr=[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],kr=null,Dr=[[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]],zr=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],jr=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Vr=[[[[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]]]],qr=[[[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]]],Gr=[[[[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]]]],Xr=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Jr=[],Wr=[],Yr=[],Zr=1,$r=2,tn=[],An=[];ee("UpsampleRgbLinePair",ae,3),ee("UpsampleBgrLinePair",ce,3),ee("UpsampleRgbaLinePair",de,4),ee("UpsampleBgraLinePair",fe,4),ee("UpsampleArgbLinePair",he,4),ee("UpsampleRgba4444LinePair",le,2),ee("UpsampleRgb565LinePair",ue,2);var en=t.UpsampleRgbLinePair,rn=t.UpsampleBgrLinePair,nn=t.UpsampleRgbaLinePair,on=t.UpsampleBgraLinePair,sn=t.UpsampleArgbLinePair,an=t.UpsampleRgba4444LinePair,cn=t.UpsampleRgb565LinePair,un=16,ln=1<<un-1,hn=-227,fn=482,dn=6,pn=(256<<dn)-1,Bn=0,gn=i(256),wn=i(256),mn=i(256),vn=i(256),bn=i(fn-hn),Qn=i(fn-hn);pe("YuvToRgbRow",ae,3),pe("YuvToBgrRow",ce,3),pe("YuvToRgbaRow",de,4),pe("YuvToBgraRow",fe,4),pe("YuvToArgbRow",he,4),pe("YuvToRgba4444Row",le,2),pe("YuvToRgb565Row",ue,2);var Cn=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Fn=[0,2,8],Un=[8,7,6,4,4,2,2,2,1,1,1,1],yn=1;this.WebPDecodeRGBA=function(t,e,r,n,i){var o=br,s=new function(){this.ba=new nt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new function(){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},this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"},a=new nt;s.ba=a,a.S=o,a.width=[a.width],a.height=[a.height];var c=a.width,u=a.height,l=new function(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]};if(null==l||null==t)var h=2;else A(null!=l),h=me(t,e,r,l.width,l.height,l.Pd,l.Qd,l.format,null);if(0!=h?c=0:(null!=c&&(c[0]=l.width[0]),null!=u&&(u[0]=l.height[0]),c=1),c){a.width=a.width[0],a.height=a.height[0],null!=n&&(n[0]=a.width),null!=i&&(i[0]=a.height);t:{if(n=new Tt,(i=new VA).data=t,i.w=e,i.ha=r,i.kd=1,e=[0],A(null!=i),(0==(t=me(i.data,i.w,i.ha,null,null,null,e,null,i))||7==t)&&e[0]&&(t=4),0==(e=t)){if(A(null!=s),n.data=i.data,n.w=i.w+i.offset,n.ha=i.ha-i.offset,n.put=ct,n.ac=at,n.bc=ut,n.ma=s,i.xa){if(null==(t=Ft())){s=1;break t}if(function(t,e){var r=[0],n=[0],i=[0];A:for(;;){if(null==t)return 0;if(null==e)return t.a=2,0;if(t.l=e,t.a=0,g(t.m,e.data,e.w,e.ha),!lt(t.m,r,n,i)){t.a=3;break A}if(t.xb=$r,e.width=r[0],e.height=n[0],!Ut(r[0],n[0],1,t,null))break A;return 1}return A(0!=t.a),0}(t,n)){if(n=0==(e=Qe(n.width,n.height,s.Oa,s.ba))){A:{n=t;e:for(;;){if(null==n){n=0;break A}if(A(null!=n.s.yc),A(null!=n.s.Ya),A(0<n.s.Wb),A(null!=(r=n.l)),A(null!=(i=r.ma)),0!=n.xb){if(n.ca=i.ba,n.tb=i.tb,A(null!=n.ca),!ve(i.Oa,r,Cr)){n.a=2;break e}if(!yt(n,r.width))break e;if(r.da)break e;if((r.da||rt(n.ca.S))&&Ae(),11>n.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=n.ca.f.kb.F&&Ae()),n.Pb&&0<n.s.ua&&null==n.s.vb.X&&!x(n.s.vb,n.s.Wa.Xa)){n.a=1;break e}n.xb=0}if(!Qt(n,n.V,n.Ba,n.c,n.i,r.o,wt))break e;i.Dc=n.Ma,n=1;break A}A(0!=n.a),n=0}n=!n}n&&(e=t.a)}else e=t.a}else{if(null==(t=new function(){var t=new It;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,kr||(kr=Mt)),t})){s=1;break t}if(t.Fa=i.na,t.P=i.P,t.qc=i.Sa,Kt(t,n)){if(0==(e=Qe(n.width,n.height,s.Oa,s.ba))){if(t.Aa=0,r=s.Oa,A(null!=(i=t)),null!=r){if(0<(c=0>(c=r.Md)?0:100<c?255:255*c/100)){for(u=l=0;4>u;++u)12>(h=i.pb[u]).lc&&(h.ia=c*Un[0>h.lc?0:h.lc]>>3),l|=h.ia;l&&(alert("todo:VP8InitRandom"),i.ia=1)}i.Ga=r.Id,100<i.Ga?i.Ga=100:0>i.Ga&&(i.Ga=0)}Dt(t,n)||(e=t.a)}}else e=t.a}0==e&&null!=s.Oa&&s.Oa.fd&&(e=be(s.ba))}s=e}o=0!=s?null:11>o?a.f.RGBA.eb:a.f.kb.y}else o=null;return o};var Nn=[3,4,3,4,4,2,2,4,4,4,2,1,1]});var l=[0],h=[0],f=[],d=new Yt,p=t,B=function(t,A){var e={},r=0,n=!1,i=0,o=0;if(e.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,A,e,r){for(var n=0;n<4;n++)if(t[A+n]!="RIFF".charCodeAt(n))return!0;return!1}(t,A)){var s,l;for(u(t,A+=4),A+=8;A<t.length;){var h=a(t,A),f=u(t,A+=4);A+=4;var d=f+(1&f);switch(h){case"VP8 ":case"VP8L":void 0===e.frames[r]&&(e.frames[r]={}),(g=e.frames[r]).src_off=n?o:A-8,g.src_size=i+f+8,r++,n&&(n=!1,i=0,o=0);break;case"VP8X":(g=e.header={}).feature_flags=t[A];var p=A+4;g.canvas_width=1+c(t,p),p+=3,g.canvas_height=1+c(t,p),p+=3;break;case"ALPH":n=!0,i=d+8,o=A-8;break;case"ANIM":(g=e.header).bgcolor=u(t,A),p=A+4,g.loop_count=(s=t)[(l=p)+0]<<0|s[l+1]<<8,p+=2;break;case"ANMF":var B,g;(g=e.frames[r]={}).offset_x=2*c(t,A),A+=3,g.offset_y=2*c(t,A),A+=3,g.width=1+c(t,A),A+=3,g.height=1+c(t,A),A+=3,g.duration=c(t,A),A+=3,B=t[A++],g.dispose=1&B,g.blend=B>>1&1}"ANMF"!=h&&(A+=d)}return e}}(p,0);B.response=p,B.rgbaoutput=!0,B.dataurl=!1;var g=B.header?B.header:null,w=B.frames?B.frames:null;if(g){g.loop_counter=g.loop_count,l=[g.canvas_height],h=[g.canvas_width];for(var m=0;m<w.length&&0!=w[m].blend;m++);}var v=w[0],b=d.WebPDecodeRGBA(p,v.src_off,v.src_size,h,l);v.rgba=b,v.imgwidth=h[0],v.imgheight=l[0];for(var Q=0;Q<h[0]*l[0]*4;Q++)f[Q]=b[Q];return this.width=h,this.height=l,this.data=f,this}!function(t){var A=function(A,n,c,u){var l=4,h=o;switch(u){case t.image_compression.FAST:l=1,h=i;break;case t.image_compression.MEDIUM:l=6,h=s;break;case t.image_compression.SLOW:l=9,h=a}A=e(A,n,c,h);var f=Object(r.b)(A,{level:l});return t.__addimage__.arrayBufferToBinaryString(f)},e=function(t,A,e,r){for(var n,i,o,s=t.length/A,a=new Uint8Array(t.length+s),c=u(),h=0;h<s;h+=1){if(o=h*A,n=t.subarray(o,o+A),r)a.set(r(n,e,i),o+h);else{for(var f,d=c.length,p=[];f<d;f+=1)p[f]=c[f](n,e,i);var B=l(p.concat());a.set(p[B],o+h)}i=n}return a},n=function(t){var A=Array.apply([],t);return A.unshift(0),A},i=function(t,A){var e,r=[],n=t.length;r[0]=1;for(var i=0;i<n;i+=1)e=t[i-A]||0,r[i+1]=t[i]-e+256&255;return r},o=function(t,A,e){var r,n=[],i=t.length;n[0]=2;for(var o=0;o<i;o+=1)r=e&&e[o]||0,n[o+1]=t[o]-r+256&255;return n},s=function(t,A,e){var r,n,i=[],o=t.length;i[0]=3;for(var s=0;s<o;s+=1)r=t[s-A]||0,n=e&&e[s]||0,i[s+1]=t[s]+256-(r+n>>>1)&255;return i},a=function(t,A,e){var r,n,i,o,s=[],a=t.length;s[0]=4;for(var u=0;u<a;u+=1)r=t[u-A]||0,n=e&&e[u]||0,i=e&&e[u-A]||0,o=c(r,n,i),s[u+1]=t[u]-o+256&255;return s},c=function(t,A,e){if(t===A&&A===e)return t;var r=Math.abs(A-e),n=Math.abs(t-e),i=Math.abs(t+A-e-e);return r<=n&&r<=i?t:n<=i?A:e},u=function(){return[n,i,o,s,a]},l=function(t){var A=t.map(function(t){return t.reduce(function(t,A){return t+Math.abs(A)},0)});return A.indexOf(Math.min.apply(null,A))};t.processPNG=function(e,n,i,o){var s,a,c,u,l,h,f,d,p,B,g,w,m,v,b,Q=this.decode.FLATE_DECODE,C="";if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){if(e=(c=new Gt(e)).imgData,a=c.bits,s=c.colorSpace,l=c.colors,-1!==[4,6].indexOf(c.colorType)){if(8===c.bits){p=(d=32==c.pixelBitlength?new Uint32Array(c.decodePixels().buffer):16==c.pixelBitlength?new Uint16Array(c.decodePixels().buffer):new Uint8Array(c.decodePixels().buffer)).length,g=new Uint8Array(p*c.colors),B=new Uint8Array(p);var F,U=c.pixelBitlength-c.bits;for(v=0,b=0;v<p;v++){for(m=d[v],F=0;F<U;)g[b++]=m>>>F&255,F+=c.bits;B[v]=m>>>F&255}}if(16===c.bits){p=(d=new Uint32Array(c.decodePixels().buffer)).length,g=new Uint8Array(p*(32/c.pixelBitlength)*c.colors),B=new Uint8Array(p*(32/c.pixelBitlength)),w=c.colors>1,v=0,b=0;for(var y=0;v<p;)m=d[v++],g[b++]=m>>>0&255,w&&(g[b++]=m>>>16&255,m=d[v++],g[b++]=m>>>0&255),B[y++]=m>>>16&255;a=8}o!==t.image_compression.NONE&&"function"==typeof r.b?(e=A(g,c.width*c.colors,c.colors,o),f=A(B,c.width,1,o)):(e=g,f=B,Q=void 0)}if(3===c.colorType&&(s=this.color_spaces.INDEXED,h=c.palette,c.transparency.indexed)){var N=c.transparency.indexed,E=0;for(v=0,p=N.length;v<p;++v)E+=N[v];if((E/=255)==p-1&&-1!==N.indexOf(0))u=[N.indexOf(0)];else if(E!==p){for(d=c.decodePixels(),B=new Uint8Array(d.length),v=0,p=d.length;v<p;v++)B[v]=N[d[v]];f=A(B,c.width,1)}}var L=function(A){var e;switch(o){case t.image_compression.FAST:e=11;break;case t.image_compression.MEDIUM:e=13;break;case t.image_compression.SLOW:e=14;break;default:e=12}return e}();return Q===this.decode.FLATE_DECODE&&(C="/Predictor "+L+" "),C+="/Colors "+l+" /BitsPerComponent "+a+" /Columns "+c.width,(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:i,data:e,index:n,filter:Q,decodeParameters:C,transparency:u,palette:h,sMask:f,predictor:L,width:c.width,height:c.height,bitsPerComponent:a,colorSpace:s}}}}(P.API),function(t){t.processGIF89A=function(A,e,r,n){var i=new function(t){var A=0;if(71!==t[A++]||73!==t[A++]||70!==t[A++]||56!==t[A++]||56!=(t[A++]+1&253)||97!==t[A++])throw new Error("Invalid GIF 87a/89a header.");var e=t[A++]|t[A++]<<8,r=t[A++]|t[A++]<<8,n=t[A++],i=n>>7,o=1<<1+(7&n);t[A++],t[A++];var s=null,a=null;i&&(s=A,a=o,A+=3*o);var c=!0,u=[],l=0,h=null,f=0,d=null;for(this.width=e,this.height=r;c&&A<t.length;)switch(t[A++]){case 33:switch(t[A++]){case 255:if(11!==t[A]||78==t[A+1]&&69==t[A+2]&&84==t[A+3]&&83==t[A+4]&&67==t[A+5]&&65==t[A+6]&&80==t[A+7]&&69==t[A+8]&&50==t[A+9]&&46==t[A+10]&&48==t[A+11]&&3==t[A+12]&&1==t[A+13]&&0==t[A+16])A+=14,d=t[A++]|t[A++]<<8,A++;else for(A+=12;;){if(!((N=t[A++])>=0))throw Error("Invalid block size");if(0===N)break;A+=N}break;case 249:if(4!==t[A++]||0!==t[A+4])throw new Error("Invalid graphics extension block.");var p=t[A++];l=t[A++]|t[A++]<<8,h=t[A++],0==(1&p)&&(h=null),f=p>>2&7,A++;break;case 254:for(;;){if(!((N=t[A++])>=0))throw Error("Invalid block size");if(0===N)break;A+=N}break;default:throw new Error("Unknown graphic control label: 0x"+t[A-1].toString(16))}break;case 44:var B=t[A++]|t[A++]<<8,g=t[A++]|t[A++]<<8,w=t[A++]|t[A++]<<8,m=t[A++]|t[A++]<<8,v=t[A++],b=v>>6&1,Q=1<<1+(7&v),C=s,F=a,U=!1;v>>7&&(U=!0,C=A,F=Q,A+=3*Q);var y=A;for(A++;;){var N;if(!((N=t[A++])>=0))throw Error("Invalid block size");if(0===N)break;A+=N}u.push({x:B,y:g,width:w,height:m,has_local_palette:U,palette_offset:C,palette_size:F,data_offset:y,data_length:A-y,transparent_index:h,interlaced:!!b,delay:l,disposal:f});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+t[A-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 new Error("Frame index out of range.");return u[t]},this.decodeAndBlitFrameBGRA=function(A,r){var n=this.frameInfo(A),i=n.width*n.height,o=new Uint8Array(i);Xt(t,n.data_offset,o,i);var s=n.palette_offset,a=n.transparent_index;null===a&&(a=256);var c=n.width,u=e-c,l=c,h=4*(n.y*e+n.x),f=4*((n.y+n.height)*e+n.x),d=h,p=4*u;!0===n.interlaced&&(p+=4*e*7);for(var B=8,g=0,w=o.length;g<w;++g){var m=o[g];if(0===l&&(l=c,(d+=p)>=f&&(p=4*u+4*e*(B-1),d=h+(c+u)*(B<<1),B>>=1)),m===a)d+=4;else{var v=t[s+3*m],b=t[s+3*m+1],Q=t[s+3*m+2];r[d++]=Q,r[d++]=b,r[d++]=v,r[d++]=255}--l}},this.decodeAndBlitFrameRGBA=function(A,r){var n=this.frameInfo(A),i=n.width*n.height,o=new Uint8Array(i);Xt(t,n.data_offset,o,i);var s=n.palette_offset,a=n.transparent_index;null===a&&(a=256);var c=n.width,u=e-c,l=c,h=4*(n.y*e+n.x),f=4*((n.y+n.height)*e+n.x),d=h,p=4*u;!0===n.interlaced&&(p+=4*e*7);for(var B=8,g=0,w=o.length;g<w;++g){var m=o[g];if(0===l&&(l=c,(d+=p)>=f&&(p=4*u+4*e*(B-1),d=h+(c+u)*(B<<1),B>>=1)),m===a)d+=4;else{var v=t[s+3*m],b=t[s+3*m+1],Q=t[s+3*m+2];r[d++]=v,r[d++]=b,r[d++]=Q,r[d++]=255}--l}}}(A),o=i.width,s=i.height,a=[];i.decodeAndBlitFrameRGBA(0,a);var c={data:a,width:o,height:s},u=new Jt(100).encode(c,100);return t.processJPEG.call(this,u,e,r,n)},t.processGIF87A=t.processGIF89A}(P.API),Wt.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var A=0;A<t;A++){var e=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[A]={red:n,green:r,blue:e,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Wt.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,A=this.width*this.height*4;this.data=new Uint8Array(A),this[t]()}catch(t){o.log("bit decode error:"+t)}},Wt.prototype.bit1=function(){var t,A=Math.ceil(this.width/8),e=A%4;for(t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<A;n++)for(var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*n*4,s=0;s<8&&8*n+s<this.width;s++){var a=this.palette[i>>7-s&1];this.data[o+4*s]=a.blue,this.data[o+4*s+1]=a.green,this.data[o+4*s+2]=a.red,this.data[o+4*s+3]=255}0!==e&&(this.pos+=4-e)}},Wt.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),A=t%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<t;n++){var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*n*4,s=i>>4,a=15&i,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*n+1>=this.width)break;c=this.palette[a],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}0!==A&&(this.pos+=4-A)}},Wt.prototype.bit8=function(){for(var t=this.width%4,A=this.height-1;A>=0;A--){for(var e=this.bottom_up?A:this.height-1-A,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=e*this.width*4+4*r;if(n<this.palette.length){var o=this.palette[n];this.data[i]=o.red,this.data[i+1]=o.green,this.data[i+2]=o.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}0!==t&&(this.pos+=4-t)}},Wt.prototype.bit15=function(){for(var t=this.width%3,A=parseInt("11111",2),e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(i&A)/A*255|0,s=(i>>5&A)/A*255|0,a=(i>>10&A)/A*255|0,c=i>>15?255:0,u=r*this.width*4+4*n;this.data[u]=a,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=c}this.pos+=t}},Wt.prototype.bit16=function(){for(var t=this.width%3,A=parseInt("11111",2),e=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&A)/A*255|0,a=(o>>5&e)/e*255|0,c=(o>>11)/A*255|0,u=n*this.width*4+4*i;this.data[u]=c,this.data[u+1]=a,this.data[u+2]=s,this.data[u+3]=255}this.pos+=t}},Wt.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var A=this.bottom_up?t:this.height-1-t,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=A*this.width*4+4*e;this.data[o]=i,this.data[o+1]=n,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},Wt.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var A=this.bottom_up?t:this.height-1-t,e=0;e<this.width;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=A*this.width*4+4*e;this.data[s]=i,this.data[s+1]=n,this.data[s+2]=r,this.data[s+3]=o}},Wt.prototype.getData=function(){return this.data},
/**
 * @license
 * Copyright (c) 2018 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){t.processBMP=function(A,e,r,n){var i=new Wt(A,!1),o=i.width,s=i.height,a={data:i.getData(),width:o,height:s},c=new Jt(100).encode(a,100);return t.processJPEG.call(this,c,e,r,n)}}(P.API),Yt.prototype.getData=function(){return this.data},
/**
 * @license
 * Copyright (c) 2019 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){t.processWEBP=function(A,e,r,n){var i=new Yt(A,!1),o=i.width,s=i.height,a={data:i.getData(),width:o,height:s},c=new Jt(100).encode(a,100);return t.processJPEG.call(this,c,e,r,n)}}(P.API),P.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this
/** @license
 * MIT license.
 * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
 *               2014 Diego Casorran, https://github.com/diegocr
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * ====================================================================
 */},Dt=P.API,zt=Dt.getCharWidthsArray=function(t,A){var e,r,n=(A=A||{}).font||this.internal.getFont(),i=A.fontSize||this.internal.getFontSize(),o=A.charSpace||this.internal.getCharSpace(),s=A.widths?A.widths:n.metadata.Unicode.widths,a=s.fof?s.fof:1,c=A.kerning?A.kerning:n.metadata.Unicode.kerning,u=c.fof?c.fof:1,l=!1!==A.doKerning,h=0,f=t.length,d=0,p=s[0]||a,B=[];for(e=0;e<f;e++)r=t.charCodeAt(e),"function"==typeof n.metadata.widthOfString?B.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(r))+o*(1e3/i)||0)/1e3):(h=l&&"object"==typeof c[r]&&!isNaN(parseInt(c[r][d],10))?c[r][d]/u:0,B.push((s[r]||p)/a+h)),d=r;return B},jt=Dt.getStringUnitWidth=function(t,A){var e=(A=A||{}).fontSize||this.internal.getFontSize(),r=A.font||this.internal.getFont(),n=A.charSpace||this.internal.getCharSpace();return Dt.processArabic&&(t=Dt.processArabic(t)),"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(t,e,n)/e:zt.apply(this,arguments).reduce(function(t,A){return t+A},0)},Vt=function(t,A,e,r){for(var n=[],i=0,o=t.length,s=0;i!==o&&s+A[i]<e;)s+=A[i],i++;n.push(t.slice(0,i));var a=i;for(s=0;i!==o;)s+A[i]>r&&(n.push(t.slice(a,i)),s=0,a=i),s+=A[i],i++;return a!==i&&n.push(t.slice(a,i)),n},qt=function(t,A,e){e||(e={});var r,n,i,o,s,a,c,u=[],l=[u],h=e.textIndent||0,f=0,d=0,p=t.split(" "),B=zt.apply(this,[" ",e])[0];if(a=-1===e.lineIndent?p[0].length+2:e.lineIndent||0){var g=Array(a).join(" "),w=[];p.map(function(t){(t=t.split(/\s*\n/)).length>1?w=w.concat(t.map(function(t,A){return(A&&t.length?"\n":"")+t})):w.push(t[0])}),p=w,a=jt.apply(this,[g,e])}for(i=0,o=p.length;i<o;i++){var m=0;if(r=p[i],a&&"\n"==r[0]&&(r=r.substr(1),m=1),h+f+(d=(n=zt.apply(this,[r,e])).reduce(function(t,A){return t+A},0))>A||m){if(d>A){for(s=Vt.apply(this,[r,n,A-(h+f),A]),u.push(s.shift()),u=[s.pop()];s.length;)l.push([s.shift()]);d=n.slice(r.length-(u[0]?u[0].length:0)).reduce(function(t,A){return t+A},0)}else u=[r];l.push(u),h=d+a,f=B}else u.push(r),h+=f+d,f=B}return c=a?function(t,A){return(A?g:"")+t.join(" ")}:function(t){return t.join(" ")},l.map(c)},Dt.splitTextToSize=function(t,A,e){var r,n=(e=e||{}).fontSize||this.internal.getFontSize(),i=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var A=this.internal.getFont(t.fontName,t.fontStyle);return A.metadata.Unicode?{widths:A.metadata.Unicode.widths||{0:1},kerning:A.metadata.Unicode.kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,e);r=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*A/n;i.textIndent=e.textIndent?1*e.textIndent*this.internal.scaleFactor/n:0,i.lineIndent=e.lineIndent;var s,a,c=[];for(s=0,a=r.length;s<a;s++)c=c.concat(qt.apply(this,[r[s],o,i]));return c},
/** @license
 jsPDF standard_fonts_metrics plugin
 * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
 * MIT license.
 * 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.
 * ====================================================================
 */
function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var A="klmnopqrstuvwxyz",e={},r={},n=0;n<A.length;n++)e[A[n]]="0123456789abcdef"[n],r["0123456789abcdef"[n]]=A[n];var i=function(t){return"0x"+parseInt(t,10).toString(16)},o=t.__fontmetrics__.compress=function(t){var A,e,n,s,a=["{"];for(var c in t){if(A=t[c],isNaN(parseInt(c,10))?e="'"+c+"'":(c=parseInt(c,10),e=(e=i(c).slice(2)).slice(0,-1)+r[e.slice(-1)]),"number"==typeof A)A<0?(n=i(A).slice(3),s="-"):(n=i(A).slice(2),s=""),n=s+n.slice(0,-1)+r[n.slice(-1)];else{if("object"!=typeof A)throw new Error("Don't know what to do with value type "+typeof A+".");n=o(A)}a.push(e+n)}return a.push("}"),a.join("")},s=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var A,r,n,i,o={},s=1,a=o,c=[],u="",l="",h=t.length-1,f=1;f<h;f+=1)"'"==(i=t[f])?A?(n=A.join(""),A=void 0):A=[]:A?A.push(i):"{"==i?(c.push([a,n]),a={},n=void 0):"}"==i?((r=c.pop())[0][r[1]]=a,n=void 0,a=r[0]):"-"==i?s=-1:void 0===n?e.hasOwnProperty(i)?(u+=e[i],n=parseInt(u,16)*s,s=1,u=""):u+=i:e.hasOwnProperty(i)?(l+=e[i],a[n]=parseInt(l,16)*s,s=1,n=void 0,l=""):l+=i;return o},a={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:a,"Courier-Bold":a,"Courier-BoldOblique":a,"Courier-Oblique":a,Helvetica:a,"Helvetica-Bold":a,"Helvetica-BoldOblique":a,"Helvetica-Oblique":a,"Times-Roman":a,"Times-Bold":a,"Times-BoldItalic":a,"Times-Italic":a}},u={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(t){var A=t.font,e=u.Unicode[A.postScriptName];e&&(A.metadata.Unicode={},A.metadata.Unicode.widths=e.widths,A.metadata.Unicode.kerning=e.kerning);var r=c.Unicode[A.postScriptName];r&&(A.metadata.Unicode.encoding=r,A.encoding=r.codePages[0])}])}(P.API),
/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A=function(t){for(var A=t.length,e=new Uint8Array(A),r=0;r<A;r++)e[r]=t.charCodeAt(r);return e};t.API.events.push(["addFont",function(e){var r=void 0,n=e.font,i=e.instance;if(!n.isStandardFont){if(void 0===i)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if("string"!=typeof(r=!1===i.existsFileInVFS(n.postScriptName)?i.loadFile(n.postScriptName):i.getFileFromVFS(n.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");!function(e,r){r=/^\x00\x01\x00\x00/.test(r)?A(r):A(u(r)),e.metadata=t.API.TTFFont.open(r),e.metadata.Unicode=e.metadata.Unicode||{encoding:{},kerning:{},widths:[]},e.metadata.glyIdsUsed=[0]}(n,r)}}])}(P),
/** @license
 * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
 *
 * 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.
 * ====================================================================
 */
function(t){function A(){return(n.canvg?Promise.resolve(n.canvg):e.e(15).then(e.bind(null,"8ZQu"))).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}P.API.addSvgAsImage=function(t,e,r,n,i,s,a,c){if(isNaN(e)||isNaN(r))throw o.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw o.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=n,u.height=i;var l=u.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return A().then(function(A){return A.fromString(l,t,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(t){return t.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),e,r,n,i,a,c)})}}(),P.API.putTotalPages=function(t){var A,e=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(A=new RegExp(t,"g"),e=this.internal.getNumberOfPages()):(A=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),e=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(A,e);return this},P.API.viewerPreferences=function(t,A){var e;t=t||{},A=A||!1;var r,n,i,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),a=[],c=0,u=0,l=0;function h(t,A){var e,r=!1;for(e=0;e<t.length;e+=1)t[e]===A&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),e=this.internal.viewerpreferences.configuration,"reset"===t||!0===A){var f=s.length;for(l=0;l<f;l+=1)e[s[l]].value=e[s[l]].defaultValue,e[s[l]].explicitSet=!1}if("object"==typeof t)for(n in t)if(i=t[n],h(s,n)&&void 0!==i){if("boolean"===e[n].type&&"boolean"==typeof i)e[n].value=i;else if("name"===e[n].type&&h(e[n].valueSet,i))e[n].value=i;else if("integer"===e[n].type&&Number.isInteger(i))e[n].value=i;else if("array"===e[n].type){for(c=0;c<i.length;c+=1)if(r=!0,1===i[c].length&&"number"==typeof i[c][0])a.push(String(i[c]-1));else if(i[c].length>1){for(u=0;u<i[c].length;u+=1)"number"!=typeof i[c][u]&&(r=!1);!0===r&&a.push([i[c][0]-1,i[c][1]-1].join(" "))}e[n].value="["+a.join(" ")+"]"}else e[n].value=e[n].defaultValue;e[n].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var t,A=[];for(t in e)!0===e[t].explicitSet&&("name"===e[t].type?A.push("/"+t+" /"+e[t].value):A.push("/"+t+" "+e[t].value));0!==A.length&&this.internal.write("/ViewerPreferences\n<<\n"+A.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=e,this
/** ====================================================================
 * @license
 * jsPDF XMP metadata plugin
 * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
 *
 * 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.
 * ====================================================================
 */},function(t){var A=function(){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',A=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),e=unescape(encodeURIComponent(t)),r=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),n=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),i=unescape(encodeURIComponent("</x:xmpmeta>")),o=e.length+r.length+n.length+A.length+i.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(A+e+r+n+i),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")};P.API.addMetadata=function(t,r){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceuri:r||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",e),this.internal.events.subscribe("postPutResources",A)),this}}(),function(t){var A=t.API,e=A.pdfEscape16=function(t,A){for(var e,r=A.metadata.Unicode.widths,n=["","0","00","000","0000"],i=[""],o=0,s=t.length;o<s;++o){if(e=A.metadata.characterToGlyph(t.charCodeAt(o)),A.metadata.glyIdsUsed.push(e),A.metadata.toUnicode[e]=t.charCodeAt(o),-1==r.indexOf(e)&&(r.push(e),r.push([parseInt(A.metadata.widthOfGlyph(e),10)])),"0"==e)return i.join("");e=e.toString(16),i.push(n[4-e.length],e)}return i.join("")},r=function(t){var A,e,r,n,i,o,s;for(i="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",r=[],o=0,s=(e=Object.keys(t).sort(function(t,A){return t-A})).length;o<s;o++)A=e[o],r.length>=100&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==t[A]&&null!==t[A]&&"function"==typeof t[A].toString&&(n=("0000"+t[A].toString(16)).slice(-4),A=("0000"+(+A).toString(16)).slice(-4),r.push("<"+A+"><"+n+">"));return r.length&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),i+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};A.events.push(["putFont",function(A){!function(A){var e=A.font,n=A.out,i=A.newObject,o=A.putStream,s=A.pdfEscapeWithNeededParanthesis;if(e.metadata instanceof t.API.TTFFont&&"Identity-H"===e.encoding){for(var a=e.metadata.Unicode.widths,c=e.metadata.subset.encode(e.metadata.glyIdsUsed,1),u="",l=0;l<c.length;l++)u+=String.fromCharCode(c[l]);var h=i();o({data:u,addLength1:!0,objectId:h}),n("endobj");var f=i();o({data:r(e.metadata.toUnicode),addLength1:!0,objectId:f}),n("endobj");var d=i();n("<<"),n("/Type /FontDescriptor"),n("/FontName /"+s(e.fontName)),n("/FontFile2 "+h+" 0 R"),n("/FontBBox "+t.API.PDFObject.convert(e.metadata.bbox)),n("/Flags "+e.metadata.flags),n("/StemV "+e.metadata.stemV),n("/ItalicAngle "+e.metadata.italicAngle),n("/Ascent "+e.metadata.ascender),n("/Descent "+e.metadata.decender),n("/CapHeight "+e.metadata.capHeight),n(">>"),n("endobj");var p=i();n("<<"),n("/Type /Font"),n("/BaseFont /"+s(e.fontName)),n("/FontDescriptor "+d+" 0 R"),n("/W "+t.API.PDFObject.convert(a)),n("/CIDToGIDMap /Identity"),n("/DW 1000"),n("/Subtype /CIDFontType2"),n("/CIDSystemInfo"),n("<<"),n("/Supplement 0"),n("/Registry (Adobe)"),n("/Ordering ("+e.encoding+")"),n(">>"),n(">>"),n("endobj"),e.objectNumber=i(),n("<<"),n("/Type /Font"),n("/Subtype /Type0"),n("/ToUnicode "+f+" 0 R"),n("/BaseFont /"+s(e.fontName)),n("/Encoding /"+e.encoding),n("/DescendantFonts ["+p+" 0 R]"),n(">>"),n("endobj"),e.isAlreadyPutted=!0}}(A)}]),A.events.push(["putFont",function(A){!function(A){var e=A.font,n=A.out,i=A.newObject,o=A.putStream,s=A.pdfEscapeWithNeededParanthesis;if(e.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===e.encoding){for(var a=e.metadata.rawData,c="",u=0;u<a.length;u++)c+=String.fromCharCode(a[u]);var l=i();o({data:c,addLength1:!0,objectId:l}),n("endobj");var h=i();o({data:r(e.metadata.toUnicode),addLength1:!0,objectId:h}),n("endobj");var f=i();n("<<"),n("/Descent "+e.metadata.decender),n("/CapHeight "+e.metadata.capHeight),n("/StemV "+e.metadata.stemV),n("/Type /FontDescriptor"),n("/FontFile2 "+l+" 0 R"),n("/Flags 96"),n("/FontBBox "+t.API.PDFObject.convert(e.metadata.bbox)),n("/FontName /"+s(e.fontName)),n("/ItalicAngle "+e.metadata.italicAngle),n("/Ascent "+e.metadata.ascender),n(">>"),n("endobj"),e.objectNumber=i();for(var d=0;d<e.metadata.hmtx.widths.length;d++)e.metadata.hmtx.widths[d]=parseInt(e.metadata.hmtx.widths[d]*(1e3/e.metadata.head.unitsPerEm));n("<</Subtype/TrueType/Type/Font/ToUnicode "+h+" 0 R/BaseFont/"+s(e.fontName)+"/FontDescriptor "+f+" 0 R/Encoding/"+e.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(e.metadata.hmtx.widths)+">>"),n("endobj"),e.isAlreadyPutted=!0}}(A)}]);var n=function(t){var A,r=t.text||"",n=t.x,i=t.y,o=t.options||{},s=t.mutex||{},a=s.pdfEscape,c=s.activeFontKey,u=s.fonts,l=c,h="",f=0,d="",p=u[l].encoding;if("Identity-H"!==u[l].encoding)return{text:r,x:n,y:i,options:o,mutex:s};for(d=r,l=c,Array.isArray(r)&&(d=r[0]),f=0;f<d.length;f+=1)u[l].metadata.hasOwnProperty("cmap")&&(A=u[l].metadata.cmap.unicode.codeMap[d[f].charCodeAt(0)]),A||d[f].charCodeAt(0)<256&&u[l].metadata.hasOwnProperty("Unicode")?h+=d[f]:h+="";var B="";return parseInt(l.slice(1))<14||"WinAnsiEncoding"===p?B=a(h,l).split("").map(function(t){return t.charCodeAt(0).toString(16)}).join(""):"Identity-H"===p&&(B=e(h,u[l])),s.isHex=!0,{text:B,x:n,y:i,options:o,mutex:s}};A.events.push(["postProcessText",function(t){var A=t.text||"",e=[],r={text:A,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(A)){var i=0;for(i=0;i<A.length;i+=1)Array.isArray(A[i])&&3===A[i].length?e.push([n(Object.assign({},r,{text:A[i][0]})).text,A[i][1],A[i][2]]):e.push(n(Object.assign({},r,{text:A[i]})).text);t.text=e}else t.text=n(Object.assign({},r,{text:A})).text}])}(P),
/**
 * @license
 * jsPDF virtual FileSystem functionality
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */
function(t){var A=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return A.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,e){return A.call(this),this.internal.vFS[t]=e,this},t.getFileFromVFS=function(t){return A.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(P.API),
/**
 * @license
 * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
 * MIT License
 */
function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var e,r,n,i,o,s,a,c=A,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},f={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],p=new 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)$/),B=!1,g=0;this.__bidiEngine__={};var w=function(t){var A=t.charCodeAt(),e=A>>8,r=f[e];return void 0!==r?c[256*r+(255&A)]:252===e||253===e?"AL":p.test(e)?"L":8===e?"R":"N"},m=function(t){for(var A,e=0;e<t.length;e++){if("L"===(A=w(t.charAt(e))))return!1;if("R"===A)return!0}return!1},v=function(t,A,o,s){var a,c,u,l,h=A[s];switch(h){case"L":case"R":B=!1;break;case"N":case"AN":break;case"EN":B&&(h="AN");break;case"AL":B=!0,h="R";break;case"WS":h="N";break;case"CS":s<1||s+1>=A.length||"EN"!==(a=o[s-1])&&"AN"!==a||"EN"!==(c=A[s+1])&&"AN"!==c?h="N":B&&(c="AN"),h=c===a?c:"N";break;case"ES":h="EN"===(a=s>0?o[s-1]:"B")&&s+1<A.length&&"EN"===A[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===o[s-1]){h="EN";break}if(B){h="N";break}for(u=s+1,l=A.length;u<l&&"ET"===A[u];)u++;h=u<l&&"EN"===A[u]?"EN":"N";break;case"NSM":if(n&&!i){for(l=A.length,u=s+1;u<l&&"NSM"===A[u];)u++;if(u<l){var f=t[s],d=f>=1425&&f<=2303||64286===f;if(a=A[u],d&&("R"===a||"AL"===a)){h="R";break}}}h=s<1||"B"===(a=A[s-1])?"N":o[s-1];break;case"B":B=!1,e=!0,h=g;break;case"S":r=!0,h="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":B=!1;break;case"BN":h="N"}return h},b=function(t,A,e){var r=t.split("");return e&&Q(r,e,{hiLevel:g}),r.reverse(),A&&A.reverse(),r.join("")},Q=function(t,A,n){var i,o,s,a,c,f=-1,d=t.length,p=0,m=[],b=g?l:u,Q=[];for(B=!1,e=!1,r=!1,o=0;o<d;o++)Q[o]=w(t[o]);for(s=0;s<d;s++){if(c=p,m[s]=v(t,Q,m,s),i=240&(p=b[c][h[m[s]]]),p&=15,A[s]=a=b[p][5],i>0)if(16===i){for(o=f;o<s;o++)A[o]=1;f=-1}else f=-1;if(b[p][6])-1===f&&(f=s);else if(f>-1){for(o=f;o<s;o++)A[o]=a;f=-1}"B"===Q[s]&&(A[s]=0),n.hiLevel|=a}r&&function(t,A,e){for(var r=0;r<e;r++)if("S"===t[r]){A[r]=g;for(var n=r-1;n>=0&&"WS"===t[n];n--)A[n]=g}}(Q,A,d)},C=function(t,A,r,n,i){if(!(i.hiLevel<t)){if(1===t&&1===g&&!e)return A.reverse(),void(r&&r.reverse());for(var o,s,a,c,u=A.length,l=0;l<u;){if(n[l]>=t){for(a=l+1;a<u&&n[a]>=t;)a++;for(c=l,s=a-1;c<s;c++,s--)o=A[c],A[c]=A[s],A[s]=o,r&&(o=r[c],r[c]=r[s],r[s]=o);l=a}l++}}},F=function(t,A,e){var r=t.split(""),n={hiLevel:g};return e||(e=[]),Q(r,e,n),function(t,A,e){if(0!==e.hiLevel&&a)for(var r,n=0;n<t.length;n++)1===A[n]&&(r=d.indexOf(t[n]))>=0&&(t[n]=d[r+1])}(r,e,n),C(2,r,A,e,n),C(1,r,A,e,n),r.join("")};return this.__bidiEngine__.doBidiReorder=function(t,A,e){if(function(t,A){if(A)for(var e=0;e<t.length;e++)A[e]=e;void 0===i&&(i=m(t)),void 0===s&&(s=m(t))}(t,A),n||!o||s)if(n&&o&&i^s)g=i?1:0,t=b(t,A,e);else if(!n&&o&&s)g=i?1:0,t=F(t,A,e),t=b(t,A);else if(!n||i||o||s){if(n&&!o&&i^s)t=b(t,A),i?(g=0,t=F(t,A,e)):(g=1,t=F(t,A,e),t=b(t,A));else if(n&&i&&!o&&s)g=1,t=F(t,A,e),t=b(t,A);else if(!n&&!o&&i^s){var r=a;i?(g=1,t=F(t,A,e),g=0,a=!1,t=F(t,A,e),a=r):(g=0,t=F(t,A,e),t=b(t,A),g=1,a=!1,t=F(t,A,e),a=r,t=b(t,A))}}else g=0,t=F(t,A,e);else g=i?1:0,t=F(t,A,e);return t},this.__bidiEngine__.setOptions=function(t){t&&(n=t.isInputVisual,o=t.isOutputVisual,i=t.isInputRtl,s=t.isOutputRtl,a=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var A=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],e=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var A=t.text,r=(t.x,t.y,t.options||{}),n=(t.mutex,r.lang,[]);if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,e.setOptions(r),"[object Array]"===Object.prototype.toString.call(A)){var i=0;for(n=[],i=0;i<A.length;i+=1)"[object Array]"===Object.prototype.toString.call(A[i])?n.push([e.doBidiReorder(A[i][0]),A[i][1],A[i][2]]):n.push([e.doBidiReorder(A[i])]);t.text=n}else t.text=e.doBidiReorder(A);e.setOptions({isInputVisual:!0})}])}(P),P.API.TTFFont=function(){function t(t){var A;if(this.rawData=t,A=this.contents=new $t(t),this.contents.pos=4,"ttcf"===A.readString(4))throw new Error("TTCF not supported.");A.pos=0,this.parse(),this.subset=new wA(this),this.registerTTF()}return t.open=function(A){return new t(A)},t.prototype.parse=function(){return this.directory=new tA(this.contents),this.head=new rA(this),this.name=new uA(this),this.cmap=new iA(this),this.toUnicode={},this.hhea=new oA(this),this.maxp=new lA(this),this.hmtx=new hA(this),this.post=new aA(this),this.os2=new sA(this),this.loca=new gA(this),this.glyf=new dA(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,A,e,r,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var A,e,r,n;for(n=[],A=0,e=(r=this.bbox).length;A<e;A++)t=r[A],n.push(Math.round(t*this.scaleFactor));return n}.call(this),this.stemV=0,this.post.exists?(e=255&(r=this.post.italic_angle),0!=(32768&(A=r>>16))&&(A=-(1+(65535^A))),this.italicAngle=+(A+"."+e)):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===(n=this.familyClass)||2===n||3===n||4===n||5===n||7===n,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 new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var A;return(null!=(A=this.cmap.unicode)?A.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var A;return A=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*A},t.prototype.widthOfString=function(t,A,e){var r,n,i,o;for(i=0,n=0,o=(t=""+t).length;0<=o?n<o:n>o;n=0<=o?++n:--n)r=t.charCodeAt(n),i+=this.widthOfGlyph(this.characterToGlyph(r))+e*(1e3/A)||0;return i*(A/1e3)},t.prototype.lineHeight=function(t,A){var e;return null==A&&(A=!1),e=A?this.lineGap:0,(this.ascender+e-this.decender)/1e3*t},t}();var Zt,$t=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 A,e;for(e=[],A=0;0<=t?A<t:A>t;A=0<=t?++A:--A)e[A]=String.fromCharCode(this.readByte());return e.join("")},t.prototype.writeString=function(t){var A,e,r;for(r=[],A=0,e=t.length;0<=e?A<e:A>e;A=0<=e?++A:--A)r.push(this.writeByte(t.charCodeAt(A)));return r},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,A,e,r,n,i,o,s;return t=this.readByte(),A=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^A)+1099511627776*(255^e)+4294967296*(255^r)+16777216*(255^n)+65536*(255^i)+256*(255^o)+(255^s)+1):72057594037927940*t+281474976710656*A+1099511627776*e+4294967296*r+16777216*n+65536*i+256*o+s},t.prototype.writeLongLong=function(t){var A,e;return A=Math.floor(t/4294967296),e=4294967295&t,this.writeByte(A>>24&255),this.writeByte(A>>16&255),this.writeByte(A>>8&255),this.writeByte(255&A),this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var A,e;for(A=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)A.push(this.readByte());return A},t.prototype.write=function(t){var A,e,r,n;for(n=[],e=0,r=t.length;e<r;e++)A=t[e],n.push(this.writeByte(A));return n},t}(),tA=function(){var t;function A(t){var A,e,r;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},e=0,r=this.tableCount;0<=r?e<r:e>r;e=0<=r?++e:--e)A={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[A.tag]=A}return A.prototype.encode=function(A){var e,r,n,i,o,s,a,c,u,l,h,f,d;for(d in h=Object.keys(A).length,s=Math.log(2),u=16*Math.floor(Math.log(h)/s),i=Math.floor(u/s),c=16*h-u,(r=new $t).writeInt(this.scalarType),r.writeShort(h),r.writeShort(u),r.writeShort(i),r.writeShort(c),n=16*h,a=r.pos+n,o=null,f=[],A)for(l=A[d],r.writeString(d),r.writeInt(t(l)),r.writeInt(a),r.writeInt(l.length),f=f.concat(l),"head"===d&&(o=a),a+=l.length;a%4;)f.push(0),a++;return r.write(f),e=2981146554-t(r.data),r.pos=o+8,r.writeUInt32(e),r.data},t=function(t){var A,e,r,n;for(t=fA.call(t);t.length%4;)t.push(0);for(r=new $t(t),e=0,A=0,n=t.length;A<n;A=A+=4)e+=r.readUInt32();return 4294967295&e},A}(),AA={}.hasOwnProperty,eA=function(t,A){for(var e in A)AA.call(A,e)&&(t[e]=A[e]);function r(){this.constructor=t}return r.prototype=A.prototype,t.prototype=new r,t.__super__=A.prototype,t};Zt=function(){function t(t){var A;this.file=t,A=this.file.directory.tables[this.tag],this.exists=!!A,A&&(this.offset=A.offset,this.length=A.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var rA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="head",A.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},A.prototype.encode=function(t){var A;return(A=new $t).writeInt(this.version),A.writeInt(this.revision),A.writeInt(this.checkSumAdjustment),A.writeInt(this.magicNumber),A.writeShort(this.flags),A.writeShort(this.unitsPerEm),A.writeLongLong(this.created),A.writeLongLong(this.modified),A.writeShort(this.xMin),A.writeShort(this.yMin),A.writeShort(this.xMax),A.writeShort(this.yMax),A.writeShort(this.macStyle),A.writeShort(this.lowestRecPPEM),A.writeShort(this.fontDirectionHint),A.writeShort(t),A.writeShort(this.glyphDataFormat),A.data},A}(),nA=function(){function t(t,A){var e,r,n,i,o,s,a,c,u,l,h,f,d,p,B,g,w;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=A+t.readInt(),u=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=t.readByte();break;case 4:for(h=t.readUInt16(),l=h/2,t.pos+=6,n=function(){var A,e;for(e=[],s=A=0;0<=l?A<l:A>l;s=0<=l?++A:--A)e.push(t.readUInt16());return e}(),t.pos+=2,d=function(){var A,e;for(e=[],s=A=0;0<=l?A<l:A>l;s=0<=l?++A:--A)e.push(t.readUInt16());return e}(),a=function(){var A,e;for(e=[],s=A=0;0<=l?A<l:A>l;s=0<=l?++A:--A)e.push(t.readUInt16());return e}(),c=function(){var A,e;for(e=[],s=A=0;0<=l?A<l:A>l;s=0<=l?++A:--A)e.push(t.readUInt16());return e}(),r=(this.length-t.pos+this.offset)/2,o=function(){var A,e;for(e=[],s=A=0;0<=r?A<r:A>r;s=0<=r?++A:--A)e.push(t.readUInt16());return e}(),s=B=0,w=n.length;B<w;s=++B)for(p=n[s],e=g=f=d[s];f<=p?g<=p:g>=p;e=f<=p?++g:--g)0===c[s]?i=e+a[s]:0!==(i=o[c[s]/2+(e-f)-(l-s)]||0)&&(i+=a[s]),this.codeMap[e]=65535&i}t.pos=u}return t.encode=function(t,A){var e,r,n,i,o,s,a,c,u,l,h,f,d,p,B,g,w,m,v,b,Q,C,F,U,y,N,E,L,H,_,S,x,I,P,T,R,O,K,M,k,D,z,j,V,q,G;switch(L=new $t,i=Object.keys(t).sort(function(t,A){return t-A}),A){case"macroman":for(d=0,p=function(){var t=[];for(f=0;f<256;++f)t.push(0);return t}(),g={0:0},n={},H=0,I=i.length;H<I;H++)null==g[j=t[r=i[H]]]&&(g[j]=++d),n[r]={old:t[r],new:g[t[r]]},p[r]=g[t[r]];return L.writeUInt16(1),L.writeUInt16(0),L.writeUInt32(12),L.writeUInt16(0),L.writeUInt16(262),L.writeUInt16(0),L.write(p),{charMap:n,subtable:L.data,maxGlyphID:d+1};case"unicode":for(N=[],u=[],w=0,g={},e={},B=a=null,_=0,P=i.length;_<P;_++)null==g[v=t[r=i[_]]]&&(g[v]=++w),e[r]={old:v,new:g[v]},o=g[v]-r,null!=B&&o===a||(B&&u.push(B),N.push(r),a=o),B=r;for(B&&u.push(B),u.push(65535),N.push(65535),U=2*(F=N.length),C=2*Math.pow(Math.log(F)/Math.LN2,2),l=Math.log(C/2)/Math.LN2,Q=2*F-C,s=[],b=[],h=[],f=S=0,T=N.length;S<T;f=++S){if(y=N[f],c=u[f],65535===y){s.push(0),b.push(0);break}if(y-(E=e[y].new)>=32768)for(s.push(0),b.push(2*(h.length+F-f)),r=x=y;y<=c?x<=c:x>=c;r=y<=c?++x:--x)h.push(e[r].new);else s.push(E-y),b.push(0)}for(L.writeUInt16(3),L.writeUInt16(1),L.writeUInt32(12),L.writeUInt16(4),L.writeUInt16(16+8*F+2*h.length),L.writeUInt16(0),L.writeUInt16(U),L.writeUInt16(C),L.writeUInt16(l),L.writeUInt16(Q),D=0,R=u.length;D<R;D++)r=u[D],L.writeUInt16(r);for(L.writeUInt16(0),z=0,O=N.length;z<O;z++)r=N[z],L.writeUInt16(r);for(V=0,K=s.length;V<K;V++)o=s[V],L.writeUInt16(o);for(q=0,M=b.length;q<M;q++)m=b[q],L.writeUInt16(m);for(G=0,k=h.length;G<k;G++)d=h[G],L.writeUInt16(d);return{charMap:e,subtable:L.data,maxGlyphID:w+1}}},t}(),iA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="cmap",A.prototype.parse=function(t){var A,e,r;for(t.pos=this.offset,this.version=t.readUInt16(),r=t.readUInt16(),this.tables=[],this.unicode=null,e=0;0<=r?e<r:e>r;e=0<=r?++e:--e)A=new nA(t,this.offset),this.tables.push(A),A.isUnicode&&null==this.unicode&&(this.unicode=A);return!0},A.encode=function(t,A){var e,r;return null==A&&(A="macroman"),e=nA.encode(t,A),(r=new $t).writeUInt16(0),r.writeUInt16(1),e.table=r.data.concat(e.subtable),e},A}(),oA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="hhea",A.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()},A}(),sA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="OS/2",A.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 A,e;for(e=[],A=0;A<10;++A)e.push(t.readByte());return e}(),this.charRange=function(){var A,e;for(e=[],A=0;A<4;++A)e.push(t.readInt());return e}(),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 A,e;for(e=[],A=0;A<2;A=++A)e.push(t.readInt());return e}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},A}(),aA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="post",A.prototype.parse=function(t){var A,e,r;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:break;case 131072:var n;for(e=t.readUInt16(),this.glyphNameIndex=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],r=[];t.pos<this.offset+this.length;)A=t.readByte(),r.push(this.names.push(t.readString(A)));return r;case 151552:return e=t.readUInt16(),this.offsets=t.read(e);case 196608:break;case 262144:return this.map=function(){var A,e,r;for(r=[],n=A=0,e=this.file.maxp.numGlyphs;0<=e?A<e:A>e;n=0<=e?++A:--A)r.push(t.readUInt32());return r}.call(this)}},A}(),cA=function(t,A){this.raw=t,this.length=t.length,this.platformID=A.platformID,this.encodingID=A.encodingID,this.languageID=A.languageID},uA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="name",A.prototype.parse=function(t){var A,e,r,n,i,o,s,a,c,u,l;for(t.pos=this.offset,t.readShort(),A=t.readShort(),o=t.readShort(),e=[],n=0;0<=A?n<A:n>A;n=0<=A?++n:--n)e.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(s={},n=c=0,u=e.length;c<u;n=++c)r=e[n],t.pos=r.offset,a=t.readString(r.length),i=new cA(a,r),null==s[l=r.nameID]&&(s[l]=[]),s[r.nameID].push(i);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},A}(),lA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="maxp",A.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},A}(),hA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="hmtx",A.prototype.parse=function(t){var A,e,r,n,i,o,s;for(t.pos=this.offset,this.metrics=[],A=0,o=this.file.hhea.numberOfMetrics;0<=o?A<o:A>o;A=0<=o?++A:--A)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var e,n;for(n=[],A=e=0;0<=r?e<r:e>r;A=0<=r?++e:--e)n.push(t.readInt16());return n}(),this.widths=function(){var t,A,e,r;for(r=[],t=0,A=(e=this.metrics).length;t<A;t++)n=e[t],r.push(n.advance);return r}.call(this),e=this.widths[this.widths.length-1],s=[],A=i=0;0<=r?i<r:i>r;A=0<=r?++i:--i)s.push(this.widths.push(e));return s},A.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]}},A}(),fA=[].slice,dA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="glyf",A.prototype.parse=function(){return this.cache={}},A.prototype.glyphFor=function(t){var A,e,r,n,i,o,s,a,c,u;return t in this.cache?this.cache[t]:(n=this.file.loca,A=this.file.contents,e=n.indexOf(t),0===(r=n.lengthOf(t))?this.cache[t]=null:(A.pos=this.offset+e,i=(o=new $t(A.read(r))).readShort(),a=o.readShort(),u=o.readShort(),s=o.readShort(),c=o.readShort(),this.cache[t]=-1===i?new BA(o,a,u,s,c):new pA(o,i,a,u,s,c),this.cache[t]))},A.prototype.encode=function(t,A,e){var r,n,i,o,s;for(i=[],n=[],o=0,s=A.length;o<s;o++)r=t[A[o]],n.push(i.length),r&&(i=i.concat(r.encode(e)));return n.push(i.length),{table:i,offsets:n}},A}(),pA=function(){function t(t,A,e,r,n,i){this.raw=t,this.numberOfContours=A,this.xMin=e,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),BA=function(){function t(t,A,e,r,n){var i,o;for(this.raw=t,this.xMin=A,this.yMin=e,this.xMax=r,this.yMax=n,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],i=this.raw;o=i.readShort(),this.glyphOffsets.push(i.pos),this.glyphIDs.push(i.readUInt16()),32&o;)i.pos+=1&o?4:2,128&o?i.pos+=8:64&o?i.pos+=4:8&o&&(i.pos+=2)}return t.prototype.encode=function(){var t,A,e;for(A=new $t(fA.call(this.raw.data)),t=0,e=this.glyphIDs.length;t<e;++t)A.pos=this.glyphOffsets[t];return A.data},t}(),gA=function(t){function A(){return A.__super__.constructor.apply(this,arguments)}return eA(A,Zt),A.prototype.tag="loca",A.prototype.parse=function(t){var A,e;return t.pos=this.offset,A=this.file.head.indexToLocFormat,this.offsets=0===A?function(){var A,r;for(r=[],e=0,A=this.length;e<A;e+=2)r.push(2*t.readUInt16());return r}.call(this):function(){var A,r;for(r=[],e=0,A=this.length;e<A;e+=4)r.push(t.readUInt32());return r}.call(this)},A.prototype.indexOf=function(t){return this.offsets[t]},A.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},A.prototype.encode=function(t,A){for(var e=new Uint32Array(this.offsets.length),r=0,n=0,i=0;i<e.length;++i)if(e[i]=r,n<A.length&&A[n]==i){++n,e[i]=r;var o=this.offsets[i],s=this.offsets[i+1]-o;s>0&&(r+=s)}for(var a=new Array(4*e.length),c=0;c<e.length;++c)a[4*c+3]=255&e[c],a[4*c+2]=(65280&e[c])>>8,a[4*c+1]=(16711680&e[c])>>16,a[4*c]=(4278190080&e[c])>>24;return a},A}(),wA=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,A,e,r,n;for(A in r=this.font.cmap.tables[0].codeMap,t={},n=this.subset)e=n[A],t[A]=r[e];return t},t.prototype.glyphsFor=function(t){var A,e,r,n,i,o,s;for(r={},i=0,o=t.length;i<o;i++)r[n=t[i]]=this.font.glyf.glyphFor(n);for(n in A=[],r)(null!=(e=r[n])?e.compound:void 0)&&A.push.apply(A,e.glyphIDs);if(A.length>0)for(n in s=this.glyphsFor(A))e=s[n],r[n]=e;return r},t.prototype.encode=function(t,A){var e,r,n,i,o,s,a,c,u,l,h,f,d,p,B;for(r in e=iA.encode(this.generateCmap(),"unicode"),i=this.glyphsFor(t),h={0:0},B=e.charMap)h[(s=B[r]).old]=s.new;for(f in l=e.maxGlyphID,i)f in h||(h[f]=l++);return c=function(t){var A,e;for(A in e={},t)e[t[A]]=A;return e}(h),u=Object.keys(c).sort(function(t,A){return t-A}),d=function(){var t,A,e;for(e=[],t=0,A=u.length;t<A;t++)o=u[t],e.push(c[o]);return e}(),n=this.font.glyf.encode(i,d,h),a=this.font.loca.encode(n.offsets,d),p={cmap:this.font.cmap.raw(),glyf:n.table,loca:a,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(A)},this.font.os2.exists&&(p["OS/2"]=this.font.os2.raw()),this.font.directory.encode(p)},t}();P.API.PDFObject=function(){var t;function A(){}return t=function(t,A){return(Array(A+1).join("0")+t).slice(-A)},A.convert=function(e){var r,n,i,o;if(Array.isArray(e))return"["+function(){var t,n,i;for(i=[],t=0,n=e.length;t<n;t++)r=e[t],i.push(A.convert(r));return i}().join(" ")+"]";if("string"==typeof e)return"/"+e;if(null!=e?e.isString:void 0)return"("+e+")";if(e instanceof Date)return"(D:"+t(e.getUTCFullYear(),4)+t(e.getUTCMonth(),2)+t(e.getUTCDate(),2)+t(e.getUTCHours(),2)+t(e.getUTCMinutes(),2)+t(e.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(e)){for(n in i=["<<"],e)o=e[n],i.push("/"+n+" "+A.convert(o));return i.push(">>"),i.join("\n")}return""+e},A}(),A.a=P}).call(A,e("DuR2"))},"G/mB":function(t,A,e){"use strict";Object.defineProperty(A,"__esModule",{value:!0});var r=e("eMjc"),n=e.n(r),i=e("3h9r"),o=[{title:"编号",dataIndex:"report_no",key:"report_no",scopedSlots:{customRender:"report_no"},width:270},{title:"剧本名称",dataIndex:"workflow_name",key:"workflow_name",scopedSlots:{customRender:"workflow_name"},width:260},{title:"备注",dataIndex:"remarks",key:"remarks",scopedSlots:{customRender:"remarks"}},{title:"执行时间",key:"create_time",dataIndex:"create_time",scopedSlots:{customRender:"create_time"},width:190},{title:"操作",key:"action",scopedSlots:{customRender:"action"},width:60}],s={name:"reportHome",data:function(){return{columns:o,loading:!1,data:[],so_text:"",visible_report:!1,report_no:"",workflow_name:"",remarks:"",create_time:"",log_data:[]}},mounted:function(){this.onLoad()},methods:{onLoad:function(){var t=this,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.loading=!0,this.$http.post("/api/v1/w5/get/report/list",{keywords:A}).then(function(A){0==A.code?(t.data=A.data,t.loading=!1):(t.$message.error(A.msg),t.loading=!1)})},onReportLog:function(t){var A=this;this.loading=!0,this.$http.post("/api/v1/w5/get/report/log",{only_id:t}).then(function(t){0==t.code?(A.log_data=t.data,A.loading=!1):(A.$message.error(t.msg),A.loading=!1)})},del:function(t){var A=this;this.$http.post("/api/v1/w5/post/report/del",{id:t}).then(function(t){0==t.code?(A.$message.success("删除成功"),A.onLoad()):A.$message.error(t.msg)})},onSearch:function(t){this.so_text=t,this.onLoad(this.so_text)},show_report:function(t,A,e,r){this.onReportLog(t),this.report_no=t,this.workflow_name=A,this.remarks=e,this.create_time=r,this.visible_report=!0},onSaveReport:function(){var t=this.workflow_name+"-"+this.report_no;n()(document.querySelector("#report"),{allowTaint:!0,useCORS:!0}).then(function(A){var e=A.width,r=A.height,n=e/592.28*841.89,o=r,s=0,a=592.28/e*r,c=A.toDataURL("image/jpeg",1),u=new i.a("","pt","a4");if(o<n)u.addImage(c,"JPEG",0,0,595.28,a);else for(;o>0;)u.addImage(c,"JPEG",0,s,595.28,a),s-=841.89,(o-=n)>0&&u.addPage();u.save(t+".pdf")})},onCloseReport:function(){this.visible_report=!1}}},a={render:function(){var t=this,A=t.$createElement,e=t._self._c||A;return e("a-layout-content",[e("div",{staticClass:"header_div"},[e("a-input-search",{staticClass:"align",staticStyle:{width:"200px"},attrs:{placeholder:"请输入关键字"},on:{search:t.onSearch}})],1),t._v(" "),e("a-table",{attrs:{rowKey:"id",columns:t.columns,"data-source":t.data,loading:t.loading},scopedSlots:t._u([{key:"workflow_name",fn:function(A){return e("span",{},[e("b",[t._v(t._s(A))])])}},{key:"report_no",fn:function(A){return e("a-tag",{attrs:{color:"#7d838c"}},[t._v("\n            "+t._s(A)+"\n        ")])}},{key:"status",fn:function(A){return e("span",{},[0==A?e("a-tag",{attrs:{color:"#469823"}},[t._v("正常")]):t._e(),t._v(" "),1==A?e("a-tag",{attrs:{color:"#9e8c0a"}},[t._v("警告")]):t._e(),t._v(" "),2==A?e("a-tag",{attrs:{color:"#9c5656"}},[t._v("错误")]):t._e(),t._v(" "),3==A?e("a-tag",{attrs:{color:"#bf0c0c"}},[t._v("危险")]):t._e()],1)}},{key:"create_time",fn:function(A){return e("di",{},[t._v("\n            "+t._s(t.Dayjs(A).subtract(8,"hour").format("YYYY-MM-DD HH:mm:ss"))+"\n        ")])}},{key:"action",fn:function(A,r){return e("div",{staticStyle:{"text-align":"center"}},[e("a-space",{attrs:{size:"small"}},[e("a-tooltip",{attrs:{placement:"left"}},[e("template",{slot:"title"},[e("span",[t._v("删除")])]),t._v(" "),e("a-popconfirm",{attrs:{title:"是否要删除该报告?","ok-text":"是","cancel-text":"否"},on:{confirm:function(A){return t.del(r.id)}}},[e("a-icon",{staticClass:"pointer",attrs:{type:"delete"}})],1)],2),t._v(" "),e("span",[t._v("|")]),t._v(" "),e("a-tooltip",{attrs:{placement:"top"}},[e("template",{slot:"title"},[e("span",[t._v("查看报告")])]),t._v(" "),e("a-icon",{staticClass:"pointer",attrs:{type:"eye"},on:{click:function(A){return t.show_report(r.report_no,r.workflow_name,r.remarks,r.create_time)}}})],2)],1)],1)}}])}),t._v(" "),e("a-modal",{attrs:{title:"PDF 报告",cancelText:"关闭",okText:"下载",maskClosable:!1,width:800,visible:t.visible_report},on:{ok:t.onSaveReport,cancel:t.onCloseReport}},[e("div",{attrs:{id:"report"}},[e("a-row",{staticClass:"report",staticStyle:{margin:"auto"},attrs:{gutter:16}},[e("a-col",{attrs:{span:24}},[e("div",{staticClass:"header"},[e("img",{staticClass:"logo",attrs:{src:t.BaseURL+"/public/logo.png"}}),t._v(" "),e("p",{staticClass:"logo_title"},[t._v("W5 SOAR v"+t._s(t.W5Version)+" 执行报告 ")])])]),t._v(" "),e("a-col",{attrs:{span:24}},[e("div",{staticClass:"div1"},[e("a-descriptions",{attrs:{column:1,bordered:"",size:"small"}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("span",{staticClass:"title"},[e("span",{staticClass:"jing"},[t._v("#")]),t._v("报告介绍\n                                ")])]),t._v(" "),e("a-descriptions-item",{attrs:{label:"编号"}},[e("b",[t._v(t._s(t.report_no))])]),t._v(" "),e("a-descriptions-item",{attrs:{label:"剧本"}},[e("b",[t._v(t._s(t.workflow_name))])]),t._v(" "),e("a-descriptions-item",{attrs:{label:"执行时间"}},[t._v("\n                                "+t._s(t.Dayjs(t.create_time).subtract(8,"hour").format("YYYY-MM-DD HH:mm:ss"))+"\n                            ")]),t._v(" "),e("a-descriptions-item",{attrs:{label:"备注"}},[t._v("\n                                "+t._s(t.remarks)+"\n                            ")])],1)],1)]),t._v(" "),t._l(t.log_data,function(A,r){return e("a-col",{key:r,staticClass:"div2",attrs:{span:24}},[e("a-descriptions",{attrs:{column:1,bordered:"",size:"small"}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("span",{staticClass:"title"},[e("span",{staticClass:"jing"},[t._v(t._s(r+1)+"、")]),t._v(t._s(A.app_name)+"\n                            ")]),t._v(" "),"开始"!=A.app_name&&"结束"!=A.app_name&&"用户输入"!=A.app_name&&"WebHook"!=A.app_name&&"定时器"!=A.app_name?e("span",{staticClass:"desc"},[t._v("\n                                "+t._s(A.args.description)+"\n                            ")]):t._e()]),t._v(" "),e("a-descriptions-item",{attrs:{label:"UUID"}},[e("b",[t._v(t._s(A.app_uuid))])]),t._v(" "),"开始"!=A.app_name&&"结束"!=A.app_name&&"用户输入"!=A.app_name&&"WebHook"!=A.app_name&&"定时器"!=A.app_name?e("a-descriptions-item",{attrs:{label:"动作"}},[e("b",[t._v(t._s(A.args.action_name))])]):t._e(),t._v(" "),"开始"!=A.app_name&&"结束"!=A.app_name&&"用户输入"!=A.app_name&&"WebHook"!=A.app_name&&"定时器"!=A.app_name?e("a-descriptions-item",{attrs:{label:"参数"}},t._l(A.args,function(A,r,n){return e("div",{key:n,staticClass:"args_list"},["action"!=r&&"action_name"!=r&&"description"!=r&&"node_name"!=r?e("div",[e("div",{staticClass:"args_title"},[e("span",{staticClass:"jing"},[t._v("|")]),t._v(" "+t._s(r))]),t._v(" "),e("div",[t._v(t._s(A))])]):t._e()])}),0):t._e(),t._v(" "),e("a-descriptions-item",{attrs:{label:"状态"}},[0==A.status?e("a-tag",{attrs:{color:"#469823"}},[t._v("正常")]):t._e(),t._v(" "),1==A.status?e("a-tag",{attrs:{color:"#9e8c0a"}},[t._v("警告")]):t._e(),t._v(" "),2==A.status?e("a-tag",{attrs:{color:"#9c5656"}},[t._v("错误")]):t._e(),t._v(" "),3==A.status?e("a-tag",{attrs:{color:"#bf0c0c"}},[t._v("危险")]):t._e()],1),t._v(" "),"用户输入"!==A.app_name&&"WebHook"!==A.app_name?e("a-descriptions-item",{attrs:{label:"结果"}},[e("div",{domProps:{innerHTML:t._s(A.html)}})]):e("a-descriptions-item",{attrs:{label:"输入"}},[e("div",{domProps:{innerHTML:t._s(A.html)}})]),t._v(" "),e("a-descriptions-item",{attrs:{label:"执行时间"}},[t._v("\n                            "+t._s(t.Dayjs(A.create_time).subtract(8,"hour").format("YYYY-MM-DD HH:mm:ss"))+"\n                        ")])],1)],1)})],2)],1)])],1)},staticRenderFns:[]};var c=e("VU/8")(s,a,!1,function(t){e("OIr7")},"data-v-0667cb4c",null);A.default=c.exports},OIr7:function(t,A){},VdNW:function(t,A,e){"use strict";A.b=X,A.a=J;var r=Uint8Array,n=Uint16Array,i=Uint32Array,o=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(t,A){for(var e=new n(31),r=0;r<31;++r)e[r]=A+=1<<t[r-1];var o=new i(e[30]);for(r=1;r<30;++r)for(var s=e[r];s<e[r+1];++s)o[s]=s-e[r]<<5|r;return[e,o]},u=c(o,2),l=u[0],h=u[1];l[28]=258,h[258]=28;for(var f=c(s,0),d=f[0],p=f[1],B=new n(32768),g=0;g<32768;++g){var w=(43690&g)>>>1|(21845&g)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,B[g]=((65280&w)>>>8|(255&w)<<8)>>>1}var m=function(t,A,e){for(var r=t.length,i=0,o=new n(A);i<r;++i)++o[t[i]-1];var s,a=new n(A);for(i=0;i<A;++i)a[i]=a[i-1]+o[i-1]<<1;if(e){s=new n(1<<A);var c=15-A;for(i=0;i<r;++i)if(t[i])for(var u=i<<4|t[i],l=A-t[i],h=a[t[i]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)s[B[h]>>>c]=u}else for(s=new n(r),i=0;i<r;++i)s[i]=B[a[t[i]-1]++]>>>15-t[i];return s},v=new r(288);for(g=0;g<144;++g)v[g]=8;for(g=144;g<256;++g)v[g]=9;for(g=256;g<280;++g)v[g]=7;for(g=280;g<288;++g)v[g]=8;var b=new r(32);for(g=0;g<32;++g)b[g]=5;var Q=m(v,9,0),C=m(v,9,1),F=m(b,5,0),U=m(b,5,1),y=function(t){for(var A=t[0],e=1;e<t.length;++e)t[e]>A&&(A=t[e]);return A},N=function(t,A,e){var r=A/8>>0;return(t[r]|t[r+1]<<8)>>>(7&A)&e},E=function(t,A){var e=A/8>>0;return(t[e]|t[e+1]<<8|t[e+2]<<16)>>>(7&A)},L=function(t){return(t/8>>0)+(7&t&&1)},H=function(t,A,e){(null==A||A<0)&&(A=0),(null==e||e>t.length)&&(e=t.length);var o=new(t instanceof n?n:t instanceof i?i:r)(e-A);return o.set(t.subarray(A,e)),o},_=function(t,A,e){var n=t.length,i=!A||e,c=!e||e.i;e||(e={}),A||(A=new r(3*n));var u=function(t){var e=A.length;if(t>e){var n=new r(Math.max(2*e,t));n.set(A),A=n}},h=e.f||0,f=e.p||0,p=e.b||0,B=e.l,g=e.d,w=e.m,v=e.n,b=8*n;do{if(!B){e.f=h=N(t,f,1);var Q=N(t,f+1,3);if(f+=3,!Q){var F=t[(k=L(f)+4)-4]|t[k-3]<<8,_=k+F;if(_>n){if(c)throw"unexpected EOF";break}i&&u(p+F),A.set(t.subarray(k,_),p),e.b=p+=F,e.p=f=8*_;continue}if(1==Q)B=C,g=U,w=9,v=5;else{if(2!=Q)throw"invalid block type";var S=N(t,f,31)+257,x=N(t,f+10,15)+4,I=S+N(t,f+5,31)+1;f+=14;for(var P=new r(I),T=new r(19),R=0;R<x;++R)T[a[R]]=N(t,f+3*R,7);f+=3*x;var O=y(T),K=(1<<O)-1;if(!c&&f+I*(O+7)>b)break;var M=m(T,O,1);for(R=0;R<I;){var k,D=M[N(t,f,K)];if(f+=15&D,(k=D>>>4)<16)P[R++]=k;else{var z=0,j=0;for(16==k?(j=3+N(t,f,3),f+=2,z=P[R-1]):17==k?(j=3+N(t,f,7),f+=3):18==k&&(j=11+N(t,f,127),f+=7);j--;)P[R++]=z}}var V=P.subarray(0,S),q=P.subarray(S);w=y(V),v=y(q),B=m(V,w,1),g=m(q,v,1)}if(f>b)throw"unexpected EOF"}i&&u(p+131072);for(var G=(1<<w)-1,X=(1<<v)-1,J=w+v+18;c||f+J<b;){var W=(z=B[E(t,f)&G])>>>4;if((f+=15&z)>b)throw"unexpected EOF";if(!z)throw"invalid length/literal";if(W<256)A[p++]=W;else{if(256==W){B=null;break}var Y=W-254;if(W>264){var Z=o[R=W-257];Y=N(t,f,(1<<Z)-1)+l[R],f+=Z}var $=g[E(t,f)&X],tt=$>>>4;if(!$)throw"invalid distance";f+=15&$;q=d[tt];if(tt>3){Z=s[tt];q+=E(t,f)&(1<<Z)-1,f+=Z}if(f>b)throw"unexpected EOF";i&&u(p+131072);for(var At=p+Y;p<At;p+=4)A[p]=A[p-q],A[p+1]=A[p+1-q],A[p+2]=A[p+2-q],A[p+3]=A[p+3-q];p=At}}e.l=B,e.p=f,e.b=p,B&&(h=1,e.m=w,e.d=g,e.n=v)}while(!h);return p==A.length?A:H(A,0,p)},S=function(t,A,e){e<<=7&A;var r=A/8>>0;t[r]|=e,t[r+1]|=e>>>8},x=function(t,A,e){e<<=7&A;var r=A/8>>0;t[r]|=e,t[r+1]|=e>>>8,t[r+2]|=e>>>16},I=function(t,A){for(var e=[],i=0;i<t.length;++i)t[i]&&e.push({s:i,f:t[i]});var o=e.length,s=e.slice();if(!o)return[new r(0),0];if(1==o){var a=new r(e[0].s+1);return a[e[0].s]=1,[a,1]}e.sort(function(t,A){return t.f-A.f}),e.push({s:-1,f:25001});var c=e[0],u=e[1],l=0,h=1,f=2;for(e[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=o-1;)c=e[e[l].f<e[f].f?l++:f++],u=e[l!=h&&e[l].f<e[f].f?l++:f++],e[h++]={s:-1,f:c.f+u.f,l:c,r:u};var d=s[0].s;for(i=1;i<o;++i)s[i].s>d&&(d=s[i].s);var p=new n(d+1),B=P(e[h-1],p,0);if(B>A){i=0;var g=0,w=B-A,m=1<<w;for(s.sort(function(t,A){return p[A.s]-p[t.s]||t.f-A.f});i<o;++i){var v=s[i].s;if(!(p[v]>A))break;g+=m-(1<<B-p[v]),p[v]=A}for(g>>>=w;g>0;){var b=s[i].s;p[b]<A?g-=1<<A-p[b]++-1:++i}for(;i>=0&&g;--i){var Q=s[i].s;p[Q]==A&&(--p[Q],++g)}B=A}return[new r(p),B]},P=function(t,A,e){return-1==t.s?Math.max(P(t.l,A,e+1),P(t.r,A,e+1)):A[t.s]=e},T=function(t){for(var A=t.length;A&&!t[--A];);for(var e=new n(++A),r=0,i=t[0],o=1,s=function(t){e[r++]=t},a=1;a<=A;++a)if(t[a]==i&&a!=A)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=t[a]}return[e.subarray(0,r),A]},R=function(t,A){for(var e=0,r=0;r<A.length;++r)e+=t[r]*A[r];return e},O=function(t,A,e){var r=e.length,n=L(A+2);t[n]=255&r,t[n+1]=r>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var i=0;i<r;++i)t[n+i+4]=e[i];return 8*(n+4+r)},K=function(t,A,e,r,i,c,u,l,h,f,d){S(A,d++,e),++i[256];for(var p=I(i,15),B=p[0],g=p[1],w=I(c,15),C=w[0],U=w[1],y=T(B),N=y[0],E=y[1],L=T(C),H=L[0],_=L[1],P=new n(19),K=0;K<N.length;++K)P[31&N[K]]++;for(K=0;K<H.length;++K)P[31&H[K]]++;for(var M=I(P,7),k=M[0],D=M[1],z=19;z>4&&!k[a[z-1]];--z);var j,V,q,G,X=f+5<<3,J=R(i,v)+R(c,b)+u,W=R(i,B)+R(c,C)+u+14+3*z+R(P,k)+(2*P[16]+3*P[17]+7*P[18]);if(X<=J&&X<=W)return O(A,d,t.subarray(h,h+f));if(S(A,d,1+(W<J)),d+=2,W<J){j=m(B,g,0),V=B,q=m(C,U,0),G=C;var Y=m(k,D,0);S(A,d,E-257),S(A,d+5,_-1),S(A,d+10,z-4),d+=14;for(K=0;K<z;++K)S(A,d+3*K,k[a[K]]);d+=3*z;for(var Z=[N,H],$=0;$<2;++$){var tt=Z[$];for(K=0;K<tt.length;++K){var At=31&tt[K];S(A,d,Y[At]),d+=k[At],At>15&&(S(A,d,tt[K]>>>5&127),d+=tt[K]>>>12)}}}else j=Q,V=v,q=F,G=b;for(K=0;K<l;++K)if(r[K]>255){At=r[K]>>>18&31;x(A,d,j[At+257]),d+=V[At+257],At>7&&(S(A,d,r[K]>>>23&31),d+=o[At]);var et=31&r[K];x(A,d,q[et]),d+=G[et],et>3&&(x(A,d,r[K]>>>5&8191),d+=s[et])}else x(A,d,j[r[K]]),d+=V[r[K]];return x(A,d,j[256]),d+V[256]},M=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),k=new r(0),D=function(t,A,e,a,c,u){var l=t.length,f=new r(a+l+5*(1+Math.floor(l/7e3))+c),d=f.subarray(a,f.length-c),B=0;if(!A||l<8)for(var g=0;g<=l;g+=65535){var w=g+65535;w<l?B=O(d,B,t.subarray(g,w)):(d[g]=u,B=O(d,B,t.subarray(g,l)))}else{for(var m=M[A-1],v=m>>>13,b=8191&m,Q=(1<<e)-1,C=new n(32768),F=new n(Q+1),U=Math.ceil(e/3),y=2*U,N=function(A){return(t[A]^t[A+1]<<U^t[A+2]<<y)&Q},E=new i(25e3),_=new n(288),S=new n(32),x=0,I=0,P=(g=0,0),T=0,R=0;g<l;++g){var D=N(g),z=32767&g,j=F[D];if(C[z]=j,F[D]=z,T<=g){var V=l-g;if((x>7e3||P>24576)&&V>423){B=K(t,d,0,E,_,S,I,P,R,g-R,B),P=x=I=0,R=g;for(var q=0;q<286;++q)_[q]=0;for(q=0;q<30;++q)S[q]=0}var G=2,X=0,J=b,W=z-j&32767;if(V>2&&D==N(g-W))for(var Y=Math.min(v,V)-1,Z=Math.min(32767,g),$=Math.min(258,V);W<=Z&&--J&&z!=j;){if(t[g+G]==t[g+G-W]){for(var tt=0;tt<$&&t[g+tt]==t[g+tt-W];++tt);if(tt>G){if(G=tt,X=W,tt>Y)break;var At=Math.min(W,tt-2),et=0;for(q=0;q<At;++q){var rt=g-W+q+32768&32767,nt=rt-C[rt]+32768&32767;nt>et&&(et=nt,j=rt)}}}W+=(z=j)-(j=C[z])+32768&32767}if(X){E[P++]=268435456|h[G]<<18|p[X];var it=31&h[G],ot=31&p[X];I+=o[it]+s[ot],++_[257+it],++S[ot],T=g+G,++x}else E[P++]=t[g],++_[t[g]]}}B=K(t,d,u,E,_,S,I,P,R,g-R,B),u||(B=O(d,B,k))}return H(f,0,a+L(B)+c)},z=function(){var t=1,A=0;return{p:function(e){for(var r=t,n=A,i=e.length,o=0;o!=i;){for(var s=Math.min(o+5552,i);o<s;++o)n+=r+=e[o];r%=65521,n%=65521}t=r,A=n},d:function(){return(t>>>8<<16|(255&A)<<8|A>>>8)+2*((255&t)<<23)}}},j=function(t,A,e,r,n){return D(t,null==A.level?6:A.level,null==A.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+A.mem,e,r,!n)},V=function(t,A,e){for(;e;++A)t[A]=e,e>>>=8},q=function(t,A){var e=A.level,r=0==e?0:e<6?1:9==e?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)},G=function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"};function X(t,A){void 0===A&&(A={});var e=z();e.p(t);var r=j(t,A,2,4);return q(r,A),V(r,r.length-4,e.d()),r}function J(t,A){return _((G(t),t.subarray(2,-4)),A)}},eMjc:function(t,A,e){
/*!
 * html2canvas 1.0.0-rc.7 <https://html2canvas.hertzen.com>
 * Copyright (c) 2020 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */var r;r=function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */var t=function(A,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,A){t.__proto__=A}||function(t,A){for(var e in A)A.hasOwnProperty(e)&&(t[e]=A[e])})(A,e)};function A(A,e){function r(){this.constructor=A}t(A,e),A.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var e=function(){return(e=Object.assign||function(t){for(var A,e=1,r=arguments.length;e<r;e++)for(var n in A=arguments[e])Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n]);return t}).apply(this,arguments)};function r(t,A,e,r){return new(e||(e=Promise))(function(n,i){function o(t){try{a(r.next(t))}catch(t){i(t)}}function s(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?n(t.value):new e(function(A){A(t.value)}).then(o,s)}a((r=r.apply(t,A||[])).next())})}function n(t,A){var e,r,n,i,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;o;)try{if(e=1,r&&(n=2&i[0]?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(n=(n=o.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){o.label=i[1];break}if(6===i[0]&&o.label<n[1]){o.label=n[1],n=i;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(i);break}n[2]&&o.ops.pop(),o.trys.pop();continue}i=A.call(t,o)}catch(t){i=[6,t],r=0}finally{e=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}for(var i=function(){function t(t,A,e,r){this.left=t,this.top=A,this.width=e,this.height=r}return t.prototype.add=function(A,e,r,n){return new t(this.left+A,this.top+e,this.width+r,this.height+n)},t.fromClientRect=function(A){return new t(A.left,A.top,A.width,A.height)},t}(),o=function(t){return i.fromClientRect(t.getBoundingClientRect())},s=function(t){for(var A=[],e=0,r=t.length;e<r;){var n=t.charCodeAt(e++);if(n>=55296&&n<=56319&&e<r){var i=t.charCodeAt(e++);56320==(64512&i)?A.push(((1023&n)<<10)+(1023&i)+65536):(A.push(n),e--)}else A.push(n)}return A},a=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var e=t.length;if(!e)return"";for(var r=[],n=-1,i="";++n<e;){var o=t[n];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(n+1===e||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256),l=0;l<c.length;l++)u[c.charCodeAt(l)]=l;var h,f=function(t,A,e){return t.slice?t.slice(A,e):new Uint16Array(Array.prototype.slice.call(t,A,e))},d=function(){function t(t,A,e,r,n,i){this.initialValue=t,this.errorValue=A,this.highStart=e,this.highValueIndex=r,this.index=n,this.data=i}return t.prototype.get=function(t){var A;if(t>=0){if(t<55296||t>56319&&t<=65535)return A=((A=this.index[t>>5])<<2)+(31&t),this.data[A];if(t<=65535)return A=((A=this.index[2048+(t-55296>>5)])<<2)+(31&t),this.data[A];if(t<this.highStart)return A=2080+(t>>11),A=this.index[A],A+=t>>5&63,A=((A=this.index[A])<<2)+(31&t),this.data[A];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),p=10,B=13,g=15,w=17,m=18,v=19,b=20,Q=21,C=22,F=24,U=25,y=26,N=27,E=28,L=30,H=32,_=33,S=34,x=35,I=37,P=38,T=39,R=40,O=42,K="!",M=function(t){var A,e,r,n=function(t){var A,e,r,n,i,o=.75*t.length,s=t.length,a=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),l=Array.isArray(c)?c:new Uint8Array(c);for(A=0;A<s;A+=4)e=u[t.charCodeAt(A)],r=u[t.charCodeAt(A+1)],n=u[t.charCodeAt(A+2)],i=u[t.charCodeAt(A+3)],l[a++]=e<<2|r>>4,l[a++]=(15&r)<<4|n>>2,l[a++]=(3&n)<<6|63&i;return c}(t),i=Array.isArray(n)?function(t){for(var A=t.length,e=[],r=0;r<A;r+=4)e.push(t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r]);return e}(n):new Uint32Array(n),o=Array.isArray(n)?function(t){for(var A=t.length,e=[],r=0;r<A;r+=2)e.push(t[r+1]<<8|t[r]);return e}(n):new Uint16Array(n),s=f(o,12,i[4]/2),a=2===i[5]?f(o,(24+i[4])/2):(A=i,e=Math.ceil((24+i[4])/4),A.slice?A.slice(e,r):new Uint32Array(Array.prototype.slice.call(A,e,r)));return new d(i[0],i[1],i[2],i[3],s,a)}(" "),k=[L,36],D=[1,2,3,5],z=[p,8],j=[N,y],V=D.concat(z),q=[P,T,R,S,x],G=[g,B],X=function(t,A,e,r){var n=r[e];if(Array.isArray(t)?-1!==t.indexOf(n):t===n)for(var i=e;i<=r.length;){if((a=r[++i])===A)return!0;if(a!==p)break}if(n===p)for(i=e;i>0;){var o=r[--i];if(Array.isArray(t)?-1!==t.indexOf(o):t===o)for(var s=e;s<=r.length;){var a;if((a=r[++s])===A)return!0;if(a!==p)break}if(o!==p)break}return!1},J=function(t,A){for(var e=t;e>=0;){var r=A[e];if(r!==p)return r;e--}return 0},W=function(t,A,e,r,n){if(0===e[r])return"×";var i=r-1;if(Array.isArray(n)&&!0===n[i])return"×";var o=i-1,s=i+1,a=A[i],c=o>=0?A[o]:0,u=A[s];if(2===a&&3===u)return"×";if(-1!==D.indexOf(a))return K;if(-1!==D.indexOf(u))return"×";if(-1!==z.indexOf(u))return"×";if(8===J(i,A))return"÷";if(11===M.get(t[i])&&(u===I||u===H||u===_))return"×";if(7===a||7===u)return"×";if(9===a)return"×";if(-1===[p,B,g].indexOf(a)&&9===u)return"×";if(-1!==[w,m,v,F,E].indexOf(u))return"×";if(J(i,A)===C)return"×";if(X(23,C,i,A))return"×";if(X([w,m],Q,i,A))return"×";if(X(12,12,i,A))return"×";if(a===p)return"÷";if(23===a||23===u)return"×";if(16===u||16===a)return"÷";if(-1!==[B,g,Q].indexOf(u)||14===a)return"×";if(36===c&&-1!==G.indexOf(a))return"×";if(a===E&&36===u)return"×";if(u===b&&-1!==k.concat(b,v,U,I,H,_).indexOf(a))return"×";if(-1!==k.indexOf(u)&&a===U||-1!==k.indexOf(a)&&u===U)return"×";if(a===N&&-1!==[I,H,_].indexOf(u)||-1!==[I,H,_].indexOf(a)&&u===y)return"×";if(-1!==k.indexOf(a)&&-1!==j.indexOf(u)||-1!==j.indexOf(a)&&-1!==k.indexOf(u))return"×";if(-1!==[N,y].indexOf(a)&&(u===U||-1!==[C,g].indexOf(u)&&A[s+1]===U)||-1!==[C,g].indexOf(a)&&u===U||a===U&&-1!==[U,E,F].indexOf(u))return"×";if(-1!==[U,E,F,w,m].indexOf(u))for(var l=i;l>=0;){if((h=A[l])===U)return"×";if(-1===[E,F].indexOf(h))break;l--}if(-1!==[N,y].indexOf(u))for(l=-1!==[w,m].indexOf(a)?o:i;l>=0;){var h;if((h=A[l])===U)return"×";if(-1===[E,F].indexOf(h))break;l--}if(P===a&&-1!==[P,T,S,x].indexOf(u)||-1!==[T,S].indexOf(a)&&-1!==[T,R].indexOf(u)||-1!==[R,x].indexOf(a)&&u===R)return"×";if(-1!==q.indexOf(a)&&-1!==[b,y].indexOf(u)||-1!==q.indexOf(u)&&a===N)return"×";if(-1!==k.indexOf(a)&&-1!==k.indexOf(u))return"×";if(a===F&&-1!==k.indexOf(u))return"×";if(-1!==k.concat(U).indexOf(a)&&u===C||-1!==k.concat(U).indexOf(u)&&a===m)return"×";if(41===a&&41===u){for(var f=e[i],d=1;f>0&&41===A[--f];)d++;if(d%2!=0)return"×"}return a===H&&u===_?"×":"÷"},Y=function(t,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var e=function(t,A){void 0===A&&(A="strict");var e=[],r=[],n=[];return t.forEach(function(t,i){var o=M.get(t);if(o>50?(n.push(!0),o-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(A)&&-1!==[8208,8211,12316,12448].indexOf(t))return r.push(i),e.push(16);if(4===o||11===o){if(0===i)return r.push(i),e.push(L);var s=e[i-1];return-1===V.indexOf(s)?(r.push(r[i-1]),e.push(s)):(r.push(i),e.push(L))}return r.push(i),31===o?e.push("strict"===A?Q:I):o===O?e.push(L):29===o?e.push(L):43===o?t>=131072&&t<=196605||t>=196608&&t<=262141?e.push(I):e.push(L):void e.push(o)}),[r,e,n]}(t,A.lineBreak),r=e[0],n=e[1],i=e[2];return"break-all"!==A.wordBreak&&"break-word"!==A.wordBreak||(n=n.map(function(t){return-1!==[U,L,O].indexOf(t)?I:t})),[r,n,"keep-all"===A.wordBreak?i.map(function(A,e){return A&&t[e]>=19968&&t[e]<=40959}):void 0]},Z=function(){function t(t,A,e,r){this.codePoints=t,this.required=A===K,this.start=e,this.end=r}return t.prototype.slice=function(){return a.apply(void 0,this.codePoints.slice(this.start,this.end))},t}();!function(t){t[t.STRING_TOKEN=0]="STRING_TOKEN",t[t.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",t[t.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",t[t.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",t[t.COMMA_TOKEN=4]="COMMA_TOKEN",t[t.HASH_TOKEN=5]="HASH_TOKEN",t[t.DELIM_TOKEN=6]="DELIM_TOKEN",t[t.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",t[t.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",t[t.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",t[t.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",t[t.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",t[t.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",t[t.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",t[t.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",t[t.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",t[t.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",t[t.NUMBER_TOKEN=17]="NUMBER_TOKEN",t[t.FUNCTION=18]="FUNCTION",t[t.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",t[t.IDENT_TOKEN=20]="IDENT_TOKEN",t[t.COLUMN_TOKEN=21]="COLUMN_TOKEN",t[t.URL_TOKEN=22]="URL_TOKEN",t[t.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",t[t.CDC_TOKEN=24]="CDC_TOKEN",t[t.CDO_TOKEN=25]="CDO_TOKEN",t[t.COLON_TOKEN=26]="COLON_TOKEN",t[t.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",t[t.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",t[t.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",t[t.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",t[t.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",t[t.EOF_TOKEN=32]="EOF_TOKEN"}(h||(h={}));var $=function(t){return t>=48&&t<=57},tt=function(t){return $(t)||t>=65&&t<=70||t>=97&&t<=102},At=function(t){return 10===t||9===t||32===t},et=function(t){return function(t){return function(t){return t>=97&&t<=122}(t)||function(t){return t>=65&&t<=90}(t)}(t)||function(t){return t>=128}(t)||95===t},rt=function(t){return et(t)||$(t)||45===t},nt=function(t){return t>=0&&t<=8||11===t||t>=14&&t<=31||127===t},it=function(t,A){return 92===t&&10!==A},ot=function(t,A,e){return 45===t?et(A)||it(A,e):!!et(t)||!(92!==t||!it(t,A))},st=function(t,A,e){return 43===t||45===t?!!$(A)||46===A&&$(e):$(46===t?A:t)},at={type:h.LEFT_PARENTHESIS_TOKEN},ct={type:h.RIGHT_PARENTHESIS_TOKEN},ut={type:h.COMMA_TOKEN},lt={type:h.SUFFIX_MATCH_TOKEN},ht={type:h.PREFIX_MATCH_TOKEN},ft={type:h.COLUMN_TOKEN},dt={type:h.DASH_MATCH_TOKEN},pt={type:h.INCLUDE_MATCH_TOKEN},Bt={type:h.LEFT_CURLY_BRACKET_TOKEN},gt={type:h.RIGHT_CURLY_BRACKET_TOKEN},wt={type:h.SUBSTRING_MATCH_TOKEN},mt={type:h.BAD_URL_TOKEN},vt={type:h.BAD_STRING_TOKEN},bt={type:h.CDO_TOKEN},Qt={type:h.CDC_TOKEN},Ct={type:h.COLON_TOKEN},Ft={type:h.SEMICOLON_TOKEN},Ut={type:h.LEFT_SQUARE_BRACKET_TOKEN},yt={type:h.RIGHT_SQUARE_BRACKET_TOKEN},Nt={type:h.WHITESPACE_TOKEN},Et={type:h.EOF_TOKEN},Lt=function(){function t(){this._value=[]}return t.prototype.write=function(t){this._value=this._value.concat(s(t))},t.prototype.read=function(){for(var t=[],A=this.consumeToken();A!==Et;)t.push(A),A=this.consumeToken();return t},t.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case 34:return this.consumeStringToken(34);case 35:var A=this.peekCodePoint(0),e=this.peekCodePoint(1),r=this.peekCodePoint(2);if(rt(A)||it(e,r)){var n=ot(A,e,r)?2:1,i=this.consumeName();return{type:h.HASH_TOKEN,value:i,flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),lt;break;case 39:return this.consumeStringToken(39);case 40:return at;case 41:return ct;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),wt;break;case 43:if(st(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 44:return ut;case 45:var o=t,s=this.peekCodePoint(0),c=this.peekCodePoint(1);if(st(o,s,c))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(ot(o,s,c))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(45===s&&62===c)return this.consumeCodePoint(),this.consumeCodePoint(),Qt;break;case 46:if(st(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(42===u&&47===(u=this.consumeCodePoint()))return this.consumeToken();if(-1===u)return this.consumeToken()}break;case 58:return Ct;case 59:return Ft;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),bt;break;case 64:var l=this.peekCodePoint(0),f=this.peekCodePoint(1),d=this.peekCodePoint(2);if(ot(l,f,d)){i=this.consumeName();return{type:h.AT_KEYWORD_TOKEN,value:i}}break;case 91:return Ut;case 92:if(it(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case 93:return yt;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ht;break;case 123:return Bt;case 125:return gt;case 117:case 85:var p=this.peekCodePoint(0),B=this.peekCodePoint(1);return 43!==p||!tt(B)&&63!==B||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),dt;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),ft;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),pt;break;case-1:return Et}return At(t)?(this.consumeWhiteSpace(),Nt):$(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):et(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:h.DELIM_TOKEN,value:a(t)}},t.prototype.consumeCodePoint=function(){var t=this._value.shift();return void 0===t?-1:t},t.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},t.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},t.prototype.consumeUnicodeRangeToken=function(){for(var t=[],A=this.consumeCodePoint();tt(A)&&t.length<6;)t.push(A),A=this.consumeCodePoint();for(var e=!1;63===A&&t.length<6;)t.push(A),A=this.consumeCodePoint(),e=!0;if(e){var r=parseInt(a.apply(void 0,t.map(function(t){return 63===t?48:t})),16),n=parseInt(a.apply(void 0,t.map(function(t){return 63===t?70:t})),16);return{type:h.UNICODE_RANGE_TOKEN,start:r,end:n}}var i=parseInt(a.apply(void 0,t),16);if(45===this.peekCodePoint(0)&&tt(this.peekCodePoint(1))){this.consumeCodePoint(),A=this.consumeCodePoint();for(var o=[];tt(A)&&o.length<6;)o.push(A),A=this.consumeCodePoint();n=parseInt(a.apply(void 0,o),16);return{type:h.UNICODE_RANGE_TOKEN,start:i,end:n}}return{type:h.UNICODE_RANGE_TOKEN,start:i,end:i}},t.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return"url"===t.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:h.FUNCTION_TOKEN,value:t}):{type:h.IDENT_TOKEN,value:t}},t.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:h.URL_TOKEN,value:""};var A=this.peekCodePoint(0);if(39===A||34===A){var e=this.consumeStringToken(this.consumeCodePoint());return e.type===h.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:e.value}):(this.consumeBadUrlRemnants(),mt)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:h.URL_TOKEN,value:a.apply(void 0,t)};if(At(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:h.URL_TOKEN,value:a.apply(void 0,t)}):(this.consumeBadUrlRemnants(),mt);if(34===r||39===r||40===r||nt(r))return this.consumeBadUrlRemnants(),mt;if(92===r){if(!it(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),mt;t.push(this.consumeEscapedCodePoint())}else t.push(r)}},t.prototype.consumeWhiteSpace=function(){for(;At(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(41===t||-1===t)return;it(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(t){for(var A="";t>0;){var e=Math.min(6e4,t);A+=a.apply(void 0,this._value.splice(0,e)),t-=e}return this._value.shift(),A},t.prototype.consumeStringToken=function(t){for(var A="",e=0;;){var r=this._value[e];if(-1===r||void 0===r||r===t)return A+=this.consumeStringSlice(e),{type:h.STRING_TOKEN,value:A};if(10===r)return this._value.splice(0,e),vt;if(92===r){var n=this._value[e+1];-1!==n&&void 0!==n&&(10===n?(A+=this.consumeStringSlice(e),e=-1,this._value.shift()):it(r,n)&&(A+=this.consumeStringSlice(e),A+=a(this.consumeEscapedCodePoint()),e=-1))}e++}},t.prototype.consumeNumber=function(){var t=[],A=4,e=this.peekCodePoint(0);for(43!==e&&45!==e||t.push(this.consumeCodePoint());$(this.peekCodePoint(0));)t.push(this.consumeCodePoint());e=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===e&&$(r))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),A=8;$(this.peekCodePoint(0));)t.push(this.consumeCodePoint());e=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===e||101===e)&&((43===r||45===r)&&$(n)||$(r)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),A=8;$(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[function(t){var A=0,e=1;43!==t[A]&&45!==t[A]||(45===t[A]&&(e=-1),A++);for(var r=[];$(t[A]);)r.push(t[A++]);var n=r.length?parseInt(a.apply(void 0,r),10):0;46===t[A]&&A++;for(var i=[];$(t[A]);)i.push(t[A++]);var o=i.length,s=o?parseInt(a.apply(void 0,i),10):0;69!==t[A]&&101!==t[A]||A++;var c=1;43!==t[A]&&45!==t[A]||(45===t[A]&&(c=-1),A++);for(var u=[];$(t[A]);)u.push(t[A++]);var l=u.length?parseInt(a.apply(void 0,u),10):0;return e*(n+s*Math.pow(10,-o))*Math.pow(10,c*l)}(t),A]},t.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),A=t[0],e=t[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(ot(r,n,i)){var o=this.consumeName();return{type:h.DIMENSION_TOKEN,number:A,flags:e,unit:o}}return 37===r?(this.consumeCodePoint(),{type:h.PERCENTAGE_TOKEN,number:A,flags:e}):{type:h.NUMBER_TOKEN,number:A,flags:e}},t.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(tt(t)){for(var A=a(t);tt(this.peekCodePoint(0))&&A.length<6;)A+=a(this.consumeCodePoint());At(this.peekCodePoint(0))&&this.consumeCodePoint();var e=parseInt(A,16);return 0===e||function(t){return t>=55296&&t<=57343}(e)||e>1114111?65533:e}return-1===t?65533:t},t.prototype.consumeName=function(){for(var t="";;){var A=this.consumeCodePoint();if(rt(A))t+=a(A);else{if(!it(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),t;t+=a(this.consumeEscapedCodePoint())}}},t}(),Ht=function(){function t(t){this._tokens=t}return t.create=function(A){var e=new Lt;return e.write(A),new t(e.read())},t.parseValue=function(A){return t.create(A).parseComponentValue()},t.parseValues=function(A){return t.create(A).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===h.WHITESPACE_TOKEN;)t=this.consumeToken();if(t.type===h.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var A=this.consumeComponentValue();do{t=this.consumeToken()}while(t.type===h.WHITESPACE_TOKEN);if(t.type===h.EOF_TOKEN)return A;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var t=[];;){var A=this.consumeComponentValue();if(A.type===h.EOF_TOKEN)return t;t.push(A),t.push()}},t.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case h.LEFT_CURLY_BRACKET_TOKEN:case h.LEFT_SQUARE_BRACKET_TOKEN:case h.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(t.type);case h.FUNCTION_TOKEN:return this.consumeFunction(t)}return t},t.prototype.consumeSimpleBlock=function(t){for(var A={type:t,values:[]},e=this.consumeToken();;){if(e.type===h.EOF_TOKEN||Kt(e,t))return A;this.reconsumeToken(e),A.values.push(this.consumeComponentValue()),e=this.consumeToken()}},t.prototype.consumeFunction=function(t){for(var A={name:t.value,values:[],type:h.FUNCTION};;){var e=this.consumeToken();if(e.type===h.EOF_TOKEN||e.type===h.RIGHT_PARENTHESIS_TOKEN)return A;this.reconsumeToken(e),A.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var t=this._tokens.shift();return void 0===t?Et:t},t.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},t}(),_t=function(t){return t.type===h.DIMENSION_TOKEN},St=function(t){return t.type===h.NUMBER_TOKEN},xt=function(t){return t.type===h.IDENT_TOKEN},It=function(t){return t.type===h.STRING_TOKEN},Pt=function(t,A){return xt(t)&&t.value===A},Tt=function(t){return t.type!==h.WHITESPACE_TOKEN},Rt=function(t){return t.type!==h.WHITESPACE_TOKEN&&t.type!==h.COMMA_TOKEN},Ot=function(t){var A=[],e=[];return t.forEach(function(t){if(t.type===h.COMMA_TOKEN){if(0===e.length)throw new Error("Error parsing function args, zero tokens for arg");return A.push(e),void(e=[])}t.type!==h.WHITESPACE_TOKEN&&e.push(t)}),e.length&&A.push(e),A},Kt=function(t,A){return A===h.LEFT_CURLY_BRACKET_TOKEN&&t.type===h.RIGHT_CURLY_BRACKET_TOKEN||(A===h.LEFT_SQUARE_BRACKET_TOKEN&&t.type===h.RIGHT_SQUARE_BRACKET_TOKEN||A===h.LEFT_PARENTHESIS_TOKEN&&t.type===h.RIGHT_PARENTHESIS_TOKEN)},Mt=function(t){return t.type===h.NUMBER_TOKEN||t.type===h.DIMENSION_TOKEN},kt=function(t){return t.type===h.PERCENTAGE_TOKEN||Mt(t)},Dt=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},zt={type:h.NUMBER_TOKEN,number:0,flags:4},jt={type:h.PERCENTAGE_TOKEN,number:50,flags:4},Vt={type:h.PERCENTAGE_TOKEN,number:100,flags:4},qt=function(t,A,e){var r=t[0],n=t[1];return[Gt(r,A),Gt(void 0!==n?n:r,e)]},Gt=function(t,A){if(t.type===h.PERCENTAGE_TOKEN)return t.number/100*A;if(_t(t))switch(t.unit){case"rem":case"em":return 16*t.number;case"px":default:return t.number}return t.number},Xt=function(t){if(t.type===h.DIMENSION_TOKEN)switch(t.unit){case"deg":return Math.PI*t.number/180;case"grad":return Math.PI/200*t.number;case"rad":return t.number;case"turn":return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Jt=function(t){return t.type===h.DIMENSION_TOKEN&&("deg"===t.unit||"grad"===t.unit||"rad"===t.unit||"turn"===t.unit)},Wt=function(t){switch(t.filter(xt).map(function(t){return t.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zt,zt];case"to top":case"bottom":return Yt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zt,Vt];case"to right":case"left":return Yt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Vt,Vt];case"to bottom":case"top":return Yt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Vt,zt];case"to left":case"right":return Yt(270)}return 0},Yt=function(t){return Math.PI*t/180},Zt=function(t){if(t.type===h.FUNCTION){var A=aA[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return A(t.values)}if(t.type===h.HASH_TOKEN){if(3===t.value.length){var e=t.value.substring(0,1),r=t.value.substring(1,2),n=t.value.substring(2,3);return AA(parseInt(e+e,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===t.value.length){e=t.value.substring(0,1),r=t.value.substring(1,2),n=t.value.substring(2,3);var i=t.value.substring(3,4);return AA(parseInt(e+e,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(i+i,16)/255)}if(6===t.value.length){e=t.value.substring(0,2),r=t.value.substring(2,4),n=t.value.substring(4,6);return AA(parseInt(e,16),parseInt(r,16),parseInt(n,16),1)}if(8===t.value.length){e=t.value.substring(0,2),r=t.value.substring(2,4),n=t.value.substring(4,6),i=t.value.substring(6,8);return AA(parseInt(e,16),parseInt(r,16),parseInt(n,16),parseInt(i,16)/255)}}if(t.type===h.IDENT_TOKEN){var o=cA[t.value.toUpperCase()];if(void 0!==o)return o}return cA.TRANSPARENT},$t=function(t){return 0==(255&t)},tA=function(t){var A=255&t,e=255&t>>8,r=255&t>>16,n=255&t>>24;return A<255?"rgba("+n+","+r+","+e+","+A/255+")":"rgb("+n+","+r+","+e+")"},AA=function(t,A,e,r){return(t<<24|A<<16|e<<8|Math.round(255*r)<<0)>>>0},eA=function(t,A){if(t.type===h.NUMBER_TOKEN)return t.number;if(t.type===h.PERCENTAGE_TOKEN){var e=3===A?1:255;return 3===A?t.number/100*e:Math.round(t.number/100*e)}return 0},rA=function(t){var A=t.filter(Rt);if(3===A.length){var e=A.map(eA),r=e[0],n=e[1],i=e[2];return AA(r,n,i,1)}if(4===A.length){var o=A.map(eA),s=(r=o[0],n=o[1],i=o[2],o[3]);return AA(r,n,i,s)}return 0};function nA(t,A,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(A-t)*e*6+t:e<.5?A:e<2/3?6*(A-t)*(2/3-e)+t:t}var iA,oA,sA=function(t){var A=t.filter(Rt),e=A[0],r=A[1],n=A[2],i=A[3],o=(e.type===h.NUMBER_TOKEN?Yt(e.number):Xt(e))/(2*Math.PI),s=kt(r)?r.number/100:0,a=kt(n)?n.number/100:0,c=void 0!==i&&kt(i)?Gt(i,1):1;if(0===s)return AA(255*a,255*a,255*a,1);var u=a<=.5?a*(s+1):a+s-a*s,l=2*a-u,f=nA(l,u,o+1/3),d=nA(l,u,o),p=nA(l,u,o-1/3);return AA(255*f,255*d,255*p,c)},aA={hsl:sA,hsla:sA,rgb:rA,rgba:rA},cA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(t){t[t.VALUE=0]="VALUE",t[t.LIST=1]="LIST",t[t.IDENT_VALUE=2]="IDENT_VALUE",t[t.TYPE_VALUE=3]="TYPE_VALUE",t[t.TOKEN_VALUE=4]="TOKEN_VALUE"}(iA||(iA={})),function(t){t[t.BORDER_BOX=0]="BORDER_BOX",t[t.PADDING_BOX=1]="PADDING_BOX",t[t.CONTENT_BOX=2]="CONTENT_BOX"}(oA||(oA={}));var uA,lA={name:"background-clip",initialValue:"border-box",prefix:!1,type:iA.LIST,parse:function(t){return t.map(function(t){if(xt(t))switch(t.value){case"padding-box":return oA.PADDING_BOX;case"content-box":return oA.CONTENT_BOX}return oA.BORDER_BOX})}},hA={name:"background-color",initialValue:"transparent",prefix:!1,type:iA.TYPE_VALUE,format:"color"},fA=function(t){var A=Zt(t[0]),e=t[1];return e&&kt(e)?{color:A,stop:e}:{color:A,stop:null}},dA=function(t,A){var e=t[0],r=t[t.length-1];null===e.stop&&(e.stop=zt),null===r.stop&&(r.stop=Vt);for(var n=[],i=0,o=0;o<t.length;o++){var s=t[o].stop;if(null!==s){var a=Gt(s,A);a>i?n.push(a):n.push(i),i=a}else n.push(null)}var c=null;for(o=0;o<n.length;o++){var u=n[o];if(null===u)null===c&&(c=o);else if(null!==c){for(var l=o-c,h=(u-n[c-1])/(l+1),f=1;f<=l;f++)n[c+f-1]=h*f;c=null}}return t.map(function(t,e){return{color:t.color,stop:Math.max(Math.min(1,n[e]/A),0)}})},pA=function(t,A,e){var r="number"==typeof t?t:function(t,A,e){var r=A/2,n=e/2,i=Gt(t[0],A)-r,o=n-Gt(t[1],e);return(Math.atan2(o,i)+2*Math.PI)%(2*Math.PI)}(t,A,e),n=Math.abs(A*Math.sin(r))+Math.abs(e*Math.cos(r)),i=A/2,o=e/2,s=n/2,a=Math.sin(r-Math.PI/2)*s,c=Math.cos(r-Math.PI/2)*s;return[n,i-c,i+c,o-a,o+a]},BA=function(t,A){return Math.sqrt(t*t+A*A)},gA=function(t,A,e,r,n){return[[0,0],[0,A],[t,0],[t,A]].reduce(function(t,A){var i=A[0],o=A[1],s=BA(e-i,r-o);return(n?s<t.optimumDistance:s>t.optimumDistance)?{optimumCorner:A,optimumDistance:s}:t},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},wA=function(t){var A=Yt(180),e=[];return Ot(t).forEach(function(t,r){if(0===r){var n=t[0];if(n.type===h.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(A=Wt(t));if(Jt(n))return void(A=(Xt(n)+Yt(270))%Yt(360))}var i=fA(t);e.push(i)}),{angle:A,stops:e,type:uA.LINEAR_GRADIENT}},mA=function(t){return 0===t[0]&&255===t[1]&&0===t[2]&&255===t[3]},vA=function(t,A,e,r,n){var i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),s=document.createElementNS(i,"foreignObject");return o.setAttributeNS(null,"width",t.toString()),o.setAttributeNS(null,"height",A.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",e.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(n),o},bA=function(t){return new Promise(function(A,e){var r=new Image;r.onload=function(){return A(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(t))})},QA={get SUPPORT_RANGE_BOUNDS(){var t=function(t){if(t.createRange){var A=t.createRange();if(A.getBoundingClientRect){var e=t.createElement("boundtest");e.style.height="123px",e.style.display="block",t.body.appendChild(e),A.selectNode(e);var r=A.getBoundingClientRect(),n=Math.round(r.height);if(t.body.removeChild(e),123===n)return!0}}return!1}(document);return Object.defineProperty(QA,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=function(t){var A=new Image,e=t.createElement("canvas"),r=e.getContext("2d");if(!r)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(A,0,0),e.toDataURL()}catch(t){return!1}return!0}(document);return Object.defineProperty(QA,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t="function"==typeof Array.from&&"function"==typeof window.fetch?function(t){var A=t.createElement("canvas");A.width=100,A.height=100;var e=A.getContext("2d");if(!e)return Promise.reject(!1);e.fillStyle="rgb(0, 255, 0)",e.fillRect(0,0,100,100);var r=new Image,n=A.toDataURL();r.src=n;var i=vA(100,100,0,0,r);return e.fillStyle="red",e.fillRect(0,0,100,100),bA(i).then(function(A){e.drawImage(A,0,0);var r=e.getImageData(0,0,100,100).data;e.fillStyle="red",e.fillRect(0,0,100,100);var i=t.createElement("div");return i.style.backgroundImage="url("+n+")",i.style.height="100px",mA(r)?bA(vA(100,100,0,0,i)):Promise.reject(!1)}).then(function(t){return e.drawImage(t,0,0),mA(e.getImageData(0,0,100,100).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(QA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=void 0!==(new Image).crossOrigin;return Object.defineProperty(QA,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(QA,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(QA,"SUPPORT_CORS_XHR",{value:t}),t}},CA=function(){function t(t){var A=t.id,e=t.enabled;this.id=A,this.enabled=e,this.start=Date.now()}return t.prototype.debug=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,[this.id,this.getTime()+"ms"].concat(t)):this.info.apply(this,t))},t.prototype.getTime=function(){return Date.now()-this.start},t.create=function(A){t.instances[A.id]=new t(A)},t.destroy=function(A){delete t.instances[A]},t.getInstance=function(A){var e=t.instances[A];if(void 0===e)throw new Error("No logger instance found with id "+A);return e},t.prototype.info=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,[this.id,this.getTime()+"ms"].concat(t))},t.prototype.error=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,[this.id,this.getTime()+"ms"].concat(t)):this.info.apply(this,t))},t.instances={},t}(),FA=function(){function t(){}return t.create=function(A,e){return t._caches[A]=new UA(A,e)},t.destroy=function(A){delete t._caches[A]},t.open=function(A){var e=t._caches[A];if(void 0!==e)return e;throw new Error('Cache with key "'+A+'" not found')},t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t.getInstance=function(){var A=t._current;if(null===A)throw new Error("No cache instance attached");return A},t.attachInstance=function(A){t._current=A},t.detachInstance=function(){t._current=null},t._caches={},t._origin="about:blank",t._current=null,t}(),UA=function(){function t(t,A){this.id=t,this._options=A,this._cache={}}return t.prototype.addImage=function(t){var A=Promise.resolve();return this.has(t)?A:SA(t)||LA(t)?(this._cache[t]=this.loadImage(t),A):A},t.prototype.match=function(t){return this._cache[t]},t.prototype.loadImage=function(t){return r(this,void 0,void 0,function(){var A,e,r,i,o=this;return n(this,function(n){switch(n.label){case 0:return A=FA.isSameOrigin(t),e=!HA(t)&&!0===this._options.useCORS&&QA.SUPPORT_CORS_IMAGES&&!A,r=!HA(t)&&!A&&"string"==typeof this._options.proxy&&QA.SUPPORT_CORS_XHR&&!e,A||!1!==this._options.allowTaint||HA(t)||r||e?(i=t,r?[4,this.proxy(i)]:[3,2]):[2];case 1:i=n.sent(),n.label=2;case 2:return CA.getInstance(this.id).debug("Added image "+t.substring(0,256)),[4,new Promise(function(t,A){var r=new Image;r.onload=function(){return t(r)},r.onerror=A,(_A(i)||e)&&(r.crossOrigin="anonymous"),r.src=i,!0===r.complete&&setTimeout(function(){return t(r)},500),o._options.imageTimeout>0&&setTimeout(function(){return A("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,n.sent()]}})})},t.prototype.has=function(t){return void 0!==this._cache[t]},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(t){var A=this,e=this._options.proxy;if(!e)throw new Error("No proxy defined");var r=t.substring(0,256);return new Promise(function(n,i){var o=QA.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;if(s.onload=function(){if(200===s.status)if("text"===o)n(s.response);else{var t=new FileReader;t.addEventListener("load",function(){return n(t.result)},!1),t.addEventListener("error",function(t){return i(t)},!1),t.readAsDataURL(s.response)}else i("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=i,s.open("GET",e+"?url="+encodeURIComponent(t)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var a=A._options.imageTimeout;s.timeout=a,s.ontimeout=function(){return i("Timed out ("+a+"ms) proxying "+r)}}s.send()})},t}(),yA=/^data:image\/svg\+xml/i,NA=/^data:image\/.*;base64,/i,EA=/^data:image\/.*/i,LA=function(t){return QA.SUPPORT_SVG_DRAWING||!xA(t)},HA=function(t){return EA.test(t)},_A=function(t){return NA.test(t)},SA=function(t){return"blob"===t.substr(0,4)},xA=function(t){return"svg"===t.substr(-3).toLowerCase()||yA.test(t)},IA=function(t){var A=PA.CIRCLE,e=TA.FARTHEST_CORNER,r=[],n=[];return Ot(t).forEach(function(t,i){var o=!0;if(0===i?o=t.reduce(function(t,A){if(xt(A))switch(A.value){case"center":return n.push(jt),!1;case"top":case"left":return n.push(zt),!1;case"right":case"bottom":return n.push(Vt),!1}else if(kt(A)||Mt(A))return n.push(A),!1;return t},o):1===i&&(o=t.reduce(function(t,r){if(xt(r))switch(r.value){case"circle":return A=PA.CIRCLE,!1;case"ellipse":return A=PA.ELLIPSE,!1;case"contain":case"closest-side":return e=TA.CLOSEST_SIDE,!1;case"farthest-side":return e=TA.FARTHEST_SIDE,!1;case"closest-corner":return e=TA.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return e=TA.FARTHEST_CORNER,!1}else if(Mt(r)||kt(r))return Array.isArray(e)||(e=[]),e.push(r),!1;return t},o)),o){var s=fA(t);r.push(s)}}),{size:e,shape:A,stops:r,position:n,type:uA.RADIAL_GRADIENT}};!function(t){t[t.URL=0]="URL",t[t.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",t[t.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(uA||(uA={}));var PA,TA;!function(t){t[t.CIRCLE=0]="CIRCLE",t[t.ELLIPSE=1]="ELLIPSE"}(PA||(PA={})),function(t){t[t.CLOSEST_SIDE=0]="CLOSEST_SIDE",t[t.FARTHEST_SIDE=1]="FARTHEST_SIDE",t[t.CLOSEST_CORNER=2]="CLOSEST_CORNER",t[t.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(TA||(TA={}));var RA=function(t){if(t.type===h.URL_TOKEN){var A={url:t.value,type:uA.URL};return FA.getInstance().addImage(t.value),A}if(t.type===h.FUNCTION){var e=KA[t.name];if(void 0===e)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return e(t.values)}throw new Error("Unsupported image type")};var OA,KA={"linear-gradient":function(t){var A=Yt(180),e=[];return Ot(t).forEach(function(t,r){if(0===r){var n=t[0];if(n.type===h.IDENT_TOKEN&&"to"===n.value)return void(A=Wt(t));if(Jt(n))return void(A=Xt(n))}var i=fA(t);e.push(i)}),{angle:A,stops:e,type:uA.LINEAR_GRADIENT}},"-moz-linear-gradient":wA,"-ms-linear-gradient":wA,"-o-linear-gradient":wA,"-webkit-linear-gradient":wA,"radial-gradient":function(t){var A=PA.CIRCLE,e=TA.FARTHEST_CORNER,r=[],n=[];return Ot(t).forEach(function(t,i){var o=!0;if(0===i){var s=!1;o=t.reduce(function(t,r){if(s)if(xt(r))switch(r.value){case"center":return n.push(jt),t;case"top":case"left":return n.push(zt),t;case"right":case"bottom":return n.push(Vt),t}else(kt(r)||Mt(r))&&n.push(r);else if(xt(r))switch(r.value){case"circle":return A=PA.CIRCLE,!1;case"ellipse":return A=PA.ELLIPSE,!1;case"at":return s=!0,!1;case"closest-side":return e=TA.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return e=TA.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return e=TA.CLOSEST_CORNER,!1;case"farthest-corner":return e=TA.FARTHEST_CORNER,!1}else if(Mt(r)||kt(r))return Array.isArray(e)||(e=[]),e.push(r),!1;return t},o)}if(o){var a=fA(t);r.push(a)}}),{size:e,shape:A,stops:r,position:n,type:uA.RADIAL_GRADIENT}},"-moz-radial-gradient":IA,"-ms-radial-gradient":IA,"-o-radial-gradient":IA,"-webkit-radial-gradient":IA,"-webkit-gradient":function(t){var A=Yt(180),e=[],r=uA.LINEAR_GRADIENT,n=PA.CIRCLE,i=TA.FARTHEST_CORNER;return Ot(t).forEach(function(t,A){var n=t[0];if(0===A){if(xt(n)&&"linear"===n.value)return void(r=uA.LINEAR_GRADIENT);if(xt(n)&&"radial"===n.value)return void(r=uA.RADIAL_GRADIENT)}if(n.type===h.FUNCTION)if("from"===n.name){var i=Zt(n.values[0]);e.push({stop:zt,color:i})}else if("to"===n.name)i=Zt(n.values[0]),e.push({stop:Vt,color:i});else if("color-stop"===n.name){var o=n.values.filter(Rt);if(2===o.length){i=Zt(o[1]);var s=o[0];St(s)&&e.push({stop:{type:h.PERCENTAGE_TOKEN,number:100*s.number,flags:s.flags},color:i})}}}),r===uA.LINEAR_GRADIENT?{angle:(A+Yt(180))%Yt(360),stops:e,type:r}:{size:i,shape:n,stops:e,position:[],type:r}}},MA={name:"background-image",initialValue:"none",type:iA.LIST,prefix:!1,parse:function(t){if(0===t.length)return[];var A=t[0];return A.type===h.IDENT_TOKEN&&"none"===A.value?[]:t.filter(function(t){return Rt(t)&&function(t){return t.type!==h.FUNCTION||KA[t.name]}(t)}).map(RA)}},kA={name:"background-origin",initialValue:"border-box",prefix:!1,type:iA.LIST,parse:function(t){return t.map(function(t){if(xt(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},DA={name:"background-position",initialValue:"0% 0%",type:iA.LIST,prefix:!1,parse:function(t){return Ot(t).map(function(t){return t.filter(kt)}).map(Dt)}};!function(t){t[t.REPEAT=0]="REPEAT",t[t.NO_REPEAT=1]="NO_REPEAT",t[t.REPEAT_X=2]="REPEAT_X",t[t.REPEAT_Y=3]="REPEAT_Y"}(OA||(OA={}));var zA,jA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:iA.LIST,parse:function(t){return Ot(t).map(function(t){return t.filter(xt).map(function(t){return t.value}).join(" ")}).map(VA)}},VA=function(t){switch(t){case"no-repeat":return OA.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return OA.REPEAT_X;case"repeat-y":case"no-repeat repeat":return OA.REPEAT_Y;case"repeat":default:return OA.REPEAT}};!function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"}(zA||(zA={}));var qA,GA={name:"background-size",initialValue:"0",prefix:!1,type:iA.LIST,parse:function(t){return Ot(t).map(function(t){return t.filter(XA)})}},XA=function(t){return xt(t)||kt(t)},JA=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:iA.TYPE_VALUE,format:"color"}},WA=JA("top"),YA=JA("right"),ZA=JA("bottom"),$A=JA("left"),te=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:iA.LIST,parse:function(t){return Dt(t.filter(kt))}}},Ae=te("top-left"),ee=te("top-right"),re=te("bottom-right"),ne=te("bottom-left");!function(t){t[t.NONE=0]="NONE",t[t.SOLID=1]="SOLID"}(qA||(qA={}));var ie,oe=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"none":return qA.NONE}return qA.SOLID}}},se=oe("top"),ae=oe("right"),ce=oe("bottom"),ue=oe("left"),le=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:iA.VALUE,prefix:!1,parse:function(t){return _t(t)?t.number:0}}},he=le("top"),fe=le("right"),de=le("bottom"),pe=le("left"),Be={name:"color",initialValue:"transparent",prefix:!1,type:iA.TYPE_VALUE,format:"color"},ge={name:"display",initialValue:"inline-block",prefix:!1,type:iA.LIST,parse:function(t){return t.filter(xt).reduce(function(t,A){return t|we(A.value)},0)}},we=function(t){switch(t){case"block":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(t){t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.INLINE_START=3]="INLINE_START",t[t.INLINE_END=4]="INLINE_END"}(ie||(ie={}));var me,ve={name:"float",initialValue:"none",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"left":return ie.LEFT;case"right":return ie.RIGHT;case"inline-start":return ie.INLINE_START;case"inline-end":return ie.INLINE_END}return ie.NONE}},be={name:"letter-spacing",initialValue:"0",prefix:!1,type:iA.VALUE,parse:function(t){return t.type===h.IDENT_TOKEN&&"normal"===t.value?0:t.type===h.NUMBER_TOKEN?t.number:t.type===h.DIMENSION_TOKEN?t.number:0}};!function(t){t.NORMAL="normal",t.STRICT="strict"}(me||(me={}));var Qe,Ce={name:"line-break",initialValue:"normal",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"strict":return me.STRICT;case"normal":default:return me.NORMAL}}},Fe={name:"line-height",initialValue:"normal",prefix:!1,type:iA.TOKEN_VALUE},Ue={name:"list-style-image",initialValue:"none",type:iA.VALUE,prefix:!1,parse:function(t){return t.type===h.IDENT_TOKEN&&"none"===t.value?null:RA(t)}};!function(t){t[t.INSIDE=0]="INSIDE",t[t.OUTSIDE=1]="OUTSIDE"}(Qe||(Qe={}));var ye,Ne={name:"list-style-position",initialValue:"outside",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"inside":return Qe.INSIDE;case"outside":default:return Qe.OUTSIDE}}};!function(t){t[t.NONE=-1]="NONE",t[t.DISC=0]="DISC",t[t.CIRCLE=1]="CIRCLE",t[t.SQUARE=2]="SQUARE",t[t.DECIMAL=3]="DECIMAL",t[t.CJK_DECIMAL=4]="CJK_DECIMAL",t[t.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",t[t.LOWER_ROMAN=6]="LOWER_ROMAN",t[t.UPPER_ROMAN=7]="UPPER_ROMAN",t[t.LOWER_GREEK=8]="LOWER_GREEK",t[t.LOWER_ALPHA=9]="LOWER_ALPHA",t[t.UPPER_ALPHA=10]="UPPER_ALPHA",t[t.ARABIC_INDIC=11]="ARABIC_INDIC",t[t.ARMENIAN=12]="ARMENIAN",t[t.BENGALI=13]="BENGALI",t[t.CAMBODIAN=14]="CAMBODIAN",t[t.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",t[t.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",t[t.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",t[t.DEVANAGARI=18]="DEVANAGARI",t[t.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",t[t.GEORGIAN=20]="GEORGIAN",t[t.GUJARATI=21]="GUJARATI",t[t.GURMUKHI=22]="GURMUKHI",t[t.HEBREW=22]="HEBREW",t[t.HIRAGANA=23]="HIRAGANA",t[t.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",t[t.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",t[t.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",t[t.KANNADA=27]="KANNADA",t[t.KATAKANA=28]="KATAKANA",t[t.KATAKANA_IROHA=29]="KATAKANA_IROHA",t[t.KHMER=30]="KHMER",t[t.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",t[t.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",t[t.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",t[t.LAO=34]="LAO",t[t.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",t[t.MALAYALAM=36]="MALAYALAM",t[t.MONGOLIAN=37]="MONGOLIAN",t[t.MYANMAR=38]="MYANMAR",t[t.ORIYA=39]="ORIYA",t[t.PERSIAN=40]="PERSIAN",t[t.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",t[t.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",t[t.TAMIL=43]="TAMIL",t[t.TELUGU=44]="TELUGU",t[t.THAI=45]="THAI",t[t.TIBETAN=46]="TIBETAN",t[t.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",t[t.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",t[t.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",t[t.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",t[t.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(ye||(ye={}));var Ee,Le={name:"list-style-type",initialValue:"none",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"disc":return ye.DISC;case"circle":return ye.CIRCLE;case"square":return ye.SQUARE;case"decimal":return ye.DECIMAL;case"cjk-decimal":return ye.CJK_DECIMAL;case"decimal-leading-zero":return ye.DECIMAL_LEADING_ZERO;case"lower-roman":return ye.LOWER_ROMAN;case"upper-roman":return ye.UPPER_ROMAN;case"lower-greek":return ye.LOWER_GREEK;case"lower-alpha":return ye.LOWER_ALPHA;case"upper-alpha":return ye.UPPER_ALPHA;case"arabic-indic":return ye.ARABIC_INDIC;case"armenian":return ye.ARMENIAN;case"bengali":return ye.BENGALI;case"cambodian":return ye.CAMBODIAN;case"cjk-earthly-branch":return ye.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return ye.CJK_HEAVENLY_STEM;case"cjk-ideographic":return ye.CJK_IDEOGRAPHIC;case"devanagari":return ye.DEVANAGARI;case"ethiopic-numeric":return ye.ETHIOPIC_NUMERIC;case"georgian":return ye.GEORGIAN;case"gujarati":return ye.GUJARATI;case"gurmukhi":return ye.GURMUKHI;case"hebrew":return ye.HEBREW;case"hiragana":return ye.HIRAGANA;case"hiragana-iroha":return ye.HIRAGANA_IROHA;case"japanese-formal":return ye.JAPANESE_FORMAL;case"japanese-informal":return ye.JAPANESE_INFORMAL;case"kannada":return ye.KANNADA;case"katakana":return ye.KATAKANA;case"katakana-iroha":return ye.KATAKANA_IROHA;case"khmer":return ye.KHMER;case"korean-hangul-formal":return ye.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return ye.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return ye.KOREAN_HANJA_INFORMAL;case"lao":return ye.LAO;case"lower-armenian":return ye.LOWER_ARMENIAN;case"malayalam":return ye.MALAYALAM;case"mongolian":return ye.MONGOLIAN;case"myanmar":return ye.MYANMAR;case"oriya":return ye.ORIYA;case"persian":return ye.PERSIAN;case"simp-chinese-formal":return ye.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return ye.SIMP_CHINESE_INFORMAL;case"tamil":return ye.TAMIL;case"telugu":return ye.TELUGU;case"thai":return ye.THAI;case"tibetan":return ye.TIBETAN;case"trad-chinese-formal":return ye.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return ye.TRAD_CHINESE_INFORMAL;case"upper-armenian":return ye.UPPER_ARMENIAN;case"disclosure-open":return ye.DISCLOSURE_OPEN;case"disclosure-closed":return ye.DISCLOSURE_CLOSED;case"none":default:return ye.NONE}}},He=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:iA.TOKEN_VALUE}},_e=He("top"),Se=He("right"),xe=He("bottom"),Ie=He("left");!function(t){t[t.VISIBLE=0]="VISIBLE",t[t.HIDDEN=1]="HIDDEN",t[t.SCROLL=2]="SCROLL",t[t.AUTO=3]="AUTO"}(Ee||(Ee={}));var Pe,Te={name:"overflow",initialValue:"visible",prefix:!1,type:iA.LIST,parse:function(t){return t.filter(xt).map(function(t){switch(t.value){case"hidden":return Ee.HIDDEN;case"scroll":return Ee.SCROLL;case"auto":return Ee.AUTO;case"visible":default:return Ee.VISIBLE}})}};!function(t){t.NORMAL="normal",t.BREAK_WORD="break-word"}(Pe||(Pe={}));var Re,Oe={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"break-word":return Pe.BREAK_WORD;case"normal":default:return Pe.NORMAL}}},Ke=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:iA.TYPE_VALUE,format:"length-percentage"}},Me=Ke("top"),ke=Ke("right"),De=Ke("bottom"),ze=Ke("left");!function(t){t[t.LEFT=0]="LEFT",t[t.CENTER=1]="CENTER",t[t.RIGHT=2]="RIGHT"}(Re||(Re={}));var je,Ve={name:"text-align",initialValue:"left",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"right":return Re.RIGHT;case"center":case"justify":return Re.CENTER;case"left":default:return Re.LEFT}}};!function(t){t[t.STATIC=0]="STATIC",t[t.RELATIVE=1]="RELATIVE",t[t.ABSOLUTE=2]="ABSOLUTE",t[t.FIXED=3]="FIXED",t[t.STICKY=4]="STICKY"}(je||(je={}));var qe,Ge={name:"position",initialValue:"static",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"relative":return je.RELATIVE;case"absolute":return je.ABSOLUTE;case"fixed":return je.FIXED;case"sticky":return je.STICKY}return je.STATIC}},Xe={name:"text-shadow",initialValue:"none",type:iA.LIST,prefix:!1,parse:function(t){return 1===t.length&&Pt(t[0],"none")?[]:Ot(t).map(function(t){for(var A={color:cA.TRANSPARENT,offsetX:zt,offsetY:zt,blur:zt},e=0,r=0;r<t.length;r++){var n=t[r];Mt(n)?(0===e?A.offsetX=n:1===e?A.offsetY=n:A.blur=n,e++):A.color=Zt(n)}return A})}};!function(t){t[t.NONE=0]="NONE",t[t.LOWERCASE=1]="LOWERCASE",t[t.UPPERCASE=2]="UPPERCASE",t[t.CAPITALIZE=3]="CAPITALIZE"}(qe||(qe={}));var Je,We={name:"text-transform",initialValue:"none",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"uppercase":return qe.UPPERCASE;case"lowercase":return qe.LOWERCASE;case"capitalize":return qe.CAPITALIZE}return qe.NONE}},Ye={name:"transform",initialValue:"none",prefix:!0,type:iA.VALUE,parse:function(t){if(t.type===h.IDENT_TOKEN&&"none"===t.value)return null;if(t.type===h.FUNCTION){var A=Ze[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return A(t.values)}return null}},Ze={matrix:function(t){var A=t.filter(function(t){return t.type===h.NUMBER_TOKEN}).map(function(t){return t.number});return 6===A.length?A:null},matrix3d:function(t){var A=t.filter(function(t){return t.type===h.NUMBER_TOKEN}).map(function(t){return t.number}),e=A[0],r=A[1],n=(A[2],A[3],A[4]),i=A[5],o=(A[6],A[7],A[8],A[9],A[10],A[11],A[12]),s=A[13];A[14],A[15];return 16===A.length?[e,r,n,i,o,s]:null}},$e={type:h.PERCENTAGE_TOKEN,number:50,flags:4},tr=[$e,$e],Ar={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:iA.LIST,parse:function(t){var A=t.filter(kt);return 2!==A.length?tr:[A[0],A[1]]}};!function(t){t[t.VISIBLE=0]="VISIBLE",t[t.HIDDEN=1]="HIDDEN",t[t.COLLAPSE=2]="COLLAPSE"}(Je||(Je={}));var er,rr={name:"visible",initialValue:"none",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"hidden":return Je.HIDDEN;case"collapse":return Je.COLLAPSE;case"visible":default:return Je.VISIBLE}}};!function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"}(er||(er={}));var nr,ir={name:"word-break",initialValue:"normal",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"break-all":return er.BREAK_ALL;case"keep-all":return er.KEEP_ALL;case"normal":default:return er.NORMAL}}},or={name:"z-index",initialValue:"auto",prefix:!1,type:iA.VALUE,parse:function(t){if(t.type===h.IDENT_TOKEN)return{auto:!0,order:0};if(St(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},sr={name:"opacity",initialValue:"1",type:iA.VALUE,prefix:!1,parse:function(t){return St(t)?t.number:1}},ar={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:iA.TYPE_VALUE,format:"color"},cr={name:"text-decoration-line",initialValue:"none",prefix:!1,type:iA.LIST,parse:function(t){return t.filter(xt).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return 0!==t})}},ur={name:"font-family",initialValue:"",prefix:!1,type:iA.LIST,parse:function(t){var A=[],e=[];return t.forEach(function(t){switch(t.type){case h.IDENT_TOKEN:case h.STRING_TOKEN:A.push(t.value);break;case h.NUMBER_TOKEN:A.push(t.number.toString());break;case h.COMMA_TOKEN:e.push(A.join(" ")),A.length=0}}),A.length&&e.push(A.join(" ")),e.map(function(t){return-1===t.indexOf(" ")?t:"'"+t+"'"})}},lr={name:"font-size",initialValue:"0",prefix:!1,type:iA.TYPE_VALUE,format:"length"},hr={name:"font-weight",initialValue:"normal",type:iA.VALUE,prefix:!1,parse:function(t){if(St(t))return t.number;if(xt(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},fr={name:"font-variant",initialValue:"none",type:iA.LIST,prefix:!1,parse:function(t){return t.filter(xt).map(function(t){return t.value})}};!function(t){t.NORMAL="normal",t.ITALIC="italic",t.OBLIQUE="oblique"}(nr||(nr={}));var dr,pr={name:"font-style",initialValue:"normal",prefix:!1,type:iA.IDENT_VALUE,parse:function(t){switch(t){case"oblique":return nr.OBLIQUE;case"italic":return nr.ITALIC;case"normal":default:return nr.NORMAL}}},Br=function(t,A){return 0!=(t&A)},gr={name:"content",initialValue:"none",type:iA.LIST,prefix:!1,parse:function(t){if(0===t.length)return[];var A=t[0];return A.type===h.IDENT_TOKEN&&"none"===A.value?[]:t}},wr={name:"counter-increment",initialValue:"none",prefix:!0,type:iA.LIST,parse:function(t){if(0===t.length)return null;var A=t[0];if(A.type===h.IDENT_TOKEN&&"none"===A.value)return null;for(var e=[],r=t.filter(Tt),n=0;n<r.length;n++){var i=r[n],o=r[n+1];if(i.type===h.IDENT_TOKEN){var s=o&&St(o)?o.number:1;e.push({counter:i.value,increment:s})}}return e}},mr={name:"counter-reset",initialValue:"none",prefix:!0,type:iA.LIST,parse:function(t){if(0===t.length)return[];for(var A=[],e=t.filter(Tt),r=0;r<e.length;r++){var n=e[r],i=e[r+1];if(xt(n)&&"none"!==n.value){var o=i&&St(i)?i.number:0;A.push({counter:n.value,reset:o})}}return A}},vr={name:"quotes",initialValue:"none",prefix:!0,type:iA.LIST,parse:function(t){if(0===t.length)return null;var A=t[0];if(A.type===h.IDENT_TOKEN&&"none"===A.value)return null;var e=[],r=t.filter(It);if(r.length%2!=0)return null;for(var n=0;n<r.length;n+=2){var i=r[n].value,o=r[n+1].value;e.push({open:i,close:o})}return e}},br=function(t,A,e){if(!t)return"";var r=t[Math.min(A,t.length-1)];return r?e?r.open:r.close:""},Qr={name:"box-shadow",initialValue:"none",type:iA.LIST,prefix:!1,parse:function(t){return 1===t.length&&Pt(t[0],"none")?[]:Ot(t).map(function(t){for(var A={color:255,offsetX:zt,offsetY:zt,blur:zt,spread:zt,inset:!1},e=0,r=0;r<t.length;r++){var n=t[r];Pt(n,"inset")?A.inset=!0:Mt(n)?(0===e?A.offsetX=n:1===e?A.offsetY=n:2===e?A.blur=n:A.spread=n,e++):A.color=Zt(n)}return A})}},Cr=function(){function t(t){this.backgroundClip=yr(lA,t.backgroundClip),this.backgroundColor=yr(hA,t.backgroundColor),this.backgroundImage=yr(MA,t.backgroundImage),this.backgroundOrigin=yr(kA,t.backgroundOrigin),this.backgroundPosition=yr(DA,t.backgroundPosition),this.backgroundRepeat=yr(jA,t.backgroundRepeat),this.backgroundSize=yr(GA,t.backgroundSize),this.borderTopColor=yr(WA,t.borderTopColor),this.borderRightColor=yr(YA,t.borderRightColor),this.borderBottomColor=yr(ZA,t.borderBottomColor),this.borderLeftColor=yr($A,t.borderLeftColor),this.borderTopLeftRadius=yr(Ae,t.borderTopLeftRadius),this.borderTopRightRadius=yr(ee,t.borderTopRightRadius),this.borderBottomRightRadius=yr(re,t.borderBottomRightRadius),this.borderBottomLeftRadius=yr(ne,t.borderBottomLeftRadius),this.borderTopStyle=yr(se,t.borderTopStyle),this.borderRightStyle=yr(ae,t.borderRightStyle),this.borderBottomStyle=yr(ce,t.borderBottomStyle),this.borderLeftStyle=yr(ue,t.borderLeftStyle),this.borderTopWidth=yr(he,t.borderTopWidth),this.borderRightWidth=yr(fe,t.borderRightWidth),this.borderBottomWidth=yr(de,t.borderBottomWidth),this.borderLeftWidth=yr(pe,t.borderLeftWidth),this.boxShadow=yr(Qr,t.boxShadow),this.color=yr(Be,t.color),this.display=yr(ge,t.display),this.float=yr(ve,t.cssFloat),this.fontFamily=yr(ur,t.fontFamily),this.fontSize=yr(lr,t.fontSize),this.fontStyle=yr(pr,t.fontStyle),this.fontVariant=yr(fr,t.fontVariant),this.fontWeight=yr(hr,t.fontWeight),this.letterSpacing=yr(be,t.letterSpacing),this.lineBreak=yr(Ce,t.lineBreak),this.lineHeight=yr(Fe,t.lineHeight),this.listStyleImage=yr(Ue,t.listStyleImage),this.listStylePosition=yr(Ne,t.listStylePosition),this.listStyleType=yr(Le,t.listStyleType),this.marginTop=yr(_e,t.marginTop),this.marginRight=yr(Se,t.marginRight),this.marginBottom=yr(xe,t.marginBottom),this.marginLeft=yr(Ie,t.marginLeft),this.opacity=yr(sr,t.opacity);var A=yr(Te,t.overflow);this.overflowX=A[0],this.overflowY=A[A.length>1?1:0],this.overflowWrap=yr(Oe,t.overflowWrap),this.paddingTop=yr(Me,t.paddingTop),this.paddingRight=yr(ke,t.paddingRight),this.paddingBottom=yr(De,t.paddingBottom),this.paddingLeft=yr(ze,t.paddingLeft),this.position=yr(Ge,t.position),this.textAlign=yr(Ve,t.textAlign),this.textDecorationColor=yr(ar,t.textDecorationColor||t.color),this.textDecorationLine=yr(cr,t.textDecorationLine),this.textShadow=yr(Xe,t.textShadow),this.textTransform=yr(We,t.textTransform),this.transform=yr(Ye,t.transform),this.transformOrigin=yr(Ar,t.transformOrigin),this.visibility=yr(rr,t.visibility),this.wordBreak=yr(ir,t.wordBreak),this.zIndex=yr(or,t.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Je.VISIBLE},t.prototype.isTransparent=function(){return $t(this.backgroundColor)},t.prototype.isTransformed=function(){return null!==this.transform},t.prototype.isPositioned=function(){return this.position!==je.STATIC},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return this.float!==ie.NONE},t.prototype.isInlineLevel=function(){return Br(this.display,4)||Br(this.display,33554432)||Br(this.display,268435456)||Br(this.display,536870912)||Br(this.display,67108864)||Br(this.display,134217728)},t}(),Fr=function(){return function(t){this.content=yr(gr,t.content),this.quotes=yr(vr,t.quotes)}}(),Ur=function(){return function(t){this.counterIncrement=yr(wr,t.counterIncrement),this.counterReset=yr(mr,t.counterReset)}}(),yr=function(t,A){var e=new Lt,r=null!==A&&void 0!==A?A.toString():t.initialValue;e.write(r);var n=new Ht(e.read());switch(t.type){case iA.IDENT_VALUE:var i=n.parseComponentValue();return t.parse(xt(i)?i.value:t.initialValue);case iA.VALUE:return t.parse(n.parseComponentValue());case iA.LIST:return t.parse(n.parseComponentValues());case iA.TOKEN_VALUE:return n.parseComponentValue();case iA.TYPE_VALUE:switch(t.format){case"angle":return Xt(n.parseComponentValue());case"color":return Zt(n.parseComponentValue());case"image":return RA(n.parseComponentValue());case"length":var o=n.parseComponentValue();return Mt(o)?o:zt;case"length-percentage":var s=n.parseComponentValue();return kt(s)?s:zt}}throw new Error("Attempting to parse unsupported css format type "+t.format)},Nr=function(){return function(t){this.styles=new Cr(window.getComputedStyle(t,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&un(t)&&(t.style.transform="none"),this.bounds=o(t),this.flags=0}}(),Er=function(){return function(t,A){this.text=t,this.bounds=A}}(),Lr=function(t,A,e){var r=[],n=0;return Sr(t,A).forEach(function(t){if(A.textDecorationLine.length||t.trim().length>0)if(QA.SUPPORT_RANGE_BOUNDS)r.push(new Er(t,_r(e,n,t.length)));else{var i=e.splitText(t.length);r.push(new Er(t,Hr(e))),e=i}else QA.SUPPORT_RANGE_BOUNDS||(e=e.splitText(t.length));n+=t.length}),r},Hr=function(t){var A=t.ownerDocument;if(A){var e=A.createElement("html2canvaswrapper");e.appendChild(t.cloneNode(!0));var r=t.parentNode;if(r){r.replaceChild(e,t);var n=o(e);return e.firstChild&&r.replaceChild(e.firstChild,e),n}}return new i(0,0,0,0)},_r=function(t,A,e){var r=t.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(t,A),n.setEnd(t,A+e),i.fromClientRect(n.getBoundingClientRect())},Sr=function(t,A){return 0!==A.letterSpacing?s(t).map(function(t){return a(t)}):xr(t,A)},xr=function(t,A){for(var e,r=function(t,A){var e=s(t),r=Y(e,A),n=r[0],i=r[1],o=r[2],a=e.length,c=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var t="×";u<a&&"×"===(t=W(e,i,n,++u,o)););if("×"!==t||u===a){var A=new Z(e,t,c,u);return c=u,{value:A,done:!1}}return{done:!0,value:null}}}}(t,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap===Pe.BREAK_WORD?"break-word":A.wordBreak}),n=[];!(e=r.next()).done;)e.value&&n.push(e.value.slice());return n},Ir=function(){return function(t,A){this.text=Pr(t.data,A.textTransform),this.textBounds=Lr(this.text,A,t)}}(),Pr=function(t,A){switch(A){case qe.LOWERCASE:return t.toLowerCase();case qe.CAPITALIZE:return t.replace(Tr,Rr);case qe.UPPERCASE:return t.toUpperCase();default:return t}},Tr=/(^|\s|:|-|\(|\))([a-z])/g,Rr=function(t,A,e){return t.length>0?A+e.toUpperCase():t},Or=function(t){function e(A){var e=t.call(this,A)||this;return e.src=A.currentSrc||A.src,e.intrinsicWidth=A.naturalWidth,e.intrinsicHeight=A.naturalHeight,FA.getInstance().addImage(e.src),e}return A(e,t),e}(Nr),Kr=function(t){function e(A){var e=t.call(this,A)||this;return e.canvas=A,e.intrinsicWidth=A.width,e.intrinsicHeight=A.height,e}return A(e,t),e}(Nr),Mr=function(t){function e(A){var e=t.call(this,A)||this,r=new XMLSerializer;return e.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(A)),e.intrinsicWidth=A.width.baseVal.value,e.intrinsicHeight=A.height.baseVal.value,FA.getInstance().addImage(e.svg),e}return A(e,t),e}(Nr),kr=function(t){function e(A){var e=t.call(this,A)||this;return e.value=A.value,e}return A(e,t),e}(Nr),Dr=function(t){function e(A){var e=t.call(this,A)||this;return e.start=A.start,e.reversed="boolean"==typeof A.reversed&&!0===A.reversed,e}return A(e,t),e}(Nr),zr=[{type:h.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],jr=[{type:h.PERCENTAGE_TOKEN,flags:0,number:50}],Vr=function(t){return t.width>t.height?new i(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width<t.height?new i(t.left,t.top+(t.height-t.width)/2,t.width,t.width):t},qr=function(t){var A=t.type===Jr?new Array(t.value.length+1).join("•"):t.value;return 0===A.length?t.placeholder||"":A},Gr="checkbox",Xr="radio",Jr="password",Wr=function(t){function e(A){var e=t.call(this,A)||this;switch(e.type=A.type.toLowerCase(),e.checked=A.checked,e.value=qr(A),e.type!==Gr&&e.type!==Xr||(e.styles.backgroundColor=3739148031,e.styles.borderTopColor=e.styles.borderRightColor=e.styles.borderBottomColor=e.styles.borderLeftColor=2779096575,e.styles.borderTopWidth=e.styles.borderRightWidth=e.styles.borderBottomWidth=e.styles.borderLeftWidth=1,e.styles.borderTopStyle=e.styles.borderRightStyle=e.styles.borderBottomStyle=e.styles.borderLeftStyle=qA.SOLID,e.styles.backgroundClip=[oA.BORDER_BOX],e.styles.backgroundOrigin=[0],e.bounds=Vr(e.bounds)),e.type){case Gr:e.styles.borderTopRightRadius=e.styles.borderTopLeftRadius=e.styles.borderBottomRightRadius=e.styles.borderBottomLeftRadius=zr;break;case Xr:e.styles.borderTopRightRadius=e.styles.borderTopLeftRadius=e.styles.borderBottomRightRadius=e.styles.borderBottomLeftRadius=jr}return e}return A(e,t),e}(Nr),Yr=function(t){function e(A){var e=t.call(this,A)||this,r=A.options[A.selectedIndex||0];return e.value=r&&r.text||"",e}return A(e,t),e}(Nr),Zr=function(t){function e(A){var e=t.call(this,A)||this;return e.value=A.value,e}return A(e,t),e}(Nr),$r=function(t){return Zt(Ht.create(t).parseComponentValue())},tn=function(t){function e(A){var e=t.call(this,A)||this;e.src=A.src,e.width=parseInt(A.width,10)||0,e.height=parseInt(A.height,10)||0,e.backgroundColor=e.styles.backgroundColor;try{if(A.contentWindow&&A.contentWindow.document&&A.contentWindow.document.documentElement){e.tree=nn(A.contentWindow.document.documentElement);var r=A.contentWindow.document.documentElement?$r(getComputedStyle(A.contentWindow.document.documentElement).backgroundColor):cA.TRANSPARENT,n=A.contentWindow.document.body?$r(getComputedStyle(A.contentWindow.document.body).backgroundColor):cA.TRANSPARENT;e.backgroundColor=$t(r)?$t(n)?e.styles.backgroundColor:n:r}}catch(t){}return e}return A(e,t),e}(Nr),An=["OL","UL","MENU"],en=function(t,A,e){for(var r=t.firstChild,n=void 0;r;r=n)if(n=r.nextSibling,an(r)&&r.data.trim().length>0)A.textNodes.push(new Ir(r,A.styles));else if(cn(r)){var i=rn(r);i.styles.isVisible()&&(on(r,i,e)?i.flags|=4:sn(i.styles)&&(i.flags|=2),-1!==An.indexOf(r.tagName)&&(i.flags|=8),A.elements.push(i),Qn(r)||pn(r)||Cn(r)||en(r,i,e))}},rn=function(t){return wn(t)?new Or(t):gn(t)?new Kr(t):pn(t)?new Mr(t):hn(t)?new kr(t):fn(t)?new Dr(t):dn(t)?new Wr(t):Cn(t)?new Yr(t):Qn(t)?new Zr(t):mn(t)?new tn(t):new Nr(t)},nn=function(t){var A=rn(t);return A.flags|=4,en(t,A,A),A},on=function(t,A,e){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Bn(t)&&e.styles.isTransparent()},sn=function(t){return t.isPositioned()||t.isFloating()},an=function(t){return t.nodeType===Node.TEXT_NODE},cn=function(t){return t.nodeType===Node.ELEMENT_NODE},un=function(t){return cn(t)&&void 0!==t.style&&!ln(t)},ln=function(t){return"object"==typeof t.className},hn=function(t){return"LI"===t.tagName},fn=function(t){return"OL"===t.tagName},dn=function(t){return"INPUT"===t.tagName},pn=function(t){return"svg"===t.tagName},Bn=function(t){return"BODY"===t.tagName},gn=function(t){return"CANVAS"===t.tagName},wn=function(t){return"IMG"===t.tagName},mn=function(t){return"IFRAME"===t.tagName},vn=function(t){return"STYLE"===t.tagName},bn=function(t){return"SCRIPT"===t.tagName},Qn=function(t){return"TEXTAREA"===t.tagName},Cn=function(t){return"SELECT"===t.tagName},Fn=function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(t){var A=this.counters[t];return A&&A.length?A[A.length-1]:1},t.prototype.getCounterValues=function(t){var A=this.counters[t];return A||[]},t.prototype.pop=function(t){var A=this;t.forEach(function(t){return A.counters[t].pop()})},t.prototype.parse=function(t){var A=this,e=t.counterIncrement,r=t.counterReset,n=!0;null!==e&&e.forEach(function(t){var e=A.counters[t.counter];e&&0!==t.increment&&(n=!1,e[Math.max(0,e.length-1)]+=t.increment)});var i=[];return n&&r.forEach(function(t){var e=A.counters[t.counter];i.push(t.counter),e||(e=A.counters[t.counter]=[]),e.push(t.reset)}),i},t}(),Un={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},yn={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Nn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},En={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ln=function(t,A,e,r,n,i){return t<A||t>e?In(t,n,i.length>0):r.integers.reduce(function(A,e,n){for(;t>=e;)t-=e,A+=r.values[n];return A},"")+i},Hn=function(t,A,e,r){var n="";do{e||t--,n=r(t)+n,t/=A}while(t*A>=A);return n},_n=function(t,A,e,r,n){var i=e-A+1;return(t<0?"-":"")+(Hn(Math.abs(t),i,r,function(t){return a(Math.floor(t%i)+A)})+n)},Sn=function(t,A,e){void 0===e&&(e=". ");var r=A.length;return Hn(Math.abs(t),r,!1,function(t){return A[Math.floor(t%r)]})+e},xn=function(t,A,e,r,n,i){if(t<-9999||t>9999)return In(t,ye.CJK_DECIMAL,n.length>0);var o=Math.abs(t),s=n;if(0===o)return A[0]+s;for(var a=0;o>0&&a<=4;a++){var c=o%10;0===c&&Br(i,1)&&""!==s?s=A[c]+s:c>1||1===c&&0===a||1===c&&1===a&&Br(i,2)||1===c&&1===a&&Br(i,4)&&t>100||1===c&&a>1&&Br(i,8)?s=A[c]+(a>0?e[a-1]:"")+s:1===c&&a>0&&(s=e[a-1]+s),o=Math.floor(o/10)}return(t<0?r:"")+s},In=function(t,A,e){var r=e?". ":"",n=e?"、":"",i=e?", ":"",o=e?" ":"";switch(A){case ye.DISC:return"•"+o;case ye.CIRCLE:return"◦"+o;case ye.SQUARE:return"◾"+o;case ye.DECIMAL_LEADING_ZERO:var s=_n(t,48,57,!0,r);return s.length<4?"0"+s:s;case ye.CJK_DECIMAL:return Sn(t,"〇一二三四五六七八九",n);case ye.LOWER_ROMAN:return Ln(t,1,3999,Un,ye.DECIMAL,r).toLowerCase();case ye.UPPER_ROMAN:return Ln(t,1,3999,Un,ye.DECIMAL,r);case ye.LOWER_GREEK:return _n(t,945,969,!1,r);case ye.LOWER_ALPHA:return _n(t,97,122,!1,r);case ye.UPPER_ALPHA:return _n(t,65,90,!1,r);case ye.ARABIC_INDIC:return _n(t,1632,1641,!0,r);case ye.ARMENIAN:case ye.UPPER_ARMENIAN:return Ln(t,1,9999,yn,ye.DECIMAL,r);case ye.LOWER_ARMENIAN:return Ln(t,1,9999,yn,ye.DECIMAL,r).toLowerCase();case ye.BENGALI:return _n(t,2534,2543,!0,r);case ye.CAMBODIAN:case ye.KHMER:return _n(t,6112,6121,!0,r);case ye.CJK_EARTHLY_BRANCH:return Sn(t,"子丑寅卯辰巳午未申酉戌亥",n);case ye.CJK_HEAVENLY_STEM:return Sn(t,"甲乙丙丁戊己庚辛壬癸",n);case ye.CJK_IDEOGRAPHIC:case ye.TRAD_CHINESE_INFORMAL:return xn(t,"零一二三四五六七八九","十百千萬","負",n,14);case ye.TRAD_CHINESE_FORMAL:return xn(t,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",n,15);case ye.SIMP_CHINESE_INFORMAL:return xn(t,"零一二三四五六七八九","十百千萬","负",n,14);case ye.SIMP_CHINESE_FORMAL:return xn(t,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",n,15);case ye.JAPANESE_INFORMAL:return xn(t,"〇一二三四五六七八九","十百千万","マイナス",n,0);case ye.JAPANESE_FORMAL:return xn(t,"零壱弐参四伍六七八九","拾百千万","マイナス",n,7);case ye.KOREAN_HANGUL_FORMAL:return xn(t,"영일이삼사오육칠팔구","십백천만","마이너스",i,7);case ye.KOREAN_HANJA_INFORMAL:return xn(t,"零一二三四五六七八九","十百千萬","마이너스",i,0);case ye.KOREAN_HANJA_FORMAL:return xn(t,"零壹貳參四五六七八九","拾百千","마이너스",i,7);case ye.DEVANAGARI:return _n(t,2406,2415,!0,r);case ye.GEORGIAN:return Ln(t,1,19999,En,ye.DECIMAL,r);case ye.GUJARATI:return _n(t,2790,2799,!0,r);case ye.GURMUKHI:return _n(t,2662,2671,!0,r);case ye.HEBREW:return Ln(t,1,10999,Nn,ye.DECIMAL,r);case ye.HIRAGANA:return Sn(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case ye.HIRAGANA_IROHA:return Sn(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case ye.KANNADA:return _n(t,3302,3311,!0,r);case ye.KATAKANA:return Sn(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case ye.KATAKANA_IROHA:return Sn(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case ye.LAO:return _n(t,3792,3801,!0,r);case ye.MONGOLIAN:return _n(t,6160,6169,!0,r);case ye.MYANMAR:return _n(t,4160,4169,!0,r);case ye.ORIYA:return _n(t,2918,2927,!0,r);case ye.PERSIAN:return _n(t,1776,1785,!0,r);case ye.TAMIL:return _n(t,3046,3055,!0,r);case ye.TELUGU:return _n(t,3174,3183,!0,r);case ye.THAI:return _n(t,3664,3673,!0,r);case ye.TIBETAN:return _n(t,3872,3881,!0,r);case ye.DECIMAL:default:return _n(t,48,57,!0,r)}},Pn=function(){function t(t,A){if(this.options=A,this.scrolledElements=[],this.referenceElement=t,this.counters=new Fn,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement)}return t.prototype.toIFrame=function(t,A){var e=this,i=Rn(t,A);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var o=t.defaultView.pageXOffset,s=t.defaultView.pageYOffset,a=i.contentWindow,c=a.document,u=On(i).then(function(){return r(e,void 0,void 0,function(){var t;return n(this,function(e){switch(e.label){case 0:return this.scrolledElements.forEach(Dn),a&&(a.scrollTo(A.left,A.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||a.scrollY===A.top&&a.scrollX===A.left||(c.documentElement.style.top=-A.top+"px",c.documentElement.style.left=-A.left+"px",c.documentElement.style.position="absolute")),t=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:e.sent(),e.label=2;case 2:return"function"==typeof t?[2,Promise.resolve().then(function(){return t(c)}).then(function(){return i})]:[2,i]}})})});return c.open(),c.write(Mn(document.doctype)+"<html></html>"),kn(this.referenceElement.ownerDocument,o,s),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),u},t.prototype.createElementClone=function(t){if(gn(t))return this.createCanvasClone(t);if(vn(t))return this.createStyleClone(t);var A=t.cloneNode(!1);return wn(A)&&"lazy"===A.loading&&(A.loading="eager"),A},t.prototype.createStyleClone=function(t){try{var A=t.sheet;if(A&&A.cssRules){var e=[].slice.call(A.cssRules,0).reduce(function(t,A){return A&&"string"==typeof A.cssText?t+A.cssText:t},""),r=t.cloneNode(!1);return r.textContent=e,r}}catch(t){if(CA.getInstance(this.options.id).error("Unable to access cssRules property",t),"SecurityError"!==t.name)throw t}return t.cloneNode(!1)},t.prototype.createCanvasClone=function(t){if(this.options.inlineImages&&t.ownerDocument){var A=t.ownerDocument.createElement("img");try{return A.src=t.toDataURL(),A}catch(t){CA.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var e=t.cloneNode(!1);try{e.width=t.width,e.height=t.height;var r=t.getContext("2d"),n=e.getContext("2d");return n&&(r?n.putImageData(r.getImageData(0,0,t.width,t.height),0,0):n.drawImage(t,0,0)),e}catch(t){}return e},t.prototype.cloneNode=function(t){if(an(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var A=t.ownerDocument.defaultView;if(A&&cn(t)&&(un(t)||ln(t))){var e=this.createElementClone(t),r=A.getComputedStyle(t),n=A.getComputedStyle(t,":before"),i=A.getComputedStyle(t,":after");this.referenceElement===t&&un(e)&&(this.clonedReferenceElement=e),Bn(e)&&Vn(e);for(var o=this.counters.parse(new Ur(r)),s=this.resolvePseudoContent(t,e,n,dr.BEFORE),a=t.firstChild;a;a=a.nextSibling)cn(a)&&(bn(a)||a.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(a))||this.options.copyStyles&&cn(a)&&vn(a)||e.appendChild(this.cloneNode(a));s&&e.insertBefore(s,e.firstChild);var c=this.resolvePseudoContent(t,e,i,dr.AFTER);return c&&e.appendChild(c),this.counters.pop(o),r&&(this.options.copyStyles||ln(t))&&!mn(t)&&Kn(r,e),0===t.scrollTop&&0===t.scrollLeft||this.scrolledElements.push([e,t.scrollLeft,t.scrollTop]),(Qn(t)||Cn(t))&&(Qn(e)||Cn(e))&&(e.value=t.value),e}return t.cloneNode(!1)},t.prototype.resolvePseudoContent=function(t,A,e,r){var n=this;if(e){var i=e.content,o=A.ownerDocument;if(o&&i&&"none"!==i&&"-moz-alt-content"!==i&&"none"!==e.display){this.counters.parse(new Ur(e));var s=new Fr(e),a=o.createElement("html2canvaspseudoelement");Kn(e,a),s.content.forEach(function(A){if(A.type===h.STRING_TOKEN)a.appendChild(o.createTextNode(A.value));else if(A.type===h.URL_TOKEN){var e=o.createElement("img");e.src=A.value,e.style.opacity="1",a.appendChild(e)}else if(A.type===h.FUNCTION){if("attr"===A.name){var r=A.values.filter(xt);r.length&&a.appendChild(o.createTextNode(t.getAttribute(r[0].value)||""))}else if("counter"===A.name){var i=A.values.filter(Rt),c=i[0],u=i[1];if(c&&xt(c)){var l=n.counters.getCounterValue(c.value),f=u&&xt(u)?Le.parse(u.value):ye.DECIMAL;a.appendChild(o.createTextNode(In(l,f,!1)))}}else if("counters"===A.name){var d=A.values.filter(Rt),p=(c=d[0],d[1]);u=d[2];if(c&&xt(c)){var B=n.counters.getCounterValues(c.value),g=u&&xt(u)?Le.parse(u.value):ye.DECIMAL,w=p&&p.type===h.STRING_TOKEN?p.value:"",m=B.map(function(t){return In(t,g,!1)}).join(w);a.appendChild(o.createTextNode(m))}}}else if(A.type===h.IDENT_TOKEN)switch(A.value){case"open-quote":a.appendChild(o.createTextNode(br(s.quotes,n.quoteDepth++,!0)));break;case"close-quote":a.appendChild(o.createTextNode(br(s.quotes,--n.quoteDepth,!1)));break;default:a.appendChild(o.createTextNode(A.value))}}),a.className=zn+" "+jn;var c=r===dr.BEFORE?" "+zn:" "+jn;return ln(A)?A.className.baseValue+=c:A.className+=c,a}}},t.destroy=function(t){return!!t.parentNode&&(t.parentNode.removeChild(t),!0)},t}();!function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"}(dr||(dr={}));var Tn,Rn=function(t,A){var e=t.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=A.width.toString(),e.height=A.height.toString(),e.scrolling="no",e.setAttribute("data-html2canvas-ignore","true"),t.body.appendChild(e),e},On=function(t){return new Promise(function(A,e){var r=t.contentWindow;if(!r)return e("No window assigned for iframe");var n=r.document;r.onload=t.onload=n.onreadystatechange=function(){r.onload=t.onload=n.onreadystatechange=null;var e=setInterval(function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(e),A(t))},50)}})},Kn=function(t,A){for(var e=t.length-1;e>=0;e--){var r=t.item(e);"content"!==r&&A.style.setProperty(r,t.getPropertyValue(r))}return A},Mn=function(t){var A="";return t&&(A+="<!DOCTYPE ",t.name&&(A+=t.name),t.internalSubset&&(A+=t.internalSubset),t.publicId&&(A+='"'+t.publicId+'"'),t.systemId&&(A+='"'+t.systemId+'"'),A+=">"),A},kn=function(t,A,e){t&&t.defaultView&&(A!==t.defaultView.pageXOffset||e!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(A,e)},Dn=function(t){var A=t[0],e=t[1],r=t[2];A.scrollLeft=e,A.scrollTop=r},zn="___html2canvas___pseudoelement_before",jn="___html2canvas___pseudoelement_after",Vn=function(t){qn(t,"."+zn+':before{\n    content: "" !important;\n    display: none !important;\n}\n         .'+jn+':after{\n    content: "" !important;\n    display: none !important;\n}')},qn=function(t,A){var e=t.ownerDocument;if(e){var r=e.createElement("style");r.textContent=A,t.appendChild(r)}};!function(t){t[t.VECTOR=0]="VECTOR",t[t.BEZIER_CURVE=1]="BEZIER_CURVE"}(Tn||(Tn={}));var Gn,Xn=function(t,A){return t.length===A.length&&t.some(function(t,e){return t===A[e]})},Jn=function(){function t(t,A){this.type=Tn.VECTOR,this.x=t,this.y=A}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t}(),Wn=function(t,A,e){return new Jn(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},Yn=function(){function t(t,A,e,r){this.type=Tn.BEZIER_CURVE,this.start=t,this.startControl=A,this.endControl=e,this.end=r}return t.prototype.subdivide=function(A,e){var r=Wn(this.start,this.startControl,A),n=Wn(this.startControl,this.endControl,A),i=Wn(this.endControl,this.end,A),o=Wn(r,n,A),s=Wn(n,i,A),a=Wn(o,s,A);return e?new t(this.start,r,o,a):new t(a,s,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Zn=function(t){return t.type===Tn.BEZIER_CURVE},$n=function(){return function(t){var A=t.styles,e=t.bounds,r=qt(A.borderTopLeftRadius,e.width,e.height),n=r[0],i=r[1],o=qt(A.borderTopRightRadius,e.width,e.height),s=o[0],a=o[1],c=qt(A.borderBottomRightRadius,e.width,e.height),u=c[0],l=c[1],h=qt(A.borderBottomLeftRadius,e.width,e.height),f=h[0],d=h[1],p=[];p.push((n+s)/e.width),p.push((f+u)/e.width),p.push((i+d)/e.height),p.push((a+l)/e.height);var B=Math.max.apply(Math,p);B>1&&(n/=B,i/=B,s/=B,a/=B,u/=B,l/=B,f/=B,d/=B);var g=e.width-s,w=e.height-l,m=e.width-u,v=e.height-d,b=A.borderTopWidth,Q=A.borderRightWidth,C=A.borderBottomWidth,F=A.borderLeftWidth,U=Gt(A.paddingTop,t.bounds.width),y=Gt(A.paddingRight,t.bounds.width),N=Gt(A.paddingBottom,t.bounds.width),E=Gt(A.paddingLeft,t.bounds.width);this.topLeftBorderBox=n>0||i>0?ti(e.left,e.top,n,i,Gn.TOP_LEFT):new Jn(e.left,e.top),this.topRightBorderBox=s>0||a>0?ti(e.left+g,e.top,s,a,Gn.TOP_RIGHT):new Jn(e.left+e.width,e.top),this.bottomRightBorderBox=u>0||l>0?ti(e.left+m,e.top+w,u,l,Gn.BOTTOM_RIGHT):new Jn(e.left+e.width,e.top+e.height),this.bottomLeftBorderBox=f>0||d>0?ti(e.left,e.top+v,f,d,Gn.BOTTOM_LEFT):new Jn(e.left,e.top+e.height),this.topLeftPaddingBox=n>0||i>0?ti(e.left+F,e.top+b,Math.max(0,n-F),Math.max(0,i-b),Gn.TOP_LEFT):new Jn(e.left+F,e.top+b),this.topRightPaddingBox=s>0||a>0?ti(e.left+Math.min(g,e.width+F),e.top+b,g>e.width+F?0:s-F,a-b,Gn.TOP_RIGHT):new Jn(e.left+e.width-Q,e.top+b),this.bottomRightPaddingBox=u>0||l>0?ti(e.left+Math.min(m,e.width-F),e.top+Math.min(w,e.height+b),Math.max(0,u-Q),l-C,Gn.BOTTOM_RIGHT):new Jn(e.left+e.width-Q,e.top+e.height-C),this.bottomLeftPaddingBox=f>0||d>0?ti(e.left+F,e.top+v,Math.max(0,f-F),d-C,Gn.BOTTOM_LEFT):new Jn(e.left+F,e.top+e.height-C),this.topLeftContentBox=n>0||i>0?ti(e.left+F+E,e.top+b+U,Math.max(0,n-(F+E)),Math.max(0,i-(b+U)),Gn.TOP_LEFT):new Jn(e.left+F+E,e.top+b+U),this.topRightContentBox=s>0||a>0?ti(e.left+Math.min(g,e.width+F+E),e.top+b+U,g>e.width+F+E?0:s-F+E,a-(b+U),Gn.TOP_RIGHT):new Jn(e.left+e.width-(Q+y),e.top+b+U),this.bottomRightContentBox=u>0||l>0?ti(e.left+Math.min(m,e.width-(F+E)),e.top+Math.min(w,e.height+b+U),Math.max(0,u-(Q+y)),l-(C+N),Gn.BOTTOM_RIGHT):new Jn(e.left+e.width-(Q+y),e.top+e.height-(C+N)),this.bottomLeftContentBox=f>0||d>0?ti(e.left+F+E,e.top+v,Math.max(0,f-(F+E)),d-(C+N),Gn.BOTTOM_LEFT):new Jn(e.left+F+E,e.top+e.height-(C+N))}}();!function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Gn||(Gn={}));var ti=function(t,A,e,r,n){var i=(Math.sqrt(2)-1)/3*4,o=e*i,s=r*i,a=t+e,c=A+r;switch(n){case Gn.TOP_LEFT:return new Yn(new Jn(t,c),new Jn(t,c-s),new Jn(a-o,A),new Jn(a,A));case Gn.TOP_RIGHT:return new Yn(new Jn(t,A),new Jn(t+o,A),new Jn(a,c-s),new Jn(a,c));case Gn.BOTTOM_RIGHT:return new Yn(new Jn(a,A),new Jn(a,A+s),new Jn(t+o,c),new Jn(t,c));case Gn.BOTTOM_LEFT:default:return new Yn(new Jn(a,c),new Jn(a-o,c),new Jn(t,A+s),new Jn(t,A))}},Ai=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},ei=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},ri=function(){return function(t,A,e){this.type=0,this.offsetX=t,this.offsetY=A,this.matrix=e,this.target=6}}(),ni=function(){return function(t,A){this.type=1,this.target=A,this.path=t}}(),ii=function(){return function(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),oi=function(){function t(t,A){if(this.container=t,this.effects=A.slice(0),this.curves=new $n(t),null!==t.styles.transform){var e=t.bounds.left+t.styles.transformOrigin[0].number,r=t.bounds.top+t.styles.transformOrigin[1].number,n=t.styles.transform;this.effects.push(new ri(e,r,n))}if(t.styles.overflowX!==Ee.VISIBLE){var i=Ai(this.curves),o=ei(this.curves);Xn(i,o)?this.effects.push(new ni(i,6)):(this.effects.push(new ni(i,2)),this.effects.push(new ni(o,4)))}}return t.prototype.getParentEffects=function(){var t=this.effects.slice(0);if(this.container.styles.overflowX!==Ee.VISIBLE){var A=Ai(this.curves),e=ei(this.curves);Xn(A,e)||t.push(new ni(e,6))}return t},t}(),si=function(t,A,e,r){t.container.elements.forEach(function(n){var i=Br(n.flags,4),o=Br(n.flags,2),s=new oi(n,t.getParentEffects());Br(n.styles.display,2048)&&r.push(s);var a=Br(n.flags,8)?[]:r;if(i||o){var c=i||n.styles.isPositioned()?e:A,u=new ii(s);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var l=n.styles.zIndex.order;if(l<0){var h=0;c.negativeZIndex.some(function(t,A){return l>t.element.container.styles.zIndex.order?(h=A,!1):h>0}),c.negativeZIndex.splice(h,0,u)}else if(l>0){var f=0;c.positiveZIndex.some(function(t,A){return l>=t.element.container.styles.zIndex.order?(f=A+1,!1):f>0}),c.positiveZIndex.splice(f,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);si(s,u,i?u:e,a)}else n.styles.isInlineLevel()?A.inlineLevel.push(s):A.nonInlineLevel.push(s),si(s,A,e,a);Br(n.flags,8)&&ai(n,a)})},ai=function(t,A){for(var e=t instanceof Dr?t.start:1,r=t instanceof Dr&&t.reversed,n=0;n<A.length;n++){var i=A[n];i.container instanceof kr&&"number"==typeof i.container.value&&0!==i.container.value&&(e=i.container.value),i.listValue=In(e,i.container.styles.listStyleType,!0),e+=r?-1:1}},ci=function(t,A,e,r){var n=[];return Zn(t)?n.push(t.subdivide(.5,!1)):n.push(t),Zn(e)?n.push(e.subdivide(.5,!0)):n.push(e),Zn(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),Zn(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},ui=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},li=function(t){var A=t.styles,e=t.bounds,r=Gt(A.paddingLeft,e.width),n=Gt(A.paddingRight,e.width),i=Gt(A.paddingTop,e.width),o=Gt(A.paddingBottom,e.width);return e.add(r+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+r+n),-(A.borderTopWidth+A.borderBottomWidth+i+o))},hi=function(t,A,e){var r,n,i=(r=Bi(t.styles.backgroundOrigin,A),n=t,0===r?n.bounds:2===r?li(n):ui(n)),o=function(t,A){return t===oA.BORDER_BOX?A.bounds:t===oA.CONTENT_BOX?li(A):ui(A)}(Bi(t.styles.backgroundClip,A),t),s=pi(Bi(t.styles.backgroundSize,A),e,i),a=s[0],c=s[1],u=qt(Bi(t.styles.backgroundPosition,A),i.width-a,i.height-c);return[gi(Bi(t.styles.backgroundRepeat,A),u,s,i,o),Math.round(i.left+u[0]),Math.round(i.top+u[1]),a,c]},fi=function(t){return xt(t)&&t.value===zA.AUTO},di=function(t){return"number"==typeof t},pi=function(t,A,e){var r=A[0],n=A[1],i=A[2],o=t[0],s=t[1];if(kt(o)&&s&&kt(s))return[Gt(o,e.width),Gt(s,e.height)];var a=di(i);if(xt(o)&&(o.value===zA.CONTAIN||o.value===zA.COVER))return di(i)?e.width/e.height<i!=(o.value===zA.COVER)?[e.width,e.width/i]:[e.height*i,e.height]:[e.width,e.height];var c=di(r),u=di(n),l=c||u;if(fi(o)&&(!s||fi(s)))return c&&u?[r,n]:a||l?l&&a?[c?r:n*i,u?n:r/i]:[c?r:e.width,u?n:e.height]:[e.width,e.height];if(a){var h=0,f=0;return kt(o)?h=Gt(o,e.width):kt(s)&&(f=Gt(s,e.height)),fi(o)?h=f*i:s&&!fi(s)||(f=h/i),[h,f]}var d=null,p=null;if(kt(o)?d=Gt(o,e.width):s&&kt(s)&&(p=Gt(s,e.height)),null===d||s&&!fi(s)||(p=c&&u?d/r*n:e.height),null!==p&&fi(o)&&(d=c&&u?p/n*r:e.width),null!==d&&null!==p)return[d,p];throw new Error("Unable to calculate background-size for element")},Bi=function(t,A){var e=t[A];return void 0===e?t[0]:e},gi=function(t,A,e,r,n){var i=A[0],o=A[1],s=e[0],a=e[1];switch(t){case OA.REPEAT_X:return[new Jn(Math.round(r.left),Math.round(r.top+o)),new Jn(Math.round(r.left+r.width),Math.round(r.top+o)),new Jn(Math.round(r.left+r.width),Math.round(a+r.top+o)),new Jn(Math.round(r.left),Math.round(a+r.top+o))];case OA.REPEAT_Y:return[new Jn(Math.round(r.left+i),Math.round(r.top)),new Jn(Math.round(r.left+i+s),Math.round(r.top)),new Jn(Math.round(r.left+i+s),Math.round(r.height+r.top)),new Jn(Math.round(r.left+i),Math.round(r.height+r.top))];case OA.NO_REPEAT:return[new Jn(Math.round(r.left+i),Math.round(r.top+o)),new Jn(Math.round(r.left+i+s),Math.round(r.top+o)),new Jn(Math.round(r.left+i+s),Math.round(r.top+o+a)),new Jn(Math.round(r.left+i),Math.round(r.top+o+a))];default:return[new Jn(Math.round(n.left),Math.round(n.top)),new Jn(Math.round(n.left+n.width),Math.round(n.top)),new Jn(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Jn(Math.round(n.left),Math.round(n.height+n.top))]}},wi=function(){function t(t){this._data={},this._document=t}return t.prototype.parseMetrics=function(t,A){var e=this._document.createElement("div"),r=this._document.createElement("img"),n=this._document.createElement("span"),i=this._document.body;e.style.visibility="hidden",e.style.fontFamily=t,e.style.fontSize=A,e.style.margin="0",e.style.padding="0",i.appendChild(e),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",n.style.fontFamily=t,n.style.fontSize=A,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode("Hidden Text")),e.appendChild(n),e.appendChild(r);var o=r.offsetTop-n.offsetTop+2;e.removeChild(n),e.appendChild(this._document.createTextNode("Hidden Text")),e.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-e.offsetTop+2;return i.removeChild(e),{baseline:o,middle:s}},t.prototype.getMetrics=function(t,A){var e=t+" "+A;return void 0===this._data[e]&&(this._data[e]=this.parseMetrics(t,A)),this._data[e]},t}(),mi=function(){function t(t){this._activeEffects=[],this.canvas=t.canvas?t.canvas:document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options=t,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=t.width+"px",this.canvas.style.height=t.height+"px"),this.fontMetrics=new wi(document),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x+t.scrollX,-t.y+t.scrollY),this.ctx.textBaseline="bottom",this._activeEffects=[],CA.getInstance(t.id).debug("Canvas renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale)}return t.prototype.applyEffects=function(t,A){for(var e=this;this._activeEffects.length;)this.popEffect();t.filter(function(t){return Br(t.target,A)}).forEach(function(t){return e.applyEffect(t)})},t.prototype.applyEffect=function(t){this.ctx.save(),function(t){return 0===t.type}(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),function(t){return 1===t.type}(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(t){return r(this,void 0,void 0,function(){var A;return n(this,function(e){switch(e.label){case 0:return(A=t.element.container.styles).isVisible()?(this.ctx.globalAlpha=A.opacity,[4,this.renderStackContent(t)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(t){return r(this,void 0,void 0,function(){return n(this,function(A){switch(A.label){case 0:return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return A.sent(),[4,this.renderNodeContent(t)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(t,A){var e=this;0===A?this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+t.bounds.height):s(t.text).map(function(t){return a(t)}).reduce(function(A,r){return e.ctx.fillText(r,A,t.bounds.top+t.bounds.height),A+e.ctx.measureText(r).width},t.bounds.left)},t.prototype.createFontStyle=function(t){var A=t.fontVariant.filter(function(t){return"normal"===t||"small-caps"===t}).join(""),e=t.fontFamily.join(", "),r=_t(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,A,t.fontWeight,r,e].join(" "),e,r]},t.prototype.renderTextNode=function(t,A){return r(this,void 0,void 0,function(){var e,r,i,o,s=this;return n(this,function(n){return e=this.createFontStyle(A),r=e[0],i=e[1],o=e[2],this.ctx.font=r,t.textBounds.forEach(function(t){s.ctx.fillStyle=tA(A.color),s.renderTextWithLetterSpacing(t,A.letterSpacing);var e=A.textShadow;e.length&&t.text.trim().length&&(e.slice(0).reverse().forEach(function(A){s.ctx.shadowColor=tA(A.color),s.ctx.shadowOffsetX=A.offsetX.number*s.options.scale,s.ctx.shadowOffsetY=A.offsetY.number*s.options.scale,s.ctx.shadowBlur=A.blur.number,s.ctx.fillText(t.text,t.bounds.left,t.bounds.top+t.bounds.height)}),s.ctx.shadowColor="",s.ctx.shadowOffsetX=0,s.ctx.shadowOffsetY=0,s.ctx.shadowBlur=0),A.textDecorationLine.length&&(s.ctx.fillStyle=tA(A.textDecorationColor||A.color),A.textDecorationLine.forEach(function(A){switch(A){case 1:var e=s.fontMetrics.getMetrics(i,o).baseline;s.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top+e),t.bounds.width,1);break;case 2:s.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top),t.bounds.width,1);break;case 3:var r=s.fontMetrics.getMetrics(i,o).middle;s.ctx.fillRect(t.bounds.left,Math.ceil(t.bounds.top+r),t.bounds.width,1)}}))}),[2]})})},t.prototype.renderReplacedElement=function(t,A,e){if(e&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var r=li(t),n=ei(A);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(e,0,0,t.intrinsicWidth,t.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(A){return r(this,void 0,void 0,function(){var e,r,o,s,a,c,u,l,f,d,p,B,g,w;return n(this,function(n){switch(n.label){case 0:this.applyEffects(A.effects,4),e=A.container,r=A.curves,o=e.styles,s=0,a=e.textNodes,n.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,o)]):[3,4];case 2:n.sent(),n.label=3;case 3:return s++,[3,1];case 4:if(!(e instanceof Or))return[3,8];n.label=5;case 5:return n.trys.push([5,7,,8]),[4,this.options.cache.match(e.src)];case 6:return B=n.sent(),this.renderReplacedElement(e,r,B),[3,8];case 7:return n.sent(),CA.getInstance(this.options.id).error("Error loading image "+e.src),[3,8];case 8:if(e instanceof Kr&&this.renderReplacedElement(e,r,e.canvas),!(e instanceof Mr))return[3,12];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,this.options.cache.match(e.svg)];case 10:return B=n.sent(),this.renderReplacedElement(e,r,B),[3,12];case 11:return n.sent(),CA.getInstance(this.options.id).error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof tn&&e.tree?[4,new t({id:this.options.id,scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,scrollX:0,scrollY:0,width:e.width,height:e.height,cache:this.options.cache,windowWidth:e.width,windowHeight:e.height}).render(e.tree)]:[3,14];case 13:u=n.sent(),e.width&&e.height&&this.ctx.drawImage(u,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),n.label=14;case 14:if(e instanceof Wr&&(l=Math.min(e.bounds.width,e.bounds.height),e.type===Gr?e.checked&&(this.ctx.save(),this.path([new Jn(e.bounds.left+.39363*l,e.bounds.top+.79*l),new Jn(e.bounds.left+.16*l,e.bounds.top+.5549*l),new Jn(e.bounds.left+.27347*l,e.bounds.top+.44071*l),new Jn(e.bounds.left+.39694*l,e.bounds.top+.5649*l),new Jn(e.bounds.left+.72983*l,e.bounds.top+.23*l),new Jn(e.bounds.left+.84*l,e.bounds.top+.34085*l),new Jn(e.bounds.left+.39363*l,e.bounds.top+.79*l)]),this.ctx.fillStyle=tA(707406591),this.ctx.fill(),this.ctx.restore()):e.type===Xr&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+l/2,e.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=tA(707406591),this.ctx.fill(),this.ctx.restore())),vi(e)&&e.value.length){switch(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=tA(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign=Qi(e.styles.textAlign),w=li(e),f=0,e.styles.textAlign){case Re.CENTER:f+=w.width/2;break;case Re.RIGHT:f+=w.width}d=w.add(f,0,0,-w.height/2+1),this.ctx.save(),this.path([new Jn(w.left,w.top),new Jn(w.left+w.width,w.top),new Jn(w.left+w.width,w.top+w.height),new Jn(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Er(e.value,d),o.letterSpacing),this.ctx.restore(),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"}if(!Br(e.styles.display,2048))return[3,20];if(null===e.styles.listStyleImage)return[3,19];if((p=e.styles.listStyleImage).type!==uA.URL)return[3,18];B=void 0,g=p.url,n.label=15;case 15:return n.trys.push([15,17,,18]),[4,this.options.cache.match(g)];case 16:return B=n.sent(),this.ctx.drawImage(B,e.bounds.left-(B.width+10),e.bounds.top),[3,18];case 17:return n.sent(),CA.getInstance(this.options.id).error("Error loading list-style-image "+g),[3,18];case 18:return[3,20];case 19:A.listValue&&e.styles.listStyleType!==ye.NONE&&(this.ctx.font=this.createFontStyle(o)[0],this.ctx.fillStyle=tA(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new i(e.bounds.left,e.bounds.top+Gt(e.styles.paddingTop,e.bounds.width),e.bounds.width,(m=o.lineHeight,v=o.fontSize.number,(xt(m)&&"normal"===m.value?1.2*v:m.type===h.NUMBER_TOKEN?v*m.number:kt(m)?Gt(m,v):v)/2+1)),this.renderTextWithLetterSpacing(new Er(A.listValue,w),o.letterSpacing),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),n.label=20;case 20:return[2]}var m,v})})},t.prototype.renderStackContent=function(t){return r(this,void 0,void 0,function(){var A,e,r,i,o,s,a,c,u,l,h,f,d,p,B;return n(this,function(n){switch(n.label){case 0:return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:n.sent(),A=0,e=t.negativeZIndex,n.label=2;case 2:return A<e.length?(B=e[A],[4,this.renderStack(B)]):[3,5];case 3:n.sent(),n.label=4;case 4:return A++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:n.sent(),r=0,i=t.nonInlineLevel,n.label=7;case 7:return r<i.length?(B=i[r],[4,this.renderNode(B)]):[3,10];case 8:n.sent(),n.label=9;case 9:return r++,[3,7];case 10:o=0,s=t.nonPositionedFloats,n.label=11;case 11:return o<s.length?(B=s[o],[4,this.renderStack(B)]):[3,14];case 12:n.sent(),n.label=13;case 13:return o++,[3,11];case 14:a=0,c=t.nonPositionedInlineLevel,n.label=15;case 15:return a<c.length?(B=c[a],[4,this.renderStack(B)]):[3,18];case 16:n.sent(),n.label=17;case 17:return a++,[3,15];case 18:u=0,l=t.inlineLevel,n.label=19;case 19:return u<l.length?(B=l[u],[4,this.renderNode(B)]):[3,22];case 20:n.sent(),n.label=21;case 21:return u++,[3,19];case 22:h=0,f=t.zeroOrAutoZIndexOrTransformedOrOpacity,n.label=23;case 23:return h<f.length?(B=f[h],[4,this.renderStack(B)]):[3,26];case 24:n.sent(),n.label=25;case 25:return h++,[3,23];case 26:d=0,p=t.positiveZIndex,n.label=27;case 27:return d<p.length?(B=p[d],[4,this.renderStack(B)]):[3,30];case 28:n.sent(),n.label=29;case 29:return d++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},t.prototype.formatPath=function(t){var A=this;t.forEach(function(t,e){var r=Zn(t)?t.start:t;0===e?A.ctx.moveTo(r.x,r.y):A.ctx.lineTo(r.x,r.y),Zn(t)&&A.ctx.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},t.prototype.renderRepeat=function(t,A,e,r){this.path(t),this.ctx.fillStyle=A,this.ctx.translate(e,r),this.ctx.fill(),this.ctx.translate(-e,-r)},t.prototype.resizeImage=function(t,A,e){if(t.width===A&&t.height===e)return t;var r=this.canvas.ownerDocument.createElement("canvas");return r.width=A,r.height=e,r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,A,e),r},t.prototype.renderBackgroundImage=function(t){return r(this,void 0,void 0,function(){var A,e,r,i,o,s;return n(this,function(a){switch(a.label){case 0:A=t.styles.backgroundImage.length-1,e=function(e){var i,o,s,a,c,u,l,h,f,d,p,B,g,w,m,v,b,Q,C,F,U,y,N,E,L,H,_,S,x,I,P;return n(this,function(n){switch(n.label){case 0:if(e.type!==uA.URL)return[3,5];i=void 0,o=e.url,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,r.options.cache.match(o)];case 2:return i=n.sent(),[3,4];case 3:return n.sent(),CA.getInstance(r.options.id).error("Error loading background-image "+o),[3,4];case 4:return i&&(s=hi(t,A,[i.width,i.height,i.width/i.height]),v=s[0],y=s[1],N=s[2],C=s[3],F=s[4],w=r.ctx.createPattern(r.resizeImage(i,C,F),"repeat"),r.renderRepeat(v,w,y,N)),[3,6];case 5:e.type===uA.LINEAR_GRADIENT?(a=hi(t,A,[null,null,null]),v=a[0],y=a[1],N=a[2],C=a[3],F=a[4],c=pA(e.angle,C,F),u=c[0],l=c[1],h=c[2],f=c[3],d=c[4],(p=document.createElement("canvas")).width=C,p.height=F,B=p.getContext("2d"),g=B.createLinearGradient(l,f,h,d),dA(e.stops,u).forEach(function(t){return g.addColorStop(t.stop,tA(t.color))}),B.fillStyle=g,B.fillRect(0,0,C,F),C>0&&F>0&&(w=r.ctx.createPattern(p,"repeat"),r.renderRepeat(v,w,y,N))):function(t){return t.type===uA.RADIAL_GRADIENT}(e)&&(m=hi(t,A,[null,null,null]),v=m[0],b=m[1],Q=m[2],C=m[3],F=m[4],U=0===e.position.length?[jt]:e.position,y=Gt(U[0],C),N=Gt(U[U.length-1],F),E=function(t,A,e,r,n){var i=0,o=0;switch(t.size){case TA.CLOSEST_SIDE:t.shape===PA.CIRCLE?i=o=Math.min(Math.abs(A),Math.abs(A-r),Math.abs(e),Math.abs(e-n)):t.shape===PA.ELLIPSE&&(i=Math.min(Math.abs(A),Math.abs(A-r)),o=Math.min(Math.abs(e),Math.abs(e-n)));break;case TA.CLOSEST_CORNER:if(t.shape===PA.CIRCLE)i=o=Math.min(BA(A,e),BA(A,e-n),BA(A-r,e),BA(A-r,e-n));else if(t.shape===PA.ELLIPSE){var s=Math.min(Math.abs(e),Math.abs(e-n))/Math.min(Math.abs(A),Math.abs(A-r)),a=gA(r,n,A,e,!0),c=a[0],u=a[1];o=s*(i=BA(c-A,(u-e)/s))}break;case TA.FARTHEST_SIDE:t.shape===PA.CIRCLE?i=o=Math.max(Math.abs(A),Math.abs(A-r),Math.abs(e),Math.abs(e-n)):t.shape===PA.ELLIPSE&&(i=Math.max(Math.abs(A),Math.abs(A-r)),o=Math.max(Math.abs(e),Math.abs(e-n)));break;case TA.FARTHEST_CORNER:if(t.shape===PA.CIRCLE)i=o=Math.max(BA(A,e),BA(A,e-n),BA(A-r,e),BA(A-r,e-n));else if(t.shape===PA.ELLIPSE){s=Math.max(Math.abs(e),Math.abs(e-n))/Math.max(Math.abs(A),Math.abs(A-r));var l=gA(r,n,A,e,!1);c=l[0],u=l[1],o=s*(i=BA(c-A,(u-e)/s))}}return Array.isArray(t.size)&&(i=Gt(t.size[0],r),o=2===t.size.length?Gt(t.size[1],n):i),[i,o]}(e,y,N,C,F),L=E[0],H=E[1],L>0&&L>0&&(_=r.ctx.createRadialGradient(b+y,Q+N,0,b+y,Q+N,L),dA(e.stops,2*L).forEach(function(t){return _.addColorStop(t.stop,tA(t.color))}),r.path(v),r.ctx.fillStyle=_,L!==H?(S=t.bounds.left+.5*t.bounds.width,x=t.bounds.top+.5*t.bounds.height,P=1/(I=H/L),r.ctx.save(),r.ctx.translate(S,x),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-S,-x),r.ctx.fillRect(b,P*(Q-x)+x,C,F*P),r.ctx.restore()):r.ctx.fill())),n.label=6;case 6:return A--,[2]}})},r=this,i=0,o=t.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return i<o.length?(s=o[i],[5,e(s)]):[3,4];case 2:a.sent(),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderBorder=function(t,A,e){return r(this,void 0,void 0,function(){return n(this,function(r){return this.path(function(t,A){switch(A){case 0:return ci(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return ci(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return ci(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return ci(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}}(e,A)),this.ctx.fillStyle=tA(t),this.ctx.fill(),[2]})})},t.prototype.renderNodeBackgroundAndBorders=function(t){return r(this,void 0,void 0,function(){var A,e,r,i,o,s,a,c,u=this;return n(this,function(n){switch(n.label){case 0:return this.applyEffects(t.effects,2),A=t.container.styles,e=!$t(A.backgroundColor)||A.backgroundImage.length,r=[{style:A.borderTopStyle,color:A.borderTopColor},{style:A.borderRightStyle,color:A.borderRightColor},{style:A.borderBottomStyle,color:A.borderBottomColor},{style:A.borderLeftStyle,color:A.borderLeftColor}],i=bi(Bi(A.backgroundClip,0),t.curves),e||A.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),$t(A.backgroundColor)||(this.ctx.fillStyle=tA(A.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:n.sent(),this.ctx.restore(),A.boxShadow.slice(0).reverse().forEach(function(A){u.ctx.save();var e,r,n,i,o,s=Ai(t.curves),a=A.inset?0:1e4,c=(e=s,r=-a+(A.inset?1:-1)*A.spread.number,n=(A.inset?1:-1)*A.spread.number,i=A.spread.number*(A.inset?-2:2),o=A.spread.number*(A.inset?-2:2),e.map(function(t,A){switch(A){case 0:return t.add(r,n);case 1:return t.add(r+i,n);case 2:return t.add(r+i,n+o);case 3:return t.add(r,n+o)}return t}));A.inset?(u.path(s),u.ctx.clip(),u.mask(c)):(u.mask(s),u.ctx.clip(),u.path(c)),u.ctx.shadowOffsetX=A.offsetX.number+a,u.ctx.shadowOffsetY=A.offsetY.number,u.ctx.shadowColor=tA(A.color),u.ctx.shadowBlur=A.blur.number,u.ctx.fillStyle=A.inset?tA(A.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),n.label=2;case 2:o=0,s=0,a=r,n.label=3;case 3:return s<a.length?(c=a[s]).style===qA.NONE||$t(c.color)?[3,5]:[4,this.renderBorder(c.color,o,t.curves)]:[3,7];case 4:n.sent(),n.label=5;case 5:o++,n.label=6;case 6:return s++,[3,3];case 7:return[2]}})})},t.prototype.render=function(t){return r(this,void 0,void 0,function(){var A;return n(this,function(e){switch(e.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=tA(this.options.backgroundColor),this.ctx.fillRect(this.options.x-this.options.scrollX,this.options.y-this.options.scrollY,this.options.width,this.options.height)),r=new oi(t,[]),n=new ii(r),si(r,n,n,i=[]),ai(r.container,i),A=n,[4,this.renderStack(A)];case 1:return e.sent(),this.applyEffects([],2),[2,this.canvas]}var r,n,i})})},t}(),vi=function(t){return t instanceof Zr||(t instanceof Yr||t instanceof Wr&&t.type!==Xr&&t.type!==Gr)},bi=function(t,A){switch(t){case oA.BORDER_BOX:return Ai(A);case oA.CONTENT_BOX:return function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]}(A);case oA.PADDING_BOX:default:return ei(A)}},Qi=function(t){switch(t){case Re.CENTER:return"center";case Re.RIGHT:return"right";case Re.LEFT:default:return"left"}},Ci=function(){function t(t){this.canvas=t.canvas?t.canvas:document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.options=t,this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=t.width+"px",this.canvas.style.height=t.height+"px",this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x+t.scrollX,-t.y+t.scrollY),CA.getInstance(t.id).debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale)}return t.prototype.render=function(t){return r(this,void 0,void 0,function(){var A,e;return n(this,function(r){switch(r.label){case 0:return A=vA(Math.max(this.options.windowWidth,this.options.width)*this.options.scale,Math.max(this.options.windowHeight,this.options.height)*this.options.scale,this.options.scrollX*this.options.scale,this.options.scrollY*this.options.scale,t),[4,Fi(A)];case 1:return e=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=tA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(e,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(),Fi=function(t){return new Promise(function(A,e){var r=new Image;r.onload=function(){A(r)},r.onerror=e,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(t))})},Ui=function(t){return Zt(Ht.create(t).parseComponentValue())};"undefined"!=typeof window&&FA.setContext(window);var yi=function(t,A){return r(void 0,void 0,void 0,function(){var r,s,a,c,u,l,h,f,d,p,B,g,w,m,v,b,Q,C,F,U,y,N,E;return n(this,function(n){switch(n.label){case 0:if(!(r=t.ownerDocument))throw new Error("Element is not attached to a Document");if(!(s=r.defaultView))throw new Error("Document is not attached to a Window");return a=(Math.round(1e3*Math.random())+Date.now()).toString(16),c=Bn(t)||"HTML"===t.tagName?function(t){var A=t.body,e=t.documentElement;if(!A||!e)throw new Error("Unable to get document size");var r=Math.max(Math.max(A.scrollWidth,e.scrollWidth),Math.max(A.offsetWidth,e.offsetWidth),Math.max(A.clientWidth,e.clientWidth)),n=Math.max(Math.max(A.scrollHeight,e.scrollHeight),Math.max(A.offsetHeight,e.offsetHeight),Math.max(A.clientHeight,e.clientHeight));return new i(0,0,r,n)}(r):o(t),u=c.width,l=c.height,h=c.left,f=c.top,d=e({},{allowTaint:!1,imageTimeout:15e3,proxy:void 0,useCORS:!1},A),p={backgroundColor:"#ffffff",cache:A.cache?A.cache:FA.create(a,d),logging:!0,removeContainer:!0,foreignObjectRendering:!1,scale:s.devicePixelRatio||1,windowWidth:s.innerWidth,windowHeight:s.innerHeight,scrollX:s.pageXOffset,scrollY:s.pageYOffset,x:h,y:f,width:Math.ceil(u),height:Math.ceil(l),id:a},B=e({},p,d,A),g=new i(B.scrollX,B.scrollY,B.windowWidth,B.windowHeight),CA.create({id:a,enabled:B.logging}),CA.getInstance(a).debug("Starting document clone"),w=new Pn(t,{id:a,onclone:B.onclone,ignoreElements:B.ignoreElements,inlineImages:B.foreignObjectRendering,copyStyles:B.foreignObjectRendering}),(m=w.clonedReferenceElement)?[4,w.toIFrame(r,g)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return v=n.sent(),b=r.documentElement?Ui(getComputedStyle(r.documentElement).backgroundColor):cA.TRANSPARENT,Q=r.body?Ui(getComputedStyle(r.body).backgroundColor):cA.TRANSPARENT,C=A.backgroundColor,F="string"==typeof C?Ui(C):null===C?cA.TRANSPARENT:4294967295,U=t===r.documentElement?$t(b)?$t(Q)?F:Q:b:F,y={id:a,cache:B.cache,canvas:B.canvas,backgroundColor:U,scale:B.scale,x:B.x,y:B.y,scrollX:B.scrollX,scrollY:B.scrollY,width:B.width,height:B.height,windowWidth:B.windowWidth,windowHeight:B.windowHeight},B.foreignObjectRendering?(CA.getInstance(a).debug("Document cloned, using foreign object rendering"),[4,new Ci(y).render(m)]):[3,3];case 2:return N=n.sent(),[3,5];case 3:return CA.getInstance(a).debug("Document cloned, using computed rendering"),FA.attachInstance(B.cache),CA.getInstance(a).debug("Starting DOM parsing"),E=nn(m),FA.detachInstance(),U===E.styles.backgroundColor&&(E.styles.backgroundColor=cA.TRANSPARENT),CA.getInstance(a).debug("Starting renderer"),[4,new mi(y).render(E)];case 4:N=n.sent(),n.label=5;case 5:return!0===B.removeContainer&&(Pn.destroy(v)||CA.getInstance(a).error("Cannot detach cloned iframe as it is not in the DOM anymore")),CA.getInstance(a).debug("Finished rendering"),CA.destroy(a),FA.destroy(a),[2,N]}})})};return function(t,A){return void 0===A&&(A={}),yi(t,A)}},t.exports=r()}});