File: //opt/netdata/usr/local/share/netdata/web/v3/2975.ed4ca5d5f595eacdf958.chunk.js
/*! For license information please see 2975.ed4ca5d5f595eacdf958.chunk.js.LICENSE.txt */
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"0b2b41ad76fac2d30743e79c4ef362ca62714b16"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="29b65db3-6e4b-40e7-b287-fe35e6fa28c3",t._sentryDebugIdIdentifier="sentry-dbid-29b65db3-6e4b-40e7-b287-fe35e6fa28c3")}catch(t){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2975],{42561(t,e){"use strict";e.A=void 0;e.A=function(t){var e=[];for(t=t.parentNode;t;)e.push(t),t=t.parentNode;return e}},43119(t,e,i){"use strict";e.A=void 0;var n=i(96540);e.A=function(t){return(0,n.useEffect)((function(){if(t){var e=function(e){27===e.keyCode&&t(e)};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}}),[t])}},40955(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib.BlockCipher,n=t.algo,r=[],o=[],s=[],a=[],l=[],u=[],h=[],c=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,n=0;for(e=0;e<256;e++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,r[i]=p,o[p]=i;var g=t[i],m=t[g],b=t[m],v=257*t[p]^16843008*p;s[i]=v<<24|v>>>8,a[i]=v<<16|v>>>16,l[i]=v<<8|v>>>24,u[i]=v,v=16843009*b^65537*m^257*g^16843008*i,h[p]=v<<24|v>>>8,c[p]=v<<16|v>>>16,f[p]=v<<8|v>>>24,d[p]=v,i?(i=g^t[t[t[b^g]]],n^=t[t[n]]):i=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,n=4*((this._nRounds=i+6)+1),o=this._keySchedule=[],s=0;s<n;s++)s<i?o[s]=e[s]:(u=o[s-1],s%i?i>6&&s%i==4&&(u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u]):(u=r[(u=u<<8|u>>>24)>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u],u^=p[s/i|0]<<24),o[s]=o[s-i]^u);for(var a=this._invKeySchedule=[],l=0;l<n;l++){if(s=n-l,l%4)var u=o[s];else u=o[s-4];a[l]=l<4||s<=4?u:h[r[u>>>24]]^c[r[u>>>16&255]]^f[r[u>>>8&255]]^d[r[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,l,u,r)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,h,c,f,d,o),i=t[e+1],t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,r,o,s,a){for(var l=this._nRounds,u=t[e]^i[0],h=t[e+1]^i[1],c=t[e+2]^i[2],f=t[e+3]^i[3],d=4,p=1;p<l;p++){var g=n[u>>>24]^r[h>>>16&255]^o[c>>>8&255]^s[255&f]^i[d++],m=n[h>>>24]^r[c>>>16&255]^o[f>>>8&255]^s[255&u]^i[d++],b=n[c>>>24]^r[f>>>16&255]^o[u>>>8&255]^s[255&h]^i[d++],v=n[f>>>24]^r[u>>>16&255]^o[h>>>8&255]^s[255&c]^i[d++];u=g,h=m,c=b,f=v}g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^i[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^i[d++],b=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^i[d++],v=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^i[d++],t[e]=g,t[e+1]=m,t[e+2]=b,t[e+3]=v},keySize:8});t.AES=i._createHelper(g)}(),e.AES)}()},43128(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib.BlockCipher,n=t.algo;const r=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var a={pbox:[],sbox:[]};function l(t,e){let i=e>>24&255,n=e>>16&255,r=e>>8&255,o=255&e,s=t.sbox[0][i]+t.sbox[1][n];return s^=t.sbox[2][r],s+=t.sbox[3][o],s}function u(t,e,i){let n,o=e,s=i;for(let a=0;a<r;++a)o^=t.pbox[a],s=l(t,o)^s,n=o,o=s,s=n;return n=o,o=s,s=n,s^=t.pbox[r],o^=t.pbox[r+1],{left:o,right:s}}function h(t,e,i){let n,o=e,s=i;for(let a=r+1;a>1;--a)o^=t.pbox[a],s=l(t,o)^s,n=o,o=s,s=n;return n=o,o=s,s=n,s^=t.pbox[1],o^=t.pbox[0],{left:o,right:s}}function c(t,e,i){for(let r=0;r<4;r++){t.sbox[r]=[];for(let e=0;e<256;e++)t.sbox[r][e]=s[r][e]}let n=0;for(let s=0;s<r+2;s++)t.pbox[s]=o[s]^e[n],n++,n>=i&&(n=0);let a=0,l=0,h=0;for(let o=0;o<r+2;o+=2)h=u(t,a,l),a=h.left,l=h.right,t.pbox[o]=a,t.pbox[o+1]=l;for(let r=0;r<4;r++)for(let e=0;e<256;e+=2)h=u(t,a,l),a=h.left,l=h.right,t.sbox[r][e]=a,t.sbox[r][e+1]=l;return!0}var f=n.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4;c(a,e,i)}},encryptBlock:function(t,e){var i=u(a,t[e],t[e+1]);t[e]=i.left,t[e+1]=i.right},decryptBlock:function(t,e){var i=h(a,t[e],t[e+1]);t[e]=i.left,t[e+1]=i.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=i._createHelper(f)}(),e.Blowfish)}()},57165(t,e,i){!function(){var e;t.exports=(e=i(19021),i(39506),void(e.lib.Cipher||function(t){var i=e,n=i.lib,r=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,a=i.enc,l=(a.Utf8,a.Base64),u=i.algo.EvpKDF,h=n.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,i){this.cfg=this.cfg.extend(i),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:b}return function(e){return{encrypt:function(i,n,r){return t(n).encrypt(e,i,n,r)},decrypt:function(i,n,r){return t(n).decrypt(e,i,n,r)}}}}()}),c=(n.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),i.mode={}),f=n.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=c.CBC=function(){var e=f.extend();function i(e,i,n){var r,o=this._iv;o?(r=o,this._iv=t):r=this._prevBlock;for(var s=0;s<n;s++)e[i+s]^=r[s]}return e.Encryptor=e.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;i.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),e.Decryptor=e.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,o=t.slice(e,e+r);n.decryptBlock(t,e),i.call(this,t,e,r),this._prevBlock=o}}),e}(),p=(i.pad={}).Pkcs7={pad:function(t,e){for(var i=4*e,n=i-t.sigBytes%i,r=n<<24|n<<16|n<<8|n,s=[],a=0;a<n;a+=4)s.push(r);var l=o.create(s,n);t.concat(l)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},g=(n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:p}),reset:function(){var t;h.reset.call(this);var e=this.cfg,i=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(n,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),m=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,i=t.salt;return(i?o.create([1398893684,1701076831]).concat(i).concat(e):e).toString(l)},parse:function(t){var e,i=l.parse(t),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=o.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),g.create({ciphertext:i,salt:e})}},b=n.SerializableCipher=r.extend({cfg:r.extend({format:m}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var r=t.createEncryptor(i,n),o=r.finalize(e),s=r.cfg;return g.create({ciphertext:o,key:i,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,i,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(i,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(i.kdf={}).OpenSSL={execute:function(t,e,i,n,r){if(n||(n=o.random(8)),r)s=u.create({keySize:e+i,hasher:r}).compute(t,n);else var s=u.create({keySize:e+i}).compute(t,n);var a=o.create(s.words.slice(e),4*i);return s.sigBytes=4*e,g.create({key:s,iv:a,salt:n})}},y=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:v}),encrypt:function(t,e,i,n){var r=(n=this.cfg.extend(n)).kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=r.iv;var o=b.encrypt.call(this,t,e,r.key,n);return o.mixIn(r),o},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var r=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);return n.iv=r.iv,b.decrypt.call(this,t,e,r.key,n)}})}()))}()},19021(t,e,i){t.exports=function(){var t=t||function(t,e){var n;if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),"undefined"!==typeof self&&self.crypto&&(n=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(50477)}catch(m){}var r=function(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(m){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(m){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),s={},a=s.lib={},l=a.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,i=t.words,n=this.sigBytes,r=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<r;o++){var s=i[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<r;a+=4)e[n+a>>>2]=i[a>>>2];return this.sigBytes+=r,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i<t;i+=4)e.push(r());return new u.init(e,t)}}),h=s.enc={},c=h.Hex={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r<i;r++){var o=e[r>>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n<e;n+=2)i[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new u.init(i,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r<i;r++){var o=e[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n<e;n++)i[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new u.init(i,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,n=this._data,r=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),l=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,h=t.min(4*l,o);if(l){for(var c=0;c<l;c+=s)this._doProcessBlock(r,c);i=r.splice(0,l),n.sigBytes-=h}return new u.init(i,h)},clone:function(){var t=l.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(a.Hasher=p.extend({cfg:l.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,i){return new t.init(i).finalize(e)}},_createHmacHelper:function(t){return function(e,i){return new g.HMAC.init(t,i).finalize(e)}}}),s.algo={});return s}(Math);return t}()},80754(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){var t=e,i=t.lib.WordArray;function n(t,e,n){for(var r=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;r[o>>>2]|=a<<24-o%4*8,o++}return i.create(r,o)}t.enc.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,n=this._map;t.clamp();for(var r=[],o=0;o<i;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<i;a++)r.push(n.charAt(s>>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(t){var e=t.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<i.length;o++)r[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return n(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)}()},64725(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){var t=e,i=t.lib.WordArray;function n(t,e,n){for(var r=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;r[o>>>2]|=a<<24-o%4*8,o++}return i.create(r,o)}t.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,r=e?this._safe_map:this._map;t.clamp();for(var o=[],s=0;s<n;s+=3)for(var a=(i[s>>>2]>>>24-s%4*8&255)<<16|(i[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|i[s+2>>>2]>>>24-(s+2)%4*8&255,l=0;l<4&&s+.75*l<n;l++)o.push(r.charAt(a>>>6*(3-l)&63));var u=r.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,r=e?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s<r.length;s++)o[r.charCodeAt(s)]=s}var a=r.charAt(64);if(a){var l=t.indexOf(a);-1!==l&&(i=l)}return n(t,i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url)}()},45503(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){var t=e,i=t.lib.WordArray,n=t.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],r=0;r<i;r+=2){var o=e[r>>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>1]|=t.charCodeAt(r)<<16-r%2*16;return i.create(n,2*e)}},n.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o<i;o+=2){var s=r(e[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,n=[],o=0;o<e;o++)n[o>>>1]|=r(t.charCodeAt(o)<<16-o%2*16);return i.create(n,2*e)}}}(),e.enc.Utf16)}()},39506(t,e,i){!function(){var e;t.exports=(e=i(19021),i(45471),i(51025),function(){var t=e,i=t.lib,n=i.Base,r=i.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var i,n=this.cfg,o=n.hasher.create(),s=r.create(),a=s.words,l=n.keySize,u=n.iterations;a.length<l;){i&&o.update(i),i=o.update(t).finalize(e),o.reset();for(var h=1;h<u;h++)i=o.finalize(i),o.reset();s.concat(i)}return s.sigBytes=4*l,s}});t.EvpKDF=function(t,e,i){return a.create(i).compute(t,e)}}(),e.EvpKDF)}()},70025(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),function(){var t=e,i=t.lib.CipherParams,n=t.enc.Hex;t.format.Hex={stringify:function(t){return t.ciphertext.toString(n)},parse:function(t){var e=n.parse(t);return i.create({ciphertext:e})}}}(),e.format.Hex)}()},51025(t,e,i){!function(){var e;t.exports=(e=i(19021),void function(){var t=e,i=t.lib.Base,n=t.enc.Utf8;t.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=n.parse(e));var i=t.blockSize,r=4*i;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),s=this._iKey=e.clone(),a=o.words,l=s.words,u=0;u<i;u++)a[u]^=1549556828,l[u]^=909522486;o.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,i=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(i))}})}())}()},21396(t,e,i){!function(){var e;t.exports=(e=i(19021),i(43240),i(6440),i(45503),i(80754),i(64725),i(84636),i(45471),i(63009),i(36308),i(81380),i(89557),i(45953),i(78056),i(51025),i(70019),i(39506),i(57165),i(82169),i(96939),i(6372),i(73797),i(38454),i(42073),i(54905),i(10482),i(52155),i(58124),i(70025),i(40955),i(7628),i(77193),i(96298),i(22696),i(43128),e)}()},6440(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,i=t.init,n=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!==typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,n=[],r=0;r<e;r++)n[r>>>2]|=t[r]<<24-r%4*8;i.call(this,n,e)}else i.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray)}()},84636(t,e,i){!function(){var e;t.exports=(e=i(19021),function(t){var i=e,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,s=t[e+0],l=t[e+1],d=t[e+2],p=t[e+3],g=t[e+4],m=t[e+5],b=t[e+6],v=t[e+7],y=t[e+8],D=t[e+9],x=t[e+10],w=t[e+11],_=t[e+12],F=t[e+13],A=t[e+14],S=t[e+15],C=o[0],L=o[1],k=o[2],P=o[3];C=u(C,L,k,P,s,7,a[0]),P=u(P,C,L,k,l,12,a[1]),k=u(k,P,C,L,d,17,a[2]),L=u(L,k,P,C,p,22,a[3]),C=u(C,L,k,P,g,7,a[4]),P=u(P,C,L,k,m,12,a[5]),k=u(k,P,C,L,b,17,a[6]),L=u(L,k,P,C,v,22,a[7]),C=u(C,L,k,P,y,7,a[8]),P=u(P,C,L,k,D,12,a[9]),k=u(k,P,C,L,x,17,a[10]),L=u(L,k,P,C,w,22,a[11]),C=u(C,L,k,P,_,7,a[12]),P=u(P,C,L,k,F,12,a[13]),k=u(k,P,C,L,A,17,a[14]),C=h(C,L=u(L,k,P,C,S,22,a[15]),k,P,l,5,a[16]),P=h(P,C,L,k,b,9,a[17]),k=h(k,P,C,L,w,14,a[18]),L=h(L,k,P,C,s,20,a[19]),C=h(C,L,k,P,m,5,a[20]),P=h(P,C,L,k,x,9,a[21]),k=h(k,P,C,L,S,14,a[22]),L=h(L,k,P,C,g,20,a[23]),C=h(C,L,k,P,D,5,a[24]),P=h(P,C,L,k,A,9,a[25]),k=h(k,P,C,L,p,14,a[26]),L=h(L,k,P,C,y,20,a[27]),C=h(C,L,k,P,F,5,a[28]),P=h(P,C,L,k,d,9,a[29]),k=h(k,P,C,L,v,14,a[30]),C=c(C,L=h(L,k,P,C,_,20,a[31]),k,P,m,4,a[32]),P=c(P,C,L,k,y,11,a[33]),k=c(k,P,C,L,w,16,a[34]),L=c(L,k,P,C,A,23,a[35]),C=c(C,L,k,P,l,4,a[36]),P=c(P,C,L,k,g,11,a[37]),k=c(k,P,C,L,v,16,a[38]),L=c(L,k,P,C,x,23,a[39]),C=c(C,L,k,P,F,4,a[40]),P=c(P,C,L,k,s,11,a[41]),k=c(k,P,C,L,p,16,a[42]),L=c(L,k,P,C,b,23,a[43]),C=c(C,L,k,P,D,4,a[44]),P=c(P,C,L,k,_,11,a[45]),k=c(k,P,C,L,S,16,a[46]),C=f(C,L=c(L,k,P,C,d,23,a[47]),k,P,s,6,a[48]),P=f(P,C,L,k,v,10,a[49]),k=f(k,P,C,L,A,15,a[50]),L=f(L,k,P,C,m,21,a[51]),C=f(C,L,k,P,_,6,a[52]),P=f(P,C,L,k,p,10,a[53]),k=f(k,P,C,L,x,15,a[54]),L=f(L,k,P,C,l,21,a[55]),C=f(C,L,k,P,y,6,a[56]),P=f(P,C,L,k,S,10,a[57]),k=f(k,P,C,L,b,15,a[58]),L=f(L,k,P,C,F,21,a[59]),C=f(C,L,k,P,g,6,a[60]),P=f(P,C,L,k,w,10,a[61]),k=f(k,P,C,L,d,15,a[62]),L=f(L,k,P,C,D,21,a[63]),o[0]=o[0]+C|0,o[1]=o[1]+L|0,o[2]=o[2]+k|0,o[3]=o[3]+P|0},_doFinalize:function(){var e=this._data,i=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;i[r>>>5]|=128<<24-r%32;var o=t.floor(n/4294967296),s=n;i[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),i[14+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(i.length+1),this._process();for(var a=this._hash,l=a.words,u=0;u<4;u++){var h=l[u];l[u]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,i,n,r,o,s){var a=t+(e&i|~e&n)+r+s;return(a<<o|a>>>32-o)+e}function h(t,e,i,n,r,o,s){var a=t+(e&n|i&~n)+r+s;return(a<<o|a>>>32-o)+e}function c(t,e,i,n,r,o,s){var a=t+(e^i^n)+r+s;return(a<<o|a>>>32-o)+e}function f(t,e,i,n,r,o,s){var a=t+(i^(e|~n))+r+s;return(a<<o|a>>>32-o)+e}i.MD5=o._createHelper(l),i.HmacMD5=o._createHmacHelper(l)}(Math),e.MD5)}()},82169(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function i(t,e,i,n){var r,o=this._iv;o?(r=o.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var s=0;s<i;s++)t[e+s]^=r[s]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;i.call(this,t,e,r,n),this._prevBlock=t.slice(e,e+r)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,o=t.slice(e,e+r);i.call(this,t,e,r,n),this._prevBlock=o}}),t}(),e.mode.CFB)}()},6372(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function i(t){if(255===(t>>24&255)){var e=t>>16&255,i=t>>8&255,n=255&t;255===e?(e=0,255===i?(i=0,255===n?n=0:++n):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=n}else t+=1<<24;return t}function n(t){return 0===(t[0]=i(t[0]))&&(t[1]=i(t[1])),t}var r=t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),n(s);var a=s.slice(0);i.encryptBlock(a,0);for(var l=0;l<r;l++)t[e+l]^=a[l]}});return t.Decryptor=r,t}(),e.mode.CTRGladman)}()},96939(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.mode.CTR=function(){var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,o=this._counter;r&&(o=this._counter=r.slice(0),this._iv=void 0);var s=o.slice(0);i.encryptBlock(s,0),o[n-1]=o[n-1]+1|0;for(var a=0;a<n;a++)t[e+a]^=s[a]}});return t.Decryptor=i,t}(),e.mode.CTR)}()},38454(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.mode.ECB=function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),t.Decryptor=t.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),t}(),e.mode.ECB)}()},73797(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.mode.OFB=function(){var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,r=this._iv,o=this._keystream;r&&(o=this._keystream=r.slice(0),this._iv=void 0),i.encryptBlock(o,0);for(var s=0;s<n;s++)t[e+s]^=o[s]}});return t.Decryptor=i,t}(),e.mode.OFB)}()},42073(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,n=4*e,r=n-i%n,o=i+r-1;t.clamp(),t.words[o>>>2]|=r<<24-o%4*8,t.sigBytes+=r},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},e.pad.Ansix923)}()},54905(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.pad.Iso10126={pad:function(t,i){var n=4*i,r=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},e.pad.Iso10126)}()},10482(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.pad.Iso97971={pad:function(t,i){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,i)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971)}()},58124(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)}()},52155(t,e,i){!function(){var e;t.exports=(e=i(19021),i(57165),e.pad.ZeroPadding={pad:function(t,e){var i=4*e;t.clamp(),t.sigBytes+=i-(t.sigBytes%i||i)},unpad:function(t){var e=t.words,i=t.sigBytes-1;for(i=t.sigBytes-1;i>=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},e.pad.ZeroPadding)}()},70019(t,e,i){!function(){var e;t.exports=(e=i(19021),i(63009),i(51025),function(){var t=e,i=t.lib,n=i.Base,r=i.WordArray,o=t.algo,s=o.SHA256,a=o.HMAC,l=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var i=this.cfg,n=a.create(i.hasher,t),o=r.create(),s=r.create([1]),l=o.words,u=s.words,h=i.keySize,c=i.iterations;l.length<h;){var f=n.update(e).finalize(s);n.reset();for(var d=f.words,p=d.length,g=f,m=1;m<c;m++){g=n.finalize(g),n.reset();for(var b=g.words,v=0;v<p;v++)d[v]^=b[v]}o.concat(f),u[0]++}return o.sigBytes=4*h,o}});t.PBKDF2=function(t,e,i){return l.create(i).compute(t,e)}}(),e.PBKDF2)}()},22696(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=[],o=[],s=[],a=n.RabbitLegacy=i.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),c=u>>>16|4294901760&h,f=h<<16|65535&u;for(n[0]^=u,n[1]^=c,n[2]^=h,n[3]^=f,n[4]^=u,n[5]^=c,n[6]^=h,n[7]^=f,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(t,e){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),t[e+n]^=r[n]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=i._createHelper(a)}(),e.RabbitLegacy)}()},96298(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=[],o=[],s=[],a=n.Rabbit=i.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),c=u>>>16|4294901760&h,f=h<<16|65535&u;for(r[0]^=u,r[1]^=c,r[2]^=h,r[3]^=f,r[4]^=u,r[5]^=c,r[6]^=h,r[7]^=f,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(t,e){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),t[e+n]^=r[n]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,i=0;i<8;i++){var n=t[i]+e[i],r=65535&n,a=n>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,u=((4294901760&n)*n|0)+((65535&n)*n|0);s[i]=l^u}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=i._createHelper(a)}(),e.Rabbit)}()},77193(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=n.RC4=i.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var o=0;r<256;r++){var s=r%i,a=e[s>>>2]>>>24-s%4*8&255;o=(o+n[r]+a)%256;var l=n[r];n[r]=n[o],n[o]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,n=0,r=0;r<4;r++){i=(i+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[i],t[i]=o,n|=t[(t[e]+t[i])%256]<<24-8*r}return this._i=e,this._j=i,n}t.RC4=i._createHelper(r);var s=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=i._createHelper(s)}(),e.RC4)}()},78056(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){var t=e,i=t.lib,n=i.WordArray,r=i.Hasher,o=t.algo,s=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),a=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=n.create([0,1518500249,1859775393,2400959708,2840853838]),c=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=o.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,r=t[n];t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,f,y,D,x,w,_,F,A,S,C,L=this._hash.words,k=h.words,P=c.words,N=s.words,E=a.words,B=l.words,M=u.words;for(w=o=L[0],_=f=L[1],F=y=L[2],A=D=L[3],S=x=L[4],i=0;i<80;i+=1)C=o+t[e+N[i]]|0,C+=i<16?d(f,y,D)+k[0]:i<32?p(f,y,D)+k[1]:i<48?g(f,y,D)+k[2]:i<64?m(f,y,D)+k[3]:b(f,y,D)+k[4],C=(C=v(C|=0,B[i]))+x|0,o=x,x=D,D=v(y,10),y=f,f=C,C=w+t[e+E[i]]|0,C+=i<16?b(_,F,A)+P[0]:i<32?m(_,F,A)+P[1]:i<48?g(_,F,A)+P[2]:i<64?p(_,F,A)+P[3]:d(_,F,A)+P[4],C=(C=v(C|=0,M[i]))+S|0,w=S,S=A,A=v(F,10),F=_,_=C;C=L[1]+y+A|0,L[1]=L[2]+D+S|0,L[2]=L[3]+x+w|0,L[3]=L[4]+o+_|0,L[4]=L[0]+f+F|0,L[0]=C},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,o=r.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return r},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function d(t,e,i){return t^e^i}function p(t,e,i){return t&e|~t&i}function g(t,e,i){return(t|~e)^i}function m(t,e,i){return t&i|e&~i}function b(t,e,i){return t^(e|~i)}function v(t,e){return t<<e|t>>>32-e}t.RIPEMD160=r._createHelper(f),t.HmacRIPEMD160=r._createHmacHelper(f)}(Math),e.RIPEMD160)}()},45471(t,e,i){!function(){var e;t.exports=(e=i(19021),function(){var t=e,i=t.lib,n=i.WordArray,r=i.Hasher,o=t.algo,s=[],a=o.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],o=i[2],a=i[3],l=i[4],u=0;u<80;u++){if(u<16)s[u]=0|t[e+u];else{var h=s[u-3]^s[u-8]^s[u-14]^s[u-16];s[u]=h<<1|h>>>31}var c=(n<<5|n>>>27)+l+s[u];c+=u<20?1518500249+(r&o|~r&a):u<40?1859775393+(r^o^a):u<60?(r&o|r&a|o&a)-1894007588:(r^o^a)-899497514,l=a,a=o,o=r<<30|r>>>2,r=n,n=c}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+o|0,i[3]=i[3]+a|0,i[4]=i[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(n+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(a),t.HmacSHA1=r._createHmacHelper(a)}(),e.SHA1)}()},36308(t,e,i){!function(){var e;t.exports=(e=i(19021),i(63009),function(){var t=e,i=t.lib.WordArray,n=t.algo,r=n.SHA256,o=n.SHA224=r.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(o),t.HmacSHA224=r._createHmacHelper(o)}(),e.SHA224)}()},63009(t,e,i){!function(){var e;t.exports=(e=i(19021),function(t){var i=e,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[],l=[];!function(){function e(e){for(var i=t.sqrt(e),n=2;n<=i;n++)if(!(e%n))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}for(var n=2,r=0;r<64;)e(n)&&(r<8&&(a[r]=i(t.pow(n,.5))),l[r]=i(t.pow(n,1/3)),r++),n++}();var u=[],h=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],c=i[6],f=i[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var p=u[d-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=u[d-2],b=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[d]=g+u[d-7]+b+u[d-16]}var v=n&r^n&o^r&o,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),D=f+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&h^~a&c)+l[d]+u[d];f=c,c=h,h=a,a=s+D|0,s=o,o=r,r=n,n=D+(y+v)|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+o|0,i[3]=i[3]+s|0,i[4]=i[4]+a|0,i[5]=i[5]+h|0,i[6]=i[6]+c|0,i[7]=i[7]+f|0},_doFinalize:function(){var e=this._data,i=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=t.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,e.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=o._createHelper(h),i.HmacSHA256=o._createHmacHelper(h)}(Math),e.SHA256)}()},45953(t,e,i){!function(){var e;t.exports=(e=i(19021),i(43240),function(t){var i=e,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.x64.Word,a=i.algo,l=[],u=[],h=[];!function(){for(var t=1,e=0,i=0;i<24;i++){l[t+5*e]=(i+1)*(i+2)/2%64;var n=(2*t+3*e)%5;t=e%5,e=n}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var r=1,o=0;o<24;o++){for(var a=0,c=0,f=0;f<7;f++){if(1&r){var d=(1<<f)-1;d<32?c^=1<<d:a^=1<<d-32}128&r?r=r<<1^113:r<<=1}h[o]=s.create(a,c)}}();var c=[];!function(){for(var t=0;t<25;t++)c[t]=s.create()}();var f=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var i=this._state,n=this.blockSize/2,r=0;r<n;r++){var o=t[e+2*r],s=t[e+2*r+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(L=i[r]).high^=s,L.low^=o}for(var a=0;a<24;a++){for(var f=0;f<5;f++){for(var d=0,p=0,g=0;g<5;g++)d^=(L=i[f+5*g]).high,p^=L.low;var m=c[f];m.high=d,m.low=p}for(f=0;f<5;f++){var b=c[(f+4)%5],v=c[(f+1)%5],y=v.high,D=v.low;for(d=b.high^(y<<1|D>>>31),p=b.low^(D<<1|y>>>31),g=0;g<5;g++)(L=i[f+5*g]).high^=d,L.low^=p}for(var x=1;x<25;x++){var w=(L=i[x]).high,_=L.low,F=l[x];F<32?(d=w<<F|_>>>32-F,p=_<<F|w>>>32-F):(d=_<<F-32|w>>>64-F,p=w<<F-32|_>>>64-F);var A=c[u[x]];A.high=d,A.low=p}var S=c[0],C=i[0];for(S.high=C.high,S.low=C.low,f=0;f<5;f++)for(g=0;g<5;g++){var L=i[x=f+5*g],k=c[x],P=c[(f+1)%5+5*g],N=c[(f+2)%5+5*g];L.high=k.high^~P.high&N.high,L.low=k.low^~P.low&N.low}L=i[0];var E=h[a];L.high^=E.high,L.low^=E.low}},_doFinalize:function(){var e=this._data,i=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(t.ceil((n+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*i.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,l=a/8,u=[],h=0;h<l;h++){var c=s[h],f=c.high,d=c.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u.push(d),u.push(f)}return new r.init(u,a)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});i.SHA3=o._createHelper(f),i.HmacSHA3=o._createHmacHelper(f)}(Math),e.SHA3)}()},89557(t,e,i){!function(){var e;t.exports=(e=i(19021),i(43240),i(81380),function(){var t=e,i=t.x64,n=i.Word,r=i.WordArray,o=t.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=s._createHelper(a),t.HmacSHA384=s._createHmacHelper(a)}(),e.SHA384)}()},81380(t,e,i){!function(){var e;t.exports=(e=i(19021),i(43240),function(){var t=e,i=t.lib.Hasher,n=t.x64,r=n.Word,o=n.WordArray,s=t.algo;function a(){return r.create.apply(r,arguments)}var l=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=a()}();var h=s.SHA512=i.extend({_doReset:function(){this._hash=new o.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],c=i[6],f=i[7],d=n.high,p=n.low,g=r.high,m=r.low,b=o.high,v=o.low,y=s.high,D=s.low,x=a.high,w=a.low,_=h.high,F=h.low,A=c.high,S=c.low,C=f.high,L=f.low,k=d,P=p,N=g,E=m,B=b,M=v,O=y,I=D,T=x,j=w,R=_,z=F,q=A,H=S,W=C,U=L,V=0;V<80;V++){var G,Y,X=u[V];if(V<16)Y=X.high=0|t[e+2*V],G=X.low=0|t[e+2*V+1];else{var $=u[V-15],K=$.high,J=$.low,Q=(K>>>1|J<<31)^(K>>>8|J<<24)^K>>>7,Z=(J>>>1|K<<31)^(J>>>8|K<<24)^(J>>>7|K<<25),tt=u[V-2],et=tt.high,it=tt.low,nt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,rt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),ot=u[V-7],st=ot.high,at=ot.low,lt=u[V-16],ut=lt.high,ht=lt.low;Y=(Y=(Y=Q+st+((G=Z+at)>>>0<Z>>>0?1:0))+nt+((G+=rt)>>>0<rt>>>0?1:0))+ut+((G+=ht)>>>0<ht>>>0?1:0),X.high=Y,X.low=G}var ct,ft=T&R^~T&q,dt=j&z^~j&H,pt=k&N^k&B^N&B,gt=P&E^P&M^E&M,mt=(k>>>28|P<<4)^(k<<30|P>>>2)^(k<<25|P>>>7),bt=(P>>>28|k<<4)^(P<<30|k>>>2)^(P<<25|k>>>7),vt=(T>>>14|j<<18)^(T>>>18|j<<14)^(T<<23|j>>>9),yt=(j>>>14|T<<18)^(j>>>18|T<<14)^(j<<23|T>>>9),Dt=l[V],xt=Dt.high,wt=Dt.low,_t=W+vt+((ct=U+yt)>>>0<U>>>0?1:0),Ft=bt+gt;W=q,U=H,q=R,H=z,R=T,z=j,T=O+(_t=(_t=(_t=_t+ft+((ct+=dt)>>>0<dt>>>0?1:0))+xt+((ct+=wt)>>>0<wt>>>0?1:0))+Y+((ct+=G)>>>0<G>>>0?1:0))+((j=I+ct|0)>>>0<I>>>0?1:0)|0,O=B,I=M,B=N,M=E,N=k,E=P,k=_t+(mt+pt+(Ft>>>0<bt>>>0?1:0))+((P=ct+Ft|0)>>>0<ct>>>0?1:0)|0}p=n.low=p+P,n.high=d+k+(p>>>0<P>>>0?1:0),m=r.low=m+E,r.high=g+N+(m>>>0<E>>>0?1:0),v=o.low=v+M,o.high=b+B+(v>>>0<M>>>0?1:0),D=s.low=D+I,s.high=y+O+(D>>>0<I>>>0?1:0),w=a.low=w+j,a.high=x+T+(w>>>0<j>>>0?1:0),F=h.low=F+z,h.high=_+R+(F>>>0<z>>>0?1:0),S=c.low=S+H,c.high=A+q+(S>>>0<H>>>0?1:0),L=f.low=L+U,f.high=C+W+(L>>>0<U>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(n+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=i._createHelper(h),t.HmacSHA512=i._createHmacHelper(h)}(),e.SHA512)}()},7628(t,e,i){!function(){var e;t.exports=(e=i(19021),i(80754),i(84636),i(39506),i(57165),function(){var t=e,i=t.lib,n=i.WordArray,r=i.BlockCipher,o=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=o.DES=r.extend({_doReset:function(){for(var t=this._key.words,e=[],i=0;i<56;i++){var n=s[i]-1;e[i]=t[n>>>5]>>>31-n%32&1}for(var r=this._subKeys=[],o=0;o<16;o++){var u=r[o]=[],h=l[o];for(i=0;i<24;i++)u[i/6|0]|=e[(a[i]-1+h)%28]<<31-i%6,u[4+(i/6|0)]|=e[28+(a[i+24]-1+h)%28]<<31-i%6;for(u[0]=u[0]<<1|u[0]>>>31,i=1;i<7;i++)u[i]=u[i]>>>4*(i-1)+3;u[7]=u[7]<<5|u[7]>>>27}var c=this._invSubKeys=[];for(i=0;i<16;i++)c[i]=r[15-i]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],o=this._lBlock,s=this._rBlock,a=0,l=0;l<8;l++)a|=u[l][((s^r[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^a}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<<t}function d(t,e){var i=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<<t}t.DES=r._createHelper(c);var p=o.TripleDES=r.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),r=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=c.createEncryptor(n.create(e)),this._des2=c.createEncryptor(n.create(i)),this._des3=c.createEncryptor(n.create(r))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(p)}(),e.TripleDES)}()},43240(t,e,i){!function(){var e;t.exports=(e=i(19021),function(t){var i=e,n=i.lib,r=n.Base,o=n.WordArray,s=i.x64={};s.Word=r.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=r.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:8*e.length},toX32:function(){for(var t=this.words,e=t.length,i=[],n=0;n<e;n++){var r=t[n];i.push(r.high),i.push(r.low)}return o.create(i,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),e=t.words=this.words.slice(0),i=e.length,n=0;n<i;n++)e[n]=e[n].clone();return t}})}(),e)}()},24716(t,e,i){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}i.d(e,{Ay:()=>q});var r=i(69861);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,o,s,a=[],l=!0,u=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=i(7587),l=function(){return"undefined"!=typeof window?window:"undefined"!=typeof i.g?i.g:"undefined"!=typeof self?self:this}();function u(){l.console&&"function"==typeof l.console.log&&l.console.log.apply(l.console,arguments)}var h={log:u,warn:function(t){l.console&&("function"==typeof l.console.warn?l.console.warn.apply(l.console,arguments):u.call(null,arguments))},error:function(t){l.console&&("function"==typeof l.console.error?l.console.error.apply(l.console,arguments):u(t))}};function c(t,e,i){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){p(n.response,e,i)},n.onerror=function(){h.error("could not download file")},n.send()}function f(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(i){}return e.status>=200&&e.status<=299}function d(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(i){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var p=l.saveAs||("object"!==("undefined"==typeof window?"undefined":n(window))||window!==l?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,i){var n=l.URL||l.webkitURL,r=document.createElement("a");e=e||t.name||"download",r.download=e,r.rel="noopener","string"==typeof t?(r.href=t,r.origin!==location.origin?f(r.href)?c(t,e,i):d(r,r.target="_blank"):d(r)):(r.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(r.href)}),4e4),setTimeout((function(){d(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,i){if(e=e||t.name||"download","string"==typeof t)if(f(t))c(t,e,i);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout((function(){d(r)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==n(e)&&(h.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.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,i),e)}:function(t,e,i,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return c(t,e,i);var o="application/octet-stream"===t.type,s=/constructor/i.test(l.HTMLElement)||l.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||o&&s)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var u=new FileReader;u.onloadend=function(){var t=u.result;t=a?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},u.readAsDataURL(t)}else{var h=l.URL||l.webkitURL,f=h.createObjectURL(t);r?r.location=f:location.href=f,r=null,setTimeout((function(){h.revokeObjectURL(f)}),4e4)}});function g(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var i=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<i.length;n++){var r=i[n].re,o=i[n].process,s=r.exec(t);s&&(e=o(s),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i}}var m=l.atob.bind(l),b=l.btoa.bind(l);function v(t,e){var i=t[0],n=t[1],r=t[2],o=t[3];i=D(i,n,r,o,e[0],7,-680876936),o=D(o,i,n,r,e[1],12,-389564586),r=D(r,o,i,n,e[2],17,606105819),n=D(n,r,o,i,e[3],22,-1044525330),i=D(i,n,r,o,e[4],7,-176418897),o=D(o,i,n,r,e[5],12,1200080426),r=D(r,o,i,n,e[6],17,-1473231341),n=D(n,r,o,i,e[7],22,-45705983),i=D(i,n,r,o,e[8],7,1770035416),o=D(o,i,n,r,e[9],12,-1958414417),r=D(r,o,i,n,e[10],17,-42063),n=D(n,r,o,i,e[11],22,-1990404162),i=D(i,n,r,o,e[12],7,1804603682),o=D(o,i,n,r,e[13],12,-40341101),r=D(r,o,i,n,e[14],17,-1502002290),i=x(i,n=D(n,r,o,i,e[15],22,1236535329),r,o,e[1],5,-165796510),o=x(o,i,n,r,e[6],9,-1069501632),r=x(r,o,i,n,e[11],14,643717713),n=x(n,r,o,i,e[0],20,-373897302),i=x(i,n,r,o,e[5],5,-701558691),o=x(o,i,n,r,e[10],9,38016083),r=x(r,o,i,n,e[15],14,-660478335),n=x(n,r,o,i,e[4],20,-405537848),i=x(i,n,r,o,e[9],5,568446438),o=x(o,i,n,r,e[14],9,-1019803690),r=x(r,o,i,n,e[3],14,-187363961),n=x(n,r,o,i,e[8],20,1163531501),i=x(i,n,r,o,e[13],5,-1444681467),o=x(o,i,n,r,e[2],9,-51403784),r=x(r,o,i,n,e[7],14,1735328473),i=w(i,n=x(n,r,o,i,e[12],20,-1926607734),r,o,e[5],4,-378558),o=w(o,i,n,r,e[8],11,-2022574463),r=w(r,o,i,n,e[11],16,1839030562),n=w(n,r,o,i,e[14],23,-35309556),i=w(i,n,r,o,e[1],4,-1530992060),o=w(o,i,n,r,e[4],11,1272893353),r=w(r,o,i,n,e[7],16,-155497632),n=w(n,r,o,i,e[10],23,-1094730640),i=w(i,n,r,o,e[13],4,681279174),o=w(o,i,n,r,e[0],11,-358537222),r=w(r,o,i,n,e[3],16,-722521979),n=w(n,r,o,i,e[6],23,76029189),i=w(i,n,r,o,e[9],4,-640364487),o=w(o,i,n,r,e[12],11,-421815835),r=w(r,o,i,n,e[15],16,530742520),i=_(i,n=w(n,r,o,i,e[2],23,-995338651),r,o,e[0],6,-198630844),o=_(o,i,n,r,e[7],10,1126891415),r=_(r,o,i,n,e[14],15,-1416354905),n=_(n,r,o,i,e[5],21,-57434055),i=_(i,n,r,o,e[12],6,1700485571),o=_(o,i,n,r,e[3],10,-1894986606),r=_(r,o,i,n,e[10],15,-1051523),n=_(n,r,o,i,e[1],21,-2054922799),i=_(i,n,r,o,e[8],6,1873313359),o=_(o,i,n,r,e[15],10,-30611744),r=_(r,o,i,n,e[6],15,-1560198380),n=_(n,r,o,i,e[13],21,1309151649),i=_(i,n,r,o,e[4],6,-145523070),o=_(o,i,n,r,e[11],10,-1120210379),r=_(r,o,i,n,e[2],15,718787259),n=_(n,r,o,i,e[9],21,-343485551),t[0]=N(i,t[0]),t[1]=N(n,t[1]),t[2]=N(r,t[2]),t[3]=N(o,t[3])}function y(t,e,i,n,r,o){return e=N(N(e,t),N(n,o)),N(e<<r|e>>>32-r,i)}function D(t,e,i,n,r,o,s){return y(e&i|~e&n,t,e,r,o,s)}function x(t,e,i,n,r,o,s){return y(e&n|i&~n,t,e,r,o,s)}function w(t,e,i,n,r,o,s){return y(e^i^n,t,e,r,o,s)}function _(t,e,i,n,r,o,s){return y(i^(e|~n),t,e,r,o,s)}function F(t){var e,i=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)v(n,A(t.substring(e-64,e)));t=t.substring(e-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)r[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(v(n,r),e=0;e<16;e++)r[e]=0;return r[14]=8*i,v(n,r),n}function A(t){var e,i=[];for(e=0;e<64;e+=4)i[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return i}var S="0123456789abcdef".split("");function C(t){for(var e="",i=0;i<4;i++)e+=S[t>>8*i+4&15]+S[t>>8*i&15];return e}function L(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function k(t){return F(t).map(L).join("")}var P="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=C(t[e]);return t.join("")}(F("hello"));function N(t,e){if(P){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}return t+e&4294967295}function E(t,e){var i,n,r,o;if(t!==i){for(var s=(r=t,o=1+(256/t.length|0),new Array(o+1).join(r)),a=[],l=0;l<256;l++)a[l]=l;var u=0;for(l=0;l<256;l++){var h=a[l];u=(u+h+s.charCodeAt(l))%256,a[l]=a[u],a[u]=h}i=t,n=a}else a=n;var c=e.length,f=0,d=0,p="";for(l=0;l<c;l++)d=(d+(h=a[f=(f+1)%256]))%256,a[f]=a[d],a[d]=h,s=a[(a[f]+a[d])%256],p+=String.fromCharCode(e.charCodeAt(l)^s);return p}var B={print:4,modify:8,copy:16,"annot-forms":32};function M(t,e,i,n){this.v=1,this.r=2;var r=192;t.forEach((function(t){if(void 0!==B.perm)throw new Error("Invalid permission: "+t);r+=B[t]})),this.padding="(\xbfN^Nu\x8aAd\0NV\xff\xfa\x01\b..\0\xb6\xd0h>\x80/\f\xa9\xfedSiz";var o=(e+this.padding).substr(0,32),s=(i+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,s),this.P=-(1+(255^r)),this.encryptionKey=k(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=E(this.encryptionKey,this.padding)}function O(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",i=t.length,n=0;n<i;n++){var r=t.charCodeAt(n);e+=r<33||35===r||37===r||40===r||41===r||47===r||60===r||62===r||91===r||93===r||123===r||125===r||r>126?"#"+("0"+r.toString(16)).slice(-2):t[n]}return e}function I(t){if("object"!==n(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof i||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var r=Math.random().toString(35);return e[t][r]=[i,!!n],r},this.unsubscribe=function(t){for(var i in e)if(e[i][t])return delete e[i][t],0===Object.keys(e[i]).length&&delete e[i],!0;return!1},this.publish=function(i){if(e.hasOwnProperty(i)){var n=Array.prototype.slice.call(arguments,1),r=[];for(var o in e[i]){var s=e[i][o];try{s[0].apply(t,n)}catch(d){l.console&&h.error("jsPDF PubSub Error",d.message,d)}s[1]&&r.push(o)}r.length&&r.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function T(t){if(!(this instanceof T))return new T(t);var e="opacity,stroke-opacity".split(",");for(var i in t)t.hasOwnProperty(i)&&e.indexOf(i)>=0&&(this[i]=t[i]);this.id="",this.objectNumber=-1}function j(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function R(t,e,i,n,r){if(!(this instanceof R))return new R(t,e,i,n,r);this.type="axial"===t?2:3,this.coords=e,this.colors=i,j.call(this,n,r)}function z(t,e,i,n,r){if(!(this instanceof z))return new z(t,e,i,n,r);this.boundingBox=t,this.xStep=e,this.yStep=i,this.stream="",this.cloneIndex=0,j.call(this,n,r)}function q(t){var e,i="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],o=arguments[2],s=arguments[3],a=[],u=1,c=16,f="S",d=null;"object"===n(t=t||{})&&(i=t.orientation,r=t.unit||r,o=t.format||o,s=t.compress||t.compressPdf||s,null!==(d=t.encryption||null)&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),u="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(c=t.floatPrecision),f=t.defaultPathOperation||"S"),a=t.filters||(!0===s?["FlateEncode"]:a),r=r||"mm",i=(""+(i||"P")).toLowerCase();var m=t.putOnlyUsedFonts||!1,v={},y={internal:{},__private__:{}};y.__private__.PubSub=I;var D="1.3",x=y.__private__.getPdfVersion=function(){return D};y.__private__.setPdfVersion=function(t){D=t};var w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};y.__private__.getPageFormats=function(){return w};var _=y.__private__.getPageFormat=function(t){return w[t]};o=o||"a4";var F="compat",A="advanced",S=F;function C(){this.saveGraphicsState(),ht(new Ut(At,0,0,-At,0,Ai()*At).toString()+" cm"),this.setFontSize(this.getFontSize()/At),f="n",S=A}function L(){this.restoreGraphicsState(),f="S",S=F}var k=y.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};y.advancedAPI=function(t){var e=S===F;return e&&C.call(this),"function"!=typeof t||(t(this),e&&L.call(this)),this},y.compatAPI=function(t){var e=S===A;return e&&L.call(this),"function"!=typeof t||(t(this),e&&C.call(this)),this},y.isAdvancedAPI=function(){return S===A};var P,N=function(t){if(S!==A)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},E=y.roundToPrecision=y.__private__.roundToPrecision=function(t,i){var n=e||i;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};P=y.hpf=y.__private__.hpf="number"==typeof c?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,c)}:"smart"===c?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return E(t,16)};var B=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return E(t,2)},j=y.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return E(t,3)},H=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return S===F?t*At:S===A?t:void 0},W=function(t){return H(function(t){return S===F?Ai()-t:S===A?t:void 0}(t))};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var U,V="00000000000000000000000000000000",G=y.__private__.getFileId=function(){return V},Y=y.__private__.setFileId=function(t){return V=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():V.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==d&&(Ne=new M(d.userPermissions,d.userPassword,d.ownerPassword,V)),V};y.setFileId=function(t){return Y(t),this},y.getFileId=function(){return G()};var X=y.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),i=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),r=Math.abs(e%60),o=[i,Z(n),"'",Z(r),"'"].join("");return["D:",t.getFullYear(),Z(t.getMonth()+1),Z(t.getDate()),Z(t.getHours()),Z(t.getMinutes()),Z(t.getSeconds()),o].join("")},$=y.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),i=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),r=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),s=parseInt(t.substr(14,2),10);return new Date(e,i,n,r,o,s,0)},K=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=X(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return U=e},J=y.__private__.getCreationDate=function(t){var e=U;return"jsDate"===t&&(e=$(U)),e};y.setCreationDate=function(t){return K(t),this},y.getCreationDate=function(t){return J(t)};var Q,Z=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},tt=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},et=0,it=[],nt=[],rt=0,ot=[],st=[],at=!1,lt=nt;y.__private__.setCustomOutputDestination=function(t){at=!0,lt=t};var ut=function(t){at||(lt=t)};y.__private__.resetCustomOutputDestination=function(){at=!1,lt=nt};var ht=y.__private__.out=function(t){return t=t.toString(),rt+=t.length+1,lt.push(t),lt},ct=y.__private__.write=function(t){return ht(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},ft=y.__private__.getArrayBuffer=function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i);e--;)n[e]=t.charCodeAt(e);return i},dt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];y.__private__.getStandardFonts=function(){return dt};var pt=t.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return pt=S===A?t/At:t,this};var gt,mt=y.__private__.getFontSize=y.getFontSize=function(){return S===F?pt:pt*At},bt=t.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return bt=t,this},y.__private__.getR2L=y.getR2L=function(){return bt};var vt,yt=y.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))gt=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.');gt=t}else gt=parseInt(t,10)};y.__private__.getZoomMode=function(){return gt};var Dt,xt=y.__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.');vt=t};y.__private__.getPageMode=function(){return vt};var wt=y.__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.');Dt=t};y.__private__.getLayoutMode=function(){return Dt},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,i){return yt(t),wt(e),xt(i),this};var _t={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(_t).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return _t[t]},y.__private__.getDocumentProperties=function(){return _t},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in _t)_t.hasOwnProperty(e)&&t[e]&&(_t[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(_t).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return _t[t]=e};var Ft,At,St,Ct,Lt,kt={},Pt={},Nt=[],Et={},Bt={},Mt={},Ot={},It=null,Tt=0,jt=[],Rt=new I(y),zt=t.hotfixes||[],qt={},Ht={},Wt=[],Ut=function t(e,i,n,r,o,s){if(!(this instanceof t))return new t(e,i,n,r,o,s);isNaN(e)&&(e=1),isNaN(i)&&(i=0),isNaN(n)&&(n=0),isNaN(r)&&(r=1),isNaN(o)&&(o=0),isNaN(s)&&(s=0),this._matrix=[e,i,n,r,o,s]};Object.defineProperty(Ut.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ut.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ut.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ut.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ut.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ut.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ut.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ut.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ut.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ut.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ut.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ut.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ut.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ut.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ut.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ut.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Ut.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(P).join(t)},Ut.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,i=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,r=t.shx*this.shy+t.sy*this.sy,o=t.tx*this.sx+t.ty*this.shx+this.tx,s=t.tx*this.shy+t.ty*this.sy+this.ty;return new Ut(e,i,n,r,o,s)},Ut.prototype.decompose=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,r=this.tx,o=this.ty,s=Math.sqrt(t*t+e*e),a=(t/=s)*i+(e/=s)*n;i-=t*a,n-=e*a;var l=Math.sqrt(i*i+n*n);return a/=l,t*(n/=l)<e*(i/=l)&&(t=-t,e=-e,a=-a,s=-s),{scale:new Ut(s,0,0,l,0,0),translate:new Ut(1,0,0,1,r,o),rotate:new Ut(t,e,-e,t,0,0),skew:new Ut(1,0,a,1,0,0)}},Ut.prototype.toString=function(t){return this.join(" ")},Ut.prototype.inversed=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,r=this.tx,o=this.ty,s=1/(t*n-e*i),a=n*s,l=-e*s,u=-i*s,h=t*s;return new Ut(a,l,u,h,-a*r-u*o,-l*r-h*o)},Ut.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,i=t.x*this.shy+t.y*this.sy+this.ty;return new pi(e,i)},Ut.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),i=this.applyToPoint(new pi(t.x+t.w,t.y+t.h));return new gi(e.x,e.y,i.x-e.x,i.y-e.y)},Ut.prototype.clone=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,r=this.tx,o=this.ty;return new Ut(t,e,i,n,r,o)},y.Matrix=Ut;var Vt=y.matrixMult=function(t,e){return e.multiply(t)},Gt=new Ut(1,0,0,1,0,0);y.unitMatrix=y.identityMatrix=Gt;var Yt=function(t,e){if(!Bt[t]){var i=(e instanceof R?"Sh":"P")+(Object.keys(Et).length+1).toString(10);e.id=i,Bt[t]=i,Et[i]=e,Rt.publish("addPattern",e)}};y.ShadingPattern=R,y.TilingPattern=z,y.addShadingPattern=function(t,e){return N("addShadingPattern()"),Yt(t,e),this},y.beginTilingPattern=function(t){N("beginTilingPattern()"),bi(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},y.endTilingPattern=function(t,e){N("endTilingPattern()"),e.stream=st[Q].join("\n"),Yt(t,e),Rt.publish("endTilingPattern",e),Wt.pop().restore()};var Xt,$t=y.__private__.newObject=function(){var t=Kt();return Jt(t,!0),t},Kt=y.__private__.newObjectDeferred=function(){return et++,it[et]=function(){return rt},et},Jt=function(t,e){return e="boolean"==typeof e&&e,it[t]=rt,e&&ht(t+" 0 obj"),t},Qt=y.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return ot.push(t),t},Zt=Kt(),te=Kt(),ee=y.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var i=parseFloat(e[0]);e=[i,i,i,"r"]}for(var n="#",r=0;r<3;r++)n+=("0"+Math.floor(255*parseFloat(e[r])).toString(16)).slice(-2);return n},ie=y.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var i=t.ch1,r=t.ch2,o=t.ch3,s=t.ch4,a="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof i&&"#"!==i.charAt(0)){var l=new g(i);if(l.ok)i=l.toHex();else if(!/^\d*\.?\d*$/.test(i))throw new Error('Invalid color "'+i+'" passed to jsPDF.encodeColorString.')}if("string"==typeof i&&/^#[0-9A-Fa-f]{3}$/.test(i)&&(i="#"+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),"string"==typeof i&&/^#[0-9A-Fa-f]{6}$/.test(i)){var u=parseInt(i.substr(1),16);i=u>>16&255,r=u>>8&255,o=255&u}if(void 0===r||void 0===s&&i===r&&r===o)e="string"==typeof i?i+" "+a[0]:2===t.precision?B(i/255)+" "+a[0]:j(i/255)+" "+a[0];else if(void 0===s||"object"===n(s)){if(s&&!isNaN(s.a)&&0===s.a)return["1.","1.","1.",a[1]].join(" ");e="string"==typeof i?[i,r,o,a[1]].join(" "):2===t.precision?[B(i/255),B(r/255),B(o/255),a[1]].join(" "):[j(i/255),j(r/255),j(o/255),a[1]].join(" ")}else e="string"==typeof i?[i,r,o,s,a[2]].join(" "):2===t.precision?[B(i),B(r),B(o),B(s),a[2]].join(" "):[j(i),j(r),j(o),j(s),a[2]].join(" ");return e},ne=y.__private__.getFilters=function(){return a},re=y.__private__.putStream=function(t){var e=(t=t||{}).data||"",i=t.filters||ne(),n=t.alreadyAppliedFilters||[],r=t.addLength1||!1,o=e.length,s=t.objectId,a=function(t){return t};if(null!==d&&void 0===s)throw new Error("ObjectId must be passed to putStream for file encryption");null!==d&&(a=Ne.encryptor(s,0));var l={};!0===i&&(i=["FlateEncode"]);var u=t.additionalKeyValues||[],h=(l=void 0!==q.API.processDataByFilters?q.API.processDataByFilters(e,i):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==l.data.length&&(u.push({key:"Length",value:l.data.length}),!0===r&&u.push({key:"Length1",value:o})),0!=h.length)if(h.split("/").length-1==1)u.push({key:"Filter",value:h});else{u.push({key:"Filter",value:"["+h+"]"});for(var c=0;c<u.length;c+=1)if("DecodeParms"===u[c].key){for(var f=[],p=0;p<l.reverseChain.split("/").length-1;p+=1)f.push("null");f.push(u[c].value),u[c].value="["+f.join(" ")+"]"}}ht("<<");for(var g=0;g<u.length;g++)ht("/"+u[g].key+" "+u[g].value);ht(">>"),0!==l.data.length&&(ht("stream"),ht(a(l.data)),ht("endstream"))},oe=y.__private__.putPage=function(t){var e=t.number,i=t.data,n=t.objId,r=t.contentsObjId;Jt(n,!0),ht("<</Type /Page"),ht("/Parent "+t.rootDictionaryObjId+" 0 R"),ht("/Resources "+t.resourceDictionaryObjId+" 0 R"),ht("/MediaBox ["+parseFloat(P(t.mediaBox.bottomLeftX))+" "+parseFloat(P(t.mediaBox.bottomLeftY))+" "+P(t.mediaBox.topRightX)+" "+P(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&ht("/CropBox ["+P(t.cropBox.bottomLeftX)+" "+P(t.cropBox.bottomLeftY)+" "+P(t.cropBox.topRightX)+" "+P(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&ht("/BleedBox ["+P(t.bleedBox.bottomLeftX)+" "+P(t.bleedBox.bottomLeftY)+" "+P(t.bleedBox.topRightX)+" "+P(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&ht("/TrimBox ["+P(t.trimBox.bottomLeftX)+" "+P(t.trimBox.bottomLeftY)+" "+P(t.trimBox.topRightX)+" "+P(t.trimBox.topRightY)+"]"),null!==t.artBox&&ht("/ArtBox ["+P(t.artBox.bottomLeftX)+" "+P(t.artBox.bottomLeftY)+" "+P(t.artBox.topRightX)+" "+P(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&ht("/UserUnit "+t.userUnit),Rt.publish("putPage",{objId:n,pageContext:jt[e],pageNumber:e,page:i}),ht("/Contents "+r+" 0 R"),ht(">>"),ht("endobj");var o=i.join("\n");return S===A&&(o+="\nQ"),Jt(r,!0),re({data:o,filters:ne(),objectId:r}),ht("endobj"),n},se=y.__private__.putPages=function(){var t,e,i=[];for(t=1;t<=Tt;t++)jt[t].objId=Kt(),jt[t].contentsObjId=Kt();for(t=1;t<=Tt;t++)i.push(oe({number:t,data:st[t],objId:jt[t].objId,contentsObjId:jt[t].contentsObjId,mediaBox:jt[t].mediaBox,cropBox:jt[t].cropBox,bleedBox:jt[t].bleedBox,trimBox:jt[t].trimBox,artBox:jt[t].artBox,userUnit:jt[t].userUnit,rootDictionaryObjId:Zt,resourceDictionaryObjId:te}));Jt(Zt,!0),ht("<</Type /Pages");var n="/Kids [";for(e=0;e<Tt;e++)n+=i[e]+" 0 R ";ht(n+"]"),ht("/Count "+Tt),ht(">>"),ht("endobj"),Rt.publish("postPutPages")},ae=function(t){Rt.publish("putFont",{font:t,out:ht,newObject:$t,putStream:re}),!0!==t.isAlreadyPutted&&(t.objectNumber=$t(),ht("<<"),ht("/Type /Font"),ht("/BaseFont /"+O(t.postScriptName)),ht("/Subtype /Type1"),"string"==typeof t.encoding&&ht("/Encoding /"+t.encoding),ht("/FirstChar 32"),ht("/LastChar 255"),ht(">>"),ht("endobj"))},le=function(t){t.objectNumber=$t();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[P(t.x),P(t.y),P(t.x+t.width),P(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var i=t.pages[1].join("\n");re({data:i,additionalKeyValues:e,objectId:t.objectNumber}),ht("endobj")},ue=function(t,e){e||(e=21);var i=$t(),n=function(t,e){var i,n=[],r=1/(e-1);for(i=0;i<1;i+=r)n.push(i);if(n.push(1),0!=t[0].offset){var o={offset:0,color:t[0].color};t.unshift(o)}if(1!=t[t.length-1].offset){var s={offset:1,color:t[t.length-1].color};t.push(s)}for(var a="",l=0,u=0;u<n.length;u++){for(i=n[u];i>t[l+1].offset;)l++;var h=t[l].offset,c=(i-h)/(t[l+1].offset-h),f=t[l].color,d=t[l+1].color;a+=tt(Math.round((1-c)*f[0]+c*d[0]).toString(16))+tt(Math.round((1-c)*f[1]+c*d[1]).toString(16))+tt(Math.round((1-c)*f[2]+c*d[2]).toString(16))}return a.trim()}(t.colors,e),r=[];r.push({key:"FunctionType",value:"0"}),r.push({key:"Domain",value:"[0.0 1.0]"}),r.push({key:"Size",value:"["+e+"]"}),r.push({key:"BitsPerSample",value:"8"}),r.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),r.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),re({data:n,additionalKeyValues:r,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:i}),ht("endobj"),t.objectNumber=$t(),ht("<< /ShadingType "+t.type),ht("/ColorSpace /DeviceRGB");var o="/Coords ["+P(parseFloat(t.coords[0]))+" "+P(parseFloat(t.coords[1]))+" ";2===t.type?o+=P(parseFloat(t.coords[2]))+" "+P(parseFloat(t.coords[3])):o+=P(parseFloat(t.coords[2]))+" "+P(parseFloat(t.coords[3]))+" "+P(parseFloat(t.coords[4]))+" "+P(parseFloat(t.coords[5])),ht(o+="]"),t.matrix&&ht("/Matrix ["+t.matrix.toString()+"]"),ht("/Function "+i+" 0 R"),ht("/Extend [true true]"),ht(">>"),ht("endobj")},he=function(t,e){var i=Kt(),n=$t();e.push({resourcesOid:i,objectOid:n}),t.objectNumber=n;var r=[];r.push({key:"Type",value:"/Pattern"}),r.push({key:"PatternType",value:"1"}),r.push({key:"PaintType",value:"1"}),r.push({key:"TilingType",value:"1"}),r.push({key:"BBox",value:"["+t.boundingBox.map(P).join(" ")+"]"}),r.push({key:"XStep",value:P(t.xStep)}),r.push({key:"YStep",value:P(t.yStep)}),r.push({key:"Resources",value:i+" 0 R"}),t.matrix&&r.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),re({data:t.stream,additionalKeyValues:r,objectId:t.objectNumber}),ht("endobj")},ce=function(t){for(var e in t.objectNumber=$t(),ht("<<"),t)switch(e){case"opacity":ht("/ca "+B(t[e]));break;case"stroke-opacity":ht("/CA "+B(t[e]))}ht(">>"),ht("endobj")},fe=function(t){Jt(t.resourcesOid,!0),ht("<<"),ht("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in ht("/Font <<"),kt)kt.hasOwnProperty(t)&&(!1===m||!0===m&&v.hasOwnProperty(t))&&ht("/"+t+" "+kt[t].objectNumber+" 0 R");ht(">>")}(),function(){if(Object.keys(Et).length>0){for(var t in ht("/Shading <<"),Et)Et.hasOwnProperty(t)&&Et[t]instanceof R&&Et[t].objectNumber>=0&&ht("/"+t+" "+Et[t].objectNumber+" 0 R");Rt.publish("putShadingPatternDict"),ht(">>")}}(),function(t){if(Object.keys(Et).length>0){for(var e in ht("/Pattern <<"),Et)Et.hasOwnProperty(e)&&Et[e]instanceof y.TilingPattern&&Et[e].objectNumber>=0&&Et[e].objectNumber<t&&ht("/"+e+" "+Et[e].objectNumber+" 0 R");Rt.publish("putTilingPatternDict"),ht(">>")}}(t.objectOid),function(){if(Object.keys(Mt).length>0){var t;for(t in ht("/ExtGState <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&ht("/"+t+" "+Mt[t].objectNumber+" 0 R");Rt.publish("putGStateDict"),ht(">>")}}(),function(){for(var t in ht("/XObject <<"),qt)qt.hasOwnProperty(t)&&qt[t].objectNumber>=0&&ht("/"+t+" "+qt[t].objectNumber+" 0 R");Rt.publish("putXobjectDict"),ht(">>")}(),ht(">>"),ht("endobj")},de=function(t){Pt[t.fontName]=Pt[t.fontName]||{},Pt[t.fontName][t.fontStyle]=t.id},pe=function(t,e,i,n,r){var o={id:"F"+(Object.keys(kt).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:i,encoding:n,isStandardFont:r||!1,metadata:{}};return Rt.publish("addFont",{font:o,instance:this}),kt[o.id]=o,de(o),o.id},ge=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return function(t,e){var i,n,r,o,s,a,l,u,h;if(r=(e=e||{}).sourceEncoding||"Unicode",s=e.outputEncoding,(e.autoencode||s)&&kt[Ft].metadata&&kt[Ft].metadata[r]&&kt[Ft].metadata[r].encoding&&(o=kt[Ft].metadata[r].encoding,!s&&kt[Ft].encoding&&(s=kt[Ft].encoding),!s&&o.codePages&&(s=o.codePages[0]),"string"==typeof s&&(s=o[s]),s)){for(l=!1,a=[],i=0,n=t.length;i<n;i++)(u=s[t.charCodeAt(i)])?a.push(String.fromCharCode(u)):a.push(t[i]),a[i].charCodeAt(0)>>8&&(l=!0);t=a.join("")}for(i=t.length;void 0===l&&0!==i;)t.charCodeAt(i-1)>>8&&(l=!0),i--;if(!l)return t;for(a=e.noBOM?[]:[254,255],i=0,n=t.length;i<n;i++){if((h=(u=t.charCodeAt(i))>>8)>>8)throw new Error("Character at position "+i+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(h),a.push(u-(h<<8))}return String.fromCharCode.apply(void 0,a)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},me=y.__private__.beginPage=function(t){st[++Tt]=[],jt[Tt]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ye(Tt),ut(st[Q])},be=function(t,e){var n,r,s;switch(i=e||i,"string"==typeof t&&(n=_(t.toLowerCase()),Array.isArray(n)&&(r=n[0],s=n[1])),Array.isArray(t)&&(r=t[0]*At,s=t[1]*At),isNaN(r)&&(r=o[0],s=o[1]),(r>14400||s>14400)&&(h.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),r=Math.min(14400,r),s=Math.min(14400,s)),o=[r,s],i.substr(0,1)){case"l":s>r&&(o=[s,r]);break;case"p":r>s&&(o=[s,r])}me(o),Je($e),ht(oi),0!==ci&&ht(ci+" J"),0!==fi&&ht(fi+" j"),Rt.publish("addPage",{pageNumber:Tt})},ve=function(t){t>0&&t<=Tt&&(st.splice(t,1),jt.splice(t,1),Tt--,Q>Tt&&(Q=Tt),this.setPage(Q))},ye=function(t){t>0&&t<=Tt&&(Q=t)},De=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return st.length-1},xe=function(t,e,i){var n,r=void 0;return i=i||{},t=void 0!==t?t:kt[Ft].fontName,e=void 0!==e?e:kt[Ft].fontStyle,n=t.toLowerCase(),void 0!==Pt[n]&&void 0!==Pt[n][e]?r=Pt[n][e]:void 0!==Pt[t]&&void 0!==Pt[t][e]?r=Pt[t][e]:!1===i.disableWarning&&h.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),r||i.noFallback||null==(r=Pt.times[e])&&(r=Pt.times.normal),r},we=y.__private__.putInfo=function(){var t=$t(),e=function(t){return t};for(var i in null!==d&&(e=Ne.encryptor(t,0)),ht("<<"),ht("/Producer ("+ge(e("jsPDF "+q.version))+")"),_t)_t.hasOwnProperty(i)&&_t[i]&&ht("/"+i.substr(0,1).toUpperCase()+i.substr(1)+" ("+ge(e(_t[i]))+")");ht("/CreationDate ("+ge(e(U))+")"),ht(">>"),ht("endobj")},_e=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Zt;switch($t(),ht("<<"),ht("/Type /Catalog"),ht("/Pages "+e+" 0 R"),gt||(gt="fullwidth"),gt){case"fullwidth":ht("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ht("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ht("/OpenAction [3 0 R /Fit]");break;case"original":ht("/OpenAction [3 0 R /XYZ null null 1]");break;default:var i=""+gt;"%"===i.substr(i.length-1)&&(gt=parseInt(gt)/100),"number"==typeof gt&&ht("/OpenAction [3 0 R /XYZ null null "+B(gt)+"]")}switch(Dt||(Dt="continuous"),Dt){case"continuous":ht("/PageLayout /OneColumn");break;case"single":ht("/PageLayout /SinglePage");break;case"two":case"twoleft":ht("/PageLayout /TwoColumnLeft");break;case"tworight":ht("/PageLayout /TwoColumnRight")}vt&&ht("/PageMode /"+vt),Rt.publish("putCatalog"),ht(">>"),ht("endobj")},Fe=y.__private__.putTrailer=function(){ht("trailer"),ht("<<"),ht("/Size "+(et+1)),ht("/Root "+et+" 0 R"),ht("/Info "+(et-1)+" 0 R"),null!==d&&ht("/Encrypt "+Ne.oid+" 0 R"),ht("/ID [ <"+V+"> <"+V+"> ]"),ht(">>")},Ae=y.__private__.putHeader=function(){ht("%PDF-"+D),ht("%\xba\xdf\xac\xe0")},Se=y.__private__.putXRef=function(){var t="0000000000";ht("xref"),ht("0 "+(et+1)),ht("0000000000 65535 f ");for(var e=1;e<=et;e++)"function"==typeof it[e]?ht((t+it[e]()).slice(-10)+" 00000 n "):void 0!==it[e]?ht((t+it[e]).slice(-10)+" 00000 n "):ht("0000000000 00000 n ")},Ce=y.__private__.buildDocument=function(){var t;et=0,rt=0,nt=[],it=[],ot=[],Zt=Kt(),te=Kt(),ut(nt),Rt.publish("buildDocument"),Ae(),se(),function(){Rt.publish("putAdditionalObjects");for(var t=0;t<ot.length;t++){var e=ot[t];Jt(e.objId,!0),ht(e.content),ht("endobj")}Rt.publish("postPutAdditionalObjects")}(),t=[],function(){for(var t in kt)kt.hasOwnProperty(t)&&(!1===m||!0===m&&v.hasOwnProperty(t))&&ae(kt[t])}(),function(){var t;for(t in Mt)Mt.hasOwnProperty(t)&&ce(Mt[t])}(),function(){for(var t in qt)qt.hasOwnProperty(t)&&le(qt[t])}(),function(t){var e;for(e in Et)Et.hasOwnProperty(e)&&(Et[e]instanceof R?ue(Et[e]):Et[e]instanceof z&&he(Et[e],t))}(t),Rt.publish("putResources"),t.forEach(fe),fe({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Rt.publish("postPutResources"),null!==d&&(Ne.oid=$t(),ht("<<"),ht("/Filter /Standard"),ht("/V "+Ne.v),ht("/R "+Ne.r),ht("/U <"+Ne.toHexString(Ne.U)+">"),ht("/O <"+Ne.toHexString(Ne.O)+">"),ht("/P "+Ne.P),ht(">>"),ht("endobj")),we(),_e();var e=rt;return Se(),Fe(),ht("startxref"),ht(""+e),ht("%%EOF"),ut(st[Q]),nt.join("\n")},Le=y.__private__.getBlob=function(t){return new Blob([ft(t)],{type:"application/pdf"})},ke=y.output=y.__private__.output=(Xt=function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return Ce();case"save":y.save(e.filename);break;case"arraybuffer":return ft(Ce());case"blob":return Le(Ce());case"bloburi":case"bloburl":if(void 0!==l.URL&&"function"==typeof l.URL.createObjectURL)return l.URL&&l.URL.createObjectURL(Le(Ce()))||void 0;h.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var i="",n=Ce();try{i=b(n)}catch(d){i=b(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+e.filename+";base64,"+i;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(l)){var r="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",o=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(r=e.pdfObjectUrl,o="");var s='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+r+'"'+o+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",a=l.open();return null!==a&&a.document.write(s),a}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(l)){var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(e.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+e.filename+'" width="500px" height="400px" /></body></html>',c=l.open();if(null!==c){c.document.write(u);var f=this;c.document.documentElement.querySelector("#pdfViewer").onload=function(){c.document.title=e.filename,c.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(f.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(l))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var p='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",e)+'"></iframe></body></html>',g=l.open();if(null!==g&&(g.document.write(p),g.document.title=e.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return l.document.location.href=this.output("datauristring",e);default:return null}},Xt.foo=function(){try{return Xt.apply(this,arguments)}catch(e){var t=e.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var i="Error in function "+t.split("\n")[0].split("<")[0]+": "+e.message;if(!l.console)throw new Error(i);l.console.error(i,e),l.alert&&alert(i)}},Xt.foo.bar=Xt,Xt.foo),Pe=function(t){return!0===Array.isArray(zt)&&zt.indexOf(t)>-1};switch(r){case"pt":At=1;break;case"mm":At=72/25.4;break;case"cm":At=72/2.54;break;case"in":At=72;break;case"px":At=1==Pe("px_scaling")?.75:96/72;break;case"pc":case"em":At=12;break;case"ex":At=6;break;default:if("number"!=typeof r)throw new Error("Invalid unit: "+r);At=r}var Ne=null;K(),Y();var Ee=y.__private__.getPageInfo=y.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:jt[t].objId,pageNumber:t,pageContext:jt[t]}},Be=y.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in jt)if(jt[e].objId===t)break;return Ee(e)},Me=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:jt[Q].objId,pageNumber:Q,pageContext:jt[Q]}};y.addPage=function(){return be.apply(this,arguments),this},y.setPage=function(){return ye.apply(this,arguments),ut.call(this,st[Q]),this},y.insertPage=function(t){return this.addPage(),this.movePage(Q,t),this},y.movePage=function(t,e){var i,n;if(t>e){i=st[t],n=jt[t];for(var r=t;r>e;r--)st[r]=st[r-1],jt[r]=jt[r-1];st[e]=i,jt[e]=n,this.setPage(e)}else if(t<e){i=st[t],n=jt[t];for(var o=t;o<e;o++)st[o]=st[o+1],jt[o]=jt[o+1];st[e]=i,jt[e]=n,this.setPage(e)}return this},y.deletePage=function(){return ve.apply(this,arguments),this},y.__private__.text=y.text=function(t,e,i,r,o){var s,a,l,u,h,c,f,d,p,g=(r=r||{}).scope||this;if("number"==typeof t&&"number"==typeof e&&("string"==typeof i||Array.isArray(i))){var m=i;i=e,e=t,t=m}if(arguments[3]instanceof Ut==0?(l=arguments[4],u=arguments[5],"object"===n(f=arguments[3])&&null!==f||("string"==typeof l&&(u=l,l=null),"string"==typeof f&&(u=f,f=null),"number"==typeof f&&(l=f,f=null),r={flags:f,angle:l,align:u})):(N("The transform parameter of text() with a Matrix value"),p=o),isNaN(e)||isNaN(i)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return g;var b,y="",D="number"==typeof r.lineHeightFactor?r.lineHeightFactor:Xe,x=g.internal.scaleFactor;function w(t){return t=t.split("\t").join(Array(r.TabLen||9).join(" ")),ge(t,f)}function _(t){for(var e,i=t.concat(),n=[],r=i.length;r--;)"string"==typeof(e=i.shift())?n.push(e):Array.isArray(t)&&(1===e.length||void 0===e[1]&&void 0===e[2])?n.push(e[0]):n.push([e[0],e[1],e[2]]);return n}function F(t,e){var i;if("string"==typeof t)i=e(t)[0];else if(Array.isArray(t)){for(var n,r,o=t.concat(),s=[],a=o.length;a--;)"string"==typeof(n=o.shift())?s.push(e(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(r=e(n[0],n[1],n[2]),s.push([r[0],r[1],r[2]]));i=s}return i}var C=!1,L=!0;if("string"==typeof t)C=!0;else if(Array.isArray(t)){var k=t.concat();a=[];for(var E,B=k.length;B--;)("string"!=typeof(E=k.shift())||Array.isArray(E)&&"string"!=typeof E[0])&&(L=!1);C=L}if(!1===C)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 M=pt/g.internal.scaleFactor,O=M*(D-1);switch(r.baseline){case"bottom":i-=O;break;case"top":i+=M-O;break;case"hanging":i+=M-2*O;break;case"middle":i+=M/2-O}if((c=r.maxWidth||0)>0&&("string"==typeof t?t=g.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(g.splitTextToSize(e,c))}),[]))),s={text:t,x:e,y:i,options:r,mutex:{pdfEscape:ge,activeFontKey:Ft,fonts:kt,activeFontSize:pt}},Rt.publish("preProcessText",s),t=s.text,l=(r=s.options).angle,p instanceof Ut==0&&l&&"number"==typeof l){l*=Math.PI/180,0===r.rotationDirection&&(l=-l),S===A&&(l=-l);var I=Math.cos(l),T=Math.sin(l);p=new Ut(I,T,-T,I,0,0)}else l&&l instanceof Ut&&(p=l);S!==A||p||(p=Gt),void 0!==(h=r.charSpace||ui)&&(y+=P(H(h))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=r.horizontalScale)&&(y+=P(100*d)+" Tz\n"),r.lang;var j=-1,R=void 0!==r.renderingMode?r.renderingMode:r.stroke,z=g.internal.getCurrentPageInfo().pageContext;switch(R){case 0:case!1:case"fill":j=0;break;case 1:case!0:case"stroke":j=1;break;case 2:case"fillThenStroke":j=2;break;case 3:case"invisible":j=3;break;case 4:case"fillAndAddForClipping":j=4;break;case 5:case"strokeAndAddPathForClipping":j=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":j=6;break;case 7:case"addToPathForClipping":j=7}var q=void 0!==z.usedRenderingMode?z.usedRenderingMode:-1;-1!==j?y+=j+" Tr\n":-1!==q&&(y+="0 Tr\n"),-1!==j&&(z.usedRenderingMode=j),u=r.align||"left";var W,U=pt*D,V=g.internal.pageSize.getWidth(),G=kt[Ft];h=r.charSpace||ui,c=r.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},r.flags);var Y=[],X=function(t){return g.getStringUnitWidth(t,{font:G,charSpace:h,fontSize:pt,doKerning:!1})*pt/x};if("[object Array]"===Object.prototype.toString.call(t)){var $;a=_(t),"left"!==u&&(W=a.map(X));var K,J=0;if("right"===u){e-=W[0],t=[],B=a.length;for(var Q=0;Q<B;Q++)0===Q?(K=ei(e),$=ii(i)):(K=H(J-W[Q]),$=-U),t.push([a[Q],K,$]),J=W[Q]}else if("center"===u){e-=W[0]/2,t=[],B=a.length;for(var Z=0;Z<B;Z++)0===Z?(K=ei(e),$=ii(i)):(K=H((J-W[Z])/2),$=-U),t.push([a[Z],K,$]),J=W[Z]}else if("left"===u){t=[],B=a.length;for(var tt=0;tt<B;tt++)t.push(a[tt])}else if("justify"===u&&"Identity-H"===G.encoding){t=[],B=a.length,c=0!==c?c:V;for(var et=0,it=0;it<B;it++)if($=0===it?ii(i):-U,K=0===it?ei(e):et,it<B-1){var nt=H((c-W[it])/(a[it].split(" ").length-1)),rt=a[it].split(" ");t.push([rt[0]+" ",K,$]),et=0;for(var ot=1;ot<rt.length;ot++){var st=(X(rt[ot-1]+" "+rt[ot])-X(rt[ot]))*x+nt;ot==rt.length-1?t.push([rt[ot],st,0]):t.push([rt[ot]+" ",st,0]),et-=st}}else t.push([a[it],K,$]);t.push(["",et,0])}else{if("justify"!==u)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(t=[],B=a.length,c=0!==c?c:V,it=0;it<B;it++){$=0===it?ii(i):-U,K=0===it?ei(e):0;var at=a[it].split(" ").length-1,lt=at>0?(c-W[it])/at:0;it<B-1?Y.push(P(H(lt))):Y.push(0),t.push([a[it],K,$])}}}!0===("boolean"==typeof r.R2L?r.R2L:bt)&&(t=F(t,(function(t,e,i){return[t.split("").reverse().join(""),e,i]}))),s={text:t,x:e,y:i,options:r,mutex:{pdfEscape:ge,activeFontKey:Ft,fonts:kt,activeFontSize:pt}},Rt.publish("postProcessText",s),t=s.text,b=s.mutex.isHex||!1;var ut=kt[Ft].encoding;"WinAnsiEncoding"!==ut&&"StandardEncoding"!==ut||(t=F(t,(function(t,e,i){return[w(t),e,i]}))),a=_(t),t=[];for(var ct,ft,dt,gt=Array.isArray(a[0])?1:0,mt="",vt=function(t,e,i){var n="";return i instanceof Ut?(i="number"==typeof r.angle?Vt(i,new Ut(1,0,0,1,t,e)):Vt(new Ut(1,0,0,1,t,e),i),S===A&&(i=Vt(new Ut(1,0,0,-1,0,0),i)),n=i.join(" ")+" Tm\n"):n=P(t)+" "+P(e)+" Td\n",n},yt=0;yt<a.length;yt++){switch(mt="",gt){case 1:dt=(b?"<":"(")+a[yt][0]+(b?">":")"),ct=parseFloat(a[yt][1]),ft=parseFloat(a[yt][2]);break;case 0:dt=(b?"<":"(")+a[yt]+(b?">":")"),ct=ei(e),ft=ii(i)}void 0!==Y&&void 0!==Y[yt]&&(mt=Y[yt]+" Tw\n"),0===yt?t.push(mt+vt(ct,ft,p)+dt):0===gt?t.push(mt+dt):1===gt&&t.push(mt+vt(ct,ft,p)+dt)}t=0===gt?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var Dt="BT\n/";return Dt+=Ft+" "+pt+" Tf\n",Dt+=P(pt*D)+" TL\n",Dt+=ai+"\n",Dt+=y,Dt+=t,ht(Dt+="ET"),v[Ft]=!0,g};var Oe=y.__private__.clip=y.clip=function(t){return ht("evenodd"===t?"W*":"W"),this};y.clipEvenOdd=function(){return Oe("evenodd")},y.__private__.discardPath=y.discardPath=function(){return ht("n"),this};var Ie=y.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(t){return Ie(t)&&(f=t),this};var Te=y.__private__.getStyle=y.getStyle=function(t){var e=f;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},je=y.close=function(){return ht("h"),this};y.stroke=function(){return ht("S"),this},y.fill=function(t){return Re("f",t),this},y.fillEvenOdd=function(t){return Re("f*",t),this},y.fillStroke=function(t){return Re("B",t),this},y.fillStrokeEvenOdd=function(t){return Re("B*",t),this};var Re=function(t,e){"object"===n(e)?He(e,t):ht(t)},ze=function(t){null===t||S===A&&void 0===t||(t=Te(t),ht(t))};function qe(t,e,i,n,r){var o=new z(e||this.boundingBox,i||this.xStep,n||this.yStep,this.gState,r||this.matrix);o.stream=this.stream;var s=t+"$$"+this.cloneIndex+++"$$";return Yt(s,o),o}var He=function(t,e){var i=Bt[t.key],n=Et[i];if(n instanceof R)ht("q"),ht(We(e)),n.gState&&y.setGState(n.gState),ht(t.matrix.toString()+" cm"),ht("/"+i+" sh"),ht("Q");else if(n instanceof z){var r=new Ut(1,0,0,-1,0,Ai());t.matrix&&(r=r.multiply(t.matrix||Gt),i=qe.call(n,t.key,t.boundingBox,t.xStep,t.yStep,r).id),ht("q"),ht("/Pattern cs"),ht("/"+i+" scn"),n.gState&&y.setGState(n.gState),ht(e),ht("Q")}},We=function(t){switch(t){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Ue=y.moveTo=function(t,e){return ht(P(H(t))+" "+P(W(e))+" m"),this},Ve=y.lineTo=function(t,e){return ht(P(H(t))+" "+P(W(e))+" l"),this},Ge=y.curveTo=function(t,e,i,n,r,o){return ht([P(H(t)),P(W(e)),P(H(i)),P(W(n)),P(H(r)),P(W(o)),"c"].join(" ")),this};y.__private__.line=y.line=function(t,e,i,n,r){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ie(r))throw new Error("Invalid arguments passed to jsPDF.line");return S===F?this.lines([[i-t,n-e]],t,e,[1,1],r||"S"):this.lines([[i-t,n-e]],t,e,[1,1]).stroke()},y.__private__.lines=y.lines=function(t,e,i,n,r,o){var s,a,l,u,h,c,f,d,p,g,m,b;if("number"==typeof t&&(b=i,i=e,e=t,t=b),n=n||[1,1],o=o||!1,isNaN(e)||isNaN(i)||!Array.isArray(t)||!Array.isArray(n)||!Ie(r)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(Ue(e,i),s=n[0],a=n[1],u=t.length,g=e,m=i,l=0;l<u;l++)2===(h=t[l]).length?(g=h[0]*s+g,m=h[1]*a+m,Ve(g,m)):(c=h[0]*s+g,f=h[1]*a+m,d=h[2]*s+g,p=h[3]*a+m,g=h[4]*s+g,m=h[5]*a+m,Ge(c,f,d,p,g,m));return o&&je(),ze(r),this},y.path=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.c;switch(i.op){case"m":Ue(n[0],n[1]);break;case"l":Ve(n[0],n[1]);break;case"c":Ge.apply(this,n);break;case"h":je()}}return this},y.__private__.rect=y.rect=function(t,e,i,n,r){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ie(r))throw new Error("Invalid arguments passed to jsPDF.rect");return S===F&&(n=-n),ht([P(H(t)),P(W(e)),P(H(i)),P(H(n)),"re"].join(" ")),ze(r),this},y.__private__.triangle=y.triangle=function(t,e,i,n,r,o,s){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(r)||isNaN(o)||!Ie(s))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[i-t,n-e],[r-i,o-n],[t-r,e-o]],t,e,[1,1],s,!0),this},y.__private__.roundedRect=y.roundedRect=function(t,e,i,n,r,o,s){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(r)||isNaN(o)||!Ie(s))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var a=4/3*(Math.SQRT2-1);return r=Math.min(r,.5*i),o=Math.min(o,.5*n),this.lines([[i-2*r,0],[r*a,0,r,o-o*a,r,o],[0,n-2*o],[0,o*a,-r*a,o,-r,o],[2*r-i,0],[-r*a,0,-r,-o*a,-r,-o],[0,2*o-n],[0,-o*a,r*a,-o,r,-o]],t+r,e,[1,1],s,!0),this},y.__private__.ellipse=y.ellipse=function(t,e,i,n,r){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ie(r))throw new Error("Invalid arguments passed to jsPDF.ellipse");var o=4/3*(Math.SQRT2-1)*i,s=4/3*(Math.SQRT2-1)*n;return Ue(t+i,e),Ge(t+i,e-s,t+o,e-n,t,e-n),Ge(t-o,e-n,t-i,e-s,t-i,e),Ge(t-i,e+s,t-o,e+n,t,e+n),Ge(t+o,e+n,t+i,e+s,t+i,e),ze(r),this},y.__private__.circle=y.circle=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||!Ie(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,i,i,n)},y.setFont=function(t,e,i){return i&&(e=k(e,i)),Ft=xe(t,e,{disableWarning:!1}),this};var Ye=y.__private__.getFont=y.getFont=function(){return kt[xe.apply(y,arguments)]};y.__private__.getFontList=y.getFontList=function(){var t,e,i={};for(t in Pt)if(Pt.hasOwnProperty(t))for(e in i[t]=[],Pt[t])Pt[t].hasOwnProperty(e)&&i[t].push(e);return i},y.addFont=function(t,e,i,n,r){var o=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==o.indexOf(arguments[3])?r=arguments[3]:arguments[3]&&-1==o.indexOf(arguments[3])&&(i=k(i,n)),pe.call(this,t,e,i,r=r||"Identity-H")};var Xe,$e=t.lineWidth||.200025,Ke=y.__private__.getLineWidth=y.getLineWidth=function(){return $e},Je=y.__private__.setLineWidth=y.setLineWidth=function(t){return $e=t,ht(P(H(t))+" w"),this};y.__private__.setLineDash=q.API.setLineDash=q.API.setLineDashPattern=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return P(H(t))})).join(" "),e=P(H(e)),ht("["+t+"] "+e+" d"),this};var Qe=y.__private__.getLineHeight=y.getLineHeight=function(){return pt*Xe};y.__private__.getLineHeight=y.getLineHeight=function(){return pt*Xe};var Ze=y.__private__.setLineHeightFactor=y.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Xe=t),this},ti=y.__private__.getLineHeightFactor=y.getLineHeightFactor=function(){return Xe};Ze(t.lineHeight);var ei=y.__private__.getHorizontalCoordinate=function(t){return H(t)},ii=y.__private__.getVerticalCoordinate=function(t){return S===A?t:jt[Q].mediaBox.topRightY-jt[Q].mediaBox.bottomLeftY-H(t)},ni=y.__private__.getHorizontalCoordinateString=y.getHorizontalCoordinateString=function(t){return P(ei(t))},ri=y.__private__.getVerticalCoordinateString=y.getVerticalCoordinateString=function(t){return P(ii(t))},oi=t.strokeColor||"0 G";y.__private__.getStrokeColor=y.getDrawColor=function(){return ee(oi)},y.__private__.setStrokeColor=y.setDrawColor=function(t,e,i,n){return oi=ie({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"draw",precision:2}),ht(oi),this};var si=t.fillColor||"0 g";y.__private__.getFillColor=y.getFillColor=function(){return ee(si)},y.__private__.setFillColor=y.setFillColor=function(t,e,i,n){return si=ie({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"fill",precision:2}),ht(si),this};var ai=t.textColor||"0 g",li=y.__private__.getTextColor=y.getTextColor=function(){return ee(ai)};y.__private__.setTextColor=y.setTextColor=function(t,e,i,n){return ai=ie({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"text",precision:3}),this};var ui=t.charSpace,hi=y.__private__.getCharSpace=y.getCharSpace=function(){return parseFloat(ui||0)};y.__private__.setCharSpace=y.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return ui=t,this};var ci=0;y.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},y.__private__.setLineCap=y.setLineCap=function(t){var e=y.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ci=e,ht(e+" J"),this};var fi=0;y.__private__.setLineJoin=y.setLineJoin=function(t){var e=y.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return fi=e,ht(e+" j"),this},y.__private__.setLineMiterLimit=y.__private__.setMiterLimit=y.setLineMiterLimit=y.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ht(P(H(t))+" M"),this},y.GState=T,y.setGState=function(t){(t="string"==typeof t?Mt[Ot[t]]:di(null,t)).equals(It)||(ht("/"+t.id+" gs"),It=t)};var di=function(t,e){if(!t||!Ot[t]){var i=!1;for(var n in Mt)if(Mt.hasOwnProperty(n)&&Mt[n].equals(e)){i=!0;break}if(i)e=Mt[n];else{var r="GS"+(Object.keys(Mt).length+1).toString(10);Mt[r]=e,e.id=r}return t&&(Ot[t]=e.id),Rt.publish("addGState",e),e}};y.addGState=function(t,e){return di(t,e),this},y.saveGraphicsState=function(){return ht("q"),Nt.push({key:Ft,size:pt,color:ai}),this},y.restoreGraphicsState=function(){ht("Q");var t=Nt.pop();return Ft=t.key,pt=t.size,ai=t.color,It=null,this},y.setCurrentTransformationMatrix=function(t){return ht(t.toString()+" cm"),this},y.comment=function(t){return ht("#"+t),this};var pi=function(t,e){var i=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var n=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var r="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return r},set:function(t){r=t.toString()}}),this},gi=function(t,e,i,n){pi.call(this,t,e),this.type="rect";var r=i||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var o=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return o},set:function(t){isNaN(t)||(o=parseFloat(t))}}),this},mi=function(){this.page=Tt,this.currentPage=Q,this.pages=st.slice(0),this.pagesContext=jt.slice(0),this.x=St,this.y=Ct,this.matrix=Lt,this.width=yi(Q),this.height=xi(Q),this.outputDestination=lt,this.id="",this.objectNumber=-1};mi.prototype.restore=function(){Tt=this.page,Q=this.currentPage,jt=this.pagesContext,st=this.pages,St=this.x,Ct=this.y,Lt=this.matrix,Di(Q,this.width),wi(Q,this.height),lt=this.outputDestination};var bi=function(t,e,i,n,r){Wt.push(new mi),Tt=Q=0,st=[],St=t,Ct=e,Lt=r,me([i,n])};for(var vi in y.beginFormObject=function(t,e,i,n,r){return bi(t,e,i,n,r),this},y.endFormObject=function(t){return function(t){if(Ht[t])Wt.pop().restore();else{var e=new mi,i="Xo"+(Object.keys(qt).length+1).toString(10);e.id=i,Ht[t]=i,qt[i]=e,Rt.publish("addFormObject",e),Wt.pop().restore()}}(t),this},y.doFormObject=function(t,e){var i=qt[Ht[t]];return ht("q"),ht(e.toString()+" cm"),ht("/"+i.id+" Do"),ht("Q"),this},y.getFormObject=function(t){var e=qt[Ht[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},y.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(p(Le(Ce()),t),"function"==typeof p.unload&&l.setTimeout&&setTimeout(p.unload,911),this):new Promise((function(e,i){try{var n=p(Le(Ce()),t);"function"==typeof p.unload&&l.setTimeout&&setTimeout(p.unload,911),e(n)}catch(r){i(r.message)}}))},q.API)q.API.hasOwnProperty(vi)&&("events"===vi&&q.API.events.length?function(t,e){var i,n,r;for(r=e.length-1;-1!==r;r--)i=e[r][0],n=e[r][1],t.subscribe.apply(t,[i].concat("function"==typeof n?[n]:n))}(Rt,q.API.events):y[vi]=q.API[vi]);function yi(t){return jt[t].mediaBox.topRightX-jt[t].mediaBox.bottomLeftX}function Di(t,e){jt[t].mediaBox.topRightX=e+jt[t].mediaBox.bottomLeftX}function xi(t){return jt[t].mediaBox.topRightY-jt[t].mediaBox.bottomLeftY}function wi(t,e){jt[t].mediaBox.topRightY=e+jt[t].mediaBox.bottomLeftY}var _i=y.getPageWidth=function(t){return yi(t=t||Q)/At},Fi=y.setPageWidth=function(t,e){Di(t,e*At)},Ai=y.getPageHeight=function(t){return xi(t=t||Q)/At},Si=y.setPageHeight=function(t,e){wi(t,e*At)};return y.internal={pdfEscape:ge,getStyle:Te,getFont:Ye,getFontSize:mt,getCharSpace:hi,getTextColor:li,getLineHeight:Qe,getLineHeightFactor:ti,getLineWidth:Ke,write:ct,getHorizontalCoordinate:ei,getVerticalCoordinate:ii,getCoordinateString:ni,getVerticalCoordinateString:ri,collections:{},newObject:$t,newAdditionalObject:Qt,newObjectDeferred:Kt,newObjectDeferredBegin:Jt,getFilters:ne,putStream:re,events:Rt,scaleFactor:At,pageSize:{getWidth:function(){return _i(Q)},setWidth:function(t){Fi(Q,t)},getHeight:function(){return Ai(Q)},setHeight:function(t){Si(Q,t)}},encryptionOptions:d,encryption:Ne,getEncryptor:function(t){return null!==d?Ne.encryptor(t,0):function(t){return t}},output:ke,getNumberOfPages:De,get pages(){return st},out:ht,f2:B,f3:j,getPageInfo:Ee,getPageInfoByObjId:Be,getCurrentPageInfo:Me,getPDFVersion:x,Point:pi,Rectangle:gi,Matrix:Ut,hasHotfix:Pe},Object.defineProperty(y.internal.pageSize,"width",{get:function(){return _i(Q)},set:function(t){Fi(Q,t)},enumerable:!0,configurable:!0}),Object.defineProperty(y.internal.pageSize,"height",{get:function(){return Ai(Q)},set:function(t){Si(Q,t)},enumerable:!0,configurable:!0}),function(t){for(var e=0,i=dt.length;e<i;e++){var n=pe.call(this,t[e][0],t[e][1],t[e][2],dt[e][3],!0);!1===m&&(v[n]=!0);var r=t[e][0].split("-");de({id:n,fontName:r[0],fontStyle:r[1]||""})}Rt.publish("addFonts",{fonts:kt,dictionary:Pt})}.call(y,dt),Ft="F1",be(o,i),Rt.publish("initialized"),y}M.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},M.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},M.prototype.hexToBytes=function(t){for(var e=[],i=0;i<t.length;i+=2)e.push(String.fromCharCode(parseInt(t.substr(i,2),16)));return e.join("")},M.prototype.processOwnerPassword=function(t,e){return E(k(e).substr(0,5),t)},M.prototype.encryptor=function(t,e){var i=k(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return E(i,t)}},T.prototype.equals=function(t){var e,i="id,objectNumber,equals";if(!t||n(t)!==n(this))return!1;var r=0;for(e in this)if(!(i.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e))return!1;if(this[e]!==t[e])return!1;r++}for(e in t)t.hasOwnProperty(e)&&i.indexOf(e)<0&&r--;return 0===r},q.API={events:[]},q.version="4.2.0";var H=q.API,W=1,U=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},V=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},G=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,(function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(1===e.length?"0"+e:e)}))},Y=function(t){return t.toFixed(2)},X=function(t){return t.toFixed(5)};H.__acroform__={};var $=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},K=function(t){return t*W},J=function(t){var e=new dt,i=Ct.internal.getHeight(t)||0,n=Ct.internal.getWidth(t)||0;return e.BBox=[0,0,Number(Y(n)),Number(Y(i))],e},Q=H.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},Z=H.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},tt=H.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},et=H.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return tt(t,e-1)},it=H.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Q(t,e-1)},nt=H.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Z(t,e-1)},rt=H.__acroform__.calculateCoordinates=function(t,e){var i=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,r=t[0],o=t[1],s=t[2],a=t[3],l={};return l.lowerLeft_X=i(r)||0,l.lowerLeft_Y=n(o+a)||0,l.upperRight_X=i(r+s)||0,l.upperRight_Y=n(o)||0,[Number(Y(l.lowerLeft_X)),Number(Y(l.lowerLeft_Y)),Number(Y(l.upperRight_X)),Number(Y(l.upperRight_Y))]},ot=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],i=t._V||t.DV,n=st(t,i),r=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+r+" "+Y(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var o=J(t);return o.scope=t.scope,o.stream=e.join("\n"),o}},st=function(t,e){var i=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},r=(e=")"==(e="("==e.substr(0,1)?e.substr(1):e).substr(e.length-1)?e.substr(0,e.length-1):e).split(" ");r=t.multiline?r.map((function(t){return t.split("\n")})):r.map((function(t){return[t]}));var o=i,s=Ct.internal.getHeight(t)||0;s=s<0?-s:s;var a=Ct.internal.getWidth(t)||0;a=a<0?-a:a;var l=function(e,i,n){if(e+1<r.length){var o=i+" "+r[e+1][0];return at(o,t,n).width<=a-4}return!1};o++;t:for(;o>0;){e="",o--;var u,h,c=at("3",t,o).height,f=t.multiline?s-o:(s-c)/2,d=f+=2,p=0,g=0,m=0;if(o<=0){e="(...) Tj\n",e+="% Width of Text: "+at(e,t,o=12).width+", FieldWidth:"+a+"\n";break}for(var b="",v=0,y=0;y<r.length;y++)if(r.hasOwnProperty(y)){var D=!1;if(1!==r[y].length&&m!==r[y].length-1){if((c+2)*(v+2)+2>s)continue t;b+=r[y][m],D=!0,g=y,y--}else{b=" "==(b+=r[y][m]+" ").substr(b.length-1)?b.substr(0,b.length-1):b;var x=parseInt(y),w=l(x,b,o),_=y>=r.length-1;if(w&&!_){b+=" ",m=0;continue}if(w||_){if(_)g=x;else if(t.multiline&&(c+2)*(v+2)+2>s)continue t}else{if(!t.multiline)continue t;if((c+2)*(v+2)+2>s)continue t;g=x}}for(var F="",A=p;A<=g;A++){var S=r[A];if(t.multiline){if(A===g){F+=S[m]+" ",m=(m+1)%S.length;continue}if(A===p){F+=S[S.length-1]+" ";continue}}F+=S[0]+" "}switch(F=" "==F.substr(F.length-1)?F.substr(0,F.length-1):F,h=at(F,t,o).width,t.textAlign){case"right":u=a-h-2;break;case"center":u=(a-h)/2;break;default:u=2}e+=Y(u)+" "+Y(d)+" Td\n",e+="("+U(F)+") Tj\n",e+=-Y(u)+" 0 Td\n",d=-(o+2),h=0,p=D?g:g+1,v++,b=""}break}return n.text=e,n.fontSize=o,n},at=function(t,e,i){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),r=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(i),charSpace:0})*parseFloat(i);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(i),charSpace:0})*parseFloat(i)*1.5,width:r}},lt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},ut=function(t,e){var i={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===i.type&&t.object===i.object}))&&e.internal.getPageInfo(t.page).pageContext.annotations.push(i)},ht=H.__acroform__.arrayToPdfArray=function(t,e,i){var r=function(t){return t};if(Array.isArray(t)){for(var o="[",s=0;s<t.length;s++)switch(0!==s&&(o+=" "),n(t[s])){case"boolean":case"number":case"object":o+=t[s].toString();break;case"string":"/"===t[s].substr(0,1)?o+="/"+G(t[s].substr(1)):(void 0!==e&&i&&(r=i.internal.getEncryptor(e)),o+="("+U(r(t[s].toString()))+")")}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ct=function(t,e,i){var n=function(t){return t};return void 0!==e&&i&&(n=i.internal.getEncryptor(e)),(t=t||"").toString(),"("+U(n(t))+")"},ft=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})};ft.prototype.toString=function(){return this.objId+" 0 R"},ft.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},ft.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var i in e)if(!1===Object.getOwnPropertyDescriptor(this,e[i]).configurable){var n=e[i],r=this[n];r&&(Array.isArray(r)?t.push({key:n,value:ht(r,this.objId,this.scope)}):r instanceof ft?(r.scope=this.scope,t.push({key:n,value:r.objId+" 0 R"})):"function"!=typeof r&&t.push({key:n,value:r}))}return t};var dt=function(){ft.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,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};$(dt,ft);var pt=function(){ft.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+U(e(t))+")"}},set:function(e){t=e}})};$(pt,ft);var gt=function t(){ft.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(e,3))},set:function(t){!0===Boolean(t)?this.F=it(e,3):this.F=nt(e,3)}});var i=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');i=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var 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 o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof _t)return;o="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+U(e(o))+")"},set:function(t){o=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(t){o=t}});var s="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(t){l=t}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/W:u},set:function(t){u=t}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(t){h=t}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof _t||this instanceof At))return ct(c,this.objId,this.scope)},set:function(t){t=t.toString(),c=t}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Dt==0?ct(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof Dt==0?"("===t.substr(0,1)?V(t.substr(1,t.length-2)):V(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Dt==1?V(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof Dt==1?"/"+G(t):t}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof Dt==0?ct(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof Dt==0?"("===t.substr(0,1)?V(t.substr(1,t.length-2)):V(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Dt==1?V(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof Dt==1?"/"+G(t):t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(t){p=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,1):this.Ff=nt(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,2):this.Ff=nt(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,3):this.Ff=nt(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};$(gt,ft);var mt=function(){gt.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return ht(e,this.objId,this.scope)},set:function(t){var i,n;n=[],"string"==typeof(i=t)&&(n=function(t,e,i){i||(i=1);for(var n,r=[];n=e.exec(t);)r.push(n[i]);return r}(i,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();-1!==e.indexOf(t)&&(e.splice(e.indexOf(t),1),!1!==i););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,18):this.Ff=nt(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=it(this.Ff,19):this.Ff=nt(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=it(this.Ff,20),e.sort()):this.Ff=nt(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,22):this.Ff=nt(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,23):this.Ff=nt(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,27):this.Ff=nt(this.Ff,27)}}),this.hasAppearanceStream=!1};$(mt,gt);var bt=function(){mt.call(this),this.fontName="helvetica",this.combo=!1};$(bt,mt);var vt=function(){bt.call(this),this.combo=!0};$(vt,bt);var yt=function(){vt.call(this),this.edit=!0};$(yt,vt);var Dt=function(){gt.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,15):this.Ff=nt(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,16):this.Ff=nt(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,17):this.Ff=nt(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,26):this.Ff=nt(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var i,n=[];for(i in n.push("<<"),e)n.push("/"+i+" ("+U(t(e[i]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===n(t)&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){var i=null==e?"":e.toString();"/"===i.substr(0,1)&&(i=i.substr(1)),t="/"+G(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+G(e)}})};$(Dt,gt);var xt=function(){Dt.call(this),this.pushButton=!0};$(xt,Dt);var wt=function(){Dt.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};$(wt,Dt);var _t=function(){var t,e;gt.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var i,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 e,i=[];for(e in i.push("<<"),r)i.push("/"+e+" ("+U(t(r[e]))+")");return i.push(">>"),i.join("\n")},set:function(t){"object"===n(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 i},set:function(t){var e=null==t?"":t.toString();"/"===e.substr(0,1)&&(e=e.substr(1)),i="/"+G(e)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(t){var e=null==t?"":t.toString();"/"===e.substr(0,1)&&(e=e.substr(1)),i="/"+G(e)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ct.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};$(_t,gt),wt.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 e in this.Kids)if(this.Kids.hasOwnProperty(e)){var i=this.Kids[e];i.appearanceStreamContent=t.createAppearanceStream(i.optionName),i.caption=t.getCA()}},wt.prototype.createOption=function(t){var e=new _t;return e.Parent=this,e.optionName=t,this.Kids.push(e),Lt.call(this.scope,e),e};var Ft=function(){Dt.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ct.CheckBox.createAppearanceStream()};$(Ft,Dt);var At=function(){gt.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,13):this.Ff=nt(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,21):this.Ff=nt(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,23):this.Ff=nt(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,24):this.Ff=nt(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,25):this.Ff=nt(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,26):this.Ff=nt(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};$(At,gt);var St=function(){At.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(et(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=it(this.Ff,14):this.Ff=nt(this.Ff,14)}}),this.password=!0};$(St,At);var Ct={CheckBox:{createAppearanceStream:function(){return{N:{On:Ct.CheckBox.YesNormal},D:{On:Ct.CheckBox.YesPushDown,Off:Ct.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=J(t);e.scope=t.scope;var i=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color),o=st(t,t.caption);return i.push("0.749023 g"),i.push("0 0 "+Y(Ct.internal.getWidth(t))+" "+Y(Ct.internal.getHeight(t))+" re"),i.push("f"),i.push("BMC"),i.push("q"),i.push("0 0 1 rg"),i.push("/"+n+" "+Y(o.fontSize)+" Tf "+r),i.push("BT"),i.push(o.text),i.push("ET"),i.push("Q"),i.push("EMC"),e.stream=i.join("\n"),e},YesNormal:function(t){var e=J(t);e.scope=t.scope;var i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),r=[],o=Ct.internal.getHeight(t),s=Ct.internal.getWidth(t),a=st(t,t.caption);return r.push("1 g"),r.push("0 0 "+Y(s)+" "+Y(o)+" re"),r.push("f"),r.push("q"),r.push("0 0 1 rg"),r.push("0 0 "+Y(s-1)+" "+Y(o-1)+" re"),r.push("W"),r.push("n"),r.push("0 g"),r.push("BT"),r.push("/"+i+" "+Y(a.fontSize)+" Tf "+n),r.push(a.text),r.push("ET"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=J(t);e.scope=t.scope;var i=[];return i.push("0.749023 g"),i.push("0 0 "+Y(Ct.internal.getWidth(t))+" "+Y(Ct.internal.getHeight(t))+" re"),i.push("f"),e.stream=i.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:Ct.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=Ct.RadioButton.Circle.YesNormal,e.D[t]=Ct.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=J(t);e.scope=t.scope;var i=[],n=Ct.internal.getWidth(t)<=Ct.internal.getHeight(t)?Ct.internal.getWidth(t)/4:Ct.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var r=Ct.internal.Bezier_C,o=Number((n*r).toFixed(5));return i.push("q"),i.push("1 0 0 1 "+X(Ct.internal.getWidth(t)/2)+" "+X(Ct.internal.getHeight(t)/2)+" cm"),i.push(n+" 0 m"),i.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),i.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),i.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),i.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e},YesPushDown:function(t){var e=J(t);e.scope=t.scope;var i=[],n=Ct.internal.getWidth(t)<=Ct.internal.getHeight(t)?Ct.internal.getWidth(t)/4:Ct.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var r=Number((2*n).toFixed(5)),o=Number((r*Ct.internal.Bezier_C).toFixed(5)),s=Number((n*Ct.internal.Bezier_C).toFixed(5));return i.push("0.749023 g"),i.push("q"),i.push("1 0 0 1 "+X(Ct.internal.getWidth(t)/2)+" "+X(Ct.internal.getHeight(t)/2)+" cm"),i.push(r+" 0 m"),i.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),i.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),i.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),i.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),i.push("f"),i.push("Q"),i.push("0 g"),i.push("q"),i.push("1 0 0 1 "+X(Ct.internal.getWidth(t)/2)+" "+X(Ct.internal.getHeight(t)/2)+" cm"),i.push(n+" 0 m"),i.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),i.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),i.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),i.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=J(t);e.scope=t.scope;var i=[],n=Ct.internal.getWidth(t)<=Ct.internal.getHeight(t)?Ct.internal.getWidth(t)/4:Ct.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var r=Number((2*n).toFixed(5)),o=Number((r*Ct.internal.Bezier_C).toFixed(5));return i.push("0.749023 g"),i.push("q"),i.push("1 0 0 1 "+X(Ct.internal.getWidth(t)/2)+" "+X(Ct.internal.getHeight(t)/2)+" cm"),i.push(r+" 0 m"),i.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),i.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),i.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),i.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:Ct.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=Ct.RadioButton.Cross.YesNormal,e.D[t]=Ct.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=J(t);e.scope=t.scope;var i=[],n=Ct.internal.calculateCross(t);return i.push("q"),i.push("1 1 "+Y(Ct.internal.getWidth(t)-2)+" "+Y(Ct.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(Y(n.x1.x)+" "+Y(n.x1.y)+" m"),i.push(Y(n.x2.x)+" "+Y(n.x2.y)+" l"),i.push(Y(n.x4.x)+" "+Y(n.x4.y)+" m"),i.push(Y(n.x3.x)+" "+Y(n.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join("\n"),e},YesPushDown:function(t){var e=J(t);e.scope=t.scope;var i=Ct.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+Y(Ct.internal.getWidth(t))+" "+Y(Ct.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+Y(Ct.internal.getWidth(t)-2)+" "+Y(Ct.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(Y(i.x1.x)+" "+Y(i.x1.y)+" m"),n.push(Y(i.x2.x)+" "+Y(i.x2.y)+" l"),n.push(Y(i.x4.x)+" "+Y(i.x4.y)+" m"),n.push(Y(i.x3.x)+" "+Y(i.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=J(t);e.scope=t.scope;var i=[];return i.push("0.749023 g"),i.push("0 0 "+Y(Ct.internal.getWidth(t))+" "+Y(Ct.internal.getHeight(t))+" re"),i.push("f"),e.stream=i.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+i}};Ct.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=Ct.internal.getWidth(t),i=Ct.internal.getHeight(t),n=Math.min(e,i);return{x1:{x:(e-n)/2,y:(i-n)/2+n},x2:{x:(e-n)/2+n,y:(i-n)/2},x3:{x:(e-n)/2,y:(i-n)/2},x4:{x:(e-n)/2+n,y:(i-n)/2+n}}}},Ct.internal.getWidth=function(t){var e=0;return"object"===n(t)&&(e=K(t.Rect[2])),e},Ct.internal.getHeight=function(t){var e=0;return"object"===n(t)&&(e=K(t.Rect[3])),e};var Lt=H.addField=function(t){if(function(t,e){if(e.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(gt.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(lt)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");W=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new pt,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",(function(){var e;(e=t).internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})),t.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];n.objId=void 0,n.hasAnnotation&&ut(n,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(e){!function(t,e){var i=!t;for(var r in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(r)){var o=t[r],s=[],a=o.Rect;if(o.Rect&&(o.Rect=rt(o.Rect,e)),e.internal.newObjectDeferredBegin(o.objId,!0),o.DA=Ct.createDefaultAppearanceStream(o),"object"===n(o)&&"function"==typeof o.getKeyValueListForStream&&(s=o.getKeyValueListForStream()),o.Rect=a,o.hasAppearanceStream&&!o.appearanceStreamContent){var l=ot(o);s.push({key:"AP",value:"<</N "+l+">>"}),e.internal.acroformPlugin.xForms.push(l)}if(o.appearanceStreamContent){var u="";for(var h in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(h)){var c=o.appearanceStreamContent[h];if(u+="/"+h+" ",u+="<<",Object.keys(c).length>=1||Array.isArray(c)){for(var r in c)if(c.hasOwnProperty(r)){var f=c[r];"function"==typeof f&&(f=f.call(e,o)),u+="/"+r+" "+f+" ",e.internal.acroformPlugin.xForms.indexOf(f)>=0||e.internal.acroformPlugin.xForms.push(f)}}else"function"==typeof(f=c)&&(f=f.call(e,o)),u+="/"+r+" "+f,e.internal.acroformPlugin.xForms.indexOf(f)>=0||e.internal.acroformPlugin.xForms.push(f);u+=">>"}s.push({key:"AP",value:"<<\n"+u+">>"})}e.internal.putStream({additionalKeyValues:s,objectId:o.objId}),e.internal.out("endobj")}i&&function(t,e){for(var i in t)if(t.hasOwnProperty(i)){var r=i,o=t[i];e.internal.newObjectDeferredBegin(o.objId,!0),"object"===n(o)&&"function"==typeof o.putStream&&o.putStream(),delete t[r]}}(e.internal.acroformPlugin.xForms,e)}(e,t)})),t.internal.acroformPlugin.isInitialized=!0}}(this,t),!(t instanceof gt))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};H.AcroFormChoiceField=mt,H.AcroFormListBox=bt,H.AcroFormComboBox=vt,H.AcroFormEditBox=yt,H.AcroFormButton=Dt,H.AcroFormPushButton=xt,H.AcroFormRadioButton=wt,H.AcroFormCheckBox=Ft,H.AcroFormTextField=At,H.AcroFormPasswordField=St,H.AcroFormAppearance=Ct,H.AcroForm={ChoiceField:mt,ListBox:bt,ComboBox:vt,EditBox:yt,Button:Dt,PushButton:xt,RadioButton:wt,CheckBox:Ft,TextField:At,PasswordField:St,Appearance:Ct},q.AcroForm={ChoiceField:mt,ListBox:bt,ComboBox:vt,EditBox:yt,Button:Dt,PushButton:xt,RadioButton:wt,CheckBox:Ft,TextField:At,PasswordField:St,Appearance:Ct};q.AcroForm;function kt(t){return t.reduce((function(t,e,i){return t[e]=i,t}),{})}!function(t){var e="addImage_";t.__addimage__={};var i="UNKNOWN",r={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]]},o=t.__addimage__.getImageFileTypeByImageData=function(t,e){var n,o,s,a,l,u=i;if("RGBA"===(e=e||i)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(F(t))for(l in r)for(s=r[l],n=0;n<s.length;n+=1){for(a=!0,o=0;o<s[n].length;o+=1)if(void 0!==s[n][o]&&s[n][o]!==t[o]){a=!1;break}if(!0===a){u=l;break}}else for(l in r)for(s=r[l],n=0;n<s.length;n+=1){for(a=!0,o=0;o<s[n].length;o+=1)if(void 0!==s[n][o]&&s[n][o]!==t.charCodeAt(o)){a=!1;break}if(!0===a){u=l;break}}return u===i&&e!==i&&(u=e),u},s=function t(e){for(var i=this.internal.write,n=this.internal.putStream,r=(0,this.internal.getFilters)();-1!==r.indexOf("FlateEncode");)r.splice(r.indexOf("FlateEncode"),1);e.objectId=this.internal.newObject();var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:e.width}),o.push({key:"Height",value:e.height}),e.colorSpace===y.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(e.palette.length/3-1)+" "+("sMask"in e&&void 0!==e.sMask?e.objectId+2:e.objectId+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+e.colorSpace}),e.colorSpace===y.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:e.bitsPerComponent}),"decodeParameters"in e&&void 0!==e.decodeParameters&&o.push({key:"DecodeParms",value:"<<"+e.decodeParameters+">>"}),"transparency"in e&&Array.isArray(e.transparency)&&e.transparency.length>0){for(var s="",a=0,l=e.transparency.length;a<l;a++)s+=e.transparency[a]+" "+e.transparency[a]+" ";o.push({key:"Mask",value:"["+s+"]"})}void 0!==e.sMask&&o.push({key:"SMask",value:e.objectId+1+" 0 R"});var u=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:o,alreadyAppliedFilters:u,objectId:e.objectId}),i("endobj"),"sMask"in e&&void 0!==e.sMask){var h,c=null!==(h=e.sMaskBitsPerComponent)&&void 0!==h?h:e.bitsPerComponent,f={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:c,data:e.sMask};"filter"in e&&(f.decodeParameters="/Predictor ".concat(e.predictor," /Colors 1 /BitsPerComponent ").concat(c," /Columns ").concat(e.width),f.filter=e.filter),t.call(this,f)}if(e.colorSpace===y.INDEXED){var d=this.internal.newObject();n({data:S(new Uint8Array(e.palette)),objectId:d}),i("endobj")}},a=function(){var t=this.internal.collections[e+"images"];for(var i in t)s.call(this,t[i])},l=function(){var t,i=this.internal.collections[e+"images"],n=this.internal.write;for(var r in i)n("/I"+(t=i[r]).index,t.objectId,"0","R")},u=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",l))},h=function(){var t=this.internal.collections[e+"images"];return u.call(this),t},c=function(){return Object.keys(this.internal.collections[e+"images"]).length},f=function(e){return"function"==typeof t["process"+e.toUpperCase()]},d=function(t){return"object"===n(t)&&1===t.nodeType},p=function(e,i){if("IMG"===e.nodeName&&e.hasAttribute("src")){var n=""+e.getAttribute("src");if(0===n.indexOf("data:image/"))return m(unescape(n).split("base64,").pop());var r=t.loadFile(n,!0);if(void 0!==r)return r}if("CANVAS"===e.nodeName){if(0===e.width||0===e.height)throw new Error("Given canvas must have data. Canvas width: "+e.width+", height: "+e.height);var o;switch(i){case"PNG":o="image/png";break;case"WEBP":o="image/webp";break;default:o="image/jpeg"}return m(e.toDataURL(o,1).split("base64,").pop())}},g=function(t){var i=this.internal.collections[e+"images"];if(i)for(var n in i)if(t===i[n].alias)return i[n]},b=function(t,e,i){return t||e||(t=-96,e=-96),t<0&&(t=-1*i.width*72/t/this.internal.scaleFactor),e<0&&(e=-1*i.height*72/e/this.internal.scaleFactor),0===t&&(t=e*i.width/i.height),0===e&&(e=t*i.height/i.width),[t,e]},v=function(t,e,i,n,r,o){var s=b.call(this,i,n,r),a=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=h.call(this);if(i=s[0],n=s[1],u[r.index]=r,o){o*=Math.PI/180;var c=Math.cos(o),f=Math.sin(o),d=function(t){return t.toFixed(4)},p=[d(c),d(f),d(-1*f),d(c),0,0,"cm"]}this.internal.write("q"),o?(this.internal.write([1,"0","0",1,a(t),l(e+n),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([a(i),"0","0",a(n),"0","0","cm"].join(" "))):this.internal.write([a(i),"0","0",a(n),a(t),l(e+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+r.index+" Do"),this.internal.write("Q")},y=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 D=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},x=t.__addimage__.sHashCode=function(t){var e,i,n=0;if("string"==typeof t)for(i=t.length,e=0;e<i;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;else if(F(t))for(i=t.byteLength/2,e=0;e<i;e++)n=(n<<5)-n+t[e],n|=0;return n},w=t.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(e=!1),e},_=t.__addimage__.extractImageFromDataUrl=function(t){if(null==t)return null;if(!(t=t.trim()).startsWith("data:"))return null;var e=t.indexOf(",");return e<0?null:t.substring(0,e).trim().endsWith("base64")?t.substring(e+1):null};t.__addimage__.isArrayBuffer=function(t){return t instanceof ArrayBuffer};var F=t.__addimage__.isArrayBufferView=function(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},A=t.__addimage__.binaryStringToUint8Array=function(t){for(var e=t.length,i=new Uint8Array(e),n=0;n<e;n++)i[n]=t.charCodeAt(n);return i},S=t.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",i=F(t)?t:new Uint8Array(t),n=0;n<i.length;n+=8192)e+=String.fromCharCode.apply(null,i.subarray(n,n+8192));return e};t.addImage=function(){var t,e,r,o,s,a,l,h,c;if("number"==typeof arguments[1]?(e=i,r=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],l=arguments[5],h=arguments[6],c=arguments[7]):(e=arguments[1],r=arguments[2],o=arguments[3],s=arguments[4],a=arguments[5],l=arguments[6],h=arguments[7],c=arguments[8]),"object"===n(t=arguments[0])&&!d(t)&&"imageData"in t){var f=t;t=f.imageData,e=f.format||e||i,r=f.x||r||0,o=f.y||o||0,s=f.w||f.width||s,a=f.h||f.height||a,l=f.alias||l,h=f.compression||h,c=f.rotation||f.angle||c}var p=this.internal.getFilters();if(void 0===h&&-1!==p.indexOf("FlateEncode")&&(h="SLOW"),isNaN(r)||isNaN(o))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var g=C.call(this,t,e,l,h);return v.call(this,r,o,s,a,g,c),this};var C=function(e,n,r,s){var a,l,u;if("string"==typeof e&&o(e)===i){e=unescape(e);var h=L(e,!1);(""!==h||void 0!==(h=t.loadFile(e,!0)))&&(e=h)}if(d(e)&&(e=p(e,n)),n=o(e,n),!f(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=r)||0===u.length)&&(r=function(t){return"string"==typeof t||F(t)?x(t):F(t.data)?x(t.data):null}(e)),(a=g.call(this,r))||(e instanceof Uint8Array||"RGBA"===n||(l=e,e=A(e)),a=this["process"+n.toUpperCase()](e,c.call(this),r,function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:D.NONE}(s),l)),!a)throw new Error("An unknown error occurred whilst processing the image.");return a},L=t.__addimage__.convertBase64ToBinaryString=function(t,e){e="boolean"!=typeof e||e;var i,n="";if("string"==typeof t){var r;i=null!==(r=_(t))&&void 0!==r?r:t;try{n=m(i)}catch(o){if(e)throw w(i)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+o.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};t.getImageProperties=function(e){var n,r,s="";if(d(e)&&(e=p(e)),"string"==typeof e&&o(e)===i&&(""===(s=L(e,!1))&&(s=t.loadFile(e)||""),e=s),r=o(e),!f(r))throw new Error("addImage does not support files of type '"+r+"', please ensure that a plugin for '"+r+"' support is added.");if(e instanceof Uint8Array||(e=A(e)),!(n=this["process"+r.toUpperCase()](e)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=r,n}}(q.API),function(t){var e=function(t){if(void 0!==t&&""!=t)return!0};q.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var i,n,r,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,a=this.internal.getPageInfoByObjId(t.objId),l=t.pageContext.annotations,u=!1,h=0;h<l.length&&!u;h++)switch((i=l[h]).type){case"link":(e(i.options.url)||e(i.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var c=0;c<l.length;c++){i=l[c];var f=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),b=i.title||"Note";r="<</Type /Annot /Subtype /Text "+(n="/Rect ["+o(i.bounds.x)+" "+s(i.bounds.y+i.bounds.h)+" "+o(i.bounds.x+i.bounds.w)+" "+s(i.bounds.y)+"] ")+"/Contents ("+f(m(i.contents))+")",r+=" /Popup "+g.objId+" 0 R",r+=" /P "+a.objId+" 0 R",r+=" /T ("+f(m(b))+") >>",p.content=r;var v=p.objId+" 0 R";r="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+o(i.bounds.x+30)+" "+s(i.bounds.y+i.bounds.h)+" "+o(i.bounds.x+i.bounds.w+30)+" "+s(i.bounds.y)+"] ")+" /Parent "+v,i.open&&(r+=" /Open true"),r+=" >>",g.content=r,this.internal.write(p.objId,"0 R",g.objId,"0 R");break;case"freetext":n="/Rect ["+o(i.bounds.x)+" "+s(i.bounds.y)+" "+o(i.bounds.x+i.bounds.w)+" "+s(i.bounds.y+i.bounds.h)+"] ";var y=i.color||"#000000";r="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+f(d(i.contents))+")",r+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",r+=" /Border [0 0 0]",r+=" >>",this.internal.write(r);break;case"link":if(i.options.name){var D=this.annotations._nameMap[i.options.name];i.options.pageNumber=D.page,i.options.top=D.y}else i.options.top||(i.options.top=0);if(n="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",r="",i.options.url)r="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(i.options.url))+") >>";else if(i.options.pageNumber)switch(r="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":r+=" /Fit]";break;case"FitH":r+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,r+=" /FitV "+i.options.left+"]";break;default:var x=s(i.options.top);i.options.left=i.options.left||0,void 0===i.options.zoom&&(i.options.zoom=0),r+=" /XYZ "+i.options.left+" "+x+" "+i.options.zoom+"]"}""!=r&&(r+=" >>",this.internal.write(r))}}this.internal.write("]")}}]),t.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},t.link=function(t,e,i,n,r){var o=this.internal.getCurrentPageInfo(),s=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:s(t),y:a(e),w:s(t+i),h:a(e+n)},options:r,type:"link"})},t.textWithLink=function(t,e,i,n){var r,o,s=this.getTextWidth(t),a=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){o=n.maxWidth;var l=this.splitTextToSize(t,o).length;r=Math.ceil(a*l)}else o=s,r=a;return this.text(t,e,i,n),i+=.2*a,"center"===n.align&&(e-=s/2),"right"===n.align&&(e-=s),this.link(e,i-a,o,r,n),s},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor}}(q.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},i={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},r=[1570,1571,1573,1575];t.__arabicParser__={};var o=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},s=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},a=t.__arabicParser__.isArabicEndLetter=function(t){return s(t)&&o(t)&&e[t.charCodeAt(0)].length<=2},l=t.__arabicParser__.isArabicAlfLetter=function(t){return s(t)&&r.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return s(t)&&o(t)&&e[t.charCodeAt(0)].length>=1};var u=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return s(t)&&o(t)&&e[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return s(t)&&o(t)&&e[t.charCodeAt(0)].length>=3};var h=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return s(t)&&o(t)&&4==e[t.charCodeAt(0)].length},c=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=i,r="",o=0;for(e=0;e<t.length;e+=1)void 0!==n[t.charCodeAt(e)]?(o++,"number"==typeof(n=n[t.charCodeAt(e)])&&(r+=String.fromCharCode(n),n=i,o=0),e===t.length-1&&(n=i,r+=t.charAt(e-(o-1)),e-=o-1,o=0)):(n=i,r+=t.charAt(e-o),e-=o,o=0);return r};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==n[t.charCodeAt(0)]};var f=t.__arabicParser__.getCorrectForm=function(t,e,i){return s(t)?!1===o(t)?-1:!u(t)||!s(e)&&!s(i)||!s(i)&&a(e)||a(t)&&!s(e)||a(t)&&l(e)||a(t)&&a(e)?0:h(t)&&s(e)&&!a(e)&&s(i)&&u(i)?3:a(t)||!s(i)?1:2:-1},d=function(t){var i=0,n=0,r=0,o="",a="",l="",u=(t=t||"").split("\\s+"),h=[];for(i=0;i<u.length;i+=1){for(h.push(""),n=0;n<u[i].length;n+=1)o=u[i][n],a=u[i][n-1],l=u[i][n+1],s(o)?(r=f(o,a,l),h[i]+=-1!==r?String.fromCharCode(e[o.charCodeAt(0)][r]):o):h[i]+=o;h[i]=c(h[i])}return h.join(" ")},p=t.__arabicParser__.processArabic=t.processArabic=function(){var t,e="string"==typeof arguments[0]?arguments[0]:arguments[0].text,i=[];if(Array.isArray(e)){var n=0;for(i=[],n=0;n<e.length;n+=1)Array.isArray(e[n])?i.push([d(e[n][0]),e[n][1],e[n][2]]):i.push([d(e[n])]);t=i}else t=d(e);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",p])}(q.API),q.API.autoPrint=function(t){var e;return(t=t||{}).variant=t.variant||"non-conform","javascript"===t.variant?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",(function(){e=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 "+e+" 0 R")}))),this},function(t){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(t){i=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var r={};Object.defineProperty(this,"style",{get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,e){var i;if("2d"!==(t=t||"2d"))return null;for(i in e)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=e[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(q.API),function(t){var e={left:0,top:0,bottom:0,right:0},i=!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({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var e=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var i=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var r=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var o=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return o},set:function(t){o=t}});var s=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return s},set:function(t){s=t}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.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,e){r.call(this);var i=(e=e||{}).fontSize||this.getFontSize(),n=e.font||this.getFont(),o=e.scaleFactor||this.internal.scaleFactor,s=0,a=0,l=0,u=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)}var h=e.maxWidth;h>0?"string"==typeof t?t=this.splitTextToSize(t,h):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(u.splitTextToSize(e,h))}),[])):t=Array.isArray(t)?t:[t];for(var c=0;c<t.length;c++)s<(l=this.getStringUnitWidth(t[c],{font:n})*i)&&(s=l);return 0!==s&&(a=t.length),{w:s/=o,h:Math.max((a*i*this.getLineHeightFactor()-i*(this.getLineHeightFactor()-1))/o,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var t=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new s(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var a=t.cell=function(){var t;t=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var n=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,a=this.internal.__cell__.margins||e,l=this.internal.__cell__.tableHeaderRow,u=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+a.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=a.top,u&&l&&(this.printHeaderRow(t.lineNumber,!0),t.y+=l[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===i?"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,i,u,h,c){if(r.call(this),!u)throw new Error("No data for PDF table.");var f,d,p,g,m=[],b=[],v=[],y={},D={},x=[],w=[],_=(c=c||{}).autoSize||!1,F=!1!==c.printHeaders,A=c.css&&void 0!==c.css["font-size"]?16*c.css["font-size"]:c.fontSize||12,S=c.margins||Object.assign({width:this.getPageWidth()},e),C="number"==typeof c.padding?c.padding:3,L=c.headerBackgroundColor||"#c8c8c8",k=c.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=F,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=A,this.internal.__cell__.padding=C,this.internal.__cell__.headerBackgroundColor=L,this.internal.__cell__.headerTextColor=k,this.setFontSize(A),null==h)b=m=Object.keys(u[0]),v=m.map((function(){return"left"}));else if(Array.isArray(h)&&"object"===n(h[0]))for(m=h.map((function(t){return t.name})),b=h.map((function(t){return t.prompt||t.name||""})),v=h.map((function(t){return t.align||"left"})),f=0;f<h.length;f+=1)D[h[f].name]=.7499990551181103*h[f].width;else Array.isArray(h)&&"string"==typeof h[0]&&(b=m=h,v=m.map((function(){return"left"})));if(_||Array.isArray(h)&&"string"==typeof h[0])for(f=0;f<m.length;f+=1){for(y[g=m[f]]=u.map((function(t){return t[g]})),this.setFont(void 0,"bold"),x.push(this.getTextDimensions(b[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=y[g],this.setFont(void 0,"normal"),p=0;p<d.length;p+=1)x.push(this.getTextDimensions(d[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);D[g]=Math.max.apply(null,x)+C+C,x=[]}if(F){var P={};for(f=0;f<m.length;f+=1)P[m[f]]={},P[m[f]].text=b[f],P[m[f]].align=v[f];var N=l.call(this,P,D);w=m.map((function(e){return new s(t,i,D[e],N,P[e].text,void 0,P[e].align)})),this.setTableHeaderRow(w),this.printHeaderRow(1,!1)}var E=h.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(f=0;f<u.length;f+=1){"rowStart"in c&&c.rowStart instanceof Function&&c.rowStart({row:f,data:u[f]},this);var B=l.call(this,u[f],D);for(p=0;p<m.length;p+=1){var M=u[f][m[p]];"cellStart"in c&&c.cellStart instanceof Function&&c.cellStart({row:f,col:p,data:M},this),a.call(this,new s(t,i,D[m[p]],B,M,f+2,E[m[p]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=i,this};var l=function(t,e){var i=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,r=this.internal.scaleFactor;return Object.keys(t).map((function(n){var r=t[n];return this.splitTextToSize(r.hasOwnProperty("text")?r.text:r,e[n]-i-i)}),this).map((function(t){return this.getLineHeightFactor()*t.length*n/r+i+i}),this).reduce((function(t,e){return Math.max(t,e)}),0)};t.setTableHeaderRow=function(t){r.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var n;if(i=!0,"function"==typeof this.internal.__cell__.headerFunction){var o=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(o[0],o[1],o[2],o[3],void 0,-1)}this.setFont(void 0,"bold");for(var l=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){n=this.internal.__cell__.tableHeaderRow[u].clone(),e&&(n.y=this.internal.__cell__.margins.top||0,l.push(n)),n.lineNumber=t;var h=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),a.call(this,n),this.setTextColor(h)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,"normal"),i=!1}}(q.API);var Pt={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Nt=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Et=kt(Nt),Bt=[100,200,300,400,500,600,700,800,900],Mt=kt(Bt);function Ot(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),i=function(t){return Pt[t=t||"normal"]?t:"normal"}(t.style),n=function(t){return t?"number"==typeof t?t>=100&&t<=900&&t%100==0?t:400:/^\d00$/.test(t)?parseInt(t):"bold"===t?700:400:400}(t.weight),r=function(t){return"number"==typeof Et[t=t||"normal"]?t:"normal"}(t.stretch);return{family:e,style:i,weight:n,stretch:r,src:t.src||[],ref:t.ref||{name:e,style:[r,i,n].join(" ")}}}function It(t,e,i,n){var r;for(r=i;r>=0&&r<e.length;r+=n)if(t[e[r]])return t[e[r]];for(r=i;r>=0&&r<e.length;r-=n)if(t[e[r]])return t[e[r]]}var Tt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},jt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Rt(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function zt(t){return t.trimLeft()}function qt(t,e){for(var i=0;i<t.length;){if(t.charAt(i)===e)return[t.substring(0,i),t.substring(i+1)];i+=1}return null}function Ht(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===e?null:[e[0],t.substring(e[0].length)]}var Wt,Ut,Vt,Gt,Yt,Xt,$t=["times"];function Kt(t,e,i,n,o){var s=4,a=Zt;switch(o){case q.API.image_compression.FAST:s=1,a=Qt;break;case q.API.image_compression.MEDIUM:s=6,a=te;break;case q.API.image_compression.SLOW:s=9,a=ee}t=function(t,e,i,n){for(var r,o=t.length/e,s=new Uint8Array(t.length+o),a=[Jt,Qt,Zt,te,ee],l=0;l<o;l+=1){var u=l*e,h=t.subarray(u,u+e);if(n)s.set(n(h,i,r),u+l);else{for(var c=a.length,f=[],d=0;d<c;d+=1)f[d]=a[d](h,i,r);var p=ne(f.concat());s.set(f[p],u+l)}r=h}return s}(t,e,Math.ceil(i*n/8),a);var l=(0,r.$)(t,{level:s});return q.API.__addimage__.arrayBufferToBinaryString(l)}function Jt(t){var e=Array.apply([],t);return e.unshift(0),e}function Qt(t,e){var i=t.length,n=[];n[0]=1;for(var r=0;r<i;r+=1){var o=t[r-e]||0;n[r+1]=t[r]-o+256&255}return n}function Zt(t,e,i){var n=t.length,r=[];r[0]=2;for(var o=0;o<n;o+=1){var s=i&&i[o]||0;r[o+1]=t[o]-s+256&255}return r}function te(t,e,i){var n=t.length,r=[];r[0]=3;for(var o=0;o<n;o+=1){var s=t[o-e]||0,a=i&&i[o]||0;r[o+1]=t[o]+256-(s+a>>>1)&255}return r}function ee(t,e,i){var n=t.length,r=[];r[0]=4;for(var o=0;o<n;o+=1){var s=ie(t[o-e]||0,i&&i[o]||0,i&&i[o-e]||0);r[o+1]=t[o]-s+256&255}return r}function ie(t,e,i){if(t===e&&e===i)return t;var n=Math.abs(e-i),r=Math.abs(t-i),o=Math.abs(t+e-i-i);return n<=r&&n<=o?t:r<=o?e:i}function ne(t){var e=t.map((function(t){return t.reduce((function(t,e){return t+Math.abs(e)}),0)}));return e.indexOf(Math.min.apply(null,e))}function re(t,e,i){var n=e*i,r=Math.floor(n/8),o=16-(n-8*r+i),s=(1<<i)-1;return se(t,r)>>o&s}function oe(t,e,i,n){var r=i*n,o=Math.floor(r/8),s=16-(r-8*o+n),a=(1<<n)-1,l=(e&a)<<s;!function(t,e,i){if(e+1<t.byteLength)t.setUint16(e,i,!1);else{var n=i>>8&255;t.setUint8(e,n)}}(t,o,se(t,o)&~(a<<s)&65535|l)}function se(t,e){return e+1<t.byteLength?t.getUint16(e,!1):t.getUint8(e)<<8}function ae(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var i=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,r=t[e++],o=r>>7,s=1<<1+(7&r);t[e++],t[e++];var a=null,l=null;o&&(a=e,l=s,e+=3*s);var u=!0,h=[],c=0,f=null,d=0,p=null;for(this.width=i,this.height=n;u&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,p=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((C=t[e++])>=0))throw Error("Invalid block size");if(0===C)break;e+=C}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];c=t[e++]|t[e++]<<8,f=t[e++],1&g||(f=null),d=g>>2&7,e++;break;case 254:for(;;){if(!((C=t[e++])>=0))throw Error("Invalid block size");if(0===C)break;e+=C}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var m=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,v=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,D=t[e++],x=D>>6&1,w=1<<1+(7&D),_=a,F=l,A=!1;D>>7&&(A=!0,_=e,F=w,e+=3*w);var S=e;for(e++;;){var C;if(!((C=t[e++])>=0))throw Error("Invalid block size");if(0===C)break;e+=C}h.push({x:m,y:b,width:v,height:y,has_local_palette:A,palette_offset:_,palette_size:F,data_offset:S,data_length:e-S,transparent_index:f,interlaced:!!x,delay:c,disposal:d});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=h.length)throw new Error("Frame index out of range.");return h[t]},this.decodeAndBlitFrameBGRA=function(e,n){var r=this.frameInfo(e),o=r.width*r.height;if(o>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var s=new Uint8Array(o);le(t,r.data_offset,s,o);var a=r.palette_offset,l=r.transparent_index;null===l&&(l=256);var u=r.width,h=i-u,c=u,f=4*(r.y*i+r.x),d=4*((r.y+r.height)*i+r.x),p=f,g=4*h;!0===r.interlaced&&(g+=4*i*7);for(var m=8,b=0,v=s.length;b<v;++b){var y=s[b];if(0===c&&(c=u,(p+=g)>=d&&(g=4*h+4*i*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===l)p+=4;else{var D=t[a+3*y],x=t[a+3*y+1],w=t[a+3*y+2];n[p++]=w,n[p++]=x,n[p++]=D,n[p++]=255}--c}},this.decodeAndBlitFrameRGBA=function(e,n){var r=this.frameInfo(e),o=r.width*r.height;if(o>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var s=new Uint8Array(o);le(t,r.data_offset,s,o);var a=r.palette_offset,l=r.transparent_index;null===l&&(l=256);var u=r.width,h=i-u,c=u,f=4*(r.y*i+r.x),d=4*((r.y+r.height)*i+r.x),p=f,g=4*h;!0===r.interlaced&&(g+=4*i*7);for(var m=8,b=0,v=s.length;b<v;++b){var y=s[b];if(0===c&&(c=u,(p+=g)>=d&&(g=4*h+4*i*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===l)p+=4;else{var D=t[a+3*y],x=t[a+3*y+1],w=t[a+3*y+2];n[p++]=D,n[p++]=x,n[p++]=w,n[p++]=255}--c}}}function le(t,e,i,n){for(var r=t[e++],o=1<<r,s=o+1,a=s+1,l=r+1,u=(1<<l)-1,c=0,f=0,d=0,p=t[e++],g=new Int32Array(4096),m=null;;){for(;c<16&&0!==p;)f|=t[e++]<<c,c+=8,1===p?p=t[e++]:--p;if(c<l)break;var b=f&u;if(f>>=l,c-=l,b!==o){if(b===s)break;for(var v=b<a?b:m,y=0,D=v;D>o;)D=g[D]>>8,++y;var x=D;if(d+y+(v!==b?1:0)>n)return void h.log("Warning, gif stream longer than expected.");i[d++]=x;var w=d+=y;for(v!==b&&(i[d++]=x),D=v;y--;)D=g[D],i[--w]=255&D,D>>=8;null!==m&&a<4096&&(g[a++]=m<<8|x,a>=u+1&&l<12&&(++l,u=u<<1|1)),m=b}else a=s+1,u=(1<<(l=r+1))-1,m=null}return d!==n&&h.log("Warning, gif stream shorter than expected."),i}function ue(t){var e,i,n,r,o,s=Math.floor,a=new Array(64),l=new Array(64),u=new Array(64),h=new Array(64),c=new Array(65535),f=new Array(65535),d=new Array(64),p=new Array(64),g=[],m=0,b=7,v=new Array(64),y=new Array(64),D=new Array(64),x=new Array(256),w=new Array(2048),_=[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],A=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],C=[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],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],k=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],N=[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 E(t,e){for(var i=0,n=0,r=new Array,o=1;o<=16;o++){for(var s=1;s<=t[o];s++)r[e[n]]=[],r[e[n]][0]=i,r[e[n]][1]=o,n++,i++;i*=2}return r}function B(t){for(var e=t[0],i=t[1]-1;i>=0;)e&1<<i&&(m|=1<<b),i--,--b<0&&(255==m?(M(255),M(0)):M(m),b=7,m=0)}function M(t){g.push(t)}function O(t){M(t>>8&255),M(255&t)}function I(t,e,i,n,r){for(var o,s=r[0],a=r[240],l=function(t,e){var i,n,r,o,s,a,l,u,h,c,f=0;for(h=0;h<8;++h){i=t[f],n=t[f+1],r=t[f+2],o=t[f+3],s=t[f+4],a=t[f+5],l=t[f+6];var p=i+(u=t[f+7]),g=i-u,m=n+l,b=n-l,v=r+a,y=r-a,D=o+s,x=o-s,w=p+D,_=p-D,F=m+v,A=m-v;t[f]=w+F,t[f+4]=w-F;var S=.707106781*(A+_);t[f+2]=_+S,t[f+6]=_-S;var C=.382683433*((w=x+y)-(A=b+g)),L=.5411961*w+C,k=1.306562965*A+C,P=.707106781*(F=y+b),N=g+P,E=g-P;t[f+5]=E+L,t[f+3]=E-L,t[f+1]=N+k,t[f+7]=N-k,f+=8}for(f=0,h=0;h<8;++h){i=t[f],n=t[f+8],r=t[f+16],o=t[f+24],s=t[f+32],a=t[f+40],l=t[f+48];var B=i+(u=t[f+56]),M=i-u,O=n+l,I=n-l,T=r+a,j=r-a,R=o+s,z=o-s,q=B+R,H=B-R,W=O+T,U=O-T;t[f]=q+W,t[f+32]=q-W;var V=.707106781*(U+H);t[f+16]=H+V,t[f+48]=H-V;var G=.382683433*((q=z+j)-(U=I+M)),Y=.5411961*q+G,X=1.306562965*U+G,$=.707106781*(W=j+I),K=M+$,J=M-$;t[f+40]=J+Y,t[f+24]=J-Y,t[f+8]=K+X,t[f+56]=K-X,f++}for(h=0;h<64;++h)c=t[h]*e[h],d[h]=c>0?c+.5|0:c-.5|0;return d}(t,e),u=0;u<64;++u)p[_[u]]=l[u];var h=p[0]-i;i=p[0],0==h?B(n[0]):(B(n[f[o=32767+h]]),B(c[o]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return B(s),i;for(var m,b=1;b<=g;){for(var v=b;0==p[b]&&b<=g;)++b;var y=b-v;if(y>=16){m=y>>4;for(var D=1;D<=m;++D)B(a);y&=15}o=32767+p[b],B(r[(y<<4)+f[o]]),B(c[o]),b++}return 63!=g&&B(s),i}function T(t){t=Math.min(Math.max(t,1),100),o!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],i=0;i<64;i++){var n=s((e[i]*t+50)/100);n=Math.min(Math.max(n,1),255),a[_[i]]=n}for(var r=[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],o=0;o<64;o++){var c=s((r[o]*t+50)/100);c=Math.min(Math.max(c,1),255),l[_[o]]=c}for(var f=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,p=0;p<8;p++)for(var g=0;g<8;g++)u[d]=1/(a[_[d]]*f[p]*f[g]*8),h[d]=1/(l[_[d]]*f[p]*f[g]*8),d++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),o=t)}this.encode=function(t,o){o&&T(o),g=new Array,m=0,b=7,O(65496),O(65504),O(16),M(74),M(70),M(73),M(70),M(0),M(1),M(1),M(0),O(1),O(1),M(0),M(0),function(){O(65499),O(132),M(0);for(var t=0;t<64;t++)M(a[t]);M(1);for(var e=0;e<64;e++)M(l[e])}(),function(t,e){O(65472),O(17),M(8),O(e),O(t),M(3),M(1),M(17),M(0),M(2),M(17),M(1),M(3),M(17),M(1)}(t.width,t.height),function(){O(65476),O(418),M(0);for(var t=0;t<16;t++)M(F[t+1]);for(var e=0;e<=11;e++)M(A[e]);M(16);for(var i=0;i<16;i++)M(S[i+1]);for(var n=0;n<=161;n++)M(C[n]);M(1);for(var r=0;r<16;r++)M(L[r+1]);for(var o=0;o<=11;o++)M(k[o]);M(17);for(var s=0;s<16;s++)M(P[s+1]);for(var a=0;a<=161;a++)M(N[a])}(),O(65498),O(12),M(3),M(1),M(0),M(2),M(17),M(3),M(17),M(0),M(63),M(0);var s=0,c=0,f=0;m=0,b=7,this.encode.displayName="_encode_";for(var d,p,x,_,E,j,R,z,q,H=t.data,W=t.width,U=t.height,V=4*W,G=0;G<U;){for(d=0;d<V;){for(E=V*G+d,R=-1,z=0,q=0;q<64;q++)j=E+(z=q>>3)*V+(R=4*(7&q)),G+z>=U&&(j-=V*(G+1+z-U)),d+R>=V&&(j-=d+R-V+4),p=H[j++],x=H[j++],_=H[j++],v[q]=(w[p]+w[x+256|0]+w[_+512|0]>>16)-128,y[q]=(w[p+768|0]+w[x+1024|0]+w[_+1280|0]>>16)-128,D[q]=(w[p+1280|0]+w[x+1536|0]+w[_+1792|0]>>16)-128;s=I(v,u,s,e,n),c=I(y,h,c,i,r),f=I(D,h,f,i,r),d+=32}G+=8}if(b>=0){var Y=[];Y[1]=b+1,Y[0]=(1<<b+1)-1,B(Y)}return O(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)x[e]=t(e)}(),e=E(F,A),i=E(L,k),n=E(S,C),r=E(P,N),function(){for(var t=1,e=2,i=1;i<=15;i++){for(var n=t;n<e;n++)f[32767+n]=i,c[32767+n]=[],c[32767+n][1]=i,c[32767+n][0]=n;for(var r=-(e-1);r<=-t;r++)f[32767+r]=i,c[32767+r]=[],c[32767+r][1]=i,c[32767+r][0]=e-1+r;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)w[t]=19595*t,w[t+256|0]=38470*t,w[t+512|0]=7471*t+32768,w[t+768|0]=-11059*t,w[t+1024|0]=-21709*t,w[t+1280|0]=32768*t+8421375,w[t+1536|0]=-27439*t,w[t+1792|0]=-5329*t}(),T(t)}function he(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ce(t){function e(t){if(!t)throw Error("assert :P")}function i(t,e,i){for(var n=0;4>n;n++)if(t[e+n]!=i.charCodeAt(n))return!0;return!1}function n(t,e,i,n,r){for(var o=0;o<r;o++)t[e+o]=i[n+o]}function r(t,e,i,n){for(var r=0;r<n;r++)t[e+r]=i}function o(t){return new Int32Array(t)}function s(t,e){for(var i=[],n=0;n<t;n++)i.push(new e);return i}function a(t,e){var i=[];return function t(i,n,r){for(var o=r[n],s=0;s<o&&(i.push(r.length>n+1?[]:new e),!(r.length<n+1));s++)t(i[s],n+1,r)}(i,0,t),i}var l=function(){var t=this;function l(t,e){for(var i=1<<e-1>>>0;t&i;)i>>>=1;return i?(t&i-1)+i:t}function u(t,i,n,r,o){e(!(r%n));do{t[i+(r-=n)]=o}while(0<r)}function h(t,i,n,r,s){if(e(2328>=s),512>=s)var a=o(512);else if(null==(a=o(s)))return 0;return function(t,i,n,r,s,a){var h,f,d=i,p=1<<n,g=o(16),m=o(16);for(e(0!=s),e(null!=r),e(null!=t),e(0<n),f=0;f<s;++f){if(15<r[f])return 0;++g[r[f]]}if(g[0]==s)return 0;for(m[1]=0,h=1;15>h;++h){if(g[h]>1<<h)return 0;m[h+1]=m[h]+g[h]}for(f=0;f<s;++f)h=r[f],0<r[f]&&(a[m[h]++]=f);if(1==m[15])return(r=new c).g=0,r.value=a[0],u(t,d,1,p,r),p;var b,v=-1,y=p-1,D=0,x=1,w=1,_=1<<n;for(f=0,h=1,s=2;h<=n;++h,s<<=1){if(x+=w<<=1,0>(w-=g[h]))return 0;for(;0<g[h];--g[h])(r=new c).g=h,r.value=a[f++],u(t,d+D,s,_,r),D=l(D,h)}for(h=n+1,s=2;15>=h;++h,s<<=1){if(x+=w<<=1,0>(w-=g[h]))return 0;for(;0<g[h];--g[h]){if(r=new c,(D&y)!=v){for(d+=_,b=1<<(v=h)-n;15>v&&!(0>=(b-=g[v]));)++v,b<<=1;p+=_=1<<(b=v-n),t[i+(v=D&y)].g=b+n,t[i+v].value=d-i-v}r.g=h-n,r.value=a[f++],u(t,d+(D>>n),s,_,r),D=l(D,h)}}return x!=2*m[15]-1?0:p}(t,i,n,r,s,a)}function c(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=s(5,c),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(Ti,f)}function p(t,i,n,r){e(null!=t),e(null!=i),e(2147483648>r),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=i,t.pa=n,t.Jd=i,t.Yc=n+r,t.Zc=4<=r?n+r-4+1:n,S(t)}function g(t,e){for(var i=0;0<e--;)i|=L(t,128)<<e;return i}function m(t,e){var i=g(t,e);return C(t)?-i:i}function b(t,i,n,r){var o,s=0;for(e(null!=t),e(null!=i),e(4294967288>r),t.Sb=r,t.Ra=0,t.u=0,t.h=0,4<r&&(r=4),o=0;o<r;++o)s+=i[n+o]<<8*o;t.Ra=s,t.bb=r,t.oa=i,t.pa=n}function v(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<zi-8>>>0,++t.bb,t.u-=8;_(t)&&(t.h=1,t.u=0)}function y(t,i){if(e(0<=i),!t.h&&i<=Ri){var n=w(t)&ji[i];return t.u+=i,v(t),n}return t.h=1,t.u=0}function D(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function x(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function w(t){return t.Ra>>>(t.u&zi-1)>>>0}function _(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>zi}function F(t,e){t.u=e,t.h=_(t)}function A(t){t.u>=qi&&(e(t.u>=qi),v(t))}function S(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(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 C(t){return g(t,1)}function L(t,e){var i=t.Ca;0>t.b&&S(t);var n=t.b,r=i*e>>>8,o=(t.I>>>n>r)+0;for(o?(i-=r,t.I-=r+1<<n>>>0):i=r+1,n=i,r=0;256<=n;)r+=8,n>>=8;return n=7^r+Hi[n],t.b-=n,t.Ca=(i<<n)-1,o}function k(t,e,i){t[e+0]=i>>24&255,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i}function P(t,e){return t[e+0]|t[e+1]<<8}function N(t,e){return P(t,e)|t[e+2]<<16}function E(t,e){return P(t,e)|P(t,e+2)<<16}function B(t,i){var n=1<<i;return e(null!=t),e(0<i),t.X=o(n),null==t.X?0:(t.Mb=32-i,t.Xa=i,1)}function M(t,i){e(null!=t),e(null!=i),e(t.Xa==i.Xa),n(i.X,0,t.X,0,1<<i.Xa)}function O(){this.X=[],this.Xa=this.Mb=0}function I(t,i,n,r){e(null!=n),e(null!=r);var o=n[0],s=r[0];return 0==o&&(o=(t*s+i/2)/i),0==s&&(s=(i*o+t/2)/t),0>=o||0>=s?0:(n[0]=o,r[0]=s,1)}function T(t,e){return t+(1<<e)-1>>>e}function j(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function R(e,i){t[i]=function(i,n,r,o,s,a,l){var u;for(u=0;u<s;++u){var h=t[e](a[l+u-1],r,o+u);a[l+u]=j(i[n+u],h)}}}function z(){this.ud=this.hd=this.jd=0}function q(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function H(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function W(t,e){return H(t+(t-e+.5>>1))}function U(t,e,i){return Math.abs(e-i)-Math.abs(t-i)}function V(t,e,i,n,r,o,s){for(n=o[s-1],i=0;i<r;++i)o[s+i]=n=j(t[e+i],n)}function G(t,e,i,n,r){var o;for(o=0;o<i;++o){var s=t[e+o],a=s>>8&255,l=16711935&(l=(l=16711935&s)+((a<<16)+a));n[r+o]=(4278255360&s)+l>>>0}}function Y(t,e){e.jd=255&t,e.hd=t>>8&255,e.ud=t>>16&255}function X(t,e,i,n,r,o){var s;for(s=0;s<n;++s){var a=e[i+s],l=a>>>8,u=a,h=255&(h=(h=a>>>16)+((t.jd<<24>>24)*(l<<24>>24)>>>5));u=255&(u=(u+=(t.hd<<24>>24)*(l<<24>>24)>>>5)+((t.ud<<24>>24)*(h<<24>>24)>>>5)),r[o+s]=(4278255360&a)+(h<<16)+u}}function $(e,i,n,r,o){t[i]=function(t,e,i,n,s,a,l,u,h){for(n=l;n<u;++n)for(l=0;l<h;++l)s[a++]=o(i[r(t[e++])])},t[e]=function(e,i,s,a,l,u,h){var c=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>c)for(e=(1<<e.b)-1,p=(1<<c)-1;i<s;++i){var g,m=0;for(g=0;g<f;++g)g&e||(m=r(a[l++])),u[h++]=o(d[m&p]),m>>=c}else t["VP8LMapColor"+n](a,l,d,p,u,h,i,s,f)}}function K(t,e,i,n,r){for(i=e+i;e<i;){var o=t[e++];n[r++]=o>>16&255,n[r++]=o>>8&255,n[r++]=255&o}}function J(t,e,i,n,r){for(i=e+i;e<i;){var o=t[e++];n[r++]=o>>16&255,n[r++]=o>>8&255,n[r++]=255&o,n[r++]=o>>24&255}}function Q(t,e,i,n,r){for(i=e+i;e<i;){var o=(s=t[e++])>>16&240|s>>12&15,s=240&s|s>>28&15;n[r++]=o,n[r++]=s}}function Z(t,e,i,n,r){for(i=e+i;e<i;){var o=(s=t[e++])>>16&248|s>>13&7,s=s>>5&224|s>>3&31;n[r++]=o,n[r++]=s}}function tt(t,e,i,n,r){for(i=e+i;e<i;){var o=t[e++];n[r++]=255&o,n[r++]=o>>8&255,n[r++]=o>>16&255}}function et(t,e,i,r,o,s){if(0==s)for(i=e+i;e<i;)k(r,((s=t[e++])[0]>>24|s[1]>>8&65280|s[2]<<8&16711680|s[3]<<24)>>>0),o+=32;else n(r,o,t,e,i)}function it(e,i){t[i][0]=t[e+"0"],t[i][1]=t[e+"1"],t[i][2]=t[e+"2"],t[i][3]=t[e+"3"],t[i][4]=t[e+"4"],t[i][5]=t[e+"5"],t[i][6]=t[e+"6"],t[i][7]=t[e+"7"],t[i][8]=t[e+"8"],t[i][9]=t[e+"9"],t[i][10]=t[e+"10"],t[i][11]=t[e+"11"],t[i][12]=t[e+"12"],t[i][13]=t[e+"13"],t[i][14]=t[e+"0"],t[i][15]=t[e+"0"]}function nt(t){return t==Hn||t==Wn||t==Un||t==Vn}function rt(){this.eb=[],this.size=this.A=this.fb=0}function ot(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function st(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new rt,this.f.kb=new ot,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function lt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ht(t,e){var i=t.T,r=e.ba.f.RGBA,o=r.eb,s=r.fb+t.ka*r.A,a=mr[e.ba.S],l=t.y,u=t.O,h=t.f,c=t.N,f=t.ea,d=t.W,p=e.cc,g=e.dc,m=e.Mc,b=e.Nc,v=t.ka,y=t.ka+t.T,D=t.U,x=D+1>>1;for(0==v?a(l,u,null,null,h,c,f,d,h,c,f,d,o,s,null,null,D):(a(e.ec,e.fc,l,u,p,g,m,b,h,c,f,d,o,s-r.A,o,s,D),++i);v+2<y;v+=2)p=h,g=c,m=f,b=d,c+=t.Rc,d+=t.Rc,s+=2*r.A,a(l,(u+=2*t.fa)-t.fa,l,u,p,g,m,b,h,c,f,d,o,s-r.A,o,s,D);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,l,u,D),n(e.cc,e.dc,h,c,x),n(e.Mc,e.Nc,f,d,x),i--):1&y||a(l,u,null,null,h,c,f,d,h,c,f,d,o,s+r.A,null,null,D),i}function ct(t,i,n){var r=t.F,o=[t.J];if(null!=r){var s=t.U,a=i.ba.S,l=a==Rn||a==Un;i=i.ba.f.RGBA;var u=[0],h=t.ka;u[0]=t.T,t.Kb&&(0==h?--u[0]:(--h,o[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-h));var c=i.eb;h=i.fb+h*i.A,t=Fn(r,o[0],t.width,s,u,c,h+(l?0:3),i.A),e(n==u),t&&nt(a)&&wn(c,h,l,s,u,i.A)}return 0}function ft(t){var e=t.ma,i=e.ba.S,n=11>i,r=i==In||i==jn||i==Rn||i==zn||12==i||nt(i);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Mi(e.Oa,t,r?11:12))return 0;if(r&&nt(i)&&bi(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=ut,t.Kb){if(i=t.U+1>>1,e.memory=o(t.U+2*i),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+i,e.Ib=ht,bi()}}else alert("todo:EmitYUV");r&&(e.Jb=ct,n&&gi())}if(n&&!Pr){for(t=0;256>t;++t)Nr[t]=89858*(t-128)+Ar>>Fr,Mr[t]=-22014*(t-128)+Ar,Br[t]=-45773*(t-128),Er[t]=113618*(t-128)+Ar>>Fr;for(t=Sr;t<Cr;++t)e=76283*(t-16)+Ar>>Fr,Or[t-Sr]=Vt(e,255),Ir[t-Sr]=Vt(e+8>>4,15);Pr=1}return 1}function dt(t){var i=t.ma,n=t.U,r=t.T;return e(!(1&t.ka)),0>=n||0>=r?0:(n=i.Ib(t,i),null!=i.Jb&&i.Jb(t,i,n),i.Dc+=n,1)}function pt(t){t.ma.memory=null}function gt(t,e,i,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,i[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function mt(t,e){if(4>t)return t+1;var i=t-2>>1;return(2+(1&t)<<i)+y(e,i)+1}function bt(t,e){return 120<e?e-120:1<=(i=((i=Jn[e-1])>>4)*t+(8-(15&i)))?i:1;var i}function vt(t,e,i){var n=w(i),r=t[e+=255&n].g-8;return 0<r&&(F(i,i.u+8),n=w(i),e+=t[e].value,e+=n&(1<<r)-1),F(i,i.u+t[e].g),t[e].value}function yt(t,i,n){return n.g+=t.g,n.value+=t.value<<i>>>0,e(8>=n.g),t.g}function Dt(t,i,n){var r=t.xc;return e((i=0==r?0:t.vc[t.md*(n>>r)+(i>>r)])<t.Wb),t.Ya[i]}function xt(t,i,r,o){var s=t.ab,a=t.c*i,l=t.C;i=l+i;var u=r,h=o;for(o=t.Ta,r=t.Ua;0<s--;){var c=t.gc[s],f=l,d=i,p=u,g=h,m=(h=o,u=r,c.Ea);switch(e(f<d),e(d<=c.nc),c.hc){case 2:Vi(p,g,(d-f)*m,h,u);break;case 0:var b=f,v=d,y=h,D=u,x=(S=c).Ea;0==b&&(Wi(p,g,null,null,1,y,D),V(p,g+1,0,0,x-1,y,D+1),g+=x,D+=x,++b);for(var w=1<<S.b,_=w-1,F=T(x,S.b),A=S.K,S=S.w+(b>>S.b)*F;b<v;){var C=A,L=S,k=1;for(Ui(p,g,y,D-x,1,y,D);k<x;){var P=(k&~_)+w;P>x&&(P=x),(0,Ki[C[L++]>>8&15])(p,g+ +k,y,D+k-x,P-k,y,D+k),k=P}g+=x,D+=x,++b&_||(S+=F)}d!=c.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,v=g,x=(p=c.Ea)-(D=p&~(y=(g=1<<c.b)-1)),b=T(p,c.b),w=c.K,c=c.w+(f>>c.b)*b;f<d;){for(_=w,F=c,A=new z,S=v+D,C=v+p;v<S;)Y(_[F++],A),Ji(A,m,v,g,h,u),v+=g,u+=g;v<C&&(Y(_[F++],A),Ji(A,m,v,x,h,u),v+=x,u+=x),++f&y||(c+=b)}break;case 3:if(p==h&&g==u&&0<c.b){for(v=h,p=m=u+(d-f)*m-(D=(d-f)*T(c.Ea,c.b)),g=h,y=u,b=[],D=(x=D)-1;0<=D;--D)b[D]=g[y+D];for(D=x-1;0<=D;--D)v[p+D]=b[D];Gi(c,f,d,h,m,h,u)}else Gi(c,f,d,p,g,h,u)}u=o,h=r}h!=r&&n(o,r,u,h,a)}function wt(t,i){var n=t.V,r=t.Ba+t.c*t.C,o=i-t.C;if(e(i<=t.l.o),e(16>=o),0<o){var s=t.l,a=t.Ta,l=t.Ua,u=s.width;if(xt(t,o,n,r),o=l=[l],e((n=t.C)<(r=i)),e(s.v<s.va),r>s.o&&(r=s.o),n<s.j){var h=s.j-n;n=s.j,o[0]+=h*u}if(n>=r?n=0:(o[0]+=4*s.v,s.ka=n-s.j,s.U=s.va-s.v,s.T=r-n,n=1),n){if(l=l[0],11>(n=t.ca).S){var c=n.f.RGBA,f=(r=n.S,o=s.U,s=s.T,h=c.eb,c.A),d=s;for(c=c.fb+t.Ma*c.A;0<d--;){var p=a,g=l,m=o,b=h,v=c;switch(r){case On:Qi(p,g,m,b,v);break;case In:Zi(p,g,m,b,v);break;case Hn:Zi(p,g,m,b,v),wn(b,v,0,m,1,0);break;case Tn:nn(p,g,m,b,v);break;case jn:et(p,g,m,b,v,1);break;case Wn:et(p,g,m,b,v,1),wn(b,v,0,m,1,0);break;case Rn:et(p,g,m,b,v,0);break;case Un:et(p,g,m,b,v,0),wn(b,v,1,m,1,0);break;case zn:tn(p,g,m,b,v);break;case Vn:tn(p,g,m,b,v),_n(b,v,m,1,0);break;case qn:en(p,g,m,b,v);break;default:e(0)}l+=u,c+=f}t.Ma+=s}else alert("todo:EmitRescaledRowsYUVA");e(t.Ma<=n.height)}}t.C=i,e(t.C<=t.i)}function _t(t){var e;if(0<t.ua)return 0;for(e=0;e<t.Wb;++e){var i=t.Ya[e].G,n=t.Ya[e].H;if(0<i[1][n[1]+0].g||0<i[2][n[2]+0].g||0<i[3][n[3]+0].g)return 0}return 1}function Ft(t,i,n,r,o,s){if(0!=t.Z){var a=t.qd,l=t.rd;for(e(null!=gr[t.Z]);i<n;++i)gr[t.Z](a,l,r,o,r,o,s),a=r,l=o,o+=s;t.qd=a,t.rd=l}}function At(t,i){var n=t.l.ma,r=0==n.Z||1==n.Z?t.l.j:t.C;if(r=t.C<r?r:t.C,e(i<=t.l.o),i>r){var o=t.l.width,s=n.ca,a=n.tb+o*r,l=t.V,u=t.Ba+t.c*r,h=t.gc;e(1==t.ab),e(3==h[0].hc),Xi(h[0],r,i,l,u,s,a),Ft(n,r,i,s,a,o)}t.C=t.Ma=i}function St(t,i,n,r,o,s,a){var l=t.$/r,u=t.$%r,h=t.m,c=t.s,f=n+t.$,d=f;o=n+r*o;var p=n+r*s,g=280+c.ua,m=t.Pb?l:16777216,b=0<c.ua?c.Wa:null,v=c.wc,y=f<p?Dt(c,u,l):null;e(t.C<s),e(p<=o);var D=!1;t:for(;;){for(;D||f<p;){var x=0;if(l>=m){var S=f-n;e((m=t).Pb),m.wd=m.m,m.xd=S,0<m.s.ua&&M(m.s.Wa,m.s.vb),m=l+Zn}if(u&v||(y=Dt(c,u,l)),e(null!=y),y.Qb&&(i[f]=y.qb,D=!0),!D)if(A(h),y.jc){x=h,S=i;var C=f,L=y.pd[w(x)&Ti-1];e(y.jc),256>L.g?(F(x,x.u+L.g),S[C]=L.value,x=0):(F(x,x.u+L.g-256),e(256<=L.value),x=L.value),0==x&&(D=!0)}else x=vt(y.G[0],y.H[0],h);if(h.h)break;if(D||256>x){if(!D)if(y.nd)i[f]=(y.qb|x<<8)>>>0;else{if(A(h),D=vt(y.G[1],y.H[1],h),A(h),S=vt(y.G[2],y.H[2],h),C=vt(y.G[3],y.H[3],h),h.h)break;i[f]=(C<<24|D<<16|x<<8|S)>>>0}if(D=!1,++f,++u>=r&&(u=0,++l,null!=a&&l<=s&&!(l%16)&&a(t,l),null!=b))for(;d<f;)x=i[d++],b.X[(506832829*x&4294967295)>>>b.Mb]=x}else if(280>x){if(x=mt(x-256,h),S=vt(y.G[4],y.H[4],h),A(h),S=bt(r,S=mt(S,h)),h.h)break;if(f-n<S||o-f<x)break t;for(C=0;C<x;++C)i[f+C]=i[f+C-S];for(f+=x,u+=x;u>=r;)u-=r,++l,null!=a&&l<=s&&!(l%16)&&a(t,l);if(e(f<=o),u&v&&(y=Dt(c,u,l)),null!=b)for(;d<f;)x=i[d++],b.X[(506832829*x&4294967295)>>>b.Mb]=x}else{if(!(x<g))break t;for(D=x-280,e(null!=b);d<f;)x=i[d++],b.X[(506832829*x&4294967295)>>>b.Mb]=x;x=f,e(!(D>>>(S=b).Xa)),i[x]=S.X[D],D=!0}D||e(h.h==_(h))}if(t.Pb&&h.h&&f<o)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&M(t.s.vb,t.s.Wa);else{if(h.h)break t;null!=a&&a(t,l>s?s:l),t.a=0,t.$=f-n}return 1}return t.a=3,0}function Ct(t){e(null!=t),t.vc=null,t.yc=null,t.Ya=null;var i=t.Wa;null!=i&&(i.X=null),t.vb=null,e(null!=t)}function Lt(){var e=new oi;return null==e?null:(e.a=0,e.xb=pr,it("Predictor","VP8LPredictors"),it("Predictor","VP8LPredictors_C"),it("PredictorAdd","VP8LPredictorsAdd"),it("PredictorAdd","VP8LPredictorsAdd_C"),Vi=G,Ji=X,Qi=K,Zi=J,tn=Q,en=Z,nn=tt,t.VP8LMapColor32b=Yi,t.VP8LMapColor8b=$i,e)}function kt(t,i,n,a,l){var u=1,f=[t],p=[i],g=a.m,m=a.s,b=null,v=0;t:for(;;){if(n)for(;u&&y(g,1);){var D=f,x=p,_=a,S=1,C=_.m,L=_.gc[_.ab],k=y(C,2);if(_.Oc&1<<k)u=0;else{switch(_.Oc|=1<<k,L.hc=k,L.Ea=D[0],L.nc=x[0],L.K=[null],++_.ab,e(4>=_.ab),k){case 0:case 1:L.b=y(C,3)+2,S=kt(T(L.Ea,L.b),T(L.nc,L.b),0,_,L.K),L.K=L.K[0];break;case 3:var P,N=y(C,8)+1,E=16<N?0:4<N?1:2<N?2:3;if(D[0]=T(L.Ea,E),L.b=E,P=S=kt(N,1,0,_,L.K)){var M,O=N,I=L,R=1<<(8>>I.b),z=o(R);if(null==z)P=0;else{var q=I.K[0],H=I.w;for(z[0]=I.K[0][0],M=1;M<1*O;++M)z[M]=j(q[H+M],z[M-1]);for(;M<4*R;++M)z[M]=0;I.K[0]=null,I.K[0]=z,P=1}}S=P;break;case 2:break;default:e(0)}u=S}}if(f=f[0],p=p[0],u&&y(g,1)&&!(u=1<=(v=y(g,4))&&11>=v)){a.a=3;break t}var W;if(W=u)e:{var U,V,G,Y=a,X=f,$=p,K=v,J=n,Q=Y.m,Z=Y.s,tt=[null],et=1,it=0,nt=Qn[K];i:for(;;){if(J&&y(Q,1)){var rt=y(Q,3)+2,ot=T(X,rt),st=T($,rt),at=ot*st;if(!kt(ot,st,0,Y,tt))break i;for(tt=tt[0],Z.xc=rt,U=0;U<at;++U){var lt=tt[U]>>8&65535;tt[U]=lt,lt>=et&&(et=lt+1)}}if(Q.h)break i;for(V=0;5>V;++V){var ut=Xn[V];!V&&0<K&&(ut+=1<<K),it<ut&&(it=ut)}var ht=s(et*nt,c),ct=et,ft=s(ct,d);if(null==ft)var dt=null;else e(65536>=ct),dt=ft;var pt=o(it);if(null==dt||null==pt||null==ht){Y.a=1;break i}var gt=ht;for(U=G=0;U<et;++U){var mt=dt[U],bt=mt.G,vt=mt.H,Dt=0,xt=1,wt=0;for(V=0;5>V;++V){ut=Xn[V],bt[V]=gt,vt[V]=G,!V&&0<K&&(ut+=1<<K);n:{var _t,Ft=ut,At=Y,Lt=pt,Pt=gt,Nt=G,Et=0,Bt=At.m,Mt=y(Bt,1);if(r(Lt,0,0,Ft),Mt){var Ot=y(Bt,1)+1,It=y(Bt,1),Tt=y(Bt,0==It?1:8);Lt[Tt]=1,2==Ot&&(Lt[Tt=y(Bt,8)]=1);var jt=1}else{var Rt=o(19),zt=y(Bt,4)+4;if(19<zt){At.a=3;var qt=0;break n}for(_t=0;_t<zt;++_t)Rt[Kn[_t]]=y(Bt,3);var Ht=void 0,Wt=void 0,Ut=At,Vt=Rt,Gt=Ft,Yt=Lt,Xt=0,$t=Ut.m,Kt=8,Jt=s(128,c);r:for(;h(Jt,0,7,Vt,19);){if(y($t,1)){var Qt=2+2*y($t,3);if((Ht=2+y($t,Qt))>Gt)break r}else Ht=Gt;for(Wt=0;Wt<Gt&&Ht--;){A($t);var Zt=Jt[0+(127&w($t))];F($t,$t.u+Zt.g);var te=Zt.value;if(16>te)Yt[Wt++]=te,0!=te&&(Kt=te);else{var ee=16==te,ie=te-16,ne=Yn[ie],re=y($t,Gn[ie])+ne;if(Wt+re>Gt)break r;for(var oe=ee?Kt:0;0<re--;)Yt[Wt++]=oe}}Xt=1;break r}Xt||(Ut.a=3),jt=Xt}(jt=jt&&!Bt.h)&&(Et=h(Pt,Nt,8,Lt,Ft)),jt&&0!=Et?qt=Et:(At.a=3,qt=0)}if(0==qt)break i;if(xt&&1==$n[V]&&(xt=0==gt[G].g),Dt+=gt[G].g,G+=qt,3>=V){var se,ae=pt[0];for(se=1;se<ut;++se)pt[se]>ae&&(ae=pt[se]);wt+=ae}}if(mt.nd=xt,mt.Qb=0,xt&&(mt.qb=(bt[3][vt[3]+0].value<<24|bt[1][vt[1]+0].value<<16|bt[2][vt[2]+0].value)>>>0,0==Dt&&256>bt[0][vt[0]+0].value&&(mt.Qb=1,mt.qb+=bt[0][vt[0]+0].value<<8)),mt.jc=!mt.Qb&&6>wt,mt.jc){var le,ue=mt;for(le=0;le<Ti;++le){var he=le,ce=ue.pd[he],fe=ue.G[0][ue.H[0]+he];256<=fe.value?(ce.g=fe.g+256,ce.value=fe.value):(ce.g=0,ce.value=0,he>>=yt(fe,8,ce),he>>=yt(ue.G[1][ue.H[1]+he],16,ce),he>>=yt(ue.G[2][ue.H[2]+he],0,ce),yt(ue.G[3][ue.H[3]+he],24,ce))}}}Z.vc=tt,Z.Wb=et,Z.Ya=dt,Z.yc=ht,W=1;break e}W=0}if(!(u=W)){a.a=3;break t}if(0<v){if(m.ua=1<<v,!B(m.Wa,v)){a.a=1,u=0;break t}}else m.ua=0;var de=a,pe=f,ge=p,me=de.s,be=me.xc;if(de.c=pe,de.i=ge,me.md=T(pe,be),me.wc=0==be?-1:(1<<be)-1,n){a.xb=dr;break t}if(null==(b=o(f*p))){a.a=1,u=0;break t}u=(u=St(a,b,0,f,p,p,null))&&!g.h;break t}return u?(null!=l?l[0]=b:(e(null==b),e(n)),a.$=0,n||Ct(m)):Ct(m),u}function Pt(t,i){var n=t.c*t.i,r=n+i+16*i;return e(t.c<=i),t.V=o(r),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+i,1)}function Nt(t,i){var n=t.C,r=i-n,o=t.V,s=t.Ba+t.c*n;for(e(i<=t.l.o);0<r;){var a=16<r?16:r,l=t.l.ma,u=t.l.width,h=u*a,c=l.ca,f=l.tb+u*n,d=t.Ta,p=t.Ua;xt(t,a,o,s),An(d,p,c,f,h),Ft(l,n,n+a,c,f,u),r-=a,o+=a*t.c,n+=a}e(n==i),t.C=t.Ma=i}function Et(){this.ub=this.yd=this.td=this.Rb=0}function Bt(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Mt(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Ot(){this.Yb=function(){var t=[];return function t(e,i,n){for(var r=n[i],o=0;o<r&&(e.push(n.length>i+1?[]:0),!(n.length<i+1));o++)t(e[o],i+1,n)}(t,0,[3,11]),t}()}function It(){this.jb=o(3),this.Wc=a([4,8],Ot),this.Xc=a([4,17],Ot)}function Tt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function jt(){this.ld=this.La=this.dd=this.tc=0}function Rt(){this.Na=this.la=0}function zt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qt(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ht(){this.uc=this.M=this.Nb=0,this.wa=Array(new jt),this.Y=0,this.ya=Array(new qt),this.aa=0,this.l=new Gt}function Wt(){this.y=o(16),this.f=o(8),this.ea=o(8)}function Ut(){this.cb=this.a=0,this.sc="",this.m=new D,this.Od=new Et,this.Kc=new Bt,this.ed=new Tt,this.Qa=new Mt,this.Ic=this.$c=this.Aa=0,this.D=new Ht,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,D),this.ia=0,this.pb=s(4,zt),this.Pa=new It,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Wt),this.Hd=0,this.rb=Array(new Rt),this.sb=0,this.wa=Array(new jt),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 qt),this.L=this.aa=0,this.gd=a([4,2],jt),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 Vt(t,e){return 0>t?0:t>e?e:t}function Gt(){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 Yt(){var t=new Ut;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,ir||(ir=Jt)),t}function Xt(t,e,i){return 0==t.a&&(t.a=e,t.sc=i,t.cb=0),0}function $t(t,e,i){return 3<=i&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Kt(t,i){if(null==t)return 0;if(t.a=0,t.sc="OK",null==i)return Xt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=i.data,o=i.w,s=i.ha;if(4>s)return Xt(t,7,"Truncated header.");var a=n[o+0]|n[o+1]<<8|n[o+2]<<16,l=t.Od;if(l.Rb=!(1&a),l.td=a>>1&7,l.yd=a>>4&1,l.ub=a>>5,3<l.td)return Xt(t,3,"Incorrect keyframe parameters.");if(!l.yd)return Xt(t,4,"Frame not displayable.");o+=3,s-=3;var u=t.Kc;if(l.Rb){if(7>s)return Xt(t,7,"cannot parse picture header");if(!$t(n,o,s))return Xt(t,3,"Bad code word");u.c=16383&(n[o+4]<<8|n[o+3]),u.Td=n[o+4]>>6,u.i=16383&(n[o+6]<<8|n[o+5]),u.Ud=n[o+6]>>6,o+=7,s-=7,t.za=u.c+15>>4,t.Ub=u.i+15>>4,i.width=u.c,i.height=u.i,i.Da=0,i.j=0,i.v=0,i.va=i.width,i.o=i.height,i.da=0,i.ib=i.width,i.hb=i.height,i.U=i.width,i.T=i.height,r((a=t.Pa).jb,0,255,a.jb.length),e(null!=(a=t.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,r(a.Zb,0,0,a.Zb.length),r(a.Lb,0,0,a.Lb)}if(l.ub>s)return Xt(t,7,"bad partition length");p(a=t.m,n,o,l.ub),o+=l.ub,s-=l.ub,l.Rb&&(u.Ld=C(a),u.Kd=C(a)),u=t.Qa;var h,c=t.Pa;if(e(null!=a),e(null!=u),u.Cb=C(a),u.Cb){if(u.Bb=C(a),C(a)){for(u.Fb=C(a),h=0;4>h;++h)u.Zb[h]=C(a)?m(a,7):0;for(h=0;4>h;++h)u.Lb[h]=C(a)?m(a,6):0}if(u.Bb)for(h=0;3>h;++h)c.jb[h]=C(a)?g(a,8):255}else u.Bb=0;if(a.Ka)return Xt(t,3,"cannot parse segment header");if((u=t.ed).zd=C(a),u.Tb=g(a,6),u.wb=g(a,3),u.Pc=C(a),u.Pc&&C(a)){for(c=0;4>c;++c)C(a)&&(u.vd[c]=m(a,6));for(c=0;4>c;++c)C(a)&&(u.od[c]=m(a,6))}if(t.L=0==u.Tb?0:u.zd?1:2,a.Ka)return Xt(t,3,"cannot parse filter header");var f=s;if(s=h=o,o=h+f,u=f,t.Xb=(1<<g(t.m,2))-1,f<3*(c=t.Xb))n=7;else{for(h+=3*c,u-=3*c,f=0;f<c;++f){var d=n[s+0]|n[s+1]<<8|n[s+2]<<16;d>u&&(d=u),p(t.Jc[+f],n,h,d),h+=d,u-=d,s+=3}p(t.Jc[+c],n,h,u),n=h<o?0:5}if(0!=n)return Xt(t,n,"cannot parse partitions");for(n=g(h=t.m,7),s=C(h)?m(h,4):0,o=C(h)?m(h,4):0,u=C(h)?m(h,4):0,c=C(h)?m(h,4):0,h=C(h)?m(h,4):0,f=t.Qa,d=0;4>d;++d){if(f.Cb){var b=f.Zb[d];f.Fb||(b+=n)}else{if(0<d){t.pb[d]=t.pb[0];continue}b=n}var v=t.pb[d];v.Sc[0]=tr[Vt(b+s,127)],v.Sc[1]=er[Vt(b+0,127)],v.Eb[0]=2*tr[Vt(b+o,127)],v.Eb[1]=101581*er[Vt(b+u,127)]>>16,8>v.Eb[1]&&(v.Eb[1]=8),v.Qc[0]=tr[Vt(b+c,117)],v.Qc[1]=er[Vt(b+h,127)],v.lc=b+h}if(!l.Rb)return Xt(t,4,"Not a key frame.");for(C(a),l=t.Pa,n=0;4>n;++n){for(s=0;8>s;++s)for(o=0;3>o;++o)for(u=0;11>u;++u)c=L(a,lr[n][s][o][u])?g(a,8):sr[n][s][o][u],l.Wc[n][s].Yb[o][u]=c;for(s=0;17>s;++s)l.Xc[n][s]=l.Wc[n][ur[s]]}return t.kc=C(a),t.kc&&(t.Bd=g(a,8)),t.cb=1}function Jt(t,e,i,n,r,o,s){var a=e[r].Yb[i];for(i=0;16>r;++r){if(!L(t,a[i+0]))return r;for(;!L(t,a[i+1]);)if(a=e[++r].Yb[0],i=0,16==r)return 16;var l=e[r+1].Yb;if(L(t,a[i+2])){var u=t,h=0;if(L(u,(f=a)[(c=i)+3]))if(L(u,f[c+6])){for(a=0,c=2*(h=L(u,f[c+8]))+(f=L(u,f[c+9+h])),h=0,f=nr[c];f[a];++a)h+=h+L(u,f[a]);h+=3+(8<<c)}else L(u,f[c+7])?(h=7+2*L(u,165),h+=L(u,145)):h=5+L(u,159);else h=L(u,f[c+4])?3+L(u,f[c+5]):2;a=l[2]}else h=1,a=l[1];l=s+rr[r],0>(u=t).b&&S(u);var c,f=u.b,d=(c=u.Ca>>1)-(u.I>>f)>>31;--u.b,u.Ca+=d,u.Ca|=1,u.I-=(c+1&d)<<f,o[l]=((h^d)-d)*n[(0<r)+0]}return 16}function Qt(t){var e=t.rb[t.sb-1];e.la=0,e.Na=0,r(t.zc,0,0,t.zc.length),t.ja=0}function Zt(t,e,i,n,r){r=t[e+i+32*n]+(r>>3),t[e+i+32*n]=-256&r?0>r?0:255:r}function te(t,e,i,n,r,o){Zt(t,e,0,i,n+r),Zt(t,e,1,i,n+o),Zt(t,e,2,i,n-o),Zt(t,e,3,i,n-r)}function ee(t){return(20091*t>>16)+t}function ie(t,e,i,n){var r,s=0,a=o(16);for(r=0;4>r;++r){var l=t[e+0]+t[e+8],u=t[e+0]-t[e+8],h=(35468*t[e+4]>>16)-ee(t[e+12]),c=ee(t[e+4])+(35468*t[e+12]>>16);a[s+0]=l+c,a[s+1]=u+h,a[s+2]=u-h,a[s+3]=l-c,s+=4,e++}for(r=s=0;4>r;++r)l=(t=a[s+0]+4)+a[s+8],u=t-a[s+8],h=(35468*a[s+4]>>16)-ee(a[s+12]),Zt(i,n,0,0,l+(c=ee(a[s+4])+(35468*a[s+12]>>16))),Zt(i,n,1,0,u+h),Zt(i,n,2,0,u-h),Zt(i,n,3,0,l-c),s++,n+=32}function ne(t,e,i,n){var r=t[e+0]+4,o=35468*t[e+4]>>16,s=ee(t[e+4]),a=35468*t[e+1]>>16;te(i,n,0,r+s,t=ee(t[e+1]),a),te(i,n,1,r+o,t,a),te(i,n,2,r-o,t,a),te(i,n,3,r-s,t,a)}function re(t,e,i,n,r){ie(t,e,i,n),r&&ie(t,e+16,i,n+4)}function oe(t,e,i,n){on(t,e+0,i,n,1),on(t,e+32,i,n+128,1)}function se(t,e,i,n){var r;for(t=t[e+0]+4,r=0;4>r;++r)for(e=0;4>e;++e)Zt(i,n,e,r,t)}function ae(t,e,i,n){t[e+0]&&ln(t,e+0,i,n),t[e+16]&&ln(t,e+16,i,n+4),t[e+32]&&ln(t,e+32,i,n+128),t[e+48]&&ln(t,e+48,i,n+128+4)}function le(t,e,i,n){var r,s=o(16);for(r=0;4>r;++r){var a=t[e+0+r]+t[e+12+r],l=t[e+4+r]+t[e+8+r],u=t[e+4+r]-t[e+8+r],h=t[e+0+r]-t[e+12+r];s[0+r]=a+l,s[8+r]=a-l,s[4+r]=h+u,s[12+r]=h-u}for(r=0;4>r;++r)a=(t=s[0+4*r]+3)+s[3+4*r],l=s[1+4*r]+s[2+4*r],u=s[1+4*r]-s[2+4*r],h=t-s[3+4*r],i[n+0]=a+l>>3,i[n+16]=h+u>>3,i[n+32]=a-l>>3,i[n+48]=h-u>>3,n+=64}function ue(t,e,i){var n,r=e-32,o=Bn,s=255-t[r-1];for(n=0;n<i;++n){var a,l=o,u=s+t[e-1];for(a=0;a<i;++a)t[e+a]=l[u+t[r+a]];e+=32}}function he(t,e){ue(t,e,4)}function ce(t,e){ue(t,e,8)}function fe(t,e){ue(t,e,16)}function de(t,e){var i;for(i=0;16>i;++i)n(t,e+32*i,t,e-32,16)}function pe(t,e){var i;for(i=16;0<i;--i)r(t,e,t[e-1],16),e+=32}function ge(t,e,i){var n;for(n=0;16>n;++n)r(e,i+32*n,t,16)}function me(t,e){var i,n=16;for(i=0;16>i;++i)n+=t[e-1+32*i]+t[e+i-32];ge(n>>5,t,e)}function be(t,e){var i,n=8;for(i=0;16>i;++i)n+=t[e-1+32*i];ge(n>>4,t,e)}function ve(t,e){var i,n=8;for(i=0;16>i;++i)n+=t[e+i-32];ge(n>>4,t,e)}function ye(t,e){ge(128,t,e)}function De(t,e,i){return t+2*e+i+2>>2}function xe(t,e){var i,r=e-32;for(r=new Uint8Array([De(t[r-1],t[r+0],t[r+1]),De(t[r+0],t[r+1],t[r+2]),De(t[r+1],t[r+2],t[r+3]),De(t[r+2],t[r+3],t[r+4])]),i=0;4>i;++i)n(t,e+32*i,r,0,r.length)}function we(t,e){var i=t[e-1],n=t[e-1+32],r=t[e-1+64],o=t[e-1+96];k(t,e+0,16843009*De(t[e-1-32],i,n)),k(t,e+32,16843009*De(i,n,r)),k(t,e+64,16843009*De(n,r,o)),k(t,e+96,16843009*De(r,o,o))}function _e(t,e){var i,n=4;for(i=0;4>i;++i)n+=t[e+i-32]+t[e-1+32*i];for(n>>=3,i=0;4>i;++i)r(t,e+32*i,n,4)}function Fe(t,e){var i=t[e-1+0],n=t[e-1+32],r=t[e-1+64],o=t[e-1-32],s=t[e+0-32],a=t[e+1-32],l=t[e+2-32],u=t[e+3-32];t[e+0+96]=De(n,r,t[e-1+96]),t[e+1+96]=t[e+0+64]=De(i,n,r),t[e+2+96]=t[e+1+64]=t[e+0+32]=De(o,i,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=De(s,o,i),t[e+3+64]=t[e+2+32]=t[e+1+0]=De(a,s,o),t[e+3+32]=t[e+2+0]=De(l,a,s),t[e+3+0]=De(u,l,a)}function Ae(t,e){var i=t[e+1-32],n=t[e+2-32],r=t[e+3-32],o=t[e+4-32],s=t[e+5-32],a=t[e+6-32],l=t[e+7-32];t[e+0+0]=De(t[e+0-32],i,n),t[e+1+0]=t[e+0+32]=De(i,n,r),t[e+2+0]=t[e+1+32]=t[e+0+64]=De(n,r,o),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=De(r,o,s),t[e+3+32]=t[e+2+64]=t[e+1+96]=De(o,s,a),t[e+3+64]=t[e+2+96]=De(s,a,l),t[e+3+96]=De(a,l,l)}function Se(t,e){var i=t[e-1+0],n=t[e-1+32],r=t[e-1+64],o=t[e-1-32],s=t[e+0-32],a=t[e+1-32],l=t[e+2-32],u=t[e+3-32];t[e+0+0]=t[e+1+64]=o+s+1>>1,t[e+1+0]=t[e+2+64]=s+a+1>>1,t[e+2+0]=t[e+3+64]=a+l+1>>1,t[e+3+0]=l+u+1>>1,t[e+0+96]=De(r,n,i),t[e+0+64]=De(n,i,o),t[e+0+32]=t[e+1+96]=De(i,o,s),t[e+1+32]=t[e+2+96]=De(o,s,a),t[e+2+32]=t[e+3+96]=De(s,a,l),t[e+3+32]=De(a,l,u)}function Ce(t,e){var i=t[e+0-32],n=t[e+1-32],r=t[e+2-32],o=t[e+3-32],s=t[e+4-32],a=t[e+5-32],l=t[e+6-32],u=t[e+7-32];t[e+0+0]=i+n+1>>1,t[e+1+0]=t[e+0+64]=n+r+1>>1,t[e+2+0]=t[e+1+64]=r+o+1>>1,t[e+3+0]=t[e+2+64]=o+s+1>>1,t[e+0+32]=De(i,n,r),t[e+1+32]=t[e+0+96]=De(n,r,o),t[e+2+32]=t[e+1+96]=De(r,o,s),t[e+3+32]=t[e+2+96]=De(o,s,a),t[e+3+64]=De(s,a,l),t[e+3+96]=De(a,l,u)}function Le(t,e){var i=t[e-1+0],n=t[e-1+32],r=t[e-1+64],o=t[e-1+96];t[e+0+0]=i+n+1>>1,t[e+2+0]=t[e+0+32]=n+r+1>>1,t[e+2+32]=t[e+0+64]=r+o+1>>1,t[e+1+0]=De(i,n,r),t[e+3+0]=t[e+1+32]=De(n,r,o),t[e+3+32]=t[e+1+64]=De(r,o,o),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=o}function ke(t,e){var i=t[e-1+0],n=t[e-1+32],r=t[e-1+64],o=t[e-1+96],s=t[e-1-32],a=t[e+0-32],l=t[e+1-32],u=t[e+2-32];t[e+0+0]=t[e+2+32]=i+s+1>>1,t[e+0+32]=t[e+2+64]=n+i+1>>1,t[e+0+64]=t[e+2+96]=r+n+1>>1,t[e+0+96]=o+r+1>>1,t[e+3+0]=De(a,l,u),t[e+2+0]=De(s,a,l),t[e+1+0]=t[e+3+32]=De(i,s,a),t[e+1+32]=t[e+3+64]=De(n,i,s),t[e+1+64]=t[e+3+96]=De(r,n,i),t[e+1+96]=De(o,r,n)}function Pe(t,e){var i;for(i=0;8>i;++i)n(t,e+32*i,t,e-32,8)}function Ne(t,e){var i;for(i=0;8>i;++i)r(t,e,t[e-1],8),e+=32}function Ee(t,e,i){var n;for(n=0;8>n;++n)r(e,i+32*n,t,8)}function Be(t,e){var i,n=8;for(i=0;8>i;++i)n+=t[e+i-32]+t[e-1+32*i];Ee(n>>4,t,e)}function Me(t,e){var i,n=4;for(i=0;8>i;++i)n+=t[e+i-32];Ee(n>>3,t,e)}function Oe(t,e){var i,n=4;for(i=0;8>i;++i)n+=t[e-1+32*i];Ee(n>>3,t,e)}function Ie(t,e){Ee(128,t,e)}function Te(t,e,i){var n=t[e-i],r=t[e+0],o=3*(r-n)+Nn[1020+t[e-2*i]-t[e+i]],s=En[112+(o+4>>3)];t[e-i]=Bn[255+n+En[112+(o+3>>3)]],t[e+0]=Bn[255+r-s]}function je(t,e,i,n){var r=t[e+0],o=t[e+i];return Mn[255+t[e-2*i]-t[e-i]]>n||Mn[255+o-r]>n}function Re(t,e,i,n){return 4*Mn[255+t[e-i]-t[e+0]]+Mn[255+t[e-2*i]-t[e+i]]<=n}function ze(t,e,i,n,r){var o=t[e-3*i],s=t[e-2*i],a=t[e-i],l=t[e+0],u=t[e+i],h=t[e+2*i],c=t[e+3*i];return 4*Mn[255+a-l]+Mn[255+s-u]>n?0:Mn[255+t[e-4*i]-o]<=r&&Mn[255+o-s]<=r&&Mn[255+s-a]<=r&&Mn[255+c-h]<=r&&Mn[255+h-u]<=r&&Mn[255+u-l]<=r}function qe(t,e,i,n){var r=2*n+1;for(n=0;16>n;++n)Re(t,e+n,i,r)&&Te(t,e+n,i)}function He(t,e,i,n){var r=2*n+1;for(n=0;16>n;++n)Re(t,e+n*i,1,r)&&Te(t,e+n*i,1)}function We(t,e,i,n){var r;for(r=3;0<r;--r)qe(t,e+=4*i,i,n)}function Ue(t,e,i,n){var r;for(r=3;0<r;--r)He(t,e+=4,i,n)}function Ve(t,e,i,n,r,o,s,a){for(o=2*o+1;0<r--;){if(ze(t,e,i,o,s))if(je(t,e,i,a))Te(t,e,i);else{var l=t,u=e,h=i,c=l[u-2*h],f=l[u-h],d=l[u+0],p=l[u+h],g=l[u+2*h],m=27*(v=Nn[1020+3*(d-f)+Nn[1020+c-p]])+63>>7,b=18*v+63>>7,v=9*v+63>>7;l[u-3*h]=Bn[255+l[u-3*h]+v],l[u-2*h]=Bn[255+c+b],l[u-h]=Bn[255+f+m],l[u+0]=Bn[255+d-m],l[u+h]=Bn[255+p-b],l[u+2*h]=Bn[255+g-v]}e+=n}}function Ge(t,e,i,n,r,o,s,a){for(o=2*o+1;0<r--;){if(ze(t,e,i,o,s))if(je(t,e,i,a))Te(t,e,i);else{var l=t,u=e,h=i,c=l[u-h],f=l[u+0],d=l[u+h],p=En[112+(4+(g=3*(f-c))>>3)],g=En[112+(g+3>>3)],m=p+1>>1;l[u-2*h]=Bn[255+l[u-2*h]+m],l[u-h]=Bn[255+c+g],l[u+0]=Bn[255+f-p],l[u+h]=Bn[255+d-m]}e+=n}}function Ye(t,e,i,n,r,o){Ve(t,e,i,1,16,n,r,o)}function Xe(t,e,i,n,r,o){Ve(t,e,1,i,16,n,r,o)}function $e(t,e,i,n,r,o){var s;for(s=3;0<s;--s)Ge(t,e+=4*i,i,1,16,n,r,o)}function Ke(t,e,i,n,r,o){var s;for(s=3;0<s;--s)Ge(t,e+=4,1,i,16,n,r,o)}function Je(t,e,i,n,r,o,s,a){Ve(t,e,r,1,8,o,s,a),Ve(i,n,r,1,8,o,s,a)}function Qe(t,e,i,n,r,o,s,a){Ve(t,e,1,r,8,o,s,a),Ve(i,n,1,r,8,o,s,a)}function Ze(t,e,i,n,r,o,s,a){Ge(t,e+4*r,r,1,8,o,s,a),Ge(i,n+4*r,r,1,8,o,s,a)}function ti(t,e,i,n,r,o,s,a){Ge(t,e+4,1,r,8,o,s,a),Ge(i,n+4,1,r,8,o,s,a)}function ei(){this.ba=new st,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new lt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ii(){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 ni(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ri(){this.ua=0,this.Wa=new O,this.vb=new O,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new c}function oi(){this.xb=this.a=0,this.l=new Gt,this.ca=new st,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new x,this.Pb=0,this.wd=new x,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ri,this.ab=0,this.gc=s(4,ni),this.Oc=0}function si(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ai(t,e,i,n,r,o,s){for(t=null==t?0:t[e+0],e=0;e<s;++e)r[o+e]=t+i[n+e]&255,t=r[o+e]}function li(t,e,i,n,r,o,s){var a;if(null==t)ai(null,null,i,n,r,o,s);else for(a=0;a<s;++a)r[o+a]=t[e+a]+i[n+a]&255}function ui(t,e,i,n,r,o,s){if(null==t)ai(null,null,i,n,r,o,s);else{var a,l=t[e+0],u=l,h=l;for(a=0;a<s;++a)u=h+(l=t[e+a])-u,h=i[n+a]+(-256&u?0>u?0:255:u)&255,u=l,r[o+a]=h}}function hi(t,i,r,s){var a=i.width,l=i.o;if(e(null!=t&&null!=i),0>r||0>=s||r+s>l)return null;if(!t.Cc){if(null==t.ga){var u;if(t.ga=new si,(u=null==t.ga)||(u=i.width*i.o,e(0==t.Gb.length),t.Gb=o(u),t.Uc=0,null==t.Gb?u=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,u=1),u=!u),!u){u=t.ga;var h=t.Fa,c=t.P,f=t.qc,d=t.mb,p=t.nb,g=c+1,m=f-1,v=u.l;if(e(null!=h&&null!=d&&null!=i),gr[0]=null,gr[1]=ai,gr[2]=li,gr[3]=ui,u.ca=d,u.tb=p,u.c=i.width,u.i=i.height,e(0<u.c&&0<u.i),1>=f)i=0;else if(u.$a=3&h[c+0],u.Z=h[c+0]>>2&3,u.Lc=h[c+0]>>4&3,c=h[c+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||c)i=0;else if(v.put=dt,v.ac=ft,v.bc=pt,v.ma=u,v.width=i.width,v.height=i.height,v.Da=i.Da,v.v=i.v,v.va=i.va,v.j=i.j,v.o=i.o,u.$a)t:{e(1==u.$a),i=Lt();e:for(;;){if(null==i){i=0;break t}if(e(null!=u),u.mc=i,i.c=u.c,i.i=u.i,i.l=u.l,i.l.ma=u,i.l.width=u.c,i.l.height=u.i,i.a=0,b(i.m,h,g,m),!kt(u.c,u.i,1,i,null))break e;if(1==i.ab&&3==i.gc[0].hc&&_t(i.s)?(u.ic=1,h=i.c*i.i,i.Ta=null,i.Ua=0,i.V=o(h),i.Ba=0,null==i.V?(i.a=1,i=0):i=1):(u.ic=0,i=Pt(i,u.c)),!i)break e;i=1;break t}u.mc=null,i=0}else i=m>=u.c*u.i;u=!i}if(u)return null;1!=t.ga.Lc?t.Ga=0:s=l-r}e(null!=t.ga),e(r+s<=l);t:{if(i=(h=t.ga).c,l=h.l.o,0==h.$a){if(g=t.rc,m=t.Vc,v=t.Fa,c=t.P+1+r*i,f=t.mb,d=t.nb+r*i,e(c<=t.P+t.qc),0!=h.Z)for(e(null!=gr[h.Z]),u=0;u<s;++u)gr[h.Z](g,m,v,c,f,d,i),g=f,m=d,d+=i,c+=i;else for(u=0;u<s;++u)n(f,d,v,c,i),g=f,m=d,d+=i,c+=i;t.rc=g,t.Vc=m}else{if(e(null!=h.mc),i=r+s,e(null!=(u=h.mc)),e(i<=u.i),u.C>=i)i=1;else if(h.ic||gi(),h.ic){h=u.V,g=u.Ba,m=u.c;var y=u.i,D=(v=1,c=u.$/m,f=u.$%m,d=u.m,p=u.s,u.$),x=m*y,w=m*i,F=p.wc,S=D<w?Dt(p,f,c):null;e(D<=x),e(i<=y),e(_t(p));e:for(;;){for(;!d.h&&D<w;){if(f&F||(S=Dt(p,f,c)),e(null!=S),A(d),256>(y=vt(S.G[0],S.H[0],d)))h[g+D]=y,++D,++f>=m&&(f=0,++c<=i&&!(c%16)&&At(u,c));else{if(!(280>y)){v=0;break e}y=mt(y-256,d);var C,L=vt(S.G[4],S.H[4],d);if(A(d),!(D>=(L=bt(m,L=mt(L,d)))&&x-D>=y)){v=0;break e}for(C=0;C<y;++C)h[g+D+C]=h[g+D+C-L];for(D+=y,f+=y;f>=m;)f-=m,++c<=i&&!(c%16)&&At(u,c);D<w&&f&F&&(S=Dt(p,f,c))}e(d.h==_(d))}At(u,c>i?i:c);break e}!v||d.h&&D<x?(v=0,u.a=d.h?5:3):u.$=D,i=v}else i=St(u,u.V,u.Ba,u.c,u.i,i,Nt);if(!i){s=0;break t}}r+s>=l&&(t.Cc=1),s=1}if(!s)return null;if(t.Cc&&(null!=(s=t.ga)&&(s.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+r*a}function ci(t,e,i,n,r,o){for(;0<r--;){var s,a=t,l=e+(i?1:0),u=t,h=e+(i?0:3);for(s=0;s<n;++s){var c=u[h+4*s];255!=c&&(c*=32897,a[l+4*s+0]=a[l+4*s+0]*c>>23,a[l+4*s+1]=a[l+4*s+1]*c>>23,a[l+4*s+2]=a[l+4*s+2]*c>>23)}e+=o}}function fi(t,e,i,n,r){for(;0<n--;){var o;for(o=0;o<i;++o){var s=t[e+2*o+0],a=15&(u=t[e+2*o+1]),l=4369*a,u=(240&u|u>>4)*l>>16;t[e+2*o+0]=(240&s|s>>4)*l>>16&240|(15&s|s<<4)*l>>16>>4&15,t[e+2*o+1]=240&u|a}e+=r}}function di(t,e,i,n,r,o,s,a){var l,u,h=255;for(u=0;u<r;++u){for(l=0;l<n;++l){var c=t[e+l];o[s+4*l]=c,h&=c}e+=i,s+=a}return 255!=h}function pi(t,e,i,n,r){var o;for(o=0;o<r;++o)i[n+o]=t[e+o]>>8}function gi(){wn=ci,_n=fi,Fn=di,An=pi}function mi(i,n,r){t[i]=function(t,i,o,s,a,l,u,h,c,f,d,p,g,m,b,v,y){var D,x=y-1>>1,w=a[l+0]|u[h+0]<<16,_=c[f+0]|d[p+0]<<16;e(null!=t);var F=3*w+_+131074>>2;for(n(t[i+0],255&F,F>>16,g,m),null!=o&&(F=3*_+w+131074>>2,n(o[s+0],255&F,F>>16,b,v)),D=1;D<=x;++D){var A=a[l+D]|u[h+D]<<16,S=c[f+D]|d[p+D]<<16,C=w+A+_+S+524296,L=C+2*(A+_)>>3;F=L+w>>1,w=(C=C+2*(w+S)>>3)+A>>1,n(t[i+2*D-1],255&F,F>>16,g,m+(2*D-1)*r),n(t[i+2*D-0],255&w,w>>16,g,m+(2*D-0)*r),null!=o&&(F=C+_>>1,w=L+S>>1,n(o[s+2*D-1],255&F,F>>16,b,v+(2*D-1)*r),n(o[s+2*D+0],255&w,w>>16,b,v+(2*D+0)*r)),w=A,_=S}1&y||(F=3*w+_+131074>>2,n(t[i+y-1],255&F,F>>16,g,m+(y-1)*r),null!=o&&(F=3*_+w+131074>>2,n(o[s+y-1],255&F,F>>16,b,v+(y-1)*r)))}}function bi(){mr[On]=br,mr[In]=yr,mr[Tn]=vr,mr[jn]=Dr,mr[Rn]=xr,mr[zn]=wr,mr[qn]=_r,mr[Hn]=yr,mr[Wn]=Dr,mr[Un]=xr,mr[Vn]=wr}function vi(t){return t&~kr?0>t?0:255:t>>Lr}function yi(t,e){return vi((19077*t>>8)+(26149*e>>8)-14234)}function Di(t,e,i){return vi((19077*t>>8)-(6419*e>>8)-(13320*i>>8)+8708)}function xi(t,e){return vi((19077*t>>8)+(33050*e>>8)-17685)}function wi(t,e,i,n,r){n[r+0]=yi(t,i),n[r+1]=Di(t,e,i),n[r+2]=xi(t,e)}function _i(t,e,i,n,r){n[r+0]=xi(t,e),n[r+1]=Di(t,e,i),n[r+2]=yi(t,i)}function Fi(t,e,i,n,r){var o=Di(t,e,i);e=o<<3&224|xi(t,e)>>3,n[r+0]=248&yi(t,i)|o>>5,n[r+1]=e}function Ai(t,e,i,n,r){var o=240&xi(t,e)|15;n[r+0]=240&yi(t,i)|Di(t,e,i)>>4,n[r+1]=o}function Si(t,e,i,n,r){n[r+0]=255,wi(t,e,i,n,r+1)}function Ci(t,e,i,n,r){_i(t,e,i,n,r),n[r+3]=255}function Li(t,e,i,n,r){wi(t,e,i,n,r),n[r+3]=255}function ki(e,i,n){t[e]=function(t,e,r,o,s,a,l,u,h){for(var c=u+(-2&h)*n;u!=c;)i(t[e+0],r[o+0],s[a+0],l,u),i(t[e+1],r[o+0],s[a+0],l,u+n),e+=2,++o,++a,u+=2*n;1&h&&i(t[e+0],r[o+0],s[a+0],l,u)}}function Pi(t,e,i){return 0==i?0==t?0==e?6:5:0==e?4:0:i}function Ni(t,e,i,n,r){switch(t>>>30){case 3:on(e,i,n,r,0);break;case 2:sn(e,i,n,r);break;case 1:ln(e,i,n,r)}}function Ei(t,e){var i,o,s=e.M,a=e.Nb,l=t.oc,u=t.pc+40,h=t.oc,c=t.pc+584,f=t.oc,d=t.pc+600;for(i=0;16>i;++i)l[u+32*i-1]=129;for(i=0;8>i;++i)h[c+32*i-1]=129,f[d+32*i-1]=129;for(0<s?l[u-1-32]=h[c-1-32]=f[d-1-32]=129:(r(l,u-32-1,127,21),r(h,c-32-1,127,9),r(f,d-32-1,127,9)),o=0;o<t.za;++o){var p=e.ya[e.aa+o];if(0<o){for(i=-1;16>i;++i)n(l,u+32*i-4,l,u+32*i+12,4);for(i=-1;8>i;++i)n(h,c+32*i-4,h,c+32*i+4,4),n(f,d+32*i-4,f,d+32*i+4,4)}var g=t.Gd,m=t.Hd+o,b=p.ad,v=p.Hc;if(0<s&&(n(l,u-32,g[m].y,0,16),n(h,c-32,g[m].f,0,8),n(f,d-32,g[m].ea,0,8)),p.Za){var y=l,D=u-32+16;for(0<s&&(o>=t.za-1?r(y,D,g[m].y[15],4):n(y,D,g[m+1].y,0,4)),i=0;4>i;i++)y[D+128+i]=y[D+256+i]=y[D+384+i]=y[D+0+i];for(i=0;16>i;++i,v<<=2)y=l,D=u+Tr[i],cr[p.Ob[i]](y,D),Ni(v,b,16*+i,y,D)}else if(y=Pi(o,s,p.Ob[0]),hr[y](l,u),0!=v)for(i=0;16>i;++i,v<<=2)Ni(v,b,16*+i,l,u+Tr[i]);for(i=p.Gc,y=Pi(o,s,p.Dd),fr[y](h,c),fr[y](f,d),v=b,y=h,D=c,255&(p=0|i)&&(170&p?an(v,256,y,D):un(v,256,y,D)),p=f,v=d,255&(i>>=8)&&(170&i?an(b,320,p,v):un(b,320,p,v)),s<t.Ub-1&&(n(g[m].y,0,l,u+480,16),n(g[m].f,0,h,c+224,8),n(g[m].ea,0,f,d+224,8)),i=8*a*t.B,g=t.sa,m=t.ta+16*o+16*a*t.R,b=t.qa,p=t.ra+8*o+i,v=t.Ha,y=t.Ia+8*o+i,i=0;16>i;++i)n(g,m+i*t.R,l,u+32*i,16);for(i=0;8>i;++i)n(b,p+i*t.B,h,c+32*i,8),n(v,y+i*t.B,f,d+32*i,8)}}function Bi(t,n,r,o,s,a,l,u,h){var c=[0],f=[0],d=0,p=null!=h?h.kd:0,g=null!=h?h:new ii;if(null==t||12>r)return 7;g.data=t,g.w=n,g.ha=r,n=[n],r=[r],g.gb=[g.gb];t:{var m=n,v=r,y=g.gb;if(e(null!=t),e(null!=v),e(null!=y),y[0]=0,12<=v[0]&&!i(t,m[0],"RIFF")){if(i(t,m[0]+8,"WEBP")){y=3;break t}var D=E(t,m[0]+4);if(12>D||4294967286<D){y=3;break t}if(p&&D>v[0]-8){y=7;break t}y[0]=D,m[0]+=12,v[0]-=12}y=0}if(0!=y)return y;for(D=0<g.gb[0],r=r[0];;){t:{var w=t;v=n,y=r;var _=c,F=f,A=m=[0];if((L=d=[d])[0]=0,8>y[0])y=7;else{if(!i(w,v[0],"VP8X")){if(10!=E(w,v[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var S=E(w,v[0]+8),C=1+N(w,v[0]+12);if(2147483648<=C*(w=1+N(w,v[0]+15))){y=3;break t}null!=A&&(A[0]=S),null!=_&&(_[0]=C),null!=F&&(F[0]=w),v[0]+=18,y[0]-=18,L[0]=1}y=0}}if(d=d[0],m=m[0],0!=y)return y;if(v=!!(2&m),!D&&d)return 3;if(null!=a&&(a[0]=!!(16&m)),null!=l&&(l[0]=v),null!=u&&(u[0]=0),l=c[0],m=f[0],d&&v&&null==h){y=0;break}if(4>r){y=7;break}if(D&&d||!D&&!d&&!i(t,n[0],"ALPH")){r=[r],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{S=t,y=n,D=r;var L=g.gb;_=g.na,F=g.P,A=g.Sa,C=22,e(null!=S),e(null!=D),w=y[0];var k=D[0];for(e(null!=_),e(null!=A),_[0]=null,F[0]=null,A[0]=0;;){if(y[0]=w,D[0]=k,8>k){y=7;break t}var P=E(S,w+4);if(4294967286<P){y=3;break t}var B=8+P+1&-2;if(C+=B,0<L&&C>L){y=3;break t}if(!i(S,w,"VP8 ")||!i(S,w,"VP8L")){y=0;break t}if(k[0]<B){y=7;break t}i(S,w,"ALPH")||(_[0]=S,F[0]=w+8,A[0]=P),w+=B,k-=B}}if(r=r[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],0!=y)break}r=[r],g.Ja=[g.Ja],g.xa=[g.xa];t:if(L=t,y=n,D=r,_=g.gb[0],F=g.Ja,A=g.xa,S=y[0],w=!i(L,S,"VP8 "),C=!i(L,S,"VP8L"),e(null!=L),e(null!=D),e(null!=F),e(null!=A),8>D[0])y=7;else{if(w||C){if(L=E(L,S+4),12<=_&&L>_-12){y=3;break t}if(p&&L>D[0]-8){y=7;break t}F[0]=L,y[0]+=8,D[0]-=8,A[0]=C}else A[0]=5<=D[0]&&47==L[S+0]&&!(L[S+4]>>5),F[0]=D[0];y=0}if(r=r[0],g.Ja=g.Ja[0],g.xa=g.xa[0],n=n[0],0!=y)break;if(4294967286<g.Ja)return 3;if(null==u||v||(u[0]=g.xa?2:1),l=[l],m=[m],g.xa){if(5>r){y=7;break}u=l,p=m,v=a,null==t||5>r?t=0:5<=r&&47==t[n+0]&&!(t[n+4]>>5)?(D=[0],L=[0],_=[0],b(F=new x,t,n,r),gt(F,D,L,_)?(null!=u&&(u[0]=D[0]),null!=p&&(p[0]=L[0]),null!=v&&(v[0]=_[0]),t=1):t=0):t=0}else{if(10>r){y=7;break}u=m,null==t||10>r||!$t(t,n+3,r-3)?t=0:(p=t[n+0]|t[n+1]<<8|t[n+2]<<16,v=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=g.Ja||!v||!t?t=0:(l&&(l[0]=v),u&&(u[0]=t),t=1))}if(!t)return 3;if(l=l[0],m=m[0],d&&(c[0]!=l||f[0]!=m))return 3;null!=h&&(h[0]=g,h.offset=n-h.w,e(4294967286>n-h.w),e(h.offset==h.ha-r));break}return 0==y||7==y&&d&&null==h?(null!=a&&(a[0]|=null!=g.na&&0<g.na.length),null!=o&&(o[0]=l),null!=s&&(s[0]=m),0):y}function Mi(t,e,i){var n=e.width,r=e.height,o=0,s=0,a=n,l=r;if(e.Da=null!=t&&0<t.Da,e.Da&&(a=t.cd,l=t.bd,o=t.v,s=t.j,11>i||(o&=-2,s&=-2),0>o||0>s||0>=a||0>=l||o+a>n||s+l>r))return 0;if(e.v=o,e.j=s,e.va=o+a,e.o=s+l,e.U=a,e.T=l,e.da=null!=t&&0<t.da,e.da){if(!I(a,l,i=[t.ib],o=[t.hb]))return 0;e.ib=i[0],e.hb=o[0]}return e.ob=null!=t&&t.ob,e.Kb=null==t||!t.Sd,e.da&&(e.ob=e.ib<3*n/4&&e.hb<3*r/4,e.Kb=0),1}function Oi(t){if(null==t)return 2;if(11>t.S){var e=t.f.RGBA;e.fb+=(t.height-1)*e.A,e.A=-e.A}else e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb);return 0}function Ii(t,e,i,n){if(null==n||0>=t||0>=e)return 2;if(null!=i){if(i.Da){var r=i.cd,s=i.bd,a=-2&i.v,l=-2&i.j;if(0>a||0>l||0>=r||0>=s||a+r>t||l+s>e)return 2;t=r,e=s}if(i.da){if(!I(t,e,r=[i.ib],s=[i.hb]))return 2;t=r[0],e=s[0]}}n.width=t,n.height=e;t:{var u=n.width,h=n.height;if(t=n.S,0>=u||0>=h||!(t>=On&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){a=s=r=e=0;var c=(l=u*zr[t])*h;if(11>t||(s=(h+1)/2*(e=(u+1)/2),12==t&&(a=(r=u)*h)),null==(h=o(c+2*s+a))){t=1;break t}n.sd=h,11>t?((u=n.f.RGBA).eb=h,u.fb=0,u.A=l,u.size=c):((u=n.f.kb).y=h,u.O=0,u.fa=l,u.Fd=c,u.f=h,u.N=0+c,u.Ab=e,u.Cd=s,u.ea=h,u.W=0+c+s,u.Db=e,u.Ed=s,12==t&&(u.F=h,u.J=0+c+2*s),u.Tc=a,u.lb=r)}if(e=1,r=n.S,s=n.width,a=n.height,r>=On&&13>r)if(11>r)t=n.f.RGBA,e&=(l=Math.abs(t.A))*(a-1)+s<=t.size,e&=l>=s*zr[r],e&=null!=t.eb;else{t=n.f.kb,l=(s+1)/2,c=(a+1)/2,u=Math.abs(t.fa),h=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(a-1)+s;e&=u*(a-1)+s<=t.Fd,e&=h*(c-1)+l<=t.Cd,e=(e&=f*(c-1)+l<=t.Ed)&u>=s&h>=l&f>=l,e&=null!=t.y,e&=null!=t.f,e&=null!=t.ea,12==r&&(e&=d>=s,e&=p<=t.Tc,e&=null!=t.F)}else e=0;t=e?0:2}}return 0!=t||null!=i&&i.fd&&(t=Oi(n)),t}var Ti=64,ji=[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],Ri=24,zi=32,qi=8,Hi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];R("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,e,i){return e[i+0]},t.Predictor3=function(t,e,i){return e[i+1]},t.Predictor4=function(t,e,i){return e[i-1]},t.Predictor5=function(t,e,i){return q(q(t,e[i+1]),e[i+0])},t.Predictor6=function(t,e,i){return q(t,e[i-1])},t.Predictor7=function(t,e,i){return q(t,e[i+0])},t.Predictor8=function(t,e,i){return q(e[i-1],e[i+0])},t.Predictor9=function(t,e,i){return q(e[i+0],e[i+1])},t.Predictor10=function(t,e,i){return q(q(t,e[i-1]),q(e[i+0],e[i+1]))},t.Predictor11=function(t,e,i){var n=e[i+0];return 0>=U(n>>24&255,t>>24&255,(e=e[i-1])>>24&255)+U(n>>16&255,t>>16&255,e>>16&255)+U(n>>8&255,t>>8&255,e>>8&255)+U(255&n,255&t,255&e)?n:t},t.Predictor12=function(t,e,i){var n=e[i+0];return(H((t>>24&255)+(n>>24&255)-((e=e[i-1])>>24&255))<<24|H((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|H((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|H((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,i){var n=e[i-1];return(W((t=q(t,e[i+0]))>>24&255,n>>24&255)<<24|W(t>>16&255,n>>16&255)<<16|W(t>>8&255,n>>8&255)<<8|W(255&t,255&n))>>>0};var Wi=t.PredictorAdd0;t.PredictorAdd1=V,R("Predictor2","PredictorAdd2"),R("Predictor3","PredictorAdd3"),R("Predictor4","PredictorAdd4"),R("Predictor5","PredictorAdd5"),R("Predictor6","PredictorAdd6"),R("Predictor7","PredictorAdd7"),R("Predictor8","PredictorAdd8"),R("Predictor9","PredictorAdd9"),R("Predictor10","PredictorAdd10"),R("Predictor11","PredictorAdd11"),R("Predictor12","PredictorAdd12"),R("Predictor13","PredictorAdd13");var Ui=t.PredictorAdd2;$("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),$("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Vi,Gi=t.ColorIndexInverseTransform,Yi=t.MapARGB,Xi=t.VP8LColorIndexInverseTransformAlpha,$i=t.MapAlpha,Ki=t.VP8LPredictorsAdd=[];Ki.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Ji,Qi,Zi,tn,en,nn,rn,on,sn,an,ln,un,hn,cn,fn,dn,pn,gn,mn,bn,vn,yn,Dn,xn,wn,_n,Fn,An,Sn=o(511),Cn=o(2041),Ln=o(225),kn=o(767),Pn=0,Nn=Cn,En=Ln,Bn=kn,Mn=Sn,On=0,In=1,Tn=2,jn=3,Rn=4,zn=5,qn=6,Hn=7,Wn=8,Un=9,Vn=10,Gn=[2,3,7],Yn=[3,3,11],Xn=[280,256,256,256,40],$n=[0,1,1,1,0],Kn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Jn=[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],Qn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Zn=8,tr=[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],er=[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],ir=null,nr=[[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]],rr=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],or=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],sr=[[[[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]]]],ar=[[[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]]],lr=[[[[255,255,255,255,255,255,255,255,255,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]]]],ur=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],hr=[],cr=[],fr=[],dr=1,pr=2,gr=[],mr=[];mi("UpsampleRgbLinePair",wi,3),mi("UpsampleBgrLinePair",_i,3),mi("UpsampleRgbaLinePair",Li,4),mi("UpsampleBgraLinePair",Ci,4),mi("UpsampleArgbLinePair",Si,4),mi("UpsampleRgba4444LinePair",Ai,2),mi("UpsampleRgb565LinePair",Fi,2);var br=t.UpsampleRgbLinePair,vr=t.UpsampleBgrLinePair,yr=t.UpsampleRgbaLinePair,Dr=t.UpsampleBgraLinePair,xr=t.UpsampleArgbLinePair,wr=t.UpsampleRgba4444LinePair,_r=t.UpsampleRgb565LinePair,Fr=16,Ar=1<<Fr-1,Sr=-227,Cr=482,Lr=6,kr=(256<<Lr)-1,Pr=0,Nr=o(256),Er=o(256),Br=o(256),Mr=o(256),Or=o(Cr-Sr),Ir=o(Cr-Sr);ki("YuvToRgbRow",wi,3),ki("YuvToBgrRow",_i,3),ki("YuvToRgbaRow",Li,4),ki("YuvToBgraRow",Ci,4),ki("YuvToArgbRow",Si,4),ki("YuvToRgba4444Row",Ai,2),ki("YuvToRgb565Row",Fi,2);var Tr=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],jr=[0,2,8],Rr=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(t,i,a,l,u){var h=In,c=new ei,f=new st;c.ba=f,f.S=h,f.width=[f.width],f.height=[f.height];var d=f.width,p=f.height,g=new at;if(null==g||null==t)var m=2;else e(null!=g),m=Bi(t,i,a,g.width,g.height,g.Pd,g.Qd,g.format,null);if(0!=m?d=0:(null!=d&&(d[0]=g.width[0]),null!=p&&(p[0]=g.height[0]),d=1),d){f.width=f.width[0],f.height=f.height[0],null!=l&&(l[0]=f.width),null!=u&&(u[0]=f.height);t:{if(l=new Gt,(u=new ii).data=t,u.w=i,u.ha=a,u.kd=1,i=[0],e(null!=u),(0==(t=Bi(u.data,u.w,u.ha,null,null,null,i,null,u))||7==t)&&i[0]&&(t=4),0==(i=t)){if(e(null!=c),l.data=u.data,l.w=u.w+u.offset,l.ha=u.ha-u.offset,l.put=dt,l.ac=ft,l.bc=pt,l.ma=c,u.xa){if(null==(t=Lt())){c=1;break t}if(function(t,i){var n=[0],r=[0],o=[0];e:for(;;){if(null==t)return 0;if(null==i)return t.a=2,0;if(t.l=i,t.a=0,b(t.m,i.data,i.w,i.ha),!gt(t.m,n,r,o)){t.a=3;break e}if(t.xb=pr,i.width=n[0],i.height=r[0],!kt(n[0],r[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,l)){if(l=0==(i=Ii(l.width,l.height,c.Oa,c.ba))){e:{l=t;i:for(;;){if(null==l){l=0;break e}if(e(null!=l.s.yc),e(null!=l.s.Ya),e(0<l.s.Wb),e(null!=(a=l.l)),e(null!=(u=a.ma)),0!=l.xb){if(l.ca=u.ba,l.tb=u.tb,e(null!=l.ca),!Mi(u.Oa,a,jn)){l.a=2;break i}if(!Pt(l,a.width))break i;if(a.da)break i;if((a.da||nt(l.ca.S))&&gi(),11>l.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=l.ca.f.kb.F&&gi()),l.Pb&&0<l.s.ua&&null==l.s.vb.X&&!B(l.s.vb,l.s.Wa.Xa)){l.a=1;break i}l.xb=0}if(!St(l,l.V,l.Ba,l.c,l.i,a.o,wt))break i;u.Dc=l.Ma,l=1;break e}e(0!=l.a),l=0}l=!l}l&&(i=t.a)}else i=t.a}else{if(null==(t=new Yt)){c=1;break t}if(t.Fa=u.na,t.P=u.P,t.qc=u.Sa,Kt(t,l)){if(0==(i=Ii(l.width,l.height,c.Oa,c.ba))){if(t.Aa=0,a=c.Oa,e(null!=(u=t)),null!=a){if(0<(d=0>(d=a.Md)?0:100<d?255:255*d/100)){for(p=g=0;4>p;++p)12>(m=u.pb[p]).lc&&(m.ia=d*Rr[0>m.lc?0:m.lc]>>3),g|=m.ia;g&&(alert("todo:VP8InitRandom"),u.ia=1)}u.Ga=a.Id,100<u.Ga?u.Ga=100:0>u.Ga&&(u.Ga=0)}(function(t,i){if(null==t)return 0;if(null==i)return Xt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Kt(t,i))return 0;if(e(t.cb),null==i.ac||i.ac(i)){i.ob&&(t.L=0);var a=jr[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=i.v-a>>4,t.zb=i.j-a>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=i.o+15+a>>4,t.Hb=i.va+15+a>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var l=t.ed;for(a=0;4>a;++a){var u;if(t.Qa.Cb){var h=t.Qa.Lb[a];t.Qa.Fb||(h+=l.Tb)}else h=l.Tb;for(u=0;1>=u;++u){var c=t.gd[a][u],f=h;if(l.Pc&&(f+=l.vd[0],u&&(f+=l.od[0])),0<(f=0>f?0:63<f?63:f)){var d=f;0<l.wb&&(d=4<l.wb?d>>2:d>>1)>9-l.wb&&(d=9-l.wb),1>d&&(d=1),c.dd=d,c.tc=2*f+d,c.ld=40<=f?2:15<=f?1:0}else c.tc=0;c.La=u}}}a=0}else Xt(t,6,"Frame setup failed"),a=t.a;if(a=0==a){if(a){t.$c=0,0<t.Aa||(t.Ic=1);e:{a=t.Ic,l=4*(d=t.za);var p=32*d,g=d+1,m=0<t.L?d*(0<t.Aa?2:1):0,b=(2==t.Aa?2:1)*d;if((c=l+832+(u=3*(16*a+jr[t.L])/2*p)+(h=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=c)a=0;else{if(c>t.Vb){if(t.Vb=0,t.Ec=o(c),t.Fc=0,null==t.Ec){a=Xt(t,1,"no memory during frame initialization.");break e}t.Vb=c}c=t.Ec,f=t.Fc,t.Ac=c,t.Bc=f,f+=l,t.Gd=s(p,Wt),t.Hd=0,t.rb=s(g+1,Rt),t.sb=1,t.wa=m?s(m,jt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=d),e(!0),t.oc=c,t.pc=f,f+=832,t.ya=s(b,qt),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=d),t.R=16*d,t.B=8*d,d=(p=jr[t.L])*t.R,p=p/2*t.B,t.sa=c,t.ta=f+d,t.qa=t.sa,t.ra=t.ta+16*a*t.R+p,t.Ha=t.qa,t.Ia=t.ra+8*a*t.B+p,t.$c=0,f+=u,t.mb=h?c:null,t.nb=h?f:null,e(f+h<=t.Fc+t.Vb),Qt(t),r(t.Ac,t.Bc,0,l),a=1}}if(a){if(i.ka=0,i.y=t.sa,i.O=t.ta,i.f=t.qa,i.N=t.ra,i.ea=t.Ha,i.Vd=t.Ia,i.fa=t.R,i.Rc=t.B,i.F=null,i.J=0,!Pn){for(a=-255;255>=a;++a)Sn[255+a]=0>a?-a:a;for(a=-1020;1020>=a;++a)Cn[1020+a]=-128>a?-128:127<a?127:a;for(a=-112;112>=a;++a)Ln[112+a]=-16>a?-16:15<a?15:a;for(a=-255;510>=a;++a)kn[255+a]=0>a?0:255<a?255:a;Pn=1}rn=le,on=re,an=oe,ln=se,un=ae,sn=ne,hn=Ye,cn=Xe,fn=Je,dn=Qe,pn=$e,gn=Ke,mn=Ze,bn=ti,vn=qe,yn=He,Dn=We,xn=Ue,cr[0]=_e,cr[1]=he,cr[2]=xe,cr[3]=we,cr[4]=Fe,cr[5]=Se,cr[6]=Ae,cr[7]=Ce,cr[8]=ke,cr[9]=Le,hr[0]=me,hr[1]=fe,hr[2]=de,hr[3]=pe,hr[4]=be,hr[5]=ve,hr[6]=ye,fr[0]=Be,fr[1]=ce,fr[2]=Pe,fr[3]=Ne,fr[4]=Oe,fr[5]=Me,fr[6]=Ie,a=1}else a=0}a&&(a=function(t,i){for(t.M=0;t.M<t.Va;++t.M){var s,a=t.Jc[t.M&t.Xb],l=t.m,u=t;for(s=0;s<u.za;++s){var h=l,c=u,f=c.Ac,d=c.Bc+4*s,p=c.zc,g=c.ya[c.aa+s];if(c.Qa.Bb?g.$b=L(h,c.Pa.jb[0])?2+L(h,c.Pa.jb[2]):L(h,c.Pa.jb[1]):g.$b=0,c.kc&&(g.Ad=L(h,c.Bd)),g.Za=!L(h,145)+0,g.Za){var m=g.Ob,b=0;for(c=0;4>c;++c){var v,y=p[0+c];for(v=0;4>v;++v){y=ar[f[d+v]][y];for(var D=or[L(h,y[0])];0<D;)D=or[2*D+L(h,y[D])];y=-D,f[d+v]=y}n(m,b,f,d,4),b+=4,p[0+c]=y}}else y=L(h,156)?L(h,128)?1:3:L(h,163)?2:0,g.Ob[0]=y,r(f,d,y,4),r(p,0,y,4);g.Dd=L(h,142)?L(h,114)?L(h,183)?1:3:2:0}if(u.m.Ka)return Xt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(u=a,h=(l=t).rb[l.sb-1],f=l.rb[l.sb+l.ja],s=l.ya[l.aa+l.ja],d=l.kc?s.Ad:0)h.la=f.la=0,s.Za||(h.Na=f.Na=0),s.Hc=0,s.Gc=0,s.ia=0;else{var x,w;if(h=f,f=u,d=l.Pa.Xc,p=l.ya[l.aa+l.ja],g=l.pb[p.$b],c=p.ad,m=0,b=l.rb[l.sb-1],y=v=0,r(c,m,0,384),p.Za)var _=0,F=d[3];else{D=o(16);var A=h.Na+b.Na;if(A=ir(f,d[1],A,g.Eb,0,D,0),h.Na=b.Na=(0<A)+0,1<A)rn(D,0,c,m);else{var S=D[0]+3>>3;for(D=0;256>D;D+=16)c[m+D]=S}_=1,F=d[0]}var C=15&h.la,k=15&b.la;for(D=0;4>D;++D){var P=1&k;for(S=w=0;4>S;++S)C=C>>1|(P=(A=ir(f,F,A=P+(1&C),g.Sc,_,c,m))>_)<<7,w=w<<2|(3<A?3:1<A?2:0!=c[m+0]),m+=16;C>>=4,k=k>>1|P<<7,v=(v<<8|w)>>>0}for(F=C,_=k>>4,x=0;4>x;x+=2){for(w=0,C=h.la>>4+x,k=b.la>>4+x,D=0;2>D;++D){for(P=1&k,S=0;2>S;++S)A=P+(1&C),C=C>>1|(P=0<(A=ir(f,d[2],A,g.Qc,0,c,m)))<<3,w=w<<2|(3<A?3:1<A?2:0!=c[m+0]),m+=16;C>>=2,k=k>>1|P<<5}y|=w<<4*x,F|=C<<4<<x,_|=(240&k)<<x}h.la=F,b.la=_,p.Hc=v,p.Gc=y,p.ia=43690&y?0:g.ia,d=!(v|y)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[s.$b][s.Za],l.wa[l.Y+l.ja].La|=!d),u.Ka)return Xt(t,7,"Premature end-of-file encountered.")}if(Qt(t),l=i,u=1,s=(a=t).D,h=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)e:{if(s.M=a.M,s.uc=h,Ei(a,s),u=1,s=(w=a.D).Nb,h=(y=jr[a.L])*a.R,f=y/2*a.B,D=16*s*a.R,S=8*s*a.B,d=a.sa,p=a.ta-h+D,g=a.qa,c=a.ra-f+S,m=a.Ha,b=a.Ia-f+S,k=0==(C=w.M),v=C>=a.Va-1,2==a.Aa&&Ei(a,w),w.uc)for(P=(A=a).D.M,e(A.D.uc),w=A.yb;w<A.Hb;++w){_=w,F=P;var N=(E=(q=A).D).Nb;x=q.R;var E=E.wa[E.Y+_],B=q.sa,M=q.ta+16*N*x+16*_,O=E.dd,I=E.tc;if(0!=I)if(e(3<=I),1==q.L)0<_&&yn(B,M,x,I+4),E.La&&xn(B,M,x,I),0<F&&vn(B,M,x,I+4),E.La&&Dn(B,M,x,I);else{var T=q.B,j=q.qa,R=q.ra+8*N*T+8*_,z=q.Ha,q=q.Ia+8*N*T+8*_;N=E.ld,0<_&&(cn(B,M,x,I+4,O,N),dn(j,R,z,q,T,I+4,O,N)),E.La&&(gn(B,M,x,I,O,N),bn(j,R,z,q,T,I,O,N)),0<F&&(hn(B,M,x,I+4,O,N),fn(j,R,z,q,T,I+4,O,N)),E.La&&(pn(B,M,x,I,O,N),mn(j,R,z,q,T,I,O,N))}}if(a.ia&&alert("todo:DitherRow"),null!=l.put){if(w=16*C,C=16*(C+1),k?(l.y=a.sa,l.O=a.ta+D,l.f=a.qa,l.N=a.ra+S,l.ea=a.Ha,l.W=a.Ia+S):(w-=y,l.y=d,l.O=p,l.f=g,l.N=c,l.ea=m,l.W=b),v||(C-=y),C>l.o&&(C=l.o),l.F=null,l.J=null,null!=a.Fa&&0<a.Fa.length&&w<C&&(l.J=hi(a,l,w,C-w),l.F=a.mb,null==l.F&&0==l.F.length)){u=Xt(a,3,"Could not decode alpha data.");break e}w<l.j&&(y=l.j-w,w=l.j,e(!(1&y)),l.O+=a.R*y,l.N+=a.B*(y>>1),l.W+=a.B*(y>>1),null!=l.F&&(l.J+=l.width*y)),w<C&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,null!=l.F&&(l.J+=l.v),l.ka=w-l.j,l.U=l.va-l.v,l.T=C-w,u=l.put(l))}s+1!=a.Ic||v||(n(a.sa,a.ta-h,d,p+16*a.R,h),n(a.qa,a.ra-f,g,c+8*a.B,f),n(a.Ha,a.Ia-f,m,b+8*a.B,f))}if(!u)return Xt(t,6,"Output aborted.")}return 1}(t,i)),null!=i.bc&&i.bc(i),a&=1}return a?(t.cb=0,a):0})(t,l)||(i=t.a)}}else i=t.a}0==i&&null!=c.Oa&&c.Oa.fd&&(i=Oi(c.ba))}c=i}h=0!=c?null:11>h?f.f.RGBA.eb:f.f.kb.y}else h=null;return h};var zr=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(t,e){for(var i="",n=0;n<4;n++)i+=String.fromCharCode(t[e++]);return i}function h(t,e){return t[e+0]|t[e+1]<<8}function c(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16)>>>0}function f(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new l;var d=[0],p=[0],g=[],m=new l,b=t,v=function(t,e){var i={},n=0,r=!1,o=0,s=0;if(i.frames=[],!function(t,e){for(var i=0;i<4;i++)if(t[e+i]!="RIFF".charCodeAt(i))return!0;return!1}(t,e)){for(f(t,e+=4),e+=8;e<t.length;){var a=u(t,e),l=f(t,e+=4);e+=4;var d=l+(1&l);switch(a){case"VP8 ":case"VP8L":void 0===i.frames[n]&&(i.frames[n]={}),(m=i.frames[n]).src_off=r?s:e-8,m.src_size=o+l+8,n++,r&&(r=!1,o=0,s=0);break;case"VP8X":(m=i.header={}).feature_flags=t[e];var p=e+4;m.canvas_width=1+c(t,p),p+=3,m.canvas_height=1+c(t,p),p+=3;break;case"ALPH":r=!0,o=d+8,s=e-8;break;case"ANIM":(m=i.header).bgcolor=f(t,e),p=e+4,m.loop_count=h(t,p),p+=2;break;case"ANMF":var g,m;(m=i.frames[n]={}).offset_x=2*c(t,e),e+=3,m.offset_y=2*c(t,e),e+=3,m.width=1+c(t,e),e+=3,m.height=1+c(t,e),e+=3,m.duration=c(t,e),e+=3,g=t[e++],m.dispose=1&g,m.blend=g>>1&1}"ANMF"!=a&&(e+=d)}return i}}(b,0);v.response=b,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,D=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,d=[y.canvas_height],p=[y.canvas_width];for(var x=0;x<D.length&&0!=D[x].blend;x++);}var w=D[0],_=m.WebPDecodeRGBA(b,w.src_off,w.src_size,p,d);w.rgba=_,w.imgwidth=p[0],w.imgheight=d[0];for(var F=0;F<p[0]*d[0]*4;F++)g[F]=_[F];return this.width=p,this.height=d,this.data=g,this}function fe(){var t,e=this.internal.__metadata__.metadata,i=unescape(encodeURIComponent(e));t=this.internal.__metadata__.rawXml?i:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><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>'+i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function de(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}!function(t){var e,i,r,o,s,a,l,u,c,f=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 u,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new a,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new a,this.lineDashOffset=t.lineDashOffset||0,this.lineDash=t.lineDash||[],this.margin=t.margin||[0,0,0,0],this.prevPageLastElemOffset=t.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new d(this),e=this.internal.f2,i=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,a=this.internal.Point,l=this.internal.Rectangle,u=this.internal.Matrix,c=new f}]);var d=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var e=t;Object.defineProperty(this,"pdf",{get:function(){return e}});var i=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return i},set:function(t){i=Boolean(t)}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(t){n=Boolean(t)}});var r=0;Object.defineProperty(this,"posX",{get:function(){return r},set:function(t){isNaN(t)||(r=t)}});var o=0;Object.defineProperty(this,"posY",{get:function(){return o},set:function(t){isNaN(t)||(o=t)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(t){var e;"number"==typeof t?e=[t,t,t,t]:((e=new Array(4))[0]=t[0],e[1]=t.length>=2?t[1]:e[0],e[2]=t.length>=3?t[2]:e[0],e[3]=t.length>=4?t[3]:e[1]),c.margin=e}});var s=!1;Object.defineProperty(this,"autoPaging",{get:function(){return s},set:function(t){s=t}});var a=0;Object.defineProperty(this,"lastBreak",{get:function(){return a},set:function(t){a=t}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(t){l=t}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(t){t instanceof f&&(c=t)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(t){c.path=t}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=p(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=p(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var h=null,d=null,g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(t){h=null,d=null,g=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(t))){var i=e[1];e[2];var n=e[3],r=e[4];e[5];var o=e[6],s=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(r)[2];r="px"===s?Math.floor(parseFloat(r)*this.pdf.internal.scaleFactor):"em"===s?Math.floor(parseFloat(r)*this.pdf.getFontSize()):Math.floor(parseFloat(r)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(r);var a=function(t){var e,i,n=[],r=t.trim();if(""===r)return $t;if(r in jt)return[jt[r]];for(;""!==r;){switch(i=null,e=(r=zt(r)).charAt(0)){case'"':case"'":i=qt(r.substring(1),e);break;default:i=Ht(r)}if(null===i)return $t;if(n.push(i[0]),""!==(r=zt(i[1]))&&","!==r.charAt(0))return $t;r=r.replace(/^,/,"")}return n}(o);if(this.fontFaces){var l=function(t,e){var i=t.getFontList(),n=JSON.stringify(i);if(null===h||d!==n){var r=function(t){var e=[];return Object.keys(t).forEach((function(i){t[i].forEach((function(t){var n=null;switch(t){case"bold":n={family:i,weight:"bold"};break;case"italic":n={family:i,style:"italic"};break;case"bolditalic":n={family:i,weight:"bold",style:"italic"};break;case"":case"normal":n={family:i}}null!==n&&(n.ref={name:i,style:t},e.push(n))}))})),e}(i);h=function(t){for(var e={},i=0;i<t.length;++i){var n=Ot(t[i]),r=n.family,o=n.stretch,s=n.style,a=n.weight;e[r]=e[r]||{},e[r][o]=e[r][o]||{},e[r][o][s]=e[r][o][s]||{},e[r][o][s][a]=n}return e}(r.concat(e)),d=n}return h}(this.pdf,this.fontFaces),u=a.map((function(t){return{family:t,stretch:"normal",weight:n,style:i}})),c=function(t,e,i){for(var n=(i=i||{}).defaultFontFamily||"times",r=Object.assign({},Tt,i.genericFontFamilies||{}),o=null,s=null,a=0;a<e.length;++a)if(r[(o=Ot(e[a])).family]&&(o.family=r[o.family]),t.hasOwnProperty(o.family)){s=t[o.family];break}if(!(s=s||t[n]))throw new Error("Could not find a font-family for the rule '"+Rt(o)+"' and default family '"+n+"'.");if(s=function(t,e){if(e[t])return e[t];var i=Et[t],n=i<=Et.normal?-1:1,r=It(e,Nt,i,n);if(!r)throw new Error("Could not find a matching font-stretch value for "+t);return r}(o.stretch,s),s=function(t,e){if(e[t])return e[t];for(var i=Pt[t],n=0;n<i.length;++n)if(e[i[n]])return e[i[n]];throw new Error("Could not find a matching font-style for "+t)}(o.style,s),!(s=function(t,e){if(e[t])return e[t];if(400===t&&e[500])return e[500];if(500===t&&e[400])return e[400];var i=Mt[t],n=It(e,Bt,i,t<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+t);return n}(o.weight,s)))throw new Error("Failed to resolve a font for the rule '"+Rt(o)+"'.");return s}(l,u);this.pdf.setFont(c.ref.name,c.ref.style)}else{var f="";("bold"===n||parseInt(n,10)>=700||"bold"===i)&&(f="bold"),"italic"===i&&(f+="italic"),0===f.length&&(f="normal");for(var p="",g={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"},m=0;m<a.length;m++){if(void 0!==this.pdf.internal.getFont(a[m],f,{noFallback:!0,disableWarning:!0})){p=a[m];break}if("bolditalic"===f&&void 0!==this.pdf.internal.getFont(a[m],"bold",{noFallback:!0,disableWarning:!0}))p=a[m],f="bold";else if(void 0!==this.pdf.internal.getFont(a[m],"normal",{noFallback:!0,disableWarning:!0})){p=a[m],f="normal";break}}if(""===p)for(var b=0;b<a.length;b++)if(g[a[b]]){p=g[a[b]];break}p=""===p?"Times":p,this.pdf.setFont(p,f)}}}}),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,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(t){this.ctx.lineDashOffset=t,z.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,z.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};d.prototype.setLineDash=function(t){this.lineDash=t},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){_.call(this,"fill",!1)},d.prototype.stroke=function(){_.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw h.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var i=this.ctx.transform.applyToPoint(new a(t,e));this.path.push({type:"mt",x:i.x,y:i.y}),this.ctx.lastPoint=new a(t,e)},d.prototype.closePath=function(){var t=new a(0,0),e=0;for(e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"===n(this.path[e+1])&&"number"==typeof this.path[e+1].x){t=new a(this.path[e+1].x,this.path[e+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new a(t.x,t.y)},d.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw h.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var i=this.ctx.transform.applyToPoint(new a(t,e));this.path.push({type:"lt",x:i.x,y:i.y}),this.ctx.lastPoint=new a(i.x,i.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),_.call(this,null,!0)},d.prototype.quadraticCurveTo=function(t,e,i,n){if(isNaN(i)||isNaN(n)||isNaN(t)||isNaN(e))throw h.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var r=this.ctx.transform.applyToPoint(new a(i,n)),o=this.ctx.transform.applyToPoint(new a(t,e));this.path.push({type:"qct",x1:o.x,y1:o.y,x:r.x,y:r.y}),this.ctx.lastPoint=new a(r.x,r.y)},d.prototype.bezierCurveTo=function(t,e,i,n,r,o){if(isNaN(r)||isNaN(o)||isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw h.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var s=this.ctx.transform.applyToPoint(new a(r,o)),l=this.ctx.transform.applyToPoint(new a(t,e)),u=this.ctx.transform.applyToPoint(new a(i,n));this.path.push({type:"bct",x1:l.x,y1:l.y,x2:u.x,y2:u.y,x:s.x,y:s.y}),this.ctx.lastPoint=new a(s.x,s.y)},d.prototype.arc=function(t,e,i,n,r,o){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(r))throw h.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new a(t,e));t=s.x,e=s.y;var l=this.ctx.transform.applyToPoint(new a(0,i)),u=this.ctx.transform.applyToPoint(new a(0,0));i=Math.sqrt(Math.pow(l.x-u.x,2)+Math.pow(l.y-u.y,2))}Math.abs(r-n)>=2*Math.PI&&(n=0,r=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:i,startAngle:n,endAngle:r,counterclockwise:o})},d.prototype.arcTo=function(t,e,i,n,r){throw new Error("arcTo not implemented.")},d.prototype.rect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw h.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+i,e),this.lineTo(t,e)},d.prototype.fillRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw h.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var r={};"butt"!==this.lineCap&&(r.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(r.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,i,n),this.fill(),r.hasOwnProperty("lineCap")&&(this.lineCap=r.lineCap),r.hasOwnProperty("lineJoin")&&(this.lineJoin=r.lineJoin)}},d.prototype.strokeRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw h.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");b.call(this)||(this.beginPath(),this.rect(t,e,i,n),this.stroke())},d.prototype.clearRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw h.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,i,n))},d.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,i=0;i<this.pdf.internal.getNumberOfPages();i++)this.pdf.setPage(i+1),this.pdf.internal.out("q");if(this.pdf.setPage(e),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},d.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,i=0;i<this.pdf.internal.getNumberOfPages();i++)this.pdf.setPage(i+1),this.pdf.internal.out("Q");this.pdf.setPage(e),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,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(t){var e,i,n,r;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))e=0,i=0,n=0,r=0;else{var o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==o)e=parseInt(o[1]),i=parseInt(o[2]),n=parseInt(o[3]),r=1;else if(null!==(o=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))e=parseInt(o[1]),i=parseInt(o[2]),n=parseInt(o[3]),r=parseFloat(o[4]);else{if(r=1,"string"==typeof t&&"#"!==t.charAt(0)){var s=new g(t);t=s.ok?s.toHex():"#000000"}4===t.length?(e=t.substring(1,2),e+=e,i=t.substring(2,3),i+=i,n=t.substring(3,4),n+=n):(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7)),e=parseInt(e,16),i=parseInt(i,16),n=parseInt(n,16)}}return{r:e,g:i,b:n,a:r,style:t}},m=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},b=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};d.prototype.fillText=function(t,e,i,n){if(isNaN(e)||isNaN(i)||"string"!=typeof t)throw h.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!m.call(this)){var r=T(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;N.call(this,{text:t,x:e,y:i,scale:o,angle:r,align:this.textAlign,maxWidth:n})}},d.prototype.strokeText=function(t,e,i,n){if(isNaN(e)||isNaN(i)||"string"!=typeof t)throw h.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!b.call(this)){n=isNaN(n)?void 0:n;var r=T(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;N.call(this,{text:t,x:e,y:i,scale:o,renderingMode:"stroke",angle:r,align:this.textAlign,maxWidth:n})}},d.prototype.measureText=function(t){if("string"!=typeof t)throw h.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,i=this.pdf.internal.scaleFactor,n=e.internal.getFontSize(),r=e.getStringUnitWidth(t)*n/e.internal.scaleFactor;return new function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this}({width:r*=Math.round(96*i/72*1e4)/1e4})},d.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw h.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var i=new u(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(i)},d.prototype.rotate=function(t){if(isNaN(t))throw h.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new u(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},d.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw h.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var i=new u(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(i)},d.prototype.transform=function(t,e,i,n,r,o){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(r)||isNaN(o))throw h.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new u(t,e,i,n,r,o);this.ctx.transform=this.ctx.transform.multiply(s)},d.prototype.setTransform=function(t,e,i,n,r,o){t=isNaN(t)?1:t,e=isNaN(e)?0:e,i=isNaN(i)?0:i,n=isNaN(n)?1:n,r=isNaN(r)?0:r,o=isNaN(o)?0:o,this.ctx.transform=new u(t,e,i,n,r,o)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(t,e,i,n,r,o,s,a,h){var c=this.pdf.getImageProperties(t),f=1,d=1,p=1,g=1;void 0!==n&&void 0!==a&&(p=a/n,g=h/r,f=c.width/n*a/n,d=c.height/r*h/r),void 0===o&&(o=e,s=i,e=0,i=0),void 0!==n&&void 0===a&&(a=n,h=r),void 0===n&&void 0===a&&(a=c.width,h=c.height);var m=this.ctx.transform.decompose(),b=T(m.rotate.shx),D=new u,_=(D=(D=(D=D.multiply(m.translate)).multiply(m.skew)).multiply(m.scale)).applyToRectangle(new l(o-e*p,s-i*g,n*f,r*d));if(this.autoPaging){for(var A,S=y.call(this,_),C=[],L=0;L<S.length;L+=1)-1===C.indexOf(S[L])&&C.push(S[L]);w(C);for(var k=C[0],P=C[C.length-1],N=k;N<P+1;N++){this.pdf.setPage(N);var E=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],B=1===N?this.posY+this.margin[0]:this.margin[0],M=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],O=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],I=1===N?0:M+(N-2)*O;if(0!==this.ctx.clip_path.length){var j=this.path;A=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(A,this.posX+this.margin[3],-I+B+this.ctx.prevPageLastElemOffset),F.call(this,"fill",!0),this.path=j}var R=JSON.parse(JSON.stringify(_));R=x([R],this.posX+this.margin[3],-I+B+this.ctx.prevPageLastElemOffset)[0];var z=(N>k||N<P)&&v.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],E,O,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",R.x,R.y,R.w,R.h,null,null,b),z&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(t,"JPEG",_.x,_.y,_.w,_.h,null,null,b)};var y=function(t,e,i){var n=[];e=e||this.pdf.internal.pageSize.width,i=i||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var r=this.posY+this.ctx.prevPageLastElemOffset;switch(t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+r)/i)+1);break;case"arc":n.push(Math.floor((t.y+r-t.radius)/i)+1),n.push(Math.floor((t.y+r+t.radius)/i)+1);break;case"qct":var o=j(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor((o.y+r)/i)+1),n.push(Math.floor((o.y+o.h+r)/i)+1);break;case"bct":var s=R(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor((s.y+r)/i)+1),n.push(Math.floor((s.y+s.h+r)/i)+1);break;case"rect":n.push(Math.floor((t.y+r)/i)+1),n.push(Math.floor((t.y+t.h+r)/i)+1)}for(var a=0;a<n.length;a+=1)for(;this.pdf.internal.getNumberOfPages()<n[a];)D.call(this);return n},D=function(){var t=this.fillStyle,e=this.strokeStyle,i=this.font,n=this.lineCap,r=this.lineWidth,o=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=i,this.lineCap=n,this.lineWidth=r,this.lineJoin=o},x=function(t,e,i){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=e,t[n].y2+=i;case"qct":t[n].x1+=e,t[n].y1+=i;default:t[n].x+=e,t[n].y+=i}return t},w=function(t){return t.sort((function(t,e){return t-e}))},_=function(t,e){var i=this.fillStyle,n=this.strokeStyle,r=this.lineCap,o=this.lineWidth,s=Math.abs(o*this.ctx.transform.scaleX),a=this.lineJoin;if(this.autoPaging){for(var l,u,h=JSON.parse(JSON.stringify(this.path)),c=JSON.parse(JSON.stringify(this.path)),f=[],d=0;d<c.length;d++)if(void 0!==c[d].x)for(var p=y.call(this,c[d]),g=0;g<p.length;g+=1)-1===f.indexOf(p[g])&&f.push(p[g]);for(var m=0;m<f.length;m++)for(;this.pdf.internal.getNumberOfPages()<f[m];)D.call(this);w(f);for(var b=f[0],_=f[f.length-1],A=b;A<_+1;A++){this.pdf.setPage(A),this.fillStyle=i,this.strokeStyle=n,this.lineCap=r,this.lineWidth=s,this.lineJoin=a;var S=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],C=1===A?this.posY+this.margin[0]:this.margin[0],L=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],k=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],P=1===A?0:L+(A-2)*k;if(0!==this.ctx.clip_path.length){var N=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(l,this.posX+this.margin[3],-P+C+this.ctx.prevPageLastElemOffset),F.call(this,t,!0),this.path=N}if(u=JSON.parse(JSON.stringify(h)),this.path=x(u,this.posX+this.margin[3],-P+C+this.ctx.prevPageLastElemOffset),!1===e||0===A){var E=(A>b||A<_)&&v.call(this);E&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],S,k,null).clip().discardPath()),F.call(this,t,e),E&&this.pdf.restoreGraphicsState()}this.lineWidth=o}this.path=h}else this.lineWidth=s,F.call(this,t,e),this.lineWidth=o},F=function(t,e){if(("stroke"!==t||e||!b.call(this))&&("stroke"===t||e||!m.call(this))){for(var i,n,r=[],o=this.path,s=0;s<o.length;s++){var a=o[s];switch(a.type){case"begin":r.push({begin:!0});break;case"close":r.push({close:!0});break;case"mt":r.push({start:a,deltas:[],abs:[]});break;case"lt":var l=r.length;if(o[s-1]&&!isNaN(o[s-1].x)&&(i=[a.x-o[s-1].x,a.y-o[s-1].y],l>0))for(;l>=0;l--)if(!0!==r[l-1].close&&!0!==r[l-1].begin){r[l-1].deltas.push(i),r[l-1].abs.push(a);break}break;case"bct":i=[a.x1-o[s-1].x,a.y1-o[s-1].y,a.x2-o[s-1].x,a.y2-o[s-1].y,a.x-o[s-1].x,a.y-o[s-1].y],r[r.length-1].deltas.push(i);break;case"qct":var u=o[s-1].x+2/3*(a.x1-o[s-1].x),h=o[s-1].y+2/3*(a.y1-o[s-1].y),c=a.x+2/3*(a.x1-a.x),f=a.y+2/3*(a.y1-a.y),d=a.x,p=a.y;i=[u-o[s-1].x,h-o[s-1].y,c-o[s-1].x,f-o[s-1].y,d-o[s-1].x,p-o[s-1].y],r[r.length-1].deltas.push(i);break;case"arc":r.push({deltas:[],abs:[],arc:!0}),Array.isArray(r[r.length-1].abs)&&r[r.length-1].abs.push(a)}}n=e?null:"stroke"===t?"stroke":"fill";for(var g=!1,v=0;v<r.length;v++)if(r[v].arc)for(var y=r[v].abs,D=0;D<y.length;D++){var x=y[D];"arc"===x.type?C.call(this,x.x,x.y,x.radius,x.startAngle,x.endAngle,x.counterclockwise,void 0,e,!g):E.call(this,x.x,x.y),g=!0}else if(!0===r[v].close)this.pdf.internal.out("h"),g=!1;else if(!0!==r[v].begin){var w=r[v].start.x,_=r[v].start.y;B.call(this,r[v].deltas,w,_),g=!0}n&&L.call(this,n),e&&k.call(this)}},A=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,i=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-i;case"top":return t+e-i;case"hanging":return t+e-2*i;case"middle":return t+e/2-i;default:return t}},S=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var C=function(t,e,i,n,r,o,s,a,l){for(var u=O.call(this,i,n,r,o),h=0;h<u.length;h++){var c=u[h];0===h&&(l?P.call(this,c.x1+t,c.y1+e):E.call(this,c.x1+t,c.y1+e)),M.call(this,t,e,c.x2,c.y2,c.x3,c.y3,c.x4,c.y4)}a?k.call(this):L.call(this,s)},L=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},k=function(){this.pdf.clip(),this.pdf.discardPath()},P=function(t,e){this.pdf.internal.out(i(t)+" "+r(e)+" m")},N=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;default:e="left"}var i,n,r,o=this.pdf.getTextDimensions(t.text),s=A.call(this,t.y),h=S.call(this,s)-o.h,c=this.ctx.transform.applyToPoint(new a(t.x,s));if(this.autoPaging){var f=this.ctx.transform.decompose(),d=new u;d=(d=(d=d.multiply(f.translate)).multiply(f.skew)).multiply(f.scale);for(var p=this.ctx.transform.applyToRectangle(new l(t.x,s,o.w,o.h)),g=d.applyToRectangle(new l(t.x,h,o.w,o.h)),m=y.call(this,g),b=[],D=0;D<m.length;D+=1)-1===b.indexOf(m[D])&&b.push(m[D]);w(b);for(var _=b[0],C=b[b.length-1],L=_;L<C+1;L++){this.pdf.setPage(L);var k=1===L?this.posY+this.margin[0]:this.margin[0],P=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],N=this.pdf.internal.pageSize.height-this.margin[2],E=N-this.margin[0],B=this.pdf.internal.pageSize.width-this.margin[1],M=B-this.margin[3],O=1===L?0:P+(L-2)*E;if(0!==this.ctx.clip_path.length){var I=this.path;i=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(i,this.posX+this.margin[3],-1*O+k),F.call(this,"fill",!0),this.path=I}var T=x([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-O+k+this.ctx.prevPageLastElemOffset)[0];t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),r=this.lineWidth,this.lineWidth=r*t.scale);var j="text"!==this.autoPaging;if(j||T.y+T.h<=N){if(j||T.y>=k&&T.x<=B){var R=j?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||B-T.x)[0],z=x([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-O+k+this.ctx.prevPageLastElemOffset)[0],q=j&&(L>_||L<C)&&v.call(this);q&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],M,E,null).clip().discardPath()),this.pdf.text(R,z.x,z.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),q&&this.pdf.restoreGraphicsState()}}else T.y<N&&(this.ctx.prevPageLastElemOffset+=N-T.y);t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=r)}}else t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),r=this.lineWidth,this.lineWidth=r*t.scale),this.pdf.text(t.text,c.x+this.posX,c.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=r)},E=function(t,e,n,o){n=n||0,o=o||0,this.pdf.internal.out(i(t+n)+" "+r(e+o)+" l")},B=function(t,e,i){return this.pdf.lines(t,e,i,null,null)},M=function(t,i,n,r,a,l,u,h){this.pdf.internal.out([e(o(n+t)),e(s(r+i)),e(o(a+t)),e(s(l+i)),e(o(u+t)),e(s(h+i)),"c"].join(" "))},O=function(t,e,i,n){for(var r=2*Math.PI,o=Math.PI/2;e>i;)e-=r;var s=Math.abs(i-e);s<r&&n&&(s=r-s);for(var a=[],l=n?-1:1,u=e;s>1e-5;){var h=u+l*Math.min(s,o);a.push(I.call(this,t,u,h)),s-=Math.abs(h-u),u=h}return a},I=function(t,e,i){var n=(i-e)/2,r=t*Math.cos(n),o=t*Math.sin(n),s=r,a=-o,l=s*s+a*a,u=l+s*r+a*o,h=4/3*(Math.sqrt(2*l*u)-u)/(s*o-a*r),c=s-h*a,f=a+h*s,d=c,p=-f,g=n+e,m=Math.cos(g),b=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:c*m-f*b,y2:c*b+f*m,x3:d*m-p*b,y3:d*b+p*m,x4:t*Math.cos(i),y4:t*Math.sin(i)}},T=function(t){return 180*t/Math.PI},j=function(t,e,i,n,r,o){var s=t+.5*(i-t),a=e+.5*(n-e),u=r+.5*(i-r),h=o+.5*(n-o),c=Math.min(t,r,s,u),f=Math.max(t,r,s,u),d=Math.min(e,o,a,h),p=Math.max(e,o,a,h);return new l(c,d,f-c,p-d)},R=function(t,e,i,n,r,o,s,a){var u,h,c,f,d,p,g,m,b,v,y,D,x,w,_=i-t,F=n-e,A=r-i,S=o-n,C=s-r,L=a-o;for(h=0;h<41;h++)b=(g=(c=t+(u=h/40)*_)+u*((d=i+u*A)-c))+u*(d+u*(r+u*C-d)-g),v=(m=(f=e+u*F)+u*((p=n+u*S)-f))+u*(p+u*(o+u*L-p)-m),0==h?(y=b,D=v,x=b,w=v):(y=Math.min(y,b),D=Math.min(D,v),x=Math.max(x,b),w=Math.max(w,v));return new l(Math.round(y),Math.round(D),Math.round(x-y),Math.round(w-D))},z=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t,e,i=(t=this.ctx.lineDash,e=this.ctx.lineDashOffset,JSON.stringify({lineDash:t,lineDashOffset:e}));this.prevLineDash!==i&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=i)}}}(q.API),function(t){var e=function(t){var e,i,n,r,o,s,a,l,u,h;for(/[^\x00-\xFF]/.test(t),i=[],n=0,r=(t+=e="\0\0\0\0".slice(t.length%4||4)).length;r>n;n+=4)0!==(o=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(s=(o=((o=((o=((o=(o-(h=o%85))/85)-(u=o%85))/85)-(l=o%85))/85)-(a=o%85))/85)%85,i.push(s+33,a+33,l+33,u+33,h+33)):i.push(122);return function(t,e){for(var i=e;i>0;i--)t.pop()}(i,e.length),String.fromCharCode.apply(String,i)+"~>"},i=function(t){var e,i,n,r,o,s=String,a="length",l=255,u="charCodeAt",h="slice",c="replace";for(t[h](-2),t=t[h](0,-2)[c](/\s/g,"")[c]("z","!!!!!"),n=[],r=0,o=(t+=e="uuuuu"[h](t[a]%5||5))[a];o>r;r+=5)i=52200625*(t[u](r)-33)+614125*(t[u](r+1)-33)+7225*(t[u](r+2)-33)+85*(t[u](r+3)-33)+(t[u](r+4)-33),n.push(l&i>>24,l&i>>16,l&i>>8,l&i);return function(t,e){for(var i=e;i>0;i--)t.pop()}(n,e[a]),s.fromCharCode.apply(s,n)},n=function(t){return t.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">"},o=function(t){var e=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===e.test(t))return"";for(var i="",n=0;n<t.length;n+=2)i+=String.fromCharCode("0x"+(t[n]+t[n+1]));return i},s=function(t){for(var e=new Uint8Array(t.length),i=t.length;i--;)e[i]=t.charCodeAt(i);return(e=(0,r.$)(e)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,r){var a=0,l=t||"",u=[];for("string"==typeof(r=r||[])&&(r=[r]),a=0;a<r.length;a+=1)switch(r[a]){case"ASCII85Decode":case"/ASCII85Decode":l=i(l),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=e(l),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=o(l),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=n(l),u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=s(l),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+r[a]+'" is not implemented')}return{data:l,reverseChain:u.reverse().join(" ")}}}(q.API),(Xt=q.API).loadFile=function(t,e,i){return function(t,e,i){e=!1!==e,i="function"==typeof i?i:function(){};var n=void 0;try{n=function(t,e,i){var n=new XMLHttpRequest,r=0,o=function(t){var e=t.length,i=[],n=String.fromCharCode;for(r=0;r<e;r+=1)i.push(n(255&t.charCodeAt(r)));return i.join("")};if(n.open("GET",t,!e),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(n.onload=function(){200===n.status?i(o(this.responseText)):i(void 0)}),n.send(null),e&&200===n.status)return o(n.responseText)}(t,e,i)}catch(l){}return n}(t,e,i)},Xt.allowFsRead=void 0,Xt.loadImageFile=Xt.loadFile,function(t){function e(){return(l.html2canvas?Promise.resolve(l.html2canvas):Promise.resolve().then(i.t.bind(i,20354,23))).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(l.DOMPurify?Promise.resolve(l.DOMPurify):i.e(9418).then(i.bind(i,99418))).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var o=function(t){var e=n(t);return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"object":"unknown"},s=function(t,e){var i=document.createElement(t);for(var n in e.className&&(i.className=e.className),e.innerHTML&&e.dompurify&&(i.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)i.style[n]=e.style[n];return i},a=function t(e,i){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),r=e.firstChild;r;r=r.nextSibling)!0!==i&&1===r.nodeType&&"SCRIPT"===r.nodeName||n.appendChild(t(r,i));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",(function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft}),!0)),n},u=function t(e){var i=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),i);return(n=n.setProgress(1,t,1,[t])).set(e)};(u.prototype=Object.create(Promise.prototype)).constructor=u,u.convert=function(t,e){return t.__proto__=e||u.prototype,t},u.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"}},u.prototype.from=function(t,e){return this.then((function(){switch(e=e||function(t){switch(o(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t),e){case"string":return this.then(r).then((function(e){return this.set({src:s("div",{innerHTML:t,dompurify:e})})}));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.")}}))},u.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.")}},u.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:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(s("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"}))},u.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},u.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var e=this.opt.jsPDF,i=this.opt.fontFaces,n="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,r=Object.assign({async:!0,allowTaint:!0,scale:n,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,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=i,i)for(var o=0;o<i.length;++o){var s=i[o],a=s.src.find((function(t){return"truetype"===t.format}));a&&e.addFont(a.url,s.ref.name,s.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,e.context2d.save(!0),t(this.prop.container,r)})).then((function(t){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},u.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}))},u.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},u.prototype.output=function(t,e,i){return"img"===(i=i||"pdf").toLowerCase()||"image"===i.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},u.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,e)}))},u.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.'}}))},u.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)}))},u.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},u.prototype.set=function(t){if("object"!==o(t))return this;var e=Object.keys(t||{}).map((function(e){if(e in u.template.prop)return function(){this.prop[e]=t[e]};switch(e){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[e]=t[e]}}}),this);return this.then((function(){return this.thenList(e)}))},u.prototype.get=function(t,e){return this.then((function(){var i=t in u.template.prop?this.prop[t]:this.opt[t];return e?e(i):i}))},u.prototype.setMargin=function(t){return this.then((function(){switch(o(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)},u.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then((function(){(t=t||q.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:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},u.prototype.setProgress=function(t,e,i,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=i&&(this.progress.n=i),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},u.prototype.updateProgress=function(t,e,i,n){return this.setProgress(t?this.progress.val+t:null,e||null,i?this.progress.n+i:null,n?this.progress.stack.concat(n):null)},u.prototype.then=function(t,e){var i=this;return this.thenCore(t,e,(function(t,e){return i.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(e){return i.updateProgress(null,t),e})).then(t,e).then((function(t){return i.updateProgress(1),t}))}))},u.prototype.thenCore=function(t,e,i){i=i||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),e&&(e=e.bind(n));var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:u.convert(Object.assign({},n),Promise.prototype),o=i.call(r,t,e);return u.convert(o,n.__proto__)},u.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},u.prototype.thenList=function(t){var e=this;return t.forEach((function(t){e=e.thenCore(t)})),e},u.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return u.convert(e,this)},u.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},u.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},u.prototype.using=u.prototype.set,u.prototype.saveAs=u.prototype.save,u.prototype.export=u.prototype.output,u.prototype.run=u.prototype.then,q.getPageSize=function(t,e,i){if("object"===n(t)){var r=t;t=r.orientation,e=r.unit||e,i=r.format||i}e=e||"mm",i=i||"a4",t=(""+(t||"P")).toLowerCase();var o,s=(""+i).toLowerCase(),a={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":o=1;break;case"mm":o=72/25.4;break;case"cm":o=72/2.54;break;case"in":o=72;break;case"px":o=.75;break;case"pc":case"em":o=12;break;case"ex":o=6;break;default:throw"Invalid unit: "+e}var l,u=0,h=0;if(a.hasOwnProperty(s))u=a[s][1]/o,h=a[s][0]/o;else try{u=i[1],h=i[0]}catch(g){throw new Error("Invalid format: "+i)}if("p"===t||"portrait"===t)t="p",h>u&&(l=h,h=u,u=l);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",u>h&&(l=h,h=u,u=l)}return{width:h,height:u,unit:e,k:o,orientation:t}},t.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Ot):null;var i=new u(e);return e.worker?i:i.from(t).doCallback()}}(q.API),q.API.addJS=function(t){var e,i,n=function(t){for(var e="",i=0;i<t.length;i++){var n=t[i];if("("===n||")"===n){for(var r=0,o=i-1;o>=0&&"\\"===t[o];o--)r++;e+=r%2==0?"\\"+n:n}else e+=n}return e}(t);return this.internal.events.subscribe("postPutResources",(function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),i=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==e&&void 0!==i&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")})),this},function(t){var e;t.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),r=0;r<n.length;r++){var o=n[r],s=i.exec(o);if(null!=s){var a=s[1];t.internal.newObjectDeferredBegin(a,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,u=[];for(r=0;r<l;r++){var h=t.internal.newObject();u.push(h);var c=t.internal.getPageInfo(r+1);t.internal.write("<< /D["+c.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),r=0;r<u.length;r++)t.internal.write("(page_"+(r+1)+")"+u[r]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,i){var n={title:e,options:i,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var i=0;i<e.children.length;i++)this.genIds_r(e.children[i])},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(e){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<e.children.length;n++){var r=e.children[n];this.objStart(r),this.line("/Title "+this.makeString(r.title)),this.line("/Parent "+this.makeRef(e)),n>0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n<e.children.length-1&&this.line("/Next "+this.makeRef(e.children[n+1])),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1])));var o=this.count=this.count_r({count:0},r);if(o>0&&this.line("/Count "+o),r.options&&r.options.pageNumber){var s=t.internal.getPageInfo(r.options.pageNumber);this.line("/Dest ["+s.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var a=0;a<e.children.length;a++)this.renderItems(e.children[a])},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(e){return"("+t.internal.pdfEscape(e)+")"},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,e){for(var i=0;i<e.children.length;i++)t.count++,this.count_r(t,e.children[i]);return t.count}}])}(q.API),function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,i,n,r,o,s){var a,l=this.decode.DCT_DECODE,u=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,a=function(t){for(var i,n=256*t.charCodeAt(4)+t.charCodeAt(5),r=t.length,o={width:0,height:0,numcomponents:1},s=4;s<r;s+=2){if(s+=n,-1!==e.indexOf(t.charCodeAt(s+1))){i=256*t.charCodeAt(s+5)+t.charCodeAt(s+6),o={width:256*t.charCodeAt(s+7)+t.charCodeAt(s+8),height:i,numcomponents:t.charCodeAt(s+9)};break}n=256*t.charCodeAt(s+2)+t.charCodeAt(s+3)}return o}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),a.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}u={data:t,width:a.width,height:a.height,colorSpace:s,bitsPerComponent:8,filter:l,index:i,alias:n}}return u}}(q.API),q.API.processPNG=function(t,e,i,n){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var o,l=(0,a.D4)(t,{checkCrc:!0}),u=l.width,h=l.height,c=l.channels,f=l.palette,d=l.depth;o=f&&1===c?function(t){for(var e=t.width,i=t.height,n=t.data,r=t.palette,o=t.depth,a=!1,l=[],u=[],h=void 0,c=!1,f=0,d=0;d<r.length;d++){var p=s(r[d],4),g=p[0],m=p[1],b=p[2],v=p[3];l.push(g,m,b),null!=v&&(0===v?(f++,u.length<1&&u.push(d)):v<255&&(c=!0))}if(c||f>1){a=!0,u=void 0;var y=e*i;h=new Uint8Array(y);for(var D=new DataView(n.buffer),x=0;x<y;x++){var w=s(r[re(D,x,o)],4)[3];h[x]=w}}else 0===f&&(u=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:a?8:void 0,colorBytes:n,alphaBytes:h,needSMask:a,palette:l,mask:u}}(l):2===c||4===c?function(t){for(var e=t.data,i=t.width,n=t.height,r=t.channels,o=t.depth,s=2===r?"DeviceGray":"DeviceRGB",a=r-1,l=i*n,u=a,h=l*u,c=1*l,f=Math.ceil(h*o/8),d=Math.ceil(c*o/8),p=new Uint8Array(f),g=new Uint8Array(d),m=new DataView(e.buffer),b=new DataView(p.buffer),v=new DataView(g.buffer),y=!1,D=0;D<l;D++){for(var x=D*r,w=0;w<u;w++)oe(b,re(m,x+w,o),D*u+w,o);var _=re(m,x+u,o);_<(1<<o)-1&&(y=!0),oe(v,_,1*D,o)}return{colorSpace:s,colorsPerPixel:a,sMaskBitsPerComponent:y?o:void 0,colorBytes:p,alphaBytes:g,needSMask:y}}(l):function(t){var e=t.data,i=1===t.channels?"DeviceGray":"DeviceRGB";return{colorSpace:i,colorsPerPixel:"DeviceGray"===i?1:3,colorBytes:e instanceof Uint16Array?function(t){for(var e=t.length,i=new Uint8Array(2*e),n=new DataView(i.buffer,i.byteOffset,i.byteLength),r=0;r<e;r++)n.setUint16(2*r,t[r],!1);return i}(e):e,needSMask:!1}}(l);var p,g,m,b=o,v=b.colorSpace,y=b.colorsPerPixel,D=b.sMaskBitsPerComponent,x=b.colorBytes,w=b.alphaBytes,_=b.needSMask,F=b.palette,A=b.mask,S=null;return n!==q.API.image_compression.NONE&&"function"==typeof r.$?(S=function(t){var e;switch(t){case q.API.image_compression.FAST:e=11;break;case q.API.image_compression.MEDIUM:e=13;break;case q.API.image_compression.SLOW:e=14;break;default:e=12}return e}(n),p=this.decode.FLATE_DECODE,g="/Predictor ".concat(S," /Colors ").concat(y," /BitsPerComponent ").concat(d," /Columns ").concat(u),t=Kt(x,Math.ceil(u*y*d/8),y,d,n),_&&(m=Kt(w,Math.ceil(u*D/8),1,D,n))):(p=void 0,g=void 0,t=x,_&&(m=w)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:i,data:t,index:e,filter:p,decodeParameters:g,transparency:A,palette:F,sMask:m,predictor:S,width:u,height:h,bitsPerComponent:d,sMaskBitsPerComponent:D,colorSpace:v}}},function(t){t.processGIF89A=function(e,i,n,r){var o=new ae(e),s=o.width,a=o.height,l=[];o.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:s,height:a},h=new ue(100).encode(u,100);return t.processJPEG.call(this,h,i,n,r)},t.processGIF87A=t.processGIF89A}(q.API),he.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 e=0;e<t;e++){var i=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:r,green:n,blue:i,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},he.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[t]()}catch(i){h.log("bit decode error:"+i)}},he.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),i=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<e;r++)for(var o=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+8*r*4,a=0;a<8&&8*r+a<this.width;a++){var l=this.palette[o>>7-a&1];this.data[s+4*a]=l.blue,this.data[s+4*a+1]=l.green,this.data[s+4*a+2]=l.red,this.data[s+4*a+3]=255}0!==i&&(this.pos+=4-i)}},he.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,i=this.height-1;i>=0;i--){for(var n=this.bottom_up?i:this.height-1-i,r=0;r<t;r++){var o=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+2*r*4,a=o>>4,l=15&o,u=this.palette[a];if(this.data[s]=u.blue,this.data[s+1]=u.green,this.data[s+2]=u.red,this.data[s+3]=255,2*r+1>=this.width)break;u=this.palette[l],this.data[s+4]=u.blue,this.data[s+4+1]=u.green,this.data[s+4+2]=u.red,this.data[s+4+3]=255}0!==e&&(this.pos+=4-e)}},he.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+4*n;if(r<this.palette.length){var s=this.palette[r];this.data[o]=s.red,this.data[o+1]=s.green,this.data[o+2]=s.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}0!==t&&(this.pos+=4-t)}},he.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),i=this.height-1;i>=0;i--){for(var n=this.bottom_up?i:this.height-1-i,r=0;r<this.width;r++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,a=(o>>5&e)/e*255|0,l=(o>>10&e)/e*255|0,u=o>>15?255:0,h=n*this.width*4+4*r;this.data[h]=l,this.data[h+1]=a,this.data[h+2]=s,this.data[h+3]=u}this.pos+=t}},he.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),i=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&e)/e*255|0,l=(s>>5&i)/i*255|0,u=(s>>11)/e*255|0,h=r*this.width*4+4*o;this.data[h]=u,this.data[h+1]=l,this.data[h+2]=a,this.data[h+3]=255}this.pos+=t}},he.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*i;this.data[s]=o,this.data[s+1]=r,this.data[s+2]=n,this.data[s+3]=255}this.pos+=this.width%4}},he.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*i;this.data[a]=o,this.data[a+1]=r,this.data[a+2]=n,this.data[a+3]=s}},he.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,i,n,r){var o=new he(e,!1),s=o.width,a=o.height,l={data:o.getData(),width:s,height:a},u=new ue(100).encode(l,100);return t.processJPEG.call(this,u,i,n,r)}}(q.API),ce.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,i,n,r){var o=new ce(e),s=o.width,a=o.height,l={data:o.getData(),width:s,height:a},u=new ue(100).encode(l,100);return t.processJPEG.call(this,u,i,n,r)}}(q.API),q.API.processRGBA=function(t,e,i){for(var n=t.data,r=n.length,o=new Uint8Array(r/4*3),s=new Uint8Array(r/4),a=0,l=0,u=0;u<r;u+=4){var h=n[u],c=n[u+1],f=n[u+2],d=n[u+3];o[a++]=h,o[a++]=c,o[a++]=f,s[l++]=d}var p=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:p,index:e,alias:i,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},q.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:"North Macedonia",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},Wt=q.API,Ut=Wt.getCharWidthsArray=function(t,e){var i,r,o=(e=e||{}).font||this.internal.getFont(),s=e.fontSize||this.internal.getFontSize(),a=e.charSpace||this.internal.getCharSpace(),l=e.widths?e.widths:o.metadata.Unicode.widths,u=l.fof?l.fof:1,h=e.kerning?e.kerning:o.metadata.Unicode.kerning,c=h.fof?h.fof:1,f=!1!==e.doKerning,d=0,p=t.length,g=0,m=l[0]||u,b=[];for(i=0;i<p;i++)r=t.charCodeAt(i),"function"==typeof o.metadata.widthOfString?b.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(r))+a*(1e3/s)||0)/1e3):(d=f&&"object"===n(h[r])&&!isNaN(parseInt(h[r][g],10))?h[r][g]/c:0,b.push((l[r]||m)/u+d)),g=r;return b},Vt=Wt.getStringUnitWidth=function(t,e){var i=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),r=e.charSpace||this.internal.getCharSpace();return Wt.processArabic&&(t=Wt.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,i,r)/i:Ut.apply(this,arguments).reduce((function(t,e){return t+e}),0)},Gt=function(t,e,i,n){for(var r=[],o=0,s=t.length,a=0;o!==s&&a+e[o]<i;)a+=e[o],o++;r.push(t.slice(0,o));var l=o;for(a=0;o!==s;)a+e[o]>n&&(r.push(t.slice(l,o)),a=0,l=o),a+=e[o],o++;return l!==o&&r.push(t.slice(l,o)),r},Yt=function(t,e,i){i||(i={});var n,r,o,s,a,l,u,h=[],c=[h],f=i.textIndent||0,d=0,p=0,g=t.split(" "),m=Ut.apply(this,[" ",i])[0];if(l=-1===i.lineIndent?g[0].length+2:i.lineIndent||0){var b=Array(l).join(" "),v=[];g.map((function(t){(t=t.split(/\s*\n/)).length>1?v=v.concat(t.map((function(t,e){return(e&&t.length?"\n":"")+t}))):v.push(t[0])})),g=v,l=Vt.apply(this,[b,i])}for(o=0,s=g.length;o<s;o++){var y=0;if(n=g[o],l&&"\n"==n[0]&&(n=n.substr(1),y=1),f+d+(p=(r=Ut.apply(this,[n,i])).reduce((function(t,e){return t+e}),0))>e||y){if(p>e){for(a=Gt.apply(this,[n,r,e-(f+d),e]),h.push(a.shift()),h=[a.pop()];a.length;)c.push([a.shift()]);p=r.slice(n.length-(h[0]?h[0].length:0)).reduce((function(t,e){return t+e}),0)}else h=[n];c.push(h),f=p+l,d=m}else h.push(n),f+=d+p,d=m}return u=l?function(t,e){return(e?b:"")+t.join(" ")}:function(t){return t.join(" ")},c.map(u)},Wt.splitTextToSize=function(t,e,i){var n,r=(i=i||{}).fontSize||this.internal.getFontSize(),o=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle),i="Unicode";return e.metadata[i]?{widths:e.metadata[i].widths||{0:1},kerning:e.metadata[i].kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,i);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var s=1*this.internal.scaleFactor*e/r;o.textIndent=i.textIndent?1*i.textIndent*this.internal.scaleFactor/r:0,o.lineIndent=i.lineIndent;var a,l,u=[];for(a=0,l=n.length;a<l;a++)u=u.concat(Yt.apply(this,[n[a],s,o]));return u},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",i="klmnopqrstuvwxyz",r={},o={},s=0;s<16;s++)r[i[s]]=e[s],o[e[s]]=i[s];var a=function(t){return"0x"+parseInt(t,10).toString(16)},l=t.__fontmetrics__.compress=function(t){var e,i,r,s,u=["{"];for(var h in t){if(e=t[h],isNaN(parseInt(h,10))?i="'"+h+"'":(h=parseInt(h,10),i=(i=a(h).slice(2)).slice(0,-1)+o[i.slice(-1)]),"number"==typeof e)e<0?(r=a(e).slice(3),s="-"):(r=a(e).slice(2),s=""),r=s+r.slice(0,-1)+o[r.slice(-1)];else{if("object"!==n(e))throw new Error("Don't know what to do with value type "+n(e)+".");r=l(e)}u.push(i+r)}return u.push("}"),u.join("")},u=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,i,n,o,s={},a=1,l=s,u=[],h="",c="",f=t.length-1,d=1;d<f;d+=1)"'"==(o=t[d])?e?(n=e.join(""),e=void 0):e=[]:e?e.push(o):"{"==o?(u.push([l,n]),l={},n=void 0):"}"==o?((i=u.pop())[0][i[1]]=l,n=void 0,l=i[0]):"-"==o?a=-1:void 0===n?r.hasOwnProperty(o)?(h+=r[o],n=parseInt(h,16)*a,a=1,h=""):h+=o:r.hasOwnProperty(o)?(c+=r[o],l[n]=parseInt(c,16)*a,a=1,n=void 0,c=""):c+=o;return s},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},f={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'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":u("{'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:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'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:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'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":u("{'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:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'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":u("{'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":u("{'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 e=t.font,i=f.Unicode[e.postScriptName];i&&(e.metadata.Unicode={},e.metadata.Unicode.widths=i.widths,e.metadata.Unicode.kerning=i.kerning);var n=c.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(q.API),function(t){var e=function(t){for(var e=t.length,i=new Uint8Array(e),n=0;n<e;n++)i[n]=t.charCodeAt(n);return i};t.API.events.push(["addFont",function(i){var n=void 0,r=i.font,o=i.instance;if(!r.isStandardFont){if(void 0===o)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if("string"!=typeof(n=!1===o.existsFileInVFS(r.postScriptName)?o.loadFile(r.postScriptName):o.getFileFromVFS(r.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");!function(i,n){n=/^\x00\x01\x00\x00/.test(n)?e(n):e(m(n)),i.metadata=t.API.TTFFont.open(n),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]}(r,n)}}])}(q),q.API.addSvgAsImage=function(t,e,n,r,o,s,a,u){if(isNaN(e)||isNaN(n))throw h.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(o))throw h.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=r,c.height=o;var f=c.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,c.width,c.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return(l.canvg?Promise.resolve(l.canvg):i.e(399).then(i.bind(i,40399))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t})).then((function(e){return e.fromString(f,t,d)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(d)})).then((function(){p.addImage(c.toDataURL("image/jpeg",1),e,n,r,o,a,u)}))},q.API.putTotalPages=function(t){var e,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var r=0;r<this.internal.pages[n].length;r++)this.internal.pages[n][r]=this.internal.pages[n][r].replace(e,i);return this},q.API.viewerPreferences=function(t,e){var i;t=t||{},e=e||!1;var r,o,s,a={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}},l=Object.keys(a),u=[],h=0,c=0,f=0;function d(t,e){var i,n=!1;for(i=0;i<t.length;i+=1)t[i]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===e){var p=l.length;for(f=0;f<p;f+=1)i[l[f]].value=i[l[f]].defaultValue,i[l[f]].explicitSet=!1}if("object"===n(t))for(o in t)if(s=t[o],d(l,o)&&void 0!==s){if("boolean"===i[o].type&&"boolean"==typeof s)i[o].value=s;else if("name"===i[o].type&&d(i[o].valueSet,s))i[o].value=s;else if("integer"===i[o].type&&Number.isInteger(s))i[o].value=s;else if("array"===i[o].type){for(h=0;h<s.length;h+=1)if(r=!0,1===s[h].length&&"number"==typeof s[h][0])u.push(String(s[h]-1));else if(s[h].length>1){for(c=0;c<s[h].length;c+=1)"number"!=typeof s[h][c]&&(r=!1);!0===r&&u.push([s[h][0]-1,s[h][1]-1].join(" "))}i[o].value="["+u.join(" ")+"]"}else i[o].value=i[o].defaultValue;i[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in i)!0===i[t].explicitSet&&("name"===i[t].type?e.push("/"+t+" /"+i[t].value):e.push("/"+t+" "+i[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this},q.API.addMetadata=function(t,e){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceUri:null!=e?e:"http://jspdf.default.namespaceuri/",rawXml:"boolean"==typeof e&&e},this.internal.events.subscribe("putCatalog",de),this.internal.events.subscribe("postPutResources",fe)),this},function(t){var e=t.API,i=e.pdfEscape16=function(t,e){for(var i,n=e.metadata.Unicode.widths,r=["","0","00","000","0000"],o=[""],s=0,a=t.length;s<a;++s){if(i=e.metadata.characterToGlyph(t.charCodeAt(s)),e.metadata.glyIdsUsed.push(i),e.metadata.toUnicode[i]=t.charCodeAt(s),-1==n.indexOf(i)&&(n.push(i),n.push([parseInt(e.metadata.widthOfGlyph(i),10)])),"0"==i)return o.join("");i=i.toString(16),o.push(r[4-i.length],i)}return o.join("")},n=function(t){var e,i,n,r,o,s,a;for(o="/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",n=[],s=0,a=(i=Object.keys(t).sort((function(t,e){return t-e}))).length;s<a;s++)e=i[s],n.length>=100&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(r=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+r+">"));return n.length&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),o+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(e){!function(e){var i=e.font,r=e.out,o=e.newObject,s=e.putStream;if(i.metadata instanceof t.API.TTFFont&&"Identity-H"===i.encoding){for(var a=i.metadata.Unicode.widths,l=i.metadata.subset.encode(i.metadata.glyIdsUsed,1),u="",h=0;h<l.length;h++)u+=String.fromCharCode(l[h]);var c=o();s({data:u,addLength1:!0,objectId:c}),r("endobj");var f=o();s({data:n(i.metadata.toUnicode),addLength1:!0,objectId:f}),r("endobj");var d=o();r("<<"),r("/Type /FontDescriptor"),r("/FontName /"+O(i.fontName)),r("/FontFile2 "+c+" 0 R"),r("/FontBBox "+t.API.PDFObject.convert(i.metadata.bbox)),r("/Flags "+i.metadata.flags),r("/StemV "+i.metadata.stemV),r("/ItalicAngle "+i.metadata.italicAngle),r("/Ascent "+i.metadata.ascender),r("/Descent "+i.metadata.decender),r("/CapHeight "+i.metadata.capHeight),r(">>"),r("endobj");var p=o();r("<<"),r("/Type /Font"),r("/BaseFont /"+O(i.fontName)),r("/FontDescriptor "+d+" 0 R"),r("/W "+t.API.PDFObject.convert(a)),r("/CIDToGIDMap /Identity"),r("/DW 1000"),r("/Subtype /CIDFontType2"),r("/CIDSystemInfo"),r("<<"),r("/Supplement 0"),r("/Registry (Adobe)"),r("/Ordering ("+i.encoding+")"),r(">>"),r(">>"),r("endobj"),i.objectNumber=o(),r("<<"),r("/Type /Font"),r("/Subtype /Type0"),r("/ToUnicode "+f+" 0 R"),r("/BaseFont /"+O(i.fontName)),r("/Encoding /"+i.encoding),r("/DescendantFonts ["+p+" 0 R]"),r(">>"),r("endobj"),i.isAlreadyPutted=!0}}(e)}]),e.events.push(["putFont",function(e){!function(e){var i=e.font,r=e.out,o=e.newObject,s=e.putStream;if(i.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===i.encoding){for(var a=i.metadata.rawData,l="",u=0;u<a.length;u++)l+=String.fromCharCode(a[u]);var h=o();s({data:l,addLength1:!0,objectId:h}),r("endobj");var c=o();s({data:n(i.metadata.toUnicode),addLength1:!0,objectId:c}),r("endobj");var f=o();r("<<"),r("/Descent "+i.metadata.decender),r("/CapHeight "+i.metadata.capHeight),r("/StemV "+i.metadata.stemV),r("/Type /FontDescriptor"),r("/FontFile2 "+h+" 0 R"),r("/Flags 96"),r("/FontBBox "+t.API.PDFObject.convert(i.metadata.bbox)),r("/FontName /"+O(i.fontName)),r("/ItalicAngle "+i.metadata.italicAngle),r("/Ascent "+i.metadata.ascender),r(">>"),r("endobj"),i.objectNumber=o();for(var d=0;d<i.metadata.hmtx.widths.length;d++)i.metadata.hmtx.widths[d]=parseInt(i.metadata.hmtx.widths[d]*(1e3/i.metadata.head.unitsPerEm));r("<</Subtype/TrueType/Type/Font/ToUnicode "+c+" 0 R/BaseFont/"+O(i.fontName)+"/FontDescriptor "+f+" 0 R/Encoding/"+i.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(i.metadata.hmtx.widths)+">>"),r("endobj"),i.isAlreadyPutted=!0}}(e)}]);var r=function(t){var e,n=t.text||"",r=t.x,o=t.y,s=t.options||{},a=t.mutex||{},l=a.pdfEscape,u=a.activeFontKey,h=a.fonts,c=u,f="",d=0,p="",g=h[c].encoding;if("Identity-H"!==h[c].encoding)return{text:n,x:r,y:o,options:s,mutex:a};for(p=n,c=u,Array.isArray(n)&&(p=n[0]),d=0;d<p.length;d+=1)h[c].metadata.hasOwnProperty("cmap")&&(e=h[c].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]),e||p[d].charCodeAt(0)<256&&h[c].metadata.hasOwnProperty("Unicode")?f+=p[d]:f+="";var m="";return parseInt(c.slice(1))<14||"WinAnsiEncoding"===g?m=l(f,c).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(m=i(f,h[c])),a.isHex=!0,{text:m,x:r,y:o,options:s,mutex:a}};e.events.push(["postProcessText",function(t){var e=t.text||"",i=[],n={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){var o=0;for(o=0;o<e.length;o+=1)Array.isArray(e[o])&&3===e[o].length?i.push([r(Object.assign({},n,{text:e[o][0]})).text,e[o][1],e[o][2]]):i.push(r(Object.assign({},n,{text:e[o]})).text);t.text=i}else t.text=r(Object.assign({},n,{text:e})).text}])}(q),function(t){var e=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,i){return e.call(this),this.internal.vFS[t]=i,this},t.getFileFromVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(q.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,n,r,o,s,a,l,u=e,h=[[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]],c=[[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]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},d={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","\xab","\xbb","\xab","\u2039","\u203a","\u2039","\u2045","\u2046","\u2045","\u207d","\u207e","\u207d","\u208d","\u208e","\u208d","\u2264","\u2265","\u2264","\u2329","\u232a","\u2329","\ufe59","\ufe5a","\ufe59","\ufe5b","\ufe5c","\ufe5b","\ufe5d","\ufe5e","\ufe5d","\ufe64","\ufe65","\ufe64"],g=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)$/),m=!1,b=0;this.__bidiEngine__={};var v=function(t){var e=t.charCodeAt(),i=e>>8,n=d[i];return void 0!==n?u[256*n+(255&e)]:252===i||253===i?"AL":g.test(i)?"L":8===i?"R":"N"},y=function(t){for(var e,i=0;i<t.length;i++){if("L"===(e=v(t.charAt(i))))return!1;if("R"===e)return!0}return!1},D=function(t,e,s,a){var l,u,h,c,f=e[a];switch(f){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":case"BN":f="N";break;case"CS":a<1||a+1>=e.length||"EN"!==(l=s[a-1])&&"AN"!==l||"EN"!==(u=e[a+1])&&"AN"!==u?f="N":m&&(u="AN"),f=u===l?u:"N";break;case"ES":f="EN"===(l=a>0?s[a-1]:"B")&&a+1<e.length&&"EN"===e[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===s[a-1]){f="EN";break}if(m){f="N";break}for(h=a+1,c=e.length;h<c&&"ET"===e[h];)h++;f=h<c&&"EN"===e[h]?"EN":"N";break;case"NSM":if(r&&!o){for(c=e.length,h=a+1;h<c&&"NSM"===e[h];)h++;if(h<c){var d=t[a],p=d>=1425&&d<=2303||64286===d;if(l=e[h],p&&("R"===l||"AL"===l)){f="R";break}}}f=a<1||"B"===(l=e[a-1])?"N":s[a-1];break;case"B":m=!1,i=!0,f=b;break;case"S":n=!0,f="N"}return f},x=function(t,e,i){var n=t.split("");return i&&w(n,i,{hiLevel:b}),n.reverse(),e&&e.reverse(),n.join("")},w=function(t,e,r){var o,s,a,l,u,d=-1,p=t.length,g=0,y=[],x=b?c:h,w=[];for(m=!1,i=!1,n=!1,s=0;s<p;s++)w[s]=v(t[s]);for(a=0;a<p;a++){if(u=g,y[a]=D(t,w,y,a),o=240&(g=x[u][f[y[a]]]),g&=15,e[a]=l=x[g][5],o>0)if(16===o){for(s=d;s<a;s++)e[s]=1;d=-1}else d=-1;if(x[g][6])-1===d&&(d=a);else if(d>-1){for(s=d;s<a;s++)e[s]=l;d=-1}"B"===w[a]&&(e[a]=0),r.hiLevel|=l}n&&function(t,e,i){for(var n=0;n<i;n++)if("S"===t[n]){e[n]=b;for(var r=n-1;r>=0&&"WS"===t[r];r--)e[r]=b}}(w,e,p)},_=function(t,e,n,r,o){if(!(o.hiLevel<t)){if(1===t&&1===b&&!i)return e.reverse(),void(n&&n.reverse());for(var s,a,l,u,h=e.length,c=0;c<h;){if(r[c]>=t){for(l=c+1;l<h&&r[l]>=t;)l++;for(u=c,a=l-1;u<a;u++,a--)s=e[u],e[u]=e[a],e[a]=s,n&&(s=n[u],n[u]=n[a],n[a]=s);c=l}c++}}},F=function(t,e,i){var n=t.split(""),r={hiLevel:b};return i||(i=[]),w(n,i,r),function(t,e,i){if(0!==i.hiLevel&&l)for(var n,r=0;r<t.length;r++)1===e[r]&&(n=p.indexOf(t[r]))>=0&&(t[r]=p[n+1])}(n,i,r),_(2,n,e,i,r),_(1,n,e,i,r),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,i){if(function(t,e){if(e)for(var i=0;i<t.length;i++)e[i]=i;void 0===o&&(o=y(t)),void 0===a&&(a=y(t))}(t,e),r||!s||a)if(r&&s&&o^a)b=o?1:0,t=x(t,e,i);else if(!r&&s&&a)b=o?1:0,t=F(t,e,i),t=x(t,e);else if(!r||o||s||a){if(r&&!s&&o^a)t=x(t,e),o?(b=0,t=F(t,e,i)):(b=1,t=F(t,e,i),t=x(t,e));else if(r&&o&&!s&&a)b=1,t=F(t,e,i),t=x(t,e);else if(!r&&!s&&o^a){var n=l;o?(b=1,t=F(t,e,i),b=0,l=!1,t=F(t,e,i),l=n):(b=0,t=F(t,e,i),t=x(t,e),b=1,l=!1,t=F(t,e,i),l=n,t=x(t,e))}}else b=0,t=F(t,e,i);else b=o?1:0,t=F(t,e,i);return t},this.__bidiEngine__.setOptions=function(t){t&&(r=t.isInputVisual,s=t.isOutputVisual,o=t.isInputRtl,a=t.isOutputRtl,l=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["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"],i=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text;t.x,t.y;var n=t.options||{};t.mutex,n.lang;var r=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,i.setOptions(n),"[object Array]"===Object.prototype.toString.call(e)){var o=0;for(r=[],o=0;o<e.length;o+=1)"[object Array]"===Object.prototype.toString.call(e[o])?r.push([i.doBidiReorder(e[o][0]),e[o][1],e[o][2]]):r.push([i.doBidiReorder(e[o])]);t.text=r}else t.text=i.doBidiReorder(e);i.setOptions({isInputVisual:!0})}])}(q),q.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new ge(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new Me(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new me(this.contents),this.head=new ye(this),this.name=new Se(this),this.cmap=new xe(this),this.toUnicode={},this.hhea=new we(this),this.maxp=new Ce(this),this.hmtx=new Le(this),this.post=new Fe(this),this.os2=new _e(this),this.loca=new Be(this),this.glyf=new Pe(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,e,i,n,r;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var e,i,n,r;for(r=[],e=0,i=(n=this.bbox).length;e<i;e++)t=n[e],r.push(Math.round(t*this.scaleFactor));return r}.call(this),this.stemV=0,this.post.exists?(i=255&(n=this.post.italic_angle),32768&(e=n>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+i)):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===(r=this.familyClass)||2===r||3===r||4===r||5===r||7===r,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 e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,i){var n,r,o,s;for(o=0,r=0,s=(t=""+t).length;0<=s?r<s:r>s;r=0<=s?++r:--r)n=t.charCodeAt(r),o+=this.widthOfGlyph(this.characterToGlyph(n))+i*(1e3/e)||0;return o*(e/1e3)},t.prototype.lineHeight=function(t,e){var i;return null==e&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*t},t}();var pe,ge=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,i;for(i=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(t){var e,i,n;for(n=[],e=0,i=t.length;0<=i?e<i:e>i;e=0<=i?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,i,n,r,o,s,a;return t=this.readByte(),e=this.readByte(),i=this.readByte(),n=this.readByte(),r=this.readByte(),o=this.readByte(),s=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^n)+16777216*(255^r)+65536*(255^o)+256*(255^s)+(255^a)+1):72057594037927940*t+281474976710656*e+1099511627776*i+4294967296*n+16777216*r+65536*o+256*s+a},t.prototype.writeLongLong=function(t){var e,i;return e=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,i;for(e=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)e.push(this.readByte());return e},t.prototype.write=function(t){var e,i,n,r;for(r=[],i=0,n=t.length;i<n;i++)e=t[i],r.push(this.writeByte(e));return r},t}(),me=function(){var t;function e(t){var e,i,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,n=this.tableCount;0<=n?i<n:i>n;i=0<=n?++i:--i)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var i,n,r,o,s,a,l,u,h,c,f,d,p;for(p in f=Object.keys(e).length,a=Math.log(2),h=16*Math.floor(Math.log(f)/a),o=Math.floor(h/a),u=16*f-h,(n=new ge).writeInt(this.scalarType),n.writeShort(f),n.writeShort(h),n.writeShort(o),n.writeShort(u),r=16*f,l=n.pos+r,s=null,d=[],e)for(c=e[p],n.writeString(p),n.writeInt(t(c)),n.writeInt(l),n.writeInt(c.length),d=d.concat(c),"head"===p&&(s=l),l+=c.length;l%4;)d.push(0),l++;return n.write(d),i=2981146554-t(n.data),n.pos=s+8,n.writeUInt32(i),n.data},t=function(t){var e,i,n,r;for(t=ke.call(t);t.length%4;)t.push(0);for(n=new ge(t),i=0,e=0,r=t.length;e<r;e=e+=4)i+=n.readUInt32();return 4294967295&i},e}(),be={}.hasOwnProperty,ve=function(t,e){for(var i in e)be.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};pe=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.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 ye=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="head",t.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()},t.prototype.encode=function(t){var e;return(e=new ge).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},t}(),De=function(){function t(t,e){var i,n,r,o,s,a,l,u,h,c,f,d,p,g,m,b,v;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),h=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(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(f=t.readUInt16(),c=f/2,t.pos+=6,r=function(){var e,i;for(i=[],a=e=0;0<=c?e<c:e>c;a=0<=c?++e:--e)i.push(t.readUInt16());return i}(),t.pos+=2,p=function(){var e,i;for(i=[],a=e=0;0<=c?e<c:e>c;a=0<=c?++e:--e)i.push(t.readUInt16());return i}(),l=function(){var e,i;for(i=[],a=e=0;0<=c?e<c:e>c;a=0<=c?++e:--e)i.push(t.readUInt16());return i}(),u=function(){var e,i;for(i=[],a=e=0;0<=c?e<c:e>c;a=0<=c?++e:--e)i.push(t.readUInt16());return i}(),n=(this.length-t.pos+this.offset)/2,s=function(){var e,i;for(i=[],a=e=0;0<=n?e<n:e>n;a=0<=n?++e:--e)i.push(t.readUInt16());return i}(),a=m=0,v=r.length;m<v;a=++m)for(g=r[a],i=b=d=p[a];d<=g?b<=g:b>=g;i=d<=g?++b:--b)0===u[a]?o=i+l[a]:0!==(o=s[u[a]/2+(i-d)-(c-a)]||0)&&(o+=l[a]),this.codeMap[i]=65535&o}t.pos=h}return t.encode=function(t,e){var i,n,r,o,s,a,l,u,h,c,f,d,p,g,m,b,v,y,D,x,w,_,F,A,S,C,L,k,P,N,E,B,M,O,I,T,j,R,z,q,H,W,U,V,G,Y;switch(k=new ge,o=Object.keys(t).sort((function(t,e){return t-e})),e){case"macroman":for(p=0,g=function(){var t=[];for(d=0;d<256;++d)t.push(0);return t}(),b={0:0},r={},P=0,M=o.length;P<M;P++)null==b[U=t[n=o[P]]]&&(b[U]=++p),r[n]={old:t[n],new:b[t[n]]},g[n]=b[t[n]];return k.writeUInt16(1),k.writeUInt16(0),k.writeUInt32(12),k.writeUInt16(0),k.writeUInt16(262),k.writeUInt16(0),k.write(g),{charMap:r,subtable:k.data,maxGlyphID:p+1};case"unicode":for(C=[],h=[],v=0,b={},i={},m=l=null,N=0,O=o.length;N<O;N++)null==b[D=t[n=o[N]]]&&(b[D]=++v),i[n]={old:D,new:b[D]},s=b[D]-n,null!=m&&s===l||(m&&h.push(m),C.push(n),l=s),m=n;for(m&&h.push(m),h.push(65535),C.push(65535),A=2*(F=C.length),_=2*Math.pow(Math.log(F)/Math.LN2,2),c=Math.log(_/2)/Math.LN2,w=2*F-_,a=[],x=[],f=[],d=E=0,I=C.length;E<I;d=++E){if(S=C[d],u=h[d],65535===S){a.push(0),x.push(0);break}if(S-(L=i[S].new)>=32768)for(a.push(0),x.push(2*(f.length+F-d)),n=B=S;S<=u?B<=u:B>=u;n=S<=u?++B:--B)f.push(i[n].new);else a.push(L-S),x.push(0)}for(k.writeUInt16(3),k.writeUInt16(1),k.writeUInt32(12),k.writeUInt16(4),k.writeUInt16(16+8*F+2*f.length),k.writeUInt16(0),k.writeUInt16(A),k.writeUInt16(_),k.writeUInt16(c),k.writeUInt16(w),H=0,T=h.length;H<T;H++)n=h[H],k.writeUInt16(n);for(k.writeUInt16(0),W=0,j=C.length;W<j;W++)n=C[W],k.writeUInt16(n);for(V=0,R=a.length;V<R;V++)s=a[V],k.writeUInt16(s);for(G=0,z=x.length;G<z;G++)y=x[G],k.writeUInt16(y);for(Y=0,q=f.length;Y<q;Y++)p=f[Y],k.writeUInt16(p);return{charMap:i,subtable:k.data,maxGlyphID:v+1}}},t}(),xe=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="cmap",t.prototype.parse=function(t){var e,i,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)e=new De(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},t.encode=function(t,e){var i,n;return null==e&&(e="macroman"),i=De.encode(t,e),(n=new ge).writeUInt16(0),n.writeUInt16(1),i.table=n.data.concat(i.subtable),i},t}(),we=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="hhea",t.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()},t}(),_e=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,i;for(i=[],e=0;e<10;++e)i.push(t.readByte());return i}(),this.charRange=function(){var e,i;for(i=[],e=0;e<4;++e)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,i;for(i=[],e=0;e<2;e=++e)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),Fe=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="post",t.prototype.parse=function(t){var e,i,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var r;for(i=t.readUInt16(),this.glyphNameIndex=[],r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)e=t.readByte(),n.push(this.names.push(t.readString(e)));return n;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 262144:return this.map=function(){var e,i,n;for(n=[],r=e=0,i=this.file.maxp.numGlyphs;0<=i?e<i:e>i;r=0<=i?++e:--e)n.push(t.readUInt32());return n}.call(this)}},t}(),Ae=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},Se=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="name",t.prototype.parse=function(t){var e,i,n,r,o,s,a,l,u,h,c;for(t.pos=this.offset,t.readShort(),e=t.readShort(),s=t.readShort(),i=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+s+t.readShort()});for(a={},r=u=0,h=i.length;u<h;r=++u)n=i[r],t.pos=n.offset,l=t.readString(n.length),o=new Ae(l,n),null==a[c=n.nameID]&&(a[c]=[]),a[n.nameID].push(o);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(m){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),Ce=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="maxp",t.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()},t}(),Le=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="hmtx",t.prototype.parse=function(t){var e,i,n,r,o,s,a;for(t.pos=this.offset,this.metrics=[],e=0,s=this.file.hhea.numberOfMetrics;0<=s?e<s:e>s;e=0<=s?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var i,r;for(r=[],e=i=0;0<=n?i<n:i>n;e=0<=n?++i:--i)r.push(t.readInt16());return r}(),this.widths=function(){var t,e,i,n;for(n=[],t=0,e=(i=this.metrics).length;t<e;t++)r=i[t],n.push(r.advance);return n}.call(this),i=this.widths[this.widths.length-1],a=[],e=o=0;0<=n?o<n:o>n;e=0<=n?++o:--o)a.push(this.widths.push(i));return a},t.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]}},t}(),ke=[].slice,Pe=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var e,i,n,r,o,s,a,l,u,h;return t in this.cache?this.cache[t]:(r=this.file.loca,e=this.file.contents,i=r.indexOf(t),0===(n=r.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+i,o=(s=new ge(e.read(n))).readShort(),l=s.readShort(),h=s.readShort(),a=s.readShort(),u=s.readShort(),this.cache[t]=-1===o?new Ee(s,l,h,a,u):new Ne(s,o,l,h,a,u),this.cache[t]))},t.prototype.encode=function(t,e,i){var n,r,o,s,a;for(o=[],r=[],s=0,a=e.length;s<a;s++)n=t[e[s]],r.push(o.length),n&&(o=o.concat(n.encode(i)));return r.push(o.length),{table:o,offsets:r}},t}(),Ne=function(){function t(t,e,i,n,r,o){this.raw=t,this.numberOfContours=e,this.xMin=i,this.yMin=n,this.xMax=r,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),Ee=function(){function t(t,e,i,n,r){var o,s;for(this.raw=t,this.xMin=e,this.yMin=i,this.xMax=n,this.yMax=r,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return t.prototype.encode=function(){var t,e,i;for(e=new ge(ke.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),Be=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ve(t,pe),t.prototype.tag="loca",t.prototype.parse=function(t){var e,i;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=0===e?function(){var e,n;for(n=[],i=0,e=this.length;i<e;i+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var e,n;for(n=[],i=0,e=this.length;i<e;i+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,e){for(var i=new Uint32Array(this.offsets.length),n=0,r=0,o=0;o<i.length;++o)if(i[o]=n,r<e.length&&e[r]==o){++r,i[o]=n;var s=this.offsets[o],a=this.offsets[o+1]-s;a>0&&(n+=a)}for(var l=new Array(4*i.length),u=0;u<i.length;++u)l[4*u+3]=255&i[u],l[4*u+2]=(65280&i[u])>>8,l[4*u+1]=(16711680&i[u])>>16,l[4*u]=(4278190080&i[u])>>24;return l},t}(),Me=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,i,n,r;for(e in n=this.font.cmap.tables[0].codeMap,t={},r=this.subset)i=r[e],t[e]=n[i];return t},t.prototype.glyphsFor=function(t){var e,i,n,r,o,s,a;for(n={},o=0,s=t.length;o<s;o++)n[r=t[o]]=this.font.glyf.glyphFor(r);for(r in e=[],n)(null!=(i=n[r])?i.compound:void 0)&&e.push.apply(e,i.glyphIDs);if(e.length>0)for(r in a=this.glyphsFor(e))i=a[r],n[r]=i;return n},t.prototype.encode=function(t,e){var i,n,r,o,s,a,l,u,h,c,f,d,p,g,m;for(n in i=xe.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),f={0:0},m=i.charMap)f[(a=m[n]).old]=a.new;for(d in c=i.maxGlyphID,o)d in f||(f[d]=c++);return u=function(t){var e,i;for(e in i={},t)i[t[e]]=e;return i}(f),h=Object.keys(u).sort((function(t,e){return t-e})),p=function(){var t,e,i;for(i=[],t=0,e=h.length;t<e;t++)s=h[t],i.push(u[s]);return i}(),r=this.font.glyf.encode(o,p,f),l=this.font.loca.encode(r.offsets,p),g={cmap:this.font.cmap.raw(),glyf:r.table,loca:l,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(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},t}();q.API.PDFObject=function(){var t;function e(){}return t=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},e.convert=function(i){var n,r,o,s;if(Array.isArray(i))return"["+function(){var t,r,o;for(o=[],t=0,r=i.length;t<r;t++)n=i[t],o.push(e.convert(n));return o}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i?i.isString:void 0)return"("+i+")";if(i instanceof Date)return"(D:"+t(i.getUTCFullYear(),4)+t(i.getUTCMonth(),2)+t(i.getUTCDate(),2)+t(i.getUTCHours(),2)+t(i.getUTCMinutes(),2)+t(i.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(i)){for(r in o=["<<"],i)s=i[r],o.push("/"+r+" "+e.convert(s));return o.push(">>"),o.join("\n")}return""+i},e}()},88055(t,e,i){var n=i(9999);t.exports=function(t){return n(t,5)}},17790(t,e,i){var n=i(19852);function r(t){this.mode=n.MODE_8BIT_BYTE,this.data=t}r.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},t.exports=r},10046(t){function e(){this.buffer=new Array,this.length=0}e.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var i=0;i<e;i++)this.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},41537(t){t.exports={L:1,M:0,Q:3,H:2}},30501(t,e,i){var n=i(39341);function r(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var i=0;i<t.length&&0==t[i];)i++;this.num=new Array(t.length-i+e);for(var n=0;n<t.length-i;n++)this.num[n]=t[n+i]}r.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),i=0;i<this.getLength();i++)for(var o=0;o<t.getLength();o++)e[i+o]^=n.gexp(n.glog(this.get(i))+n.glog(t.get(o)));return new r(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=n.glog(this.get(0))-n.glog(t.get(0)),i=new Array(this.getLength()),o=0;o<this.getLength();o++)i[o]=this.get(o);for(o=0;o<t.getLength();o++)i[o]^=n.gexp(n.glog(t.get(o))+e);return new r(i,0).mod(t)}},t.exports=r},46641(t,e,i){var n=i(17790),r=i(12835),o=i(10046),s=i(38759),a=i(30501);function l(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=l.prototype;u.addData=function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},u.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=r.getRSBlocks(t,this.errorCorrectLevel),i=new o,n=0,a=0;a<e.length;a++)n+=e[a].dataCount;for(a=0;a<this.dataList.length;a++){var l=this.dataList[a];i.put(l.mode,4),i.put(l.getLength(),s.getLengthInBits(l.mode,t)),l.write(i)}if(i.getLengthInBits()<=8*n)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[i][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},u.setupPositionProbePattern=function(t,e){for(var i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+i][e+n]=0<=i&&i<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=n&&n<=4)},u.getBestMaskPattern=function(){for(var t=0,e=0,i=0;i<8;i++){this.makeImpl(!0,i);var n=s.getLostPoint(this);(0==i||t>n)&&(t=n,e=i)}return e},u.createMovieClip=function(t,e,i){var n=t.createEmptyMovieClip(e,i);this.make();for(var r=0;r<this.modules.length;r++)for(var o=1*r,s=0;s<this.modules[r].length;s++){var a=1*s;this.modules[r][s]&&(n.beginFill(0,100),n.moveTo(a,o),n.lineTo(a+1,o),n.lineTo(a+1,o+1),n.lineTo(a,o+1),n.endFill())}return n},u.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},u.setupPositionAdjustPattern=function(){for(var t=s.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var i=0;i<t.length;i++){var n=t[e],r=t[i];if(null==this.modules[n][r])for(var o=-2;o<=2;o++)for(var a=-2;a<=2;a++)this.modules[n+o][r+a]=-2==o||2==o||-2==a||2==a||0==o&&0==a}},u.setupTypeNumber=function(t){for(var e=s.getBCHTypeNumber(this.typeNumber),i=0;i<18;i++){var n=!t&&1==(e>>i&1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=n}for(i=0;i<18;i++){n=!t&&1==(e>>i&1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=n}},u.setupTypeInfo=function(t,e){for(var i=this.errorCorrectLevel<<3|e,n=s.getBCHTypeInfo(i),r=0;r<15;r++){var o=!t&&1==(n>>r&1);r<6?this.modules[r][8]=o:r<8?this.modules[r+1][8]=o:this.modules[this.moduleCount-15+r][8]=o}for(r=0;r<15;r++){o=!t&&1==(n>>r&1);r<8?this.modules[8][this.moduleCount-r-1]=o:r<9?this.modules[8][15-r-1+1]=o:this.modules[8][15-r-1]=o}this.modules[this.moduleCount-8][8]=!t},u.mapData=function(t,e){for(var i=-1,n=this.moduleCount-1,r=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var l=0;l<2;l++)if(null==this.modules[n][a-l]){var u=!1;o<t.length&&(u=1==(t[o]>>>r&1)),s.getMask(e,n,a-l)&&(u=!u),this.modules[n][a-l]=u,-1==--r&&(o++,r=7)}if((n+=i)<0||this.moduleCount<=n){n-=i,i=-i;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(t,e,i){for(var n=r.getRSBlocks(t,e),a=new o,u=0;u<i.length;u++){var h=i[u];a.put(h.mode,4),a.put(h.getLength(),s.getLengthInBits(h.mode,t)),h.write(a)}var c=0;for(u=0;u<n.length;u++)c+=n[u].dataCount;if(a.getLengthInBits()>8*c)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*c+")");for(a.getLengthInBits()+4<=8*c&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*c)&&(a.put(l.PAD0,8),!(a.getLengthInBits()>=8*c));)a.put(l.PAD1,8);return l.createBytes(a,n)},l.createBytes=function(t,e){for(var i=0,n=0,r=0,o=new Array(e.length),l=new Array(e.length),u=0;u<e.length;u++){var h=e[u].dataCount,c=e[u].totalCount-h;n=Math.max(n,h),r=Math.max(r,c),o[u]=new Array(h);for(var f=0;f<o[u].length;f++)o[u][f]=255&t.buffer[f+i];i+=h;var d=s.getErrorCorrectPolynomial(c),p=new a(o[u],d.getLength()-1).mod(d);l[u]=new Array(d.getLength()-1);for(f=0;f<l[u].length;f++){var g=f+p.getLength()-l[u].length;l[u][f]=g>=0?p.get(g):0}}var m=0;for(f=0;f<e.length;f++)m+=e[f].totalCount;var b=new Array(m),v=0;for(f=0;f<n;f++)for(u=0;u<e.length;u++)f<o[u].length&&(b[v++]=o[u][f]);for(f=0;f<r;f++)for(u=0;u<e.length;u++)f<l[u].length&&(b[v++]=l[u][f]);return b},t.exports=l},12835(t,e,i){var n=i(41537);function r(t,e){this.totalCount=t,this.dataCount=e}r.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r.getRSBlocks=function(t,e){var i=r.getRsBlockTable(t,e);if(void 0==i)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=i.length/3,o=new Array,s=0;s<n;s++)for(var a=i[3*s+0],l=i[3*s+1],u=i[3*s+2],h=0;h<a;h++)o.push(new r(l,u));return o},r.getRsBlockTable=function(t,e){switch(e){case n.L:return r.RS_BLOCK_TABLE[4*(t-1)+0];case n.M:return r.RS_BLOCK_TABLE[4*(t-1)+1];case n.Q:return r.RS_BLOCK_TABLE[4*(t-1)+2];case n.H:return r.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},t.exports=r},39341(t){for(var e={glog:function(t){if(t<1)throw new Error("glog("+t+")");return e.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},i=0;i<8;i++)e.EXP_TABLE[i]=1<<i;for(i=8;i<256;i++)e.EXP_TABLE[i]=e.EXP_TABLE[i-4]^e.EXP_TABLE[i-5]^e.EXP_TABLE[i-6]^e.EXP_TABLE[i-8];for(i=0;i<255;i++)e.LOG_TABLE[e.EXP_TABLE[i]]=i;t.exports=e},19852(t){t.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},38759(t,e,i){var n=i(19852),r=i(30501),o=i(39341),s=0,a=1,l=2,u=3,h=4,c=5,f=6,d=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;p.getBCHDigit(e)-p.getBCHDigit(p.G15)>=0;)e^=p.G15<<p.getBCHDigit(e)-p.getBCHDigit(p.G15);return(t<<10|e)^p.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;p.getBCHDigit(e)-p.getBCHDigit(p.G18)>=0;)e^=p.G18<<p.getBCHDigit(e)-p.getBCHDigit(p.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return p.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,i){switch(t){case s:return(e+i)%2==0;case a:return e%2==0;case l:return i%3==0;case u:return(e+i)%3==0;case h:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case c:return e*i%2+e*i%3==0;case f:return(e*i%2+e*i%3)%2==0;case d:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new r([1],0),i=0;i<t;i++)e=e.multiply(new r([1,o.gexp(i)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),i=0,n=0;n<e;n++)for(var r=0;r<e;r++){for(var o=0,s=t.isDark(n,r),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var l=-1;l<=1;l++)r+l<0||e<=r+l||0==a&&0==l||s==t.isDark(n+a,r+l)&&o++;o>5&&(i+=3+o-5)}for(n=0;n<e-1;n++)for(r=0;r<e-1;r++){var u=0;t.isDark(n,r)&&u++,t.isDark(n+1,r)&&u++,t.isDark(n,r+1)&&u++,t.isDark(n+1,r+1)&&u++,0!=u&&4!=u||(i+=3)}for(n=0;n<e;n++)for(r=0;r<e-6;r++)t.isDark(n,r)&&!t.isDark(n,r+1)&&t.isDark(n,r+2)&&t.isDark(n,r+3)&&t.isDark(n,r+4)&&!t.isDark(n,r+5)&&t.isDark(n,r+6)&&(i+=40);for(r=0;r<e;r++)for(n=0;n<e-6;n++)t.isDark(n,r)&&!t.isDark(n+1,r)&&t.isDark(n+2,r)&&t.isDark(n+3,r)&&t.isDark(n+4,r)&&!t.isDark(n+5,r)&&t.isDark(n+6,r)&&(i+=40);var h=0;for(r=0;r<e;r++)for(n=0;n<e;n++)t.isDark(n,r)&&h++;return i+=10*(Math.abs(100*h/e/e-50)/5)}};t.exports=p},41853(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},r=a(i(5556)),o=i(96540),s=a(o);function a(t){return t&&t.__esModule?t:{default:t}}var l={bgColor:r.default.oneOfType([r.default.object,r.default.string]).isRequired,bgD:r.default.string.isRequired,fgColor:r.default.oneOfType([r.default.object,r.default.string]).isRequired,fgD:r.default.string.isRequired,size:r.default.number.isRequired,title:r.default.string,viewBoxSize:r.default.number.isRequired,xmlns:r.default.string},u=(0,o.forwardRef)((function(t,e){var i=t.bgColor,r=t.bgD,o=t.fgD,a=t.fgColor,l=t.size,u=t.title,h=t.viewBoxSize,c=t.xmlns,f=void 0===c?"http://www.w3.org/2000/svg":c,d=function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",n({},d,{height:l,ref:e,viewBox:"0 0 "+h+" "+h,width:l,xmlns:f}),u?s.default.createElement("title",null,u):null,s.default.createElement("path",{d:r,fill:i}),s.default.createElement("path",{d:o,fill:a}))}));u.displayName="QRCodeSvg",u.propTypes=l,e.default=u},194(t,e,i){"use strict";var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},r=h(i(5556)),o=h(i(41537)),s=h(i(46641)),a=i(96540),l=h(a),u=h(i(41853));function h(t){return t&&t.__esModule?t:{default:t}}var c={bgColor:r.default.oneOfType([r.default.object,r.default.string]),fgColor:r.default.oneOfType([r.default.object,r.default.string]),level:r.default.string,size:r.default.number,value:r.default.string.isRequired},f=(0,a.forwardRef)((function(t,e){var i=t.bgColor,r=void 0===i?"#FFFFFF":i,a=t.fgColor,h=void 0===a?"#000000":a,c=t.level,f=void 0===c?"L":c,d=t.size,p=void 0===d?256:d,g=t.value,m=function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["bgColor","fgColor","level","size","value"]),b=new s.default(-1,o.default[f]);b.addData(g),b.make();var v=b.modules;return l.default.createElement(u.default,n({},m,{bgColor:r,bgD:v.map((function(t,e){return t.map((function(t,i){return t?"":"M "+i+" "+e+" l 1 0 0 1 -1 0 Z"})).join(" ")})).join(" "),fgColor:h,fgD:v.map((function(t,e){return t.map((function(t,i){return t?"M "+i+" "+e+" l 1 0 0 1 -1 0 Z":""})).join(" ")})).join(" "),ref:e,size:p,viewBoxSize:v.length}))}));f.displayName="QRCode",f.propTypes=c,e.Ay=f},16099(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=n(i(86308));function o(t){if(!t.options.indentation&&!t.options.lineSeparator)return;let e;for(t.content+=t.options.lineSeparator,e=0;e<t.level;e++)t.content+=t.options.indentation}function s(t,e){t.content+=e}function a(t,e,i){if("Element"===t.type)!function(t,e,i){e.path.push(t.name),!i&&e.content.length>0&&o(e);if(s(e,"<"+t.name),function(t,e){Object.keys(e).forEach((function(i){const n=e[i].replace(/"/g,""");s(t," "+i+'="'+n+'"')}))}(e,t.attributes),null===t.children||e.options.forceSelfClosingEmptyTag&&0===t.children.length){const t=e.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";s(e,t)}else if(0===t.children.length)s(e,"></"+t.name+">");else{const n=t.children;s(e,">"),e.level++;let r="preserve"===t.attributes["xml:space"]||i,l=!1;if(!r&&e.options.ignoredPaths&&(l=function(t,e){const i="/"+t.join("/"),n=t[t.length-1];return e.includes(n)||e.includes(i)}(e.path,e.options.ignoredPaths),r=l),!r&&e.options.collapseContent){let t=!1,e=!1,o=!1;n.forEach((function(r,s){"Text"===r.type?(r.content.includes("\n")?(e=!0,r.content=r.content.trim()):0!==s&&s!==n.length-1||i||0===r.content.trim().length&&(r.content=""),(r.content.trim().length>0||1===n.length)&&(t=!0)):"CDATA"===r.type?t=!0:o=!0})),!t||o&&e||(r=!0)}n.forEach((function(t){a(t,e,i||r)})),e.level--,i||r||o(e),l&&function(t){let e;for(t.content=t.content.replace(/ +$/,""),e=0;e<t.level;e++)t.content+=t.options.indentation}(e),s(e,"</"+t.name+">")}e.path.pop()}(t,e,i);else if("ProcessingInstruction"===t.type)l(t,e);else{if("string"!==typeof t.content)throw new Error("Unknown node type: "+t.type);!function(t,e,i){if(!i){const i=t.trim();(e.options.lineSeparator||0===i.length)&&(t=i)}t.length>0&&(!i&&e.content.length>0&&o(e),s(e,t))}(t.content,e,i)}}function l(t,e){e.content.length>0&&o(e),s(e,"<?"+t.name),s(e," "+t.content.trim()),s(e,"?>")}function u(t,e={}){e.indentation="indentation"in e?e.indentation:" ",e.collapseContent=!0===e.collapseContent,e.lineSeparator="lineSeparator"in e?e.lineSeparator:"\r\n",e.whiteSpaceAtEndOfSelfclosingTag=!0===e.whiteSpaceAtEndOfSelfclosingTag,e.throwOnFailure=!1!==e.throwOnFailure;try{const i=(0,r.default)(t,{filter:e.filter,strictMode:e.strictMode}),n={content:"",level:0,options:e,path:[]};return i.declaration&&l(i.declaration,n),i.children.forEach((function(t){a(t,n,!1)})),e.lineSeparator?n.content.replace(/\r\n/g,"\n").replace(/\n/g,e.lineSeparator):n.content}catch(i){if(e.throwOnFailure)throw i;return t}}u.minify=(t,e={})=>u(t,Object.assign(Object.assign({},e),{indentation:"",lineSeparator:""})),t.exports=u,e.default=u},86308(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingError=void 0;class i extends Error{constructor(t,e){super(t),this.cause=e}}let n;function r(){return a(!1)||function(){const t=h(/^([^<]+)/);if(t){const e={type:"Text",content:t[1]};return{excluded:!1===n.options.filter(e),node:e}}}()||l()||function(){if(n.xml.startsWith("<![CDATA[")){const t=n.xml.indexOf("]]>");if(t>-1){const e=t+3,i={type:"CDATA",content:n.xml.substring(0,e)};return n.xml=n.xml.slice(e),{excluded:!1===n.options.filter(i),node:i}}}}()||s()}function o(){return h(/\s*/),a(!0)||l()||function(){const t=h(/^<!DOCTYPE\s+\S+\s+SYSTEM[^>]*>/)||h(/^<!DOCTYPE\s+\S+\s+PUBLIC[^>]*>/)||h(/^<!DOCTYPE\s+\S+\s*\[[^\]]*]>/)||h(/^<!DOCTYPE\s+\S+\s*>/);if(t){const e={type:"DocumentType",content:t[0]};return{excluded:!1===n.options.filter(e),node:e}}}()||s()}function s(){const t=h(/^<\?([\w-:.]+)\s*/);if(!t)return;const e={name:t[1],type:"ProcessingInstruction",content:""},r=n.xml.indexOf("?>");if(!(r>-1))throw new i("Failed to parse XML","ProcessingInstruction closing tag not found");return e.content=n.xml.substring(0,r).trim(),n.xml=n.xml.slice(r),h(/\?>/),{excluded:!1===n.options.filter(e),node:e}}function a(t){const e=h(/^<([^?!</>\s]+)\s*/);if(!e)return;const o={type:"Element",name:e[1],attributes:{},children:[]},s=!t&&!1===n.options.filter(o);for(;!(0===n.xml.length||c(">")||c("?>")||c("/>"));){const t=u();if(!t)return;o.attributes[t.name]=t.value}if(h(/^\s*\/>/))return o.children=null,{excluded:s,node:o};h(/\??>/);let a=r();for(;a;)a.excluded||o.children.push(a.node),a=r();if(n.options.strictMode){const t=`</${o.name}>`;if(!n.xml.startsWith(t))throw new i("Failed to parse XML",`Closing tag not matching "${t}"`);n.xml=n.xml.slice(t.length)}else h(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:s,node:o}}function l(){const t=h(/^<!--[\s\S]*?-->/);if(t){const e={type:"Comment",content:t[0]};return{excluded:!1===n.options.filter(e),node:e}}}function u(){const t=h(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(t)return{name:t[1].trim(),value:(e=t[2].trim(),e.replace(/^['"]|['"]$/g,""))};var e}function h(t){const e=n.xml.match(t);if(e)return n.xml=n.xml.slice(e[0].length),e}function c(t){return 0===n.xml.indexOf(t)}function f(t,e={}){t=t.trim();const r=e.filter||(()=>!0);return n={xml:t,options:Object.assign(Object.assign({},e),{filter:r,strictMode:!0===e.strictMode})},function(){const t=s(),e=[];let r,a=o();for(;a;){if("Element"===a.node.type){if(r)throw new Error("Found multiple root nodes");r=a.node}a.excluded||e.push(a.node),a=o()}if(!r)throw new i("Failed to parse XML","Root Element not found");if(0!==n.xml.length)throw new i("Failed to parse XML","Not Well-Formed XML");return{declaration:t?t.node:null,root:r,children:e}}()}e.ParsingError=i,t.exports=f,e.default=f},20772(t,e,i){"use strict";var n=i(69565),r=i(97751),o=i(55966);t.exports=function(t,e,i,s){try{var a=o(t,"return");if(a)return r("Promise").resolve(n(a,t)).then((function(){e(i)}),(function(t){s(t)}))}catch(l){return s(l)}e(i)}},36639(t,e,i){"use strict";var n=i(69565),r=i(79306),o=i(28551),s=i(20034),a=i(96837),l=i(97751),u=i(97040),h=i(34527),c=i(1767),f=i(20772),d=function(t){var e=0===t,i=1===t,d=2===t,p=3===t;return function(t,g,m){o(t);var b=void 0!==g;!b&&e||r(g);var v=c(t),y=l("Promise"),D=v.iterator,x=v.next,w=0;return new y((function(t,r){var l=function(t){f(D,r,t,r)},c=function(){try{if(b)try{a(w)}catch(v){l(v)}y.resolve(o(n(x,D))).then((function(n){try{if(o(n).done)e?(h(m,w),t(m)):t(!p&&(d||void 0));else{var a=n.value;try{if(b){var v=g(a,w),x=function(n){if(i)c();else if(d)n?c():f(D,t,!1,r);else if(e)try{u(m,w++,n),c()}catch(o){l(o)}else n?f(D,t,p||a,r):c()};s(v)?y.resolve(v).then(x,l):x(v)}else u(m,w++,a),c()}catch(_){l(_)}}}catch(F){r(F)}}),r)}catch(_){r(_)}};c()}))}};t.exports={toArray:d(0),forEach:d(1),every:d(2),some:d(3),find:d(4)}},53982(t,e,i){"use strict";var n,r,o=i(44576),s=i(77629),a=i(94901),l=i(2360),u=i(42787),h=i(36840),c=i(78227),f=i(96395),d="USE_FUNCTION_CONSTRUCTOR",p=c("asyncIterator"),g=o.AsyncIterator,m=s.AsyncIteratorPrototype;if(m)n=m;else if(a(g))n=g.prototype;else if(s[d]||o[d])try{r=u(u(u(Function("return async function*(){}()")()))),u(r)===Object.prototype&&(n=r)}catch(b){}n?f&&(n=l(n)):n={},a(n[p])||h(n,p,(function(){return this})),t.exports=n},18107(t,e,i){"use strict";var n=i(46518),r=i(48981),o=i(26198),s=i(91291),a=i(6469);n({target:"Array",proto:!0},{at:function(t){var e=r(this),i=o(e),n=s(t),a=n>=0?n:i+n;return a<0||a>=i?void 0:e[a]}}),a("at")},61806(t,e,i){"use strict";var n=i(46518),r=i(28551),o=i(97040),s=i(72652),a=i(1767);n({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[],e=0;return s(a(r(this)),(function(i){o(t,e++,i)}),{IS_RECORD:!0}),t}})},79978(t,e,i){"use strict";var n=i(46518),r=i(69565),o=i(79504),s=i(67750),a=i(94901),l=i(20034),u=i(60788),h=i(655),c=i(55966),f=i(61034),d=i(2478),p=i(78227),g=i(96395),m=p("replace"),b=TypeError,v=o("".indexOf),y=o("".replace),D=o("".slice),x=Math.max;n({target:"String",proto:!0},{replaceAll:function(t,e){var i,n,o,p,w,_,F,A,S,C,L=s(this),k=0,P="";if(l(t)){if((i=u(t))&&(n=h(s(f(t))),!~v(n,"g")))throw new b("`.replaceAll` does not allow non-global regexes");if(o=c(t,m))return r(o,t,L,e);if(g&&i)return y(h(L),t,e)}for(p=h(L),w=h(t),(_=a(e))||(e=h(e)),F=w.length,A=x(1,F),S=v(p,w);-1!==S;)C=_?h(e(w,S,p)):d(w,p,S,[],void 0,e),P+=D(p,k,S)+C,k=S+F,S=S+A>p.length?-1:v(p,w,S+A);return k<p.length&&(P+=D(p,k)),P}})},34504(t,e,i){"use strict";i(18107)},33811(t,e,i){"use strict";var n=i(46518),r=i(90679),o=i(42787),s=i(66699),a=i(39297),l=i(78227),u=i(53982),h=i(96395),c=l("toStringTag"),f=TypeError,d=function(){if(r(this,u),o(this)===u)throw new f("Abstract class AsyncIterator not directly constructable")};d.prototype=u,a(u,c)||s(u,c,"AsyncIterator"),!h&&a(u,"constructor")&&u.constructor!==Object||s(u,"constructor",d),n({global:!0,constructor:!0,forced:h},{AsyncIterator:d})},86994(t,e,i){"use strict";var n=i(46518),r=i(36639).toArray;n({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{toArray:function(){return r(this,void 0,[])}})},41795(t,e,i){"use strict";i(61806)},78898(t,e,i){"use strict";var n=i(46518),r=i(68183).charAt,o=i(67750),s=i(91291),a=i(655);n({target:"String",proto:!0,forced:!0},{at:function(t){var e=a(o(this)),i=e.length,n=s(t),l=n>=0?n:i+n;return l<0||l>=i?void 0:r(e,l)}})},66118(t,e,i){"use strict";i.d(e,{$L:()=>hn,A6:()=>P,Bs:()=>ge,E8:()=>Be,FN:()=>Se,Hg:()=>_t,Jb:()=>N,No:()=>Fe,P$:()=>O,PP:()=>Oi,Qw:()=>u,UA:()=>ln,ZT:()=>B,ij:()=>R,ju:()=>E,kc:()=>ji,m_:()=>Ni,s$:()=>fi,t1:()=>ue});var n=i(81692);class r{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const r=e.listeners[n],o=e.duration;r.forEach((n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=n.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var o=new r;const s="transparent",a={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const r=(0,n.c)(t||s),o=r.valid&&(0,n.c)(e||s);return o&&o.valid?o.mix(r,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class l{constructor(t,e,i,r){const o=e[i];r=(0,n.a)([t.to,r,o,t.from]);const s=(0,n.a)([t.from,o,r]);this._active=!0,this._fn=t.fn||a[t.type||typeof s],this._easing=n.e[t.easing]||n.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,n.a)([t.to,e,r,t.from]),this._from=(0,n.a)([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e<i),!this._active)return this._target[n]=s,void this._notify(!0);e<0?this._target[n]=r:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}}class u{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!(0,n.i)(t))return;const e=Object.keys(n.d.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((r=>{const o=t[r];if(!(0,n.i)(o))return;const s={};for(const t of e)s[t]=o[t];((0,n.b)(o.properties)&&o.properties||[r]).forEach((t=>{t!==r&&i.has(t)||i.set(t,s)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let r=0;r<n.length;r++){const e=t[n[r]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if("$"===u.charAt(0))continue;if("options"===u){n.push(...this._animateOptions(t,e));continue}const h=e[u];let c=r[u];const f=i.get(u);if(c){if(f&&c.active()){c.update(f,h,s);continue}c.cancel()}f&&f.duration?(r[u]=c=new l(f,t,u,h),n.push(c)):t[u]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(o.add(this._chart,i),!0):void 0}}function h(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function c(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r<o;++r)i.push(n[r].index);return i}function f(t,e,i,r={}){const o=t.keys,s="single"===r.mode;let a,l,u,h;if(null===e)return;let c=!1;for(a=0,l=o.length;a<l;++a){if(u=+o[a],u===i){if(c=!0,r.all)continue;break}h=t.values[u],(0,n.g)(h)&&(s||0===e||(0,n.s)(e)===(0,n.s)(h))&&(e+=h)}return c||r.all?e:0}function d(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function p(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function g(t,e,i,n){for(const r of e.getMatchingVisibleMetas(n).reverse()){const e=t[r.index];if(i&&e>0||!i&&e<0)return r.index}return null}function m(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,u=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),c=e.length;let f;for(let d=0;d<c;++d){const t=e[d],{[l]:i,[u]:o}=t;f=(t._stacks||(t._stacks={}))[u]=p(r,h,i),f[a]=o,f._top=g(f,s,!0,n.type),f._bottom=g(f,s,!1,n.type);(f._visualValues||(f._visualValues={}))[a]=o}}function b(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function v(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const y=t=>"reset"===t||"none"===t,D=(t,e)=>e?t:Object.assign({},t);class x{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=d(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&v(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=(0,n.v)(i.xAxisID,b(t,"x")),s=e.yAxisID=(0,n.v)(i.yAxisID,b(t,"y")),a=e.rAxisID=(0,n.v)(i.rAxisID,b(t,"r")),l=e.indexAxis,u=e.iAxisID=r(l,o,s,a),h=e.vAxisID=r(l,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(u),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,n.u)(this._data,this),t._stacked&&v(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if((0,n.i)(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,r="x"===i.axis?"x":"y",o="x"===n.axis?"x":"y",s=Object.keys(t),a=new Array(s.length);let l,u,h;for(l=0,u=s.length;l<u;++l)h=s[l],a[l]={[r]:h,[o]:t[h]};return a}(e,t)}else if(i!==e){if(i){(0,n.u)(i,this);const t=this._cachedMeta;v(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,n.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=d(e.vScale,e),e.stack!==i.stack&&(n=!0,v(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&(m(this,e._parsed),e._stacked=d(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:s}=i,a=o.axis;let l,u,h,c=0===t&&e===r.length||i._sorted,f=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=r,i._sorted=!0,h=r;else{h=(0,n.b)(r[t])?this.parseArrayData(i,r,t,e):(0,n.i)(r[t])?this.parseObjectData(i,r,t,e):this.parsePrimitiveData(i,r,t,e);const o=()=>null===u[a]||f&&u[a]<f[a];for(l=0;l<e;++l)i._parsed[l+t]=u=h[l],c&&(o()&&(c=!1),f=u);i._sorted=c}s&&m(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:r,vScale:o}=t,s=r.axis,a=o.axis,l=r.getLabels(),u=r===o,h=new Array(n);let c,f,d;for(c=0,f=n;c<f;++c)d=c+i,h[c]={[s]:u||r.parse(l[d],d),[a]:o.parse(e[d],d)};return h}parseArrayData(t,e,i,n){const{xScale:r,yScale:o}=t,s=new Array(n);let a,l,u,h;for(a=0,l=n;a<l;++a)u=a+i,h=e[u],s[a]={x:r.parse(h[0],u),y:o.parse(h[1],u)};return s}parseObjectData(t,e,i,r){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(r);let h,c,f,d;for(h=0,c=r;h<c;++h)f=h+i,d=e[f],u[h]={x:o.parse((0,n.f)(d,a),f),y:s.parse((0,n.f)(d,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,r=this._cachedMeta,o=e[t.axis];return f({keys:c(n,!0),values:e._stacks[t.axis]._visualValues},o,r.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const r=i[e.axis];let o=null===r?NaN:r;const s=n&&i._stacks[e.axis];n&&s&&(n.values=s,o=f(n,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,s=r.length,a=this._getOtherScale(t),l=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:c(i,!0),values:null})(e,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:f}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(a);let d,p;function g(){p=r[d];const e=p[a.axis];return!(0,n.g)(p[t.axis])||h>e||f<e}for(d=0;d<s&&(g()||(this.updateRangeFromParsed(u,t,p,l),!o));++d);if(o)for(d=s-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(u,t,p,l);break}return u}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,o,s;for(r=0,o=e.length;r<o;++r)s=e[r][t.axis],(0,n.g)(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,r,o;return(0,n.i)(t)?(e=t.top,i=t.right,r=t.bottom,o=t.left):e=i=r=o=t,{top:e,right:i,bottom:r,left:o,disabled:!1===t}}((0,n.v)(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=h(t,i),r=h(e,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],r=e.chartArea,o=[],s=this._drawStart||0,a=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,r,s,a),u=s;u<s+a;++u){const e=n[u];e.hidden||(e.active&&l?o.push(e):e.draw(t,r))}for(u=0;u<o.length;++u)o[u].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,i){return(0,n.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return(0,n.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r="active"===e,o=this._cachedDataOpts,s=t+"-"+e,a=o[s],l=this.enableOptionSharing&&(0,n.h)(i);if(a)return D(a,l);const u=this.chart.config,h=u.datasetElementScopeKeys(this._type,t),c=r?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),h),d=Object.keys(n.d.elements[t]),p=u.resolveNamedOptions(f,d,(()=>this.getContext(i,r,e)),c);return p.$shared&&(p.$shared=l,o[s]=Object.freeze(D(p,l))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new u(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||y(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:o}}updateElement(t,e,i,n){y(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!y(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[s,a,l]of this._syncList)this[s](a,l);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,e,i=!0){const n=this._cachedMeta,r=n.data,o=t+e;let s;const a=t=>{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s<o;++s)r[s]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&v(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function w(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let r=[];for(let e=0,n=i.length;e<n;e++)r=r.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=(0,n._)(r.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let r,o,s,a,l=e._length;const u=()=>{32767!==s&&-32768!==s&&((0,n.h)(a)&&(l=Math.min(l,Math.abs(s-a)||l)),a=s)};for(r=0,o=i.length;r<o;++r)s=e.getPixelForValue(i[r]),u();for(a=void 0,r=0,o=e.ticks.length;r<o;++r)s=e.getPixelForTick(r),u();return l}function _(t,e,i,r){return(0,n.b)(t)?function(t,e,i,n){const r=i.parse(t[0],n),o=i.parse(t[1],n),s=Math.min(r,o),a=Math.max(r,o);let l=s,u=a;Math.abs(s)>Math.abs(a)&&(l=a,u=s),e[i.axis]=u,e._custom={barStart:l,barEnd:u,start:r,end:o,min:s,max:a}}(t,e,i,r):e[i.axis]=i.parse(t,r),e}function F(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let u,h,c,f;for(u=i,h=i+n;u<h;++u)f=e[u],c={},c[r.axis]=a||r.parse(s[u],u),l.push(_(f,c,o,u));return l}function A(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function S(t,e,i,n){let r=e.borderSkipped;const o={};if(!r)return void(t.borderSkipped=o);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:a,reverse:l,top:u,bottom:h}=function(t){let e,i,n,r,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(r="end",o="start"):(r="start",o="end"),{start:i,end:n,reverse:e,top:r,bottom:o}}(t);"middle"===r&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?r=u:(i._bottom||0)===n?r=h:(o[C(h,s,a,l)]=!0,r=u)),o[C(r,s,a,l)]=!0,t.borderSkipped=o}function C(t,e,i,n){var r,o,s;return n?(s=i,t=L(t=(r=t)===(o=e)?s:r===s?o:r,i,e)):t=L(t,e,i),t}function L(t,e,i){return"start"===t?e:"end"===t?i:t}function k(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class P extends x{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return F(t,e,i,n)}parseArrayData(t,e,i,n){return F(t,e,i,n)}parseObjectData(t,e,i,r){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u="x"===o.axis?a:l,h="x"===s.axis?a:l,c=[];let f,d,p,g;for(f=i,d=i+r;f<d;++f)g=e[f],p={},p[o.axis]=o.parse((0,n.f)(g,u),f),c.push(_((0,n.f)(g,h),p,s,f));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,r=this.getParsed(t),o=r._custom,s=A(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const o="reset"===r,{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:f}=this._getSharedOptions(e,r);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=o||(0,n.k)(e[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),p=this._calculateBarIndexPixels(d,h),g=(e._stacks||{})[a.axis],m={horizontal:u,base:i.base,enableBorderRadius:!g||A(e._custom)||s===g._top||s===g._bottom,x:u?i.head:p.center,y:u?p.center:i.head,height:u?p.size:Math.abs(i.size),width:u?Math.abs(i.size):p.size};f&&(m.options=c||this.resolveDataElementOptions(d,t[d].active?"active":r));const b=m.options||t[d].options;S(m,b,g,s),k(m,b,h.ratio),this.updateElement(t[d],d,m,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[i.axis],u=t=>{const e=t._parsed.find((t=>t[i.axis]===l)),r=e&&e[t.vScale.axis];if((0,n.k)(r)||isNaN(r))return!0};for(const n of r)if((void 0===e||!u(n))&&((!1===o||-1===s.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&s.push(n.stack),n.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[(0,n.v)("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let r,o;for(r=0,o=e.data.length;r<o;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const s=t.barThickness;return{min:s||w(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:o,minBarLength:s}}=this,a=o||0,l=this.getParsed(t),u=l._custom,h=A(u);let c,f,d=l[e.axis],p=0,g=i?this.applyStack(e,l,i):d;g!==d&&(p=g-d,g=d),h&&(d=u.barStart,g=u.barEnd-u.barStart,0!==d&&(0,n.s)(d)!==(0,n.s)(u.barEnd)&&(p=0),p+=d);const m=(0,n.k)(o)||h?p:o;let b=e.getPixelForValue(m);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(p+g):b,f=c-b,Math.abs(f)<s){f=function(t,e,i){return 0!==t?(0,n.s)(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(f,e,a)*s,d===a&&(b-=f/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),u=Math.min(t,o),p=Math.max(t,o);b=Math.max(Math.min(b,p),u),c=b+f,i&&!h&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(c)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const t=(0,n.s)(f)*e.getLineWidthForValue(a)/2;b+=t,f-=t}return{size:f,base:b,head:c,center:c+f/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,o=r.skipNull,s=(0,n.v)(r.maxBarThickness,1/0);let a,l;const u=this._getAxisCount();if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,h="flex"===r.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const l=i.categoryPercentage;null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s);const u=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/n,ratio:i.barPercentage,start:u}}(t,e,r,i*u):function(t,e,i,r){const o=i.barThickness;let s,a;return(0,n.k)(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*r,a=1),{chunk:s/r,ratio:a,start:e.pixels[t]-s/2}}(t,e,r,i*u),c="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf((0,n.v)(c,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=h.start+h.chunk*d+h.chunk/2,l=Math.min(s,h.chunk*h.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let r=0;for(;r<n;++r)null===this.getParsed(r)[e.axis]||i[r].hidden||i[r].draw(this._ctx)}}class N extends x{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const r=super.parsePrimitiveData(t,e,i,n);for(let o=0;o<r.length;o++)r[o]._custom=this.resolveDataElementOptions(o+i).radius;return r}parseArrayData(t,e,i,r){const o=super.parseArrayData(t,e,i,r);for(let s=0;s<o.length;s++){const t=e[i+s];o[s]._custom=(0,n.v)(t[2],this.resolveDataElementOptions(s+i).radius)}return o}parseObjectData(t,e,i,r){const o=super.parseObjectData(t,e,i,r);for(let s=0;s<o.length;s++){const t=e[i+s];o[s]._custom=(0,n.v)(t&&t.r&&+t.r,this.resolveDataElementOptions(s+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:r}=e,o=this.getParsed(t),s=n.getLabelForValue(o.x),a=r.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+s+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),u=o.axis,h=s.axis;for(let c=e;c<e+i;c++){const e=t[c],i=!r&&this.getParsed(c),f={},d=f[u]=r?o.getPixelForDecimal(.5):o.getPixelForValue(i[u]),p=f[h]=r?s.getBasePixel():s.getPixelForValue(i[h]);f.skip=isNaN(d)||isNaN(p),l&&(f.options=a||this.resolveDataElementOptions(c,e.active?"active":n),r&&(f.options.radius=0)),this.updateElement(e,c,f,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return"active"!==e&&(r.radius=0),r.radius+=(0,n.v)(i&&i._custom,o),r}}class E extends x{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:r,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:l.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(a),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:o&&(s||l.borderRadius),index:a}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=i;else{let o,s,a=t=>+i[t];if((0,n.i)(i[t])){const{key:t="value"}=this._parsing;a=e=>+(0,n.f)(i[e],t)}for(o=t,s=t+e;o<s;++o)r._parsed[o]=a(o)}}_getRotation(){return(0,n.t)(this.options.rotation-90)}_getCircumference(){return(0,n.t)(this.options.circumference)}_getRotationExtents(){let t=n.T,e=-n.T;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),o=n._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,o=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min((0,n.m)(this.options.cutout,a),1),u=this._getRingWeight(this.index),{circumference:h,rotation:c}=this._getRotationExtents(),{ratioX:f,ratioY:d,offsetX:p,offsetY:g}=function(t,e,i){let r=1,o=1,s=0,a=0;if(e<n.T){const l=t,u=l+e,h=Math.cos(l),c=Math.sin(l),f=Math.cos(u),d=Math.sin(u),p=(t,e,r)=>(0,n.p)(t,l,u,!0)?1:Math.max(e,e*i,r,r*i),g=(t,e,r)=>(0,n.p)(t,l,u,!0)?-1:Math.min(e,e*i,r,r*i),m=p(0,h,f),b=p(n.H,c,d),v=g(n.P,h,f),y=g(n.P+n.H,c,d);r=(m-v)/2,o=(b-y)/2,s=-(m+v)/2,a=-(b+y)/2}return{ratioX:r,ratioY:o,offsetX:s,offsetY:a}}(c,h,l),m=(i.width-s)/f,b=(i.height-s)/d,v=Math.max(Math.min(m,b)/2,0),y=(0,n.n)(this.options.radius,v),D=(y-Math.max(y*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,r.total=this.calculateTotal(),this.outerRadius=y-D*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-D*u,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/n.T)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,u=(s.top+s.bottom)/2,h=r&&a.animateScale,c=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,r);for(g=e;g<e+i;++g){const e=this._circumference(g,r),i=t[g],o={x:l+this.offsetX,y:u+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:c};p&&(o.options=d||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const r=t._parsed[i];null===r||isNaN(r)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(r))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?n.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=(0,n.o)(e._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,s=o.controller;break}if(!t)return 0;for(n=0,r=t.length;n<r;++n)a=s.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max((0,n.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class B extends x{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:a,count:l}=(0,n.q)(e,r,s);this._drawStart=a,this._drawCount=l,(0,n.w)(e)&&(a=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:u},t),this.updateElements(r,a,l,t)}updateElements(t,e,i,r){const o="reset"===r,{iScale:s,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,r),f=s.axis,d=a.axis,{spanGaps:p,segment:g}=this.options,m=(0,n.x)(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===r,v=e+i,y=t.length;let D=e>0&&this.getParsed(e-1);for(let x=0;x<y;++x){const i=t[x],p=b?i:{};if(x<e||x>=v){p.skip=!0;continue}const y=this.getParsed(x),w=(0,n.k)(y[d]),_=p[f]=s.getPixelForValue(y[f],x),F=p[d]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[d],x);p.skip=isNaN(_)||isNaN(F)||w,p.stop=x>0&&Math.abs(y[f]-D[f])>m,g&&(p.parsed=y,p.raw=u.data[x]),c&&(p.options=h||this.resolveDataElementOptions(x,i.active?"active":r)),b||this.updateElement(i,x,p,r),D=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class M extends x{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map(((e,r)=>{const o=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=(0,n.o)(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,i,r){return n.y.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,r){const o="reset"===r,s=this.chart,a=s.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,h=l.yCenter,c=l.getIndexAngle(0)-.5*n.P;let f,d=c;const p=360/this.countVisibleElements();for(f=0;f<e;++f)d+=this._computeAngle(f,r,p);for(f=e;f<e+i;f++){const e=t[f];let i=d,n=d+this._computeAngle(f,r,p),g=s.getDataVisibility(f)?l.getDistanceFromCenterForValue(this.getParsed(f).r):0;d=n,o&&(a.animateScale&&(g=0),a.animateRotate&&(i=n=c));const m={x:u,y:h,innerRadius:0,outerRadius:g,startAngle:i,endAngle:n,options:this.resolveDataElementOptions(f,e.active?"active":r)};this.updateElement(e,f,m,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?(0,n.t)(this.resolveDataElementOptions(t,e).angle||i):0}}class O extends E{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}var I=Object.freeze({__proto__:null,BarController:P,BubbleController:N,DoughnutController:E,LineController:B,PieController:O,PolarAreaController:M,RadarController:class extends x{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return n.y.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this._cachedMeta.rScale,o="reset"===n;for(let s=e;s<e+i;s++){const e=t[s],i=this.resolveDataElementOptions(s,e.active?"active":n),a=r.getPointPositionForValue(s,this.getParsed(s).r),l=o?r.xCenter:a.x,u=o?r.yCenter:a.y,h={x:l,y:u,angle:a.angle,skip:isNaN(l)||isNaN(u),options:i};this.updateElement(e,s,h,n)}}},ScatterController:class extends x{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:r}=e,o=this.getParsed(t),s=n.getLabelForValue(o.x),a=r.getLabelForValue(o.y);return{label:i[t]||"",value:"("+s+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:o,count:s}=(0,n.q)(e,i,r);if(this._drawStart=o,this._drawCount=s,(0,n.w)(e)&&(o=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:o}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const s=this.resolveDatasetElementOptions(t);s.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:s},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const o="reset"===r,{iScale:s,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,h=this.resolveDataElementOptions(e,r),c=this.getSharedOptions(h),f=this.includeOptions(r,c),d=s.axis,p=a.axis,{spanGaps:g,segment:m}=this.options,b=(0,n.x)(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===r;let y=e>0&&this.getParsed(e-1);for(let D=e;D<e+i;++D){const e=t[D],i=this.getParsed(D),h=v?e:{},g=(0,n.k)(i[p]),x=h[d]=s.getPixelForValue(i[d],D),w=h[p]=o||g?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,i,l):i[p],D);h.skip=isNaN(x)||isNaN(w)||g,h.stop=D>0&&Math.abs(i[d]-y[d])>b,m&&(h.parsed=i,h.raw=u.data[D]),f&&(h.options=c||this.resolveDataElementOptions(D,e.active?"active":r)),v||this.updateElement(e,D,h,r),y=i}this.updateSharedOptions(c,r,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}}});function T(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class j{static override(t){Object.assign(j.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return T()}parse(){return T()}format(){return T()}add(){return T()}diff(){return T()}startOf(){return T()}endOf(){return T()}}var R={_date:j};function z(t,e,i,r){const{controller:o,data:s,_sorted:a}=t,l=o._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&"r"!==e&&a&&s.length){const a=l._reversePixels?n.A:n.B;if(!r){const r=a(s,e,i);if(u){const{vScale:e}=o._cachedMeta,{_parsed:i}=t,s=i.slice(0,r.lo+1).reverse().findIndex((t=>!(0,n.k)(t[e.axis])));r.lo-=Math.max(0,s);const a=i.slice(r.hi).findIndex((t=>!(0,n.k)(t[e.axis])));r.hi+=Math.max(0,a)}return r}if(o._sharedOptions){const t=s[0],n="function"===typeof t.getRange&&t.getRange(e);if(n){const t=a(s,e,i-n),r=a(s,e,i+n);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function q(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let a=0,l=o.length;a<l;++a){const{index:t,data:i}=o[a],{lo:l,hi:u}=z(o[a],e,s,r);for(let e=l;e<=u;++e){const r=i[e];r.skip||n(r,t,e)}}}function H(t,e,i,r,o){const s=[];if(!o&&!t.isPointInArea(e))return s;return q(t,i,e,(function(i,a,l){(o||(0,n.C)(i,t.chartArea,0))&&i.inRange(e.x,e.y,r)&&s.push({element:i,datasetIndex:a,index:l})}),!0),s}function W(t,e,i,n,r,o){let s=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const r=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return q(t,i,e,(function(i,u,h){const c=i.inRange(e.x,e.y,r);if(n&&!c)return;const f=i.getCenterPoint(r);if(!(!!o||t.isPointInArea(f))&&!c)return;const d=a(e,f);d<l?(s=[{element:i,datasetIndex:u,index:h}],l=d):d===l&&s.push({element:i,datasetIndex:u,index:h})})),s}function U(t,e,i,r,o,s){return s||t.isPointInArea(e)?"r"!==i||r?W(t,e,i,r,o,s):function(t,e,i,r){let o=[];return q(t,i,e,(function(t,i,s){const{startAngle:a,endAngle:l}=t.getProps(["startAngle","endAngle"],r),{angle:u}=(0,n.D)(t,{x:e.x,y:e.y});(0,n.p)(u,a,l)&&o.push({element:t,datasetIndex:i,index:s})})),o}(t,e,i,o):[]}function V(t,e,i,n,r){const o=[],s="x"===i?"inXRange":"inYRange";let a=!1;return q(t,i,e,((t,n,l)=>{t[s]&&t[s](e[i],r)&&(o.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,r))})),n&&!a?[]:o}var G={evaluateInteractionItems:q,modes:{index(t,e,i,r){const o=(0,n.z)(e,t),s=i.axis||"x",a=i.includeInvisible||!1,l=i.intersect?H(t,o,s,r,a):U(t,o,s,!1,r,a),u=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=l[0].index,i=t.data[e];i&&!i.skip&&u.push({element:i,datasetIndex:t.index,index:e})})),u):[]},dataset(t,e,i,r){const o=(0,n.z)(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;let l=i.intersect?H(t,o,s,r,a):U(t,o,s,!1,r,a);if(l.length>0){const e=l[0].datasetIndex,i=t.getDatasetMeta(e).data;l=[];for(let t=0;t<i.length;++t)l.push({element:i[t],datasetIndex:e,index:t})}return l},point:(t,e,i,r)=>H(t,(0,n.z)(e,t),i.axis||"xy",r,i.includeInvisible||!1),nearest(t,e,i,r){const o=(0,n.z)(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;return U(t,o,s,i.intersect,r,a)},x:(t,e,i,r)=>V(t,(0,n.z)(e,t),"x",i.intersect,r),y:(t,e,i,r)=>V(t,(0,n.z)(e,t),"y",i.intersect,r)}};const Y=["left","top","right","bottom"];function X(t,e){return t.filter((t=>t.pos===e))}function $(t,e){return t.filter((t=>-1===Y.indexOf(t.pos)&&t.box.axis===e))}function K(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function J(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!Y.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o<s;++o){a=t[o];const{fullSize:s}=a.box,l=i[a.stack],u=l&&a.stackWeight/l.weight;a.horizontal?(a.width=u?u*n:s&&e.availableWidth,a.height=r):(a.width=n,a.height=u?u*r:s&&e.availableHeight)}return i}function Q(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Z(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function tt(t,e,i,r){const{pos:o,box:s}=i,a=t.maxPadding;if(!(0,n.i)(o)){i.size&&(t[o]-=i.size);const e=r[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&Z(a,s.getPadding());const l=Math.max(0,e.outerWidth-Q(a,t,"left","right")),u=Math.max(0,e.outerHeight-Q(a,t,"top","bottom")),h=l!==t.w,c=u!==t.h;return t.w=l,t.h=u,i.horizontal?{same:h,other:c}:{same:c,other:h}}function et(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function it(t,e,i,n){const r=[];let o,s,a,l,u,h;for(o=0,s=t.length,u=0;o<s;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,et(a.horizontal,e));const{same:s,other:c}=tt(e,i,a,n);u|=s&&r.length,h=h||c,l.fullSize||r.push(a)}return u&&it(r,e,i,n)||h}function nt(t,e,i,n,r){t.top=i,t.left=e,t.right=e+n,t.bottom=i+r,t.width=n,t.height=r}function rt(t,e,i,r){const o=i.padding;let{x:s,y:a}=e;for(const l of t){const t=l.box,u=r[l.stack]||{count:1,placed:0,weight:1},h=l.stackWeight/u.weight||1;if(l.horizontal){const r=e.w*h,s=u.size||t.height;(0,n.h)(u.start)&&(a=u.start),t.fullSize?nt(t,o.left,a,i.outerWidth-o.right-o.left,s):nt(t,e.left+u.placed,a,r,s),u.start=a,u.placed+=r,a=t.bottom}else{const r=e.h*h,a=u.size||t.width;(0,n.h)(u.start)&&(s=u.start),t.fullSize?nt(t,s,o.top,a,i.outerHeight-o.bottom-o.top):nt(t,s,e.top+u.placed,a,r),u.start=s,u.placed+=r,s=t.right}}e.x=s,e.y=a}var ot={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,r){if(!t)return;const o=(0,n.E)(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),l=function(t){const e=function(t){const e=[];let i,n,r,o,s,a;for(i=0,n=(t||[]).length;i<n;++i)r=t[i],({position:o,options:{stack:s,stackWeight:a=1}}=r),e.push({index:i,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}(t),i=K(e.filter((t=>t.box.fullSize)),!0),n=K(X(e,"left"),!0),r=K(X(e,"right")),o=K(X(e,"top"),!0),s=K(X(e,"bottom")),a=$(e,"x"),l=$(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:X(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),u=l.vertical,h=l.horizontal;(0,n.F)(t.boxes,(t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const c=u.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,f=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/c,hBoxMaxHeight:a/2}),d=Object.assign({},o);Z(d,(0,n.E)(r));const p=Object.assign({maxPadding:d,w:s,h:a,x:o.left,y:o.top},o),g=J(u.concat(h),f);it(l.fullSize,p,f,g),it(u,p,f,g),it(h,p,f,g)&&it(u,p,f,g),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),rt(l.leftAndTop,p,f,g),p.x+=p.w,p.y+=p.h,rt(l.rightAndBottom,p,f,g),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},(0,n.F)(l.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class st{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class at extends st{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const lt="$chartjs",ut={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ht=t=>null===t||""===t;const ct=!!n.K&&{passive:!0};function ft(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ct)}function dt(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function pt(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||dt(i.addedNodes,n),e=e&&!dt(i.removedNodes,n);e&&i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function gt(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||dt(i.removedNodes,n),e=e&&!dt(i.addedNodes,n);e&&i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const mt=new Map;let bt=0;function vt(){const t=window.devicePixelRatio;t!==bt&&(bt=t,mt.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function yt(t,e,i){const r=t.canvas,o=r&&(0,n.I)(r);if(!o)return;const s=(0,n.L)(((t,e)=>{const n=o.clientWidth;i(t,e),n<o.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)}));return a.observe(o),function(t,e){mt.size||window.addEventListener("resize",vt),mt.set(t,e)}(t,s),a}function Dt(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){mt.delete(t),mt.size||window.removeEventListener("resize",vt)}(t)}function xt(t,e,i){const r=t.canvas,o=(0,n.L)((e=>{null!==t.ctx&&i(function(t,e){const i=ut[t.type]||t.type,{x:r,y:o}=(0,n.z)(t,e);return{type:i,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==o?o:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,ct)}(r,e,o),o}class wt extends st{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[lt]={initial:{height:r,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ht(o)){const e=(0,n.J)(t,"width");void 0!==e&&(t.width=e)}if(ht(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,n.J)(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[lt])return!1;const i=e[lt].initial;["height","width"].forEach((t=>{const r=i[t];(0,n.k)(r)?e.removeAttribute(t):e.setAttribute(t,r)}));const r=i.style||{};return Object.keys(r).forEach((t=>{e.style[t]=r[t]})),e.width=e.width,delete e[lt],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:pt,detach:gt,resize:yt}[e]||xt;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Dt,detach:Dt,resize:Dt}[e]||ft)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return(0,n.G)(t,e,i,r)}isAttached(t){const e=t&&(0,n.I)(t);return!(!e||!e.isConnected)}}class _t{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return(0,n.x)(this.x)&&(0,n.x)(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}function Ft(t,e){const i=t.options.ticks,r=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),o=Math.min(i.maxTicksLimit||r,r),s=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],a=s.length,l=s[0],u=s[a-1],h=[];if(a>o)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;r<t.length;r++)r===s&&(e.push(t[r]),o++,s=i[o*n])}(e,h,s,a/o),h;const c=function(t,e,i){const r=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!r)return Math.max(o,1);const s=(0,n.N)(r);for(let n=0,a=s.length-1;n<a;n++){const t=s[n];if(t>o)return t}return Math.max(o,1)}(s,e,o);if(a>0){let t,i;const r=a>1?Math.round((u-l)/(a-1)):null;for(At(e,h,c,(0,n.k)(r)?0:l-r,l),t=0,i=a-1;t<i;t++)At(e,h,c,s[t],s[t+1]);return At(e,h,c,u,(0,n.k)(r)?e.length:u+r),h}return At(e,h,c),h}function At(t,e,i,r,o){const s=(0,n.v)(r,0),a=Math.min((0,n.v)(o,t.length),t.length);let l,u,h,c=0;for(i=Math.ceil(i),o&&(l=o-r,i=l/Math.floor(l/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(u=Math.max(s,0);u<a;u++)u===h&&(e.push(t[u]),c++,h=Math.round(s+c*i))}const St=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Ct=(t,e)=>Math.min(e||t,t);function Lt(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;o<r;o+=n)i.push(t[Math.floor(o)]);return i}function kt(t,e,i){const n=t.ticks.length,r=Math.min(e,n-1),o=t._startPixel,s=t._endPixel,a=1e-6;let l,u=t.getPixelForTick(r);if(!(i&&(l=1===n?Math.max(u-o,s-u):0===e?(t.getPixelForTick(1)-u)/2:(u-t.getPixelForTick(r-1))/2,u+=r<e?l:-l,u<o-a||u>s+a)))return u}function Pt(t){return t.drawTicks?t.tickLength:0}function Nt(t,e){if(!t.display)return 0;const i=(0,n.a0)(t.font,e),r=(0,n.E)(t.padding);return((0,n.b)(t.text)?t.text.length:1)*i.lineHeight+r.height}function Et(t,e,i){let r=(0,n.a1)(t);return(i&&"right"!==e||!i&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class Bt extends _t{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=(0,n.O)(t,Number.POSITIVE_INFINITY),e=(0,n.O)(e,Number.NEGATIVE_INFINITY),i=(0,n.O)(i,Number.POSITIVE_INFINITY),r=(0,n.O)(r,Number.NEGATIVE_INFINITY),{min:(0,n.O)(t,i),max:(0,n.O)(e,r),minDefined:(0,n.g)(t),maxDefined:(0,n.g)(e)}}getMinMax(t){let e,{min:i,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:i,max:r};const a=this.getMatchingVisibleMetas();for(let n=0,l=a.length;n<l;++n)e=a[n].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),s||(r=Math.max(r,e.max));return i=s&&i>r?r:i,r=o&&i>r?i:r,{min:(0,n.O)(i,(0,n.O)(r,i)),max:(0,n.O)(r,(0,n.O)(i,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,n.Q)(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,n.R)(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Lt(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=Ft(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,n.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,n.Q)(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){(0,n.Q)(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),(0,n.Q)(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,n.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=(0,n.Q)(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){(0,n.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,n.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Ct(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,o=e.maxRotation;let s,a,l,u=r;if(!this._isVisible()||!e.display||r>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=r);const h=this._getLabelSizes(),c=h.widest.width,f=h.highest.height,d=(0,n.S)(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:d/(i-1),c+6>s&&(s=d/(i-(t.offset?.5:1)),a=this.maxHeight-Pt(t.grid)-e.padding-Nt(t.title,this.chart.options.font),l=Math.sqrt(c*c+f*f),u=(0,n.U)(Math.min(Math.asin((0,n.S)((h.highest.height+6)/s,-1,1)),Math.asin((0,n.S)(a/l,-1,1))-Math.asin((0,n.S)(f/l,-1,1)))),u=Math.max(r,Math.min(o,u))),this.labelRotation=u}afterCalculateLabelRotation(){(0,n.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,n.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=Nt(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=Pt(o)+s):(t.height=this.maxHeight,t.width=Pt(o)+s),i.display&&this.ticks.length){const{first:e,last:r,widest:o,highest:s}=this._getLabelSizes(),l=2*i.padding,u=(0,n.t)(this.labelRotation),h=Math.cos(u),c=Math.sin(u);if(a){const e=i.mirror?0:c*o.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=i.mirror?0:h*o.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,r,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,c=0;a?l?(h=n*t.width,c=i*e.height):(h=i*t.height,c=n*e.width):"start"===r?c=e.width:"end"===r?h=t.width:"inner"!==r&&(h=t.width/2,c=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((c-u+o)*this.width/(this.width-u),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,n.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)(0,n.k)(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Lt(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(e/Ct(e,i));let u,h,c,f,d,p,g,m,b,v,y,D=0,x=0;for(u=0;u<e;u+=l){if(f=t[u].label,d=this._resolveTickFontOptions(u),r.font=p=d.string,g=o[p]=o[p]||{data:{},gc:[]},m=d.lineHeight,b=v=0,(0,n.k)(f)||(0,n.b)(f)){if((0,n.b)(f))for(h=0,c=f.length;h<c;++h)y=f[h],(0,n.k)(y)||(0,n.b)(y)||(b=(0,n.V)(r,g.data,g.gc,b,y),v+=m)}else b=(0,n.V)(r,g.data,g.gc,b,f),v=m;s.push(b),a.push(v),D=Math.max(b,D),x=Math.max(v,x)}!function(t,e){(0,n.F)(t,(t=>{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r<n;++r)delete t.data[i[r]];i.splice(0,n)}}))}(o,e);const w=s.indexOf(D),_=a.indexOf(x),F=t=>({width:s[t]||0,height:a[t]||0});return{first:F(0),last:F(e-1),widest:F(w),highest:F(_),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,n.W)(this._alignToPixels?(0,n.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return(0,n.j)(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=(i=this.chart.getContext(),r=this,(0,n.j)(i,{scale:r,type:"scale"})));var i,r}_tickSize(){const t=this.options.ticks,e=(0,n.t)(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*i>a*r?a/i:l/r:l*r<a*i?l/i:a/r}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,u=this.isHorizontal(),h=this.ticks.length+(l?1:0),c=Pt(o),f=[],d=a.setContext(this.getContext()),p=d.display?d.width:0,g=p/2,m=function(t){return(0,n.X)(i,t,p)};let b,v,y,D,x,w,_,F,A,S,C,L;if("top"===s)b=m(this.bottom),w=this.bottom-c,F=b-g,S=m(t.top)+g,L=t.bottom;else if("bottom"===s)b=m(this.top),S=t.top,L=m(t.bottom)-g,w=b+g,F=this.top+c;else if("left"===s)b=m(this.right),x=this.right-c,_=b-g,A=m(t.left)+g,C=t.right;else if("right"===s)b=m(this.left),A=t.left,C=m(t.right)-g,x=b+g,_=this.left+c;else if("x"===e){if("center"===s)b=m((t.top+t.bottom)/2+.5);else if((0,n.i)(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}S=t.top,L=t.bottom,w=b+g,F=w+c}else if("y"===e){if("center"===s)b=m((t.left+t.right)/2);else if((0,n.i)(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}x=b-g,_=x-c,A=t.left,C=t.right}const k=(0,n.v)(r.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/k));for(v=0;v<h;v+=P){const t=this.getContext(v),e=o.setContext(t),r=a.setContext(t),s=e.lineWidth,h=e.color,c=r.dash||[],d=r.dashOffset,p=e.tickWidth,g=e.tickColor,m=e.tickBorderDash||[],b=e.tickBorderDashOffset;y=kt(this,v,l),void 0!==y&&(D=(0,n.X)(i,y,s),u?x=_=A=C=D:w=F=S=L=D,f.push({tx1:x,ty1:w,tx2:_,ty2:F,x1:A,y1:S,x2:C,y2:L,width:s,color:h,borderDash:c,borderDashOffset:d,tickWidth:p,tickColor:g,tickBorderDash:m,tickBorderDashOffset:b}))}return this._ticksLength=h,this._borderValue=b,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:o}=i,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:h,mirror:c}=o,f=Pt(i.grid),d=f+h,p=c?-h:d,g=-(0,n.t)(this.labelRotation),m=[];let b,v,y,D,x,w,_,F,A,S,C,L,k="middle";if("top"===r)w=this.bottom-p,_=this._getXAxisLabelAlignment();else if("bottom"===r)w=this.top+p,_=this._getXAxisLabelAlignment();else if("left"===r){const t=this._getYAxisLabelAlignment(f);_=t.textAlign,x=t.x}else if("right"===r){const t=this._getYAxisLabelAlignment(f);_=t.textAlign,x=t.x}else if("x"===e){if("center"===r)w=(t.top+t.bottom)/2+d;else if((0,n.i)(r)){const t=Object.keys(r)[0],e=r[t];w=this.chart.scales[t].getPixelForValue(e)+d}_=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===r)x=(t.left+t.right)/2-d;else if((0,n.i)(r)){const t=Object.keys(r)[0],e=r[t];x=this.chart.scales[t].getPixelForValue(e)}_=this._getYAxisLabelAlignment(f).textAlign}"y"===e&&("start"===l?k="top":"end"===l&&(k="bottom"));const P=this._getLabelSizes();for(b=0,v=a.length;b<v;++b){y=a[b],D=y.label;const t=o.setContext(this.getContext(b));F=this.getPixelForTick(b)+o.labelOffset,A=this._resolveTickFontOptions(b),S=A.lineHeight,C=(0,n.b)(D)?D.length:1;const e=C/2,i=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let f,d=_;if(s?(x=F,"inner"===_&&(d=b===v-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),L="top"===r?"near"===u||0!==g?-C*S+S/2:"center"===u?-P.highest.height/2-e*S+S:-P.highest.height+S/2:"near"===u||0!==g?S/2:"center"===u?P.highest.height/2-e*S:P.highest.height-C*S,c&&(L*=-1),0===g||t.showLabelBackdrop||(x+=S/2*Math.sin(g))):(w=F,L=(1-C)*S/2),t.showLabelBackdrop){const e=(0,n.E)(t.backdropPadding),i=P.heights[b],r=P.widths[b];let o=L-e.top,s=0-e.left;switch(k){case"middle":o-=i/2;break;case"bottom":o-=i}switch(_){case"center":s-=r/2;break;case"right":s-=r;break;case"inner":b===v-1?s-=r:b>0&&(s-=r/2)}f={left:s,top:o,width:r+e.width,height:i+e.height,color:t.backdropColor}}m.push({label:D,font:A,textOffset:L,options:{rotation:g,color:i,strokeColor:l,strokeWidth:h,textAlign:d,textBaseline:k,translation:[x,w],backdrop:f}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-(0,n.t)(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,o=t+r,s=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+r,"near"===i?a="left":"center"===i?(a="center",l+=s/2):(a="right",l+=s)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=s/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+r,"near"===i?a="right":"center"===i?(a="center",l-=s/2):(a="left",l-=s)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=s/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r<o;++r){const t=n[r];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:r}}=this,o=i.setContext(this.getContext()),s=i.display?o.width:0;if(!s)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,h,c,f;this.isHorizontal()?(u=(0,n.X)(t,this.left,s)-s/2,h=(0,n.X)(t,this.right,a)+a/2,c=f=l):(c=(0,n.X)(t,this.top,s)-s/2,f=(0,n.X)(t,this.bottom,a)+a/2,u=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(u,c),e.lineTo(h,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&(0,n.Y)(e,i);const r=this.getLabelItems(t);for(const o of r){const t=o.options,i=o.font,r=o.label,s=o.textOffset;(0,n.Z)(e,r,0,s,i,t)}i&&(0,n.$)(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const o=(0,n.a0)(i.font),s=(0,n.E)(i.padding),a=i.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||(0,n.i)(e)?(l+=s.bottom,(0,n.b)(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:u,titleY:h,maxWidth:c,rotation:f}=function(t,e,i,r){const{top:o,left:s,bottom:a,right:l,chart:u}=t,{chartArea:h,scales:c}=u;let f,d,p,g=0;const m=a-o,b=l-s;if(t.isHorizontal()){if(d=(0,n.a2)(r,s,l),(0,n.i)(i)){const t=Object.keys(i)[0],n=i[t];p=c[t].getPixelForValue(n)+m-e}else p="center"===i?(h.bottom+h.top)/2+m-e:St(t,i,e);f=l-s}else{if((0,n.i)(i)){const t=Object.keys(i)[0],n=i[t];d=c[t].getPixelForValue(n)-b+e}else d="center"===i?(h.left+h.right)/2-b+e:St(t,i,e);p=(0,n.a2)(r,a,o),g="left"===i?-n.H:n.H}return{titleX:d,titleY:p,maxWidth:f,rotation:g}}(this,l,e,a);(0,n.Z)(t,i.text,0,0,o,{color:i.color,maxWidth:c,rotation:f,textAlign:Et(a,e,r),textBaseline:"middle",translation:[u,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=(0,n.v)(t.grid&&t.grid.z,-1),r=(0,n.v)(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Bt.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r<o;++r){const o=e[r];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return(0,n.a0)(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Mt{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const r=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,function(t,e,i){const r=(0,n.a4)(Object.create(null),[i?n.d.get(i):{},n.d.get(e),t.defaults]);n.d.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const r=i.split("."),o=r.pop(),s=[t].concat(r).join("."),a=e[i].split("."),l=a.pop(),u=a.join(".");n.d.route(s,o,u,l)}))}(e,t.defaultRoutes);t.descriptors&&n.d.describe(e,t.descriptors)}(t,s,i),this.override&&n.d.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in n.d[r]&&(delete n.d[r][i],this.override&&delete n.a3[i])}}class Ot{constructor(){this.controllers=new Mt(x,"datasets",!0),this.elements=new Mt(_t,"elements"),this.plugins=new Mt(Object,"plugins"),this.scales=new Mt(Bt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const r=i||this._getRegistryForType(e);i||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):(0,n.F)(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const r=(0,n.a5)(t);(0,n.Q)(i["before"+r],[],i),e[t](i),(0,n.Q)(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var It=new Ot;class Tt{constructor(){this._init=void 0}notify(t,e,i,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,i);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,i,r){r=r||{};for(const o of t){const t=o.plugin,s=t[i],a=[e,r,o.options];if(!1===(0,n.Q)(s,a,t)&&r.cancelable)return!1}return!0}invalidate(){(0,n.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=(0,n.v)(i.options&&i.options.plugins,{}),o=function(t){const e={},i=[],n=Object.keys(It.plugins.items);for(let o=0;o<n.length;o++)i.push(It.getPlugin(n[o]));const r=t.plugins||[];for(let o=0;o<r.length;o++){const t=r[o];-1===i.indexOf(t)&&(i.push(t),e[t.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==r||e?function(t,{plugins:e,localIds:i},n,r){const o=[],s=t.getContext();for(const a of e){const e=a.id,l=jt(n[e],r);null!==l&&o.push({plugin:a,options:Rt(t.config,{plugin:a,local:i[e]},l,s)})}return o}(t,o,r,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function jt(t,e){return e||!1!==t?!0===t?{}:t:null}function Rt(t,{plugin:e,local:i},n,r){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(n,o);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zt(t,e){const i=n.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function qt(t){if("x"===t||"y"===t||"r"===t)return t}function Ht(t,...e){if(qt(t))return t;for(const n of e){const e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&qt(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Wt(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ut(t,e){const i=n.a3[t.type]||{scales:{}},r=e.scales||{},o=zt(t.type,e),s=Object.create(null);return Object.keys(r).forEach((e=>{const a=r[e];if(!(0,n.i)(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=Ht(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Wt(t,"x",i[0])||Wt(t,"y",i[0])}return{}}(e,t),n.d.scales[a.type]),u=function(t,e){return t===e?"_index_":"_value_"}(l,o),h=i.scales||{};s[e]=(0,n.ab)(Object.create(null),[{axis:l},a,h[l],h[u]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,a=i.indexAxis||zt(o,e),l=(n.a3[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),o=i[e+"AxisID"]||e;s[o]=s[o]||Object.create(null),(0,n.ab)(s[o],[{axis:e},r[o],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];(0,n.ab)(e,[n.d.scales[e.type],n.d.scale])})),s}function Vt(t){const e=t.options||(t.options={});e.plugins=(0,n.v)(e.plugins,{}),e.scales=Ut(t,e)}function Gt(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Yt=new Map,Xt=new Set;function $t(t,e){let i=Yt.get(t);return i||(i=e(),Yt.set(t,i),Xt.add(i)),i}const Kt=(t,e,i)=>{const r=(0,n.f)(e,i);void 0!==r&&t.add(r)};class Jt{constructor(t){this._config=function(t){return(t=t||{}).data=Gt(t.data),Vt(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Gt(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Vt(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return $t(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return $t(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return $t(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return $t(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:r,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const l=new Set;e.forEach((e=>{t&&(l.add(t),e.forEach((e=>Kt(l,t,e)))),e.forEach((t=>Kt(l,r,t))),e.forEach((t=>Kt(l,n.a3[o]||{},t))),e.forEach((t=>Kt(l,n.d,t))),e.forEach((t=>Kt(l,n.a6,t)))}));const u=Array.from(l);return 0===u.length&&u.push(Object.create(null)),Xt.has(e)&&s.set(e,u),u}chartOptionScopes(){const{options:t,type:e}=this;return[t,n.a3[e]||{},n.d.datasets[e]||{},{type:e},n.d,n.a6]}resolveNamedOptions(t,e,i,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Qt(this._resolverCache,t,r);let l=s;if(function(t,e){const{isScriptable:i,isIndexable:r}=(0,n.aa)(t);for(const o of e){const e=i(o),s=r(o),a=(s||e)&&t[o];if(e&&((0,n.a7)(a)||Zt(a))||s&&(0,n.b)(a))return!0}return!1}(s,e)){o.$shared=!1,i=(0,n.a7)(i)?i():i;const e=this.createResolver(t,i,a);l=(0,n.a8)(s,i,e)}for(const n of e)o[n]=l[n];return o}createResolver(t,e,i=[""],r){const{resolver:o}=Qt(this._resolverCache,t,i);return(0,n.i)(e)?(0,n.a8)(o,e,void 0,r):o}}function Qt(t,e,i){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=i.join();let s=r.get(o);if(!s){s={resolver:(0,n.a9)(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},r.set(o,s)}return s}const Zt=t=>(0,n.i)(t)&&Object.getOwnPropertyNames(t).some((e=>(0,n.a7)(t[e])));const te=["top","bottom","left","right","chartArea"];function ee(t,e){return"top"===t||"bottom"===t||-1===te.indexOf(t)&&"x"===e}function ie(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ne(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),(0,n.Q)(i&&i.onComplete,[t],e)}function re(t){const e=t.chart,i=e.options.animation;(0,n.Q)(i&&i.onProgress,[t],e)}function oe(t){return(0,n.M)()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const se={},ae=t=>{const e=oe(t);return Object.values(se).filter((t=>t.canvas===e)).pop()};function le(t,e,i){const n=Object.keys(t);for(const r of n){const n=+r;if(n>=e){const o=t[r];delete t[r],(i>0||n>e)&&(t[n+i]=o)}}}class ue{static defaults=n.d;static instances=se;static overrides=n.a3;static registry=It;static version="4.5.1";static getChart=ae;static register(...t){It.add(...t),he()}static unregister(...t){It.remove(...t),he()}constructor(t,e){const i=this.config=new Jt(e),r=oe(t),s=ae(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!(0,n.M)()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?at:wt}(r)),this.platform.updateConfig(i);const l=this.platform.acquireContext(r,a.aspectRatio),u=l&&l.canvas,h=u&&u.height,c=u&&u.width;this.id=(0,n.ac)(),this.ctx=l,this.canvas=u,this.width=c,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Tt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,n.ad)((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],se[this.id]=this,l&&u?(o.listen(this,"complete",ne),o.listen(this,"progress",re),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:o}=this;return(0,n.k)(t)?e&&o?o:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return It}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,n.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,n.af)(this.canvas,this.ctx),this}stop(){return o.stop(this),this}resize(t,e){o.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,(0,n.ae)(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),(0,n.Q)(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};(0,n.F)(t,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=Ht(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),(0,n.F)(o,(e=>{const o=e.options,s=o.id,a=Ht(s,o),l=(0,n.v)(o.type,e.dtype);void 0!==o.position&&ee(o.position,a)===ee(e.dposition)||(o.position=e.dposition),r[s]=!0;let u=null;if(s in i&&i[s].type===l)u=i[s];else{u=new(It.getScale(l))({id:s,type:l,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(o,t)})),(0,n.F)(r,((t,e)=>{t||delete i[e]})),(0,n.F)(i,(t=>{ot.configure(this,t,t.options),ot.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ie("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const r=e[i];let o=this.getDatasetMeta(i);const s=r.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=s,o.indexAxis=r.indexAxis||zt(s,this.options),o.order=r.order||0,o.index=i,o.label=""+r.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=It.getController(s),{datasetElementType:r,dataElementType:a}=n.d.datasets[s];Object.assign(e,{dataElementType:It.getElement(a),datasetElementType:r&&It.getElement(r)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){(0,n.F)(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let n=0,u=this.data.datasets.length;n<u;n++){const{controller:t}=this.getDatasetMeta(n),e=!r&&-1===o.indexOf(t);t.buildOrUpdateElements(e),s=Math.max(+t.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||(0,n.F)(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ie("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){(0,n.F)(this.scales,(t=>{ot.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(0,n.ag)(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of e){le(t,n,"_removeElements"===i?-r:r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),r=i(0);for(let o=1;o<e;o++)if(!(0,n.ag)(r,i(o)))return;return Array.from(r).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ot.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],(0,n.F)(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,(0,n.a7)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(o.has(this)?this.attached&&!o.running(this)&&o.start(this):(this.draw(),ne({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,r;for(n=0,r=e.length;n<r;++n){const r=e[n];t&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},r=(0,n.ah)(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&(0,n.Y)(e,r),t.controller.draw(),r&&(0,n.$)(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return(0,n.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const r=G.modes[e];return"function"===typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=(0,n.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"===typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);(0,n.h)(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update((e=>e.datasetIndex===t?r:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),o.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,n.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete se[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},r=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};(0,n.F)(this.options.events,(t=>i(t,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){(0,n.F)(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},(0,n.F)(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s<a;++s){o=t[s];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!(0,n.ai)(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,i,s),l=(0,n.aj)(t),u=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,l);i&&(this._lastEvent=null,(0,n.Q)(o.onHover,[t,a,this],this),l&&(0,n.Q)(o.onClick,[t,a,this],this));const h=!(0,n.ai)(a,r);return(h||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=u,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}function he(){return(0,n.F)(ue.instances,(t=>t._plugins.invalidate()))}function ce(t,e,i,r){const o=(s=t.options.borderRadius,(0,n.am)(s,["outerStart","outerEnd","innerStart","innerEnd"]));var s;const a=(i-e)/2,l=Math.min(a,r*e/2),u=t=>{const e=(i-Math.min(a,t))*r/2;return(0,n.S)(t,0,Math.min(a,e))};return{outerStart:u(o.outerStart),outerEnd:u(o.outerEnd),innerStart:(0,n.S)(o.innerStart,0,l),innerEnd:(0,n.S)(o.innerEnd,0,l)}}function fe(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function de(t,e,i,r,o,s){const{x:a,y:l,startAngle:u,pixelMargin:h,innerRadius:c}=e,f=Math.max(e.outerRadius+r+i-h,0),d=c>0?c+r+i+h:0;let p=0;const g=o-u;if(r){const t=((c>0?c-r:0)+(f>0?f-r:0))/2;p=(g-(0!==t?g*t/(t+r):g))/2}const m=(g-Math.max(.001,g*f-i/n.P)/f)/2,b=u+m+p,v=o-m-p,{outerStart:y,outerEnd:D,innerStart:x,innerEnd:w}=ce(e,d,f,v-b),_=f-y,F=f-D,A=b+y/_,S=v-D/F,C=d+x,L=d+w,k=b+x/C,P=v-w/L;if(t.beginPath(),s){const e=(A+S)/2;if(t.arc(a,l,f,A,e),t.arc(a,l,f,e,S),D>0){const e=fe(F,S,a,l);t.arc(e.x,e.y,D,S,v+n.H)}const i=fe(L,v,a,l);if(t.lineTo(i.x,i.y),w>0){const e=fe(L,P,a,l);t.arc(e.x,e.y,w,v+n.H,P+Math.PI)}const r=(v-w/d+(b+x/d))/2;if(t.arc(a,l,d,v-w/d,r,!0),t.arc(a,l,d,r,b+x/d,!0),x>0){const e=fe(C,k,a,l);t.arc(e.x,e.y,x,k+Math.PI,b-n.H)}const o=fe(_,b,a,l);if(t.lineTo(o.x,o.y),y>0){const e=fe(_,A,a,l);t.arc(e.x,e.y,y,b-n.H,A)}}else{t.moveTo(a,l);const e=Math.cos(A)*f+a,i=Math.sin(A)*f+l;t.lineTo(e,i);const n=Math.cos(S)*f+a,r=Math.sin(S)*f+l;t.lineTo(n,r)}t.closePath()}function pe(t,e,i,r,o){const{fullCircles:s,startAngle:a,circumference:l,options:u}=e,{borderWidth:h,borderJoinStyle:c,borderDash:f,borderDashOffset:d,borderRadius:p}=u,g="inner"===u.borderAlign;if(!h)return;t.setLineDash(f||[]),t.lineDashOffset=d,g?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let m=e.endAngle;if(s){de(t,e,i,r,m,o);for(let e=0;e<s;++e)t.stroke();isNaN(l)||(m=a+(l%n.T||n.T))}g&&function(t,e,i){const{startAngle:r,pixelMargin:o,x:s,y:a,outerRadius:l,innerRadius:u}=e;let h=o/l;t.beginPath(),t.arc(s,a,l,r-h,i+h),u>o?(h=o/u,t.arc(s,a,u,i+h,r-h,!0)):t.arc(s,a,o,i+n.H,r-n.H),t.closePath(),t.clip()}(t,e,m),u.selfJoin&&m-a>=n.P&&0===p&&"miter"!==c&&function(t,e,i){const{startAngle:r,x:o,y:s,outerRadius:a,innerRadius:l,options:u}=e,{borderWidth:h,borderJoinStyle:c}=u,f=Math.min(h/a,(0,n.al)(r-i));if(t.beginPath(),t.arc(o,s,a-h/2,r+f/2,i-f/2),l>0){const e=Math.min(h/l,(0,n.al)(r-i));t.arc(o,s,l+h/2,i-e/2,r+e/2,!0)}else{const e=Math.min(h/2,a*(0,n.al)(r-i));if("round"===c)t.arc(o,s,e,i-n.P/2,r+n.P/2,!0);else if("bevel"===c){const a=2*e*e,l=-a*Math.cos(i+n.P/2)+o,u=-a*Math.sin(i+n.P/2)+s,h=a*Math.cos(r+n.P/2)+o,c=a*Math.sin(r+n.P/2)+s;t.lineTo(l,u),t.lineTo(h,c)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,m),s||(de(t,e,i,r,m,o),t.stroke())}class ge extends _t{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.getProps(["x","y"],i),{angle:o,distance:s}=(0,n.D)(r,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:u,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=(this.options.spacing+this.options.borderWidth)/2,d=(0,n.v)(c,l-a),p=(0,n.p)(o,a,l)&&a!==l,g=d>=n.T||p,m=(0,n.ak)(s,u+f,h+f);return g&&m}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,u=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(u)*h,y:i+Math.sin(u)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,r=(e.offset||0)/4,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>n.T?Math.floor(i/n.T):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*r,Math.sin(a)*r);const l=r*(1-Math.sin(Math.min(n.P,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,r,o){const{fullCircles:s,startAngle:a,circumference:l}=e;let u=e.endAngle;if(s){de(t,e,i,r,u,o);for(let e=0;e<s;++e)t.fill();isNaN(l)||(u=a+(l%n.T||n.T))}de(t,e,i,r,u,o),t.fill()}(t,this,l,o,s),pe(t,this,l,o,s),t.restore()}}function me(t,e,i=e){t.lineCap=(0,n.v)(i.borderCapStyle,e.borderCapStyle),t.setLineDash((0,n.v)(i.borderDash,e.borderDash)),t.lineDashOffset=(0,n.v)(i.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,n.v)(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,n.v)(i.borderWidth,e.borderWidth),t.strokeStyle=(0,n.v)(i.borderColor,e.borderColor)}function be(t,e,i){t.lineTo(i.x,i.y)}function ve(t,e,i={}){const n=t.length,{start:r=0,end:o=n-1}=i,{start:s,end:a}=e,l=Math.max(r,s),u=Math.min(o,a),h=r<s&&o<s||r>a&&o>a;return{count:n,start:l,loop:e.loop,ilen:u<l&&!h?n+u-l:u-l}}function ye(t,e,i,r){const{points:o,options:s}=e,{count:a,start:l,loop:u,ilen:h}=ve(o,i,r),c=function(t){return t.stepped?n.at:t.tension||"monotone"===t.cubicInterpolationMode?n.au:be}(s);let f,d,p,{move:g=!0,reverse:m}=r||{};for(f=0;f<=h;++f)d=o[(l+(m?h-f:f))%a],d.skip||(g?(t.moveTo(d.x,d.y),g=!1):c(t,p,d,m,s.stepped),p=d);return u&&(d=o[(l+(m?h:0))%a],c(t,p,d,m,s.stepped)),!!u}function De(t,e,i,n){const r=e.points,{count:o,start:s,ilen:a}=ve(r,i,n),{move:l=!0,reverse:u}=n||{};let h,c,f,d,p,g,m=0,b=0;const v=t=>(s+(u?a-t:t))%o,y=()=>{d!==p&&(t.lineTo(m,p),t.lineTo(m,d),t.lineTo(m,g))};for(l&&(c=r[v(0)],t.moveTo(c.x,c.y)),h=0;h<=a;++h){if(c=r[v(h)],c.skip)continue;const e=c.x,i=c.y,n=0|e;n===f?(i<d?d=i:i>p&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),f=n,b=0,d=p=i),g=i}y()}function xe(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i?De:ye}const we="function"===typeof Path2D;function _e(t,e,i,n){we&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),me(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=xe(e);for(const a of r)me(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Fe extends _t{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;(0,n.an)(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,n.ao)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],o=this.points,s=(0,n.ap)(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],l=function(t){return t.stepped?n.aq:t.tension||"monotone"===t.cubicInterpolationMode?n.ar:n.as}(i);let u,h;for(u=0,h=s.length;u<h;++u){const{start:n,end:h}=s[u],c=o[n],f=o[h];if(c===f){a.push(c);continue}const d=l(c,f,Math.abs((r-c[e])/(f[e]-c[e])),i.stepped);d[e]=t[e],a.push(d)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return xe(this)(t,this,e,i)}path(t,e,i){const n=this.segments,r=xe(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const s of n)o&=r(t,this,s,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),_e(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ae(t,e,i,n){const r=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<r.radius+r.hitRadius}class Se extends _t{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ae(this,t,"x",e)}inYRange(t,e){return Ae(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!(0,n.C)(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,(0,n.av)(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ce(t,e){const{x:i,y:n,base:r,width:o,height:s}=t.getProps(["x","y","base","width","height"],e);let a,l,u,h,c;return t.horizontal?(c=s/2,a=Math.min(i,r),l=Math.max(i,r),u=n-c,h=n+c):(c=o/2,a=i-c,l=i+c,u=Math.min(n,r),h=Math.max(n,r)),{left:a,top:u,right:l,bottom:h}}function Le(t,e,i,r){return t?0:(0,n.S)(e,i,r)}function ke(t){const e=Ce(t),i=e.right-e.left,r=e.bottom-e.top,o=function(t,e,i){const r=t.options.borderWidth,o=t.borderSkipped,s=(0,n.ax)(r);return{t:Le(o.top,s.top,0,i),r:Le(o.right,s.right,0,e),b:Le(o.bottom,s.bottom,0,i),l:Le(o.left,s.left,0,e)}}(t,i/2,r/2),s=function(t,e,i){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=(0,n.ay)(o),a=Math.min(e,i),l=t.borderSkipped,u=r||(0,n.i)(o);return{topLeft:Le(!u||l.top||l.left,s.topLeft,0,a),topRight:Le(!u||l.top||l.right,s.topRight,0,a),bottomLeft:Le(!u||l.bottom||l.left,s.bottomLeft,0,a),bottomRight:Le(!u||l.bottom||l.right,s.bottomRight,0,a)}}(t,i/2,r/2);return{outer:{x:e.left,y:e.top,w:i,h:r,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function Pe(t,e,i,r){const o=null===e,s=null===i,a=t&&!(o&&s)&&Ce(t,r);return a&&(o||(0,n.ak)(e,a.left,a.right))&&(s||(0,n.ak)(i,a.top,a.bottom))}function Ne(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ee(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}class Be extends _t{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:s}=ke(this),a=(l=s.radius).topLeft||l.topRight||l.bottomLeft||l.bottomRight?n.aw:Ne;var l;t.save(),s.w===o.w&&s.h===o.h||(t.beginPath(),a(t,Ee(s,e,o)),t.clip(),a(t,Ee(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Ee(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Pe(this,t,e,i)}inXRange(t,e){return Pe(this,t,null,e)}inYRange(t,e){return Pe(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}var Me=Object.freeze({__proto__:null,ArcElement:ge,BarElement:Be,LineElement:Fe,PointElement:Se});const Oe=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Ie=Oe.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Te(t){return Oe[t%Oe.length]}function je(t){return Ie[t%Ie.length]}function Re(t){let e=0;return(i,n)=>{const r=t.getDatasetMeta(n).controller;r instanceof E?e=function(t,e){return t.backgroundColor=t.data.map((()=>Te(e++))),e}(i,e):r instanceof M?e=function(t,e){return t.backgroundColor=t.data.map((()=>je(e++))),e}(i,e):r&&(e=function(t,e){return t.borderColor=Te(e),t.backgroundColor=je(e),++e}(i,e))}}function ze(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var qe={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:r},options:o}=t.config,{elements:s}=o,a=ze(r)||(l=o)&&(l.borderColor||l.backgroundColor)||s&&ze(s)||"rgba(0,0,0,0.1)"!==n.d.borderColor||"rgba(0,0,0,0.1)"!==n.d.backgroundColor;var l;if(!i.forceOverride&&a)return;const u=Re(t);r.forEach(u)}};function He(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function We(t){t.data.datasets.forEach((t=>{He(t)}))}var Ue={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void We(t);const r=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,l=t.getDatasetMeta(o),u=s||e.data;if("y"===(0,n.a)([a,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const h=t.scales[l.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:f}=function(t,e){const i=e.length;let r,o=0;const{iScale:s}=t,{min:a,max:l,minDefined:u,maxDefined:h}=s.getUserBounds();return u&&(o=(0,n.S)((0,n.B)(e,s.axis,a).lo,0,i-1)),r=h?(0,n.S)((0,n.B)(e,s.axis,l).hi+1,o,i)-o:i-o,{start:o,count:r}}(l,u);if(f<=(i.threshold||4*r))return void He(e);let d;switch((0,n.k)(s)&&(e._data=u,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const u=e+i-1;let h,c,f,d,p,g=e;for(s[l++]=t[g],h=0;h<o-2;h++){let n,r=0,o=0;const u=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-u;for(n=u;n<m;n++)r+=t[n].x,o+=t[n].y;r/=b,o/=b;const v=Math.floor(h*a)+1+e,y=Math.min(Math.floor((h+1)*a)+1,i)+e,{x:D,y:x}=t[g];for(f=d=-1,n=v;n<y;n++)d=.5*Math.abs((D-r)*(t[n].y-x)-(D-t[n].x)*(o-x)),d>f&&(f=d,c=t[n],p=n);s[l++]=c,g=p}return s[l++]=t[u],s}(u,c,f,r,i);break;case"min-max":d=function(t,e,i,r){let o,s,a,l,u,h,c,f,d,p,g=0,m=0;const b=[],v=e+i-1,y=t[e].x,D=t[v].x-y;for(o=e;o<e+i;++o){s=t[o],a=(s.x-y)/D*r,l=s.y;const e=0|a;if(e===u)l<d?(d=l,h=o):l>p&&(p=l,c=o),g=(m*g+s.x)/++m;else{const i=o-1;if(!(0,n.k)(h)&&!(0,n.k)(c)){const e=Math.min(h,c),n=Math.max(h,c);e!==f&&e!==i&&b.push({...t[e],x:g}),n!==f&&n!==i&&b.push({...t[n],x:g})}o>0&&i!==f&&b.push(t[i]),b.push(s),u=e,m=0,d=p=l,h=c=f=o}}return b}(u,c,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){We(t)}};function Ve(t,e,i,r){if(r)return;let o=e[t],s=i[t];return"angle"===t&&(o=(0,n.al)(o),s=(0,n.al)(s)),{property:t,start:o,end:s}}function Ge(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ye(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Xe(t,e){let i=[],r=!1;return(0,n.b)(t)?(r=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},r=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=Ge(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Fe({points:i,options:{tension:0},_loop:r,_fullLoop:r}):null}function $e(t){return t&&!1!==t.fill}function Ke(t,e,i){let r=t[e].fill;const o=[e];let s;if(!i)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!(0,n.g)(r))return r;if(s=t[r],!s)return!1;if(s.visible)return r;o.push(r),r=s.fill}return!1}function Je(t,e,i){const r=function(t){const e=t.options,i=e.fill;let r=(0,n.v)(i&&i.target,i);void 0===r&&(r=!!e.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(t);if((0,n.i)(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return(0,n.g)(o)&&Math.floor(o)===o?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(r[0],e,o,i):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Qe(t,e,i){const n=[];for(let r=0;r<i.length;r++){const o=i[r],{first:s,last:a,point:l}=Ze(o,e,"x");if(!(!l||s&&a))if(s)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Ze(t,e,i){const r=t.interpolate(e,i);if(!r)return{};const o=r[i],s=t.segments,a=t.points;let l=!1,u=!1;for(let h=0;h<s.length;h++){const t=s[h],e=a[t.start][i],r=a[t.end][i];if((0,n.ak)(o,e,r)){l=o===e,u=o===r;break}}return{first:l,last:u,point:r}}class ti{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:o,radius:s}=this;return e=e||{start:0,end:n.T},t.arc(r,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ei(t){const{chart:e,fill:i,line:r}=t;if((0,n.g)(i))return function(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let r=0;r<n.length;r++){const t=n[r];if(t.index===e)break;t.hidden||i.unshift(t.dataset)}return i}(e,i);a.push(Xe({x:null,y:e.bottom},n));for(let l=0;l<o.length;l++){const t=o[l];for(let e=t.start;e<=t.end;e++)Qe(r,s[e],a)}return new Fe({points:r,options:{}})}(t);if("shape"===i)return!0;const o=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,r=e.options,o=e.getLabels().length,s=r.reverse?e.max:e.min,a=function(t,e,i){let r;return r="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:(0,n.i)(t)?t.value:e.getBaseValue(),r}(i,e,s),l=[];if(r.grid.circular){const t=e.getPointPositionForValue(0,s);return new ti({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(a)})}for(let n=0;n<o;++n)l.push(e.getPointPositionForValue(n,a));return l}(t);return function(t){const{scale:e={},fill:i}=t,r=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:(0,n.i)(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if((0,n.g)(r)){const t=e.isHorizontal();return{x:t?r:null,y:t?null:r}}return null}(t)}(t);return o instanceof ti?o:Xe(o,r)}function ii(t,e,i){const r=ei(e),{chart:o,index:s,line:a,scale:l,axis:u}=e,h=a.options,c=h.fill,f=h.backgroundColor,{above:d=f,below:p=f}=c||{},g=o.getDatasetMeta(s),m=(0,n.ah)(o,g);r&&a.points.length&&((0,n.Y)(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a,clip:l}=e,u=i._loop?"angle":e.axis;t.save();let h=o;o!==r&&("x"===u?(ni(t,n,s.top),oi(t,{line:i,target:n,color:r,scale:a,property:u,clip:l}),t.restore(),t.save(),ni(t,n,s.bottom)):"y"===u&&(ri(t,n,s.left),oi(t,{line:i,target:n,color:o,scale:a,property:u,clip:l}),t.restore(),t.save(),ri(t,n,s.right),h=r));oi(t,{line:i,target:n,color:h,scale:a,property:u,clip:l}),t.restore()}(t,{line:a,target:r,above:d,below:p,area:i,scale:l,axis:u,clip:m}),(0,n.$)(t))}function ni(t,e,i){const{segments:n,points:r}=e;let o=!0,s=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,u=r[n],h=r[Ge(n,l,r)];o?(t.moveTo(u.x,u.y),o=!1):(t.lineTo(u.x,i),t.lineTo(u.x,u.y)),s=!!e.pathSegment(t,a,{move:s}),s?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function ri(t,e,i){const{segments:n,points:r}=e;let o=!0,s=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,u=r[n],h=r[Ge(n,l,r)];o?(t.moveTo(u.x,u.y),o=!1):(t.lineTo(i,u.y),t.lineTo(u.x,u.y)),s=!!e.pathSegment(t,a,{move:s}),s?t.closePath():t.lineTo(i,h.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function oi(t,e){const{line:i,target:r,property:o,color:s,scale:a,clip:l}=e,u=function(t,e,i){const r=t.segments,o=t.points,s=e.points,a=[];for(const l of r){let{start:t,end:r}=l;r=Ge(t,r,o);const u=Ve(i,o[t],o[r],l.loop);if(!e.segments){a.push({source:l,target:u,start:o[t],end:o[r]});continue}const h=(0,n.ap)(e,u);for(const e of h){const t=Ve(i,s[e.start],s[e.end],e.loop),r=(0,n.az)(l,o,t);for(const n of r)a.push({source:n,target:e,start:{[i]:Ye(u,t,"start",Math.max)},end:{[i]:Ye(u,t,"end",Math.min)}})}}return a}(i,r,o);for(const{source:n,target:h,start:c,end:f}of u){const{style:{backgroundColor:e=s}={}}=n,u=!0!==r;t.save(),t.fillStyle=e,si(t,a,l,u&&Ve(o,c,f)),t.beginPath();const d=!!i.pathSegment(t,n);let p;if(u){d?t.closePath():ai(t,r,f,o);const e=!!r.pathSegment(t,h,{move:d,reverse:!0});p=d&&e,p||ai(t,r,c,o)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function si(t,e,i,n){const r=e.chart.chartArea,{property:o,start:s,end:a}=n||{};if("x"===o||"y"===o){let e,n,l,u;"x"===o?(e=s,n=r.top,l=a,u=r.bottom):(e=r.left,n=s,l=r.right,u=a),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),n=Math.max(n,i.top),u=Math.min(u,i.bottom)),t.rect(e,n,l-e,u-n),t.clip()}}function ai(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}var li={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s<n;++s)o=t.getDatasetMeta(s),a=o.dataset,l=null,a&&a.options&&a instanceof Fe&&(l={visible:t.isDatasetVisible(s),index:s,fill:Je(a,s,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,r.push(l);for(s=0;s<n;++s)l=r[s],l&&!1!==l.fill&&(l.fill=Ke(r,s,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,r=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let s=r.length-1;s>=0;--s){const e=r[s].$filler;e&&(e.line.updateControlPoints(o,e.axis),n&&e.fill&&ii(t.ctx,e,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){const e=n[r].$filler;$e(e)&&ii(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;$e(n)&&"beforeDatasetDraw"===i.drawTime&&ii(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ui=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class hi extends _t{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=(0,n.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,r=(0,n.a0)(i.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ui(i,o);let u,h;e.font=r.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(s,o,a,l)+10):(h=this.maxHeight,u=this._fitCols(s,r,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let c=-1,f=-u;return this.legendItems.forEach(((t,d)=>{const p=i+e/2+r.measureText(t.text).width;(0===d||l[l.length-1]+p+2*s>o)&&(h+=u,l[l.length-(d>0?0:1)]=0,f+=u,c++),a[d]={left:0,top:f,row:c,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],u=o-t;let h=s,c=0,f=0,d=0,p=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:m}=function(t,e,i,n,r){const o=function(t,e,i,n){let r=t.text;r&&"string"!==typeof r&&(r=r.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+n.measureText(r).width}(n,t,e,i),s=function(t,e,i){let n=t;"string"!==typeof e.text&&(n=ci(e,i));return n}(r,n,e.lineHeight);return{itemWidth:o,itemHeight:s}}(i,e,r,t,n);o>0&&f+m+2*s>u&&(h+=c+s,l.push({width:c,height:f}),d+=c+s,p++,c=f=0),a[o]={left:d,top:f,col:p,width:g,height:m},c=Math.max(c,g),f+=m+s})),h+=c,l.push({width:c,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:o}}=this,s=(0,n.aA)(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=(0,n.a2)(i,this.left+r,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=(0,n.a2)(i,this.left+r,this.right-this.lineWidths[o])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+r}else{let o=0,a=(0,n.a2)(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=(0,n.a2)(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,n.Y)(t,this),this._draw(),(0,n.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:o,labels:s}=t,a=n.d.color,l=(0,n.aA)(t.rtl,this.left,this.width),u=(0,n.a0)(s.font),{padding:h}=s,c=u.size,f=c/2;let d;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=u.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=ui(s,c),b=this.isHorizontal(),v=this._computeTitleHeight();d=b?{x:(0,n.a2)(o,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:(0,n.a2)(o,this.top+v+h,this.bottom-e[0].height),line:0},(0,n.aB)(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach(((D,x)=>{r.strokeStyle=D.fontColor,r.fillStyle=D.fontColor;const w=r.measureText(D.text).width,_=l.textAlign(D.textAlign||(D.textAlign=s.textAlign)),F=p+f+w;let A=d.x,S=d.y;l.setWidth(this.width),b?x>0&&A+F+h>this.right&&(S=d.y+=y,d.line++,A=d.x=(0,n.a2)(o,this.left+h,this.right-i[d.line])):x>0&&S+y>this.bottom&&(A=d.x=A+e[d.line].width+h,d.line++,S=d.y=(0,n.a2)(o,this.top+v+h,this.bottom-e[d.line].height));if(function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;r.save();const o=(0,n.v)(i.lineWidth,1);if(r.fillStyle=(0,n.v)(i.fillStyle,a),r.lineCap=(0,n.v)(i.lineCap,"butt"),r.lineDashOffset=(0,n.v)(i.lineDashOffset,0),r.lineJoin=(0,n.v)(i.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=(0,n.v)(i.strokeStyle,a),r.setLineDash((0,n.v)(i.lineDash,[])),s.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},u=l.xPlus(t,p/2),h=e+f;(0,n.aE)(r,a,u,h,s.pointStyleWidth&&p)}else{const s=e+Math.max((c-g)/2,0),a=l.leftForLtr(t,p),u=(0,n.ay)(i.borderRadius);r.beginPath(),Object.values(u).some((t=>0!==t))?(0,n.aw)(r,{x:a,y:s,w:p,h:g,radius:u}):r.rect(a,s,p,g),r.fill(),0!==o&&r.stroke()}r.restore()}(l.x(A),S,D),A=(0,n.aC)(_,A+p+f,b?A+F:this.right,t.rtl),function(t,e,i){(0,n.Z)(r,i.text,t,e+m/2,u,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(A),S,D),b)d.x+=F+h;else if("string"!==typeof D.text){const t=u.lineHeight;d.y+=ci(D,t)+h}else d.y+=y})),(0,n.aD)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=(0,n.a0)(e.font),r=(0,n.E)(e.padding);if(!e.display)return;const o=(0,n.aA)(t.rtl,this.left,this.width),s=this.ctx,a=e.position,l=i.size/2,u=r.top+l;let h,c=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+u,c=(0,n.a2)(t.align,c,this.right-f);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=u+(0,n.a2)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=(0,n.a2)(a,c,c+f);s.textAlign=o.textAlign((0,n.a1)(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,(0,n.Z)(s,e.text,d,h,i)}_computeTitleHeight(){const t=this.options.title,e=(0,n.a0)(t.font),i=(0,n.E)(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,o;if((0,n.ak)(t,this.left,this.right)&&(0,n.ak)(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],(0,n.ak)(t,r.left,r.left+r.width)&&(0,n.ak)(e,r.top,r.top+r.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,a=(o=i,null!==(r=s)&&null!==o&&r.datasetIndex===o.datasetIndex&&r.index===o.index);s&&!a&&(0,n.Q)(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!a&&(0,n.Q)(e.onHover,[t,i,this],this)}else i&&(0,n.Q)(e.onClick,[t,i,this],this);var r,o}}function ci(t,e){return e*(t.text?t.text.length:0)}var fi={id:"legend",_element:hi,start(t,e,i){const n=t.legend=new hi({ctx:t.ctx,options:i,chart:t});ot.configure(t,n,i),ot.addBox(t,n)},stop(t){ot.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ot.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:r,textAlign:o,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const u=t.controller.getStyle(i?0:void 0),h=(0,n.E)(u.borderWidth);return{text:e[t.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:o||u.textAlign,borderRadius:a&&(l||u.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class di extends _t{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=(0,n.b)(i.text)?i.text.length:1;this._padding=(0,n.E)(i.padding);const o=r*(0,n.a0)(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:r,right:o,options:s}=this,a=s.align;let l,u,h,c=0;return this.isHorizontal()?(u=(0,n.a2)(a,i,o),h=e+t,l=o-i):("left"===s.position?(u=i+t,h=(0,n.a2)(a,r,e),c=-.5*n.P):(u=o-t,h=(0,n.a2)(a,e,r),c=.5*n.P),l=r-e),{titleX:u,titleY:h,maxWidth:l,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=(0,n.a0)(e.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:a,rotation:l}=this._drawArgs(r);(0,n.Z)(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:l,textAlign:(0,n.a1)(e.align),textBaseline:"middle",translation:[o,s]})}}var pi={id:"title",_element:di,start(t,e,i){!function(t,e){const i=new di({ctx:t.ctx,options:e,chart:t});ot.configure(t,i,e),ot.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ot.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ot.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gi=new WeakMap;var mi={id:"subtitle",start(t,e,i){const n=new di({ctx:t.ctx,options:i,chart:t});ot.configure(t,n,i),ot.addBox(t,n),gi.set(t,n)},stop(t){ot.removeBox(t,gi.get(t)),gi.delete(t)},beforeUpdate(t,e,i){const n=gi.get(t);ot.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const bi={average(t){if(!t.length)return!1;let e,i,n=new Set,r=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),r+=t.y,++o}}if(0===o||0===n.size)return!1;return{x:[...n].reduce(((t,e)=>t+e))/n.size,y:r/o}},nearest(t,e){if(!t.length)return!1;let i,r,o,s=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(i=0,r=t.length;i<r;++i){const r=t[i].element;if(r&&r.hasValue()){const t=r.getCenterPoint(),i=(0,n.aF)(e,t);i<l&&(l=i,o=r)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function vi(t,e){return e&&((0,n.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function yi(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Di(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function xi(t,e){const i=t.chart.ctx,{body:r,footer:o,title:s}=t,{boxWidth:a,boxHeight:l}=e,u=(0,n.a0)(e.bodyFont),h=(0,n.a0)(e.titleFont),c=(0,n.a0)(e.footerFont),f=s.length,d=o.length,p=r.length,g=(0,n.E)(e.padding);let m=g.height,b=0,v=r.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(v+=t.beforeBody.length+t.afterBody.length,f&&(m+=f*h.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),v){m+=p*(e.displayColors?Math.max(l,u.lineHeight):u.lineHeight)+(v-p)*u.lineHeight+(v-1)*e.bodySpacing}d&&(m+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let y=0;const D=function(t){b=Math.max(b,i.measureText(t).width+y)};return i.save(),i.font=h.string,(0,n.F)(t.title,D),i.font=u.string,(0,n.F)(t.beforeBody.concat(t.afterBody),D),y=e.displayColors?a+2+e.boxPadding:0,(0,n.F)(r,(t=>{(0,n.F)(t.before,D),(0,n.F)(t.lines,D),(0,n.F)(t.after,D)})),y=0,i.font=c.string,(0,n.F)(t.footer,D),i.restore(),b+=g.width,{width:b,height:m}}function wi(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let u="center";return"center"===n?u=r<=(a+l)/2?"left":"right":r<=o/2?u="left":r>=s-o/2&&(u="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(u,t,e,i)&&(u="center"),u}function _i(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||wi(t,e,i,n),yAlign:n}}function Fi(t,e,i,r){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:u}=i,h=o+s,{topLeft:c,topRight:f,bottomLeft:d,bottomRight:p}=(0,n.ay)(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,l);const m=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,u,h);return"center"===u?"left"===l?g+=h:"right"===l&&(g-=h):"left"===l?g-=Math.max(c,d)+o:"right"===l&&(g+=Math.max(f,p)+o),{x:(0,n.S)(g,0,r.width-e.width),y:(0,n.S)(m,0,r.height-e.height)}}function Ai(t,e,i){const r=(0,n.E)(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function Si(t){return vi([],yi(t))}function Ci(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Li={beforeTitle:n.aG,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:n.aG,beforeBody:n.aG,beforeLabel:n.aG,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return(0,n.k)(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:n.aG,afterBody:n.aG,beforeFooter:n.aG,footer:n.aG,afterFooter:n.aG};function ki(t,e,i,n){const r=t[e].call(i,n);return"undefined"===typeof r?Li[e].call(i,n):r}class Pi extends _t{static positioners=bi;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new u(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,(0,n.j)(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=ki(i,"beforeTitle",this,t),r=ki(i,"title",this,t),o=ki(i,"afterTitle",this,t);let s=[];return s=vi(s,yi(n)),s=vi(s,yi(r)),s=vi(s,yi(o)),s}getBeforeBody(t,e){return Si(ki(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return(0,n.F)(t,(t=>{const e={before:[],lines:[],after:[]},n=Ci(i,t);vi(e.before,yi(ki(n,"beforeLabel",this,t))),vi(e.lines,ki(n,"label",this,t)),vi(e.after,yi(ki(n,"afterLabel",this,t))),r.push(e)})),r}getAfterBody(t,e){return Si(ki(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=ki(i,"beforeFooter",this,t),r=ki(i,"footer",this,t),o=ki(i,"afterFooter",this,t);let s=[];return s=vi(s,yi(n)),s=vi(s,yi(r)),s=vi(s,yi(o)),s}_createItems(t){const e=this._active,i=this.chart.data,r=[],o=[],s=[];let a,l,u=[];for(a=0,l=e.length;a<l;++a)u.push(Di(this.chart,e[a]));return t.filter&&(u=u.filter(((e,n,r)=>t.filter(e,n,r,i)))),t.itemSort&&(u=u.sort(((e,n)=>t.itemSort(e,n,i)))),(0,n.F)(u,(e=>{const i=Ci(t.callbacks,e);r.push(ki(i,"labelColor",this,e)),o.push(ki(i,"labelPointStyle",this,e)),s.push(ki(i,"labelTextColor",this,e))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=u,u}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=bi[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=xi(this,i),s=Object.assign({},t,e),a=_i(this.chart,i,s),l=Fi(i,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:l,topRight:u,bottomLeft:h,bottomRight:c}=(0,n.ay)(a),{x:f,y:d}=t,{width:p,height:g}=e;let m,b,v,y,D,x;return"center"===o?(D=d+g/2,"left"===r?(m=f,b=m-s,y=D+s,x=D-s):(m=f+p,b=m+s,y=D-s,x=D+s),v=m):(b="left"===r?f+Math.max(l,h)+s:"right"===r?f+p-Math.max(u,c)-s:this.caretX,"top"===o?(y=d,D=y-s,m=b-s,v=b+s):(y=d+g,D=y+s,m=b+s,v=b-s),x=y),{x1:m,x2:b,x3:v,y1:y,y2:D,y3:x}}drawTitle(t,e,i){const r=this.title,o=r.length;let s,a,l;if(o){const u=(0,n.aA)(i.rtl,this.x,this.width);for(t.x=Ai(this,i.titleAlign,i),e.textAlign=u.textAlign(i.titleAlign),e.textBaseline="middle",s=(0,n.a0)(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,l=0;l<o;++l)e.fillText(r[l],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,r,o){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:u}=o,h=(0,n.a0)(o.bodyFont),c=Ai(this,"left",o),f=r.x(c),d=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+d;if(o.usePointStyle){const e={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},i=r.leftForLtr(f,u)+u/2,h=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,(0,n.av)(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,(0,n.av)(t,e,i,h)}else{t.lineWidth=(0,n.i)(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=r.leftForLtr(f,u),i=r.leftForLtr(r.xPlus(f,1),u-2),a=(0,n.ay)(s.borderRadius);Object.values(a).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,n.aw)(t,{x:e,y:p,w:u,h:l,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),(0,n.aw)(t,{x:i,y:p+1,w:u-2,h:l-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,u,l),t.strokeRect(e,p,u,l),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:h}=i,c=(0,n.a0)(i.bodyFont);let f=c.lineHeight,d=0;const p=(0,n.aA)(i.rtl,this.x,this.width),g=function(i){e.fillText(i,p.x(t.x+d),t.y+f/2),t.y+=f+o},m=p.textAlign(s);let b,v,y,D,x,w,_;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=Ai(this,m,i),e.fillStyle=i.bodyColor,(0,n.F)(this.beforeBody,g),d=a&&"right"!==m?"center"===s?u/2+h:u+2+h:0,D=0,w=r.length;D<w;++D){for(b=r[D],v=this.labelTextColors[D],e.fillStyle=v,(0,n.F)(b.before,g),y=b.lines,a&&y.length&&(this._drawColorBox(e,t,D,p,i),f=Math.max(c.lineHeight,l)),x=0,_=y.length;x<_;++x)g(y[x]),f=c.lineHeight;(0,n.F)(b.after,g)}d=0,f=c.lineHeight,(0,n.F)(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const r=this.footer,o=r.length;let s,a;if(o){const l=(0,n.aA)(i.rtl,this.x,this.width);for(t.x=Ai(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=(0,n.a0)(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<o;++a)e.fillText(r[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:u,height:h}=i,{topLeft:c,topRight:f,bottomLeft:d,bottomRight:p}=(0,n.ay)(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+c,l),"top"===s&&this.drawCaret(t,e,i,r),e.lineTo(a+u-f,l),e.quadraticCurveTo(a+u,l,a+u,l+f),"center"===s&&"right"===o&&this.drawCaret(t,e,i,r),e.lineTo(a+u,l+h-p),e.quadraticCurveTo(a+u,l+h,a+u-p,l+h),"bottom"===s&&this.drawCaret(t,e,i,r),e.lineTo(a+d,l+h),e.quadraticCurveTo(a,l+h,a,l+h-d),"center"===s&&"left"===o&&this.drawCaret(t,e,i,r),e.lineTo(a,l+c),e.quadraticCurveTo(a,l,a+c,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=bi[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=xi(this,t),s=Object.assign({},i,this._size),a=_i(e,t,s),l=Fi(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=(0,n.E)(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,e),(0,n.aB)(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,n.aD)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),o=!(0,n.ai)(i,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),a=this._positionChanged(s,t),l=e||!(0,n.ai)(s,o)||a;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const r=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=bi[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}var Ni={id:"tooltip",_element:Pi,positioners:bi,afterInit(t,e,i){i&&(t.tooltip=new Pi({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Li},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ei=Object.freeze({__proto__:null,Colors:qe,Decimation:Ue,Filler:li,Legend:fi,SubTitle:mi,Title:pi,Tooltip:Ni});function Bi(t,e,i,n){const r=t.indexOf(e);if(-1===r)return((t,e,i,n)=>("string"===typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return r!==t.lastIndexOf(e)?i:r}function Mi(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Oi extends Bt{static id="category";static defaults={ticks:{callback:Mi}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,n.k)(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:(0,n.S)(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Bi(i,t,(0,n.v)(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){return Mi.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ii(t,e,{horizontal:i,minRotation:r}){const o=(0,n.t)(r),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class Ti extends Bt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,n.k)(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const s=t=>r=e?r:t,a=t=>o=i?o:t;if(t){const t=(0,n.s)(r),e=(0,n.s)(o);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(r===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||s(r-e)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r=function(t,e){const i=[],{bounds:r,step:o,min:s,max:a,precision:l,count:u,maxTicks:h,maxDigits:c,includeBounds:f}=t,d=o||1,p=h-1,{min:g,max:m}=e,b=!(0,n.k)(s),v=!(0,n.k)(a),y=!(0,n.k)(u),D=(m-g)/(c+1);let x,w,_,F,A=(0,n.aI)((m-g)/p/d)*d;if(A<1e-14&&!b&&!v)return[{value:g},{value:m}];F=Math.ceil(m/A)-Math.floor(g/A),F>p&&(A=(0,n.aI)(F*A/p/d)*d),(0,n.k)(l)||(x=Math.pow(10,l),A=Math.ceil(A*x)/x),"ticks"===r?(w=Math.floor(g/A)*A,_=Math.ceil(m/A)*A):(w=g,_=m),b&&v&&o&&(0,n.aJ)((a-s)/o,A/1e3)?(F=Math.round(Math.min((a-s)/A,h)),A=(a-s)/F,w=s,_=a):y?(w=b?s:w,_=v?a:_,F=u-1,A=(_-w)/F):(F=(_-w)/A,F=(0,n.aK)(F,Math.round(F),A/1e3)?Math.round(F):Math.ceil(F));const S=Math.max((0,n.aL)(A),(0,n.aL)(w));x=Math.pow(10,(0,n.k)(l)?S:l),w=Math.round(w*x)/x,_=Math.round(_*x)/x;let C=0;for(b&&(f&&w!==s?(i.push({value:s}),w<s&&C++,(0,n.aK)(Math.round((w+C*A)*x)/x,s,Ii(s,D,t))&&C++):w<s&&C++);C<F;++C){const t=Math.round((w+C*A)*x)/x;if(v&&t>a)break;i.push({value:t})}return v&&f&&_!==a?i.length&&(0,n.aK)(i[i.length-1].value,a,Ii(a,D,t))?i[i.length-1].value=a:i.push({value:a}):v&&_!==a||i.push({value:_}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&(0,n.aH)(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return(0,n.o)(t,this.chart.options.locale,this.options.ticks.format)}}class ji extends Ti{static id="linear";static defaults={ticks:{callback:n.aM.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,n.g)(t)?t:0,this.max=(0,n.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=(0,n.t)(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Ri=t=>Math.floor((0,n.aN)(t)),zi=(t,e)=>Math.pow(10,Ri(t)+e);function qi(t){return 1===t/Math.pow(10,Ri(t))}function Hi(t,e,i){const n=Math.pow(10,i),r=Math.floor(t/n);return Math.ceil(e/n)-r}function Wi(t,{min:e,max:i}){e=(0,n.O)(t.min,e);const r=[],o=Ri(e);let s=function(t,e){let i=Ri(e-t);for(;Hi(t,e,i)>10;)i++;for(;Hi(t,e,i)<10;)i--;return Math.min(i,Ri(t))}(e,i),a=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),u=o>s?Math.pow(10,o):0,h=Math.round((e-u)*a)/a,c=Math.floor((e-u)/l/10)*l*10;let f=Math.floor((h-c)/Math.pow(10,s)),d=(0,n.O)(t.min,Math.round((u+c+f*Math.pow(10,s))*a)/a);for(;d<i;)r.push({value:d,major:qi(d),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,a=s>=0?1:a),d=Math.round((u+c+f*Math.pow(10,s))*a)/a;const p=(0,n.O)(t.max,d);return r.push({value:p,major:qi(p),significand:f}),r}class Ui extends Bt{static id="logarithmic";static defaults={ticks:{callback:n.aM.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ti.prototype.parse.apply(this,[t,e]);if(0!==i)return(0,n.g)(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,n.g)(t)?Math.max(0,t):null,this.max=(0,n.g)(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,n.g)(this._userMin)&&(this.min=t===zi(this.min,0)?zi(this.min,-1):zi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t;i===n&&(i<=0?(r(1),o(10)):(r(zi(i,-1)),o(zi(n,1)))),i<=0&&r(zi(n,-1)),n<=0&&o(zi(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=Wi({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,n.aH)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":(0,n.o)(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=(0,n.aN)(t),this._valueRange=(0,n.aN)(this.max)-(0,n.aN)(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:((0,n.aN)(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Vi(t){const e=t.ticks;if(e.display&&t.display){const t=(0,n.E)(e.backdropPadding);return(0,n.v)(e.font&&e.font.size,n.d.font.size)+t.height}return 0}function Gi(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i,end:e}:{start:e,end:e+i}}function Yi(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),r=[],o=[],s=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?n.P/s:0;for(let f=0;f<s;f++){const s=a.setContext(t.getPointLabelContext(f));o[f]=s.padding;const d=t.getPointPosition(f,t.drawingArea+o[f],l),p=(0,n.a0)(s.font),g=(u=t.ctx,h=p,c=t._pointLabels[f],c=(0,n.b)(c)?c:[c],{w:(0,n.aO)(u,h.string,c),h:c.length*h.lineHeight});r[f]=g;const m=(0,n.al)(t.getIndexAngle(f)+l),b=Math.round((0,n.U)(m));Xi(i,e,m,Gi(b,d.x,g.w,0,180),Gi(b,d.y,g.h,90,270))}var u,h,c;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const r=[],o=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:l}=s.pointLabels,u={extra:Vi(s)/2,additionalAngle:a?n.P/o:0};let h;for(let n=0;n<o;n++){u.padding=i[n],u.size=e[n];const o=$i(t,n,u);r.push(o),"auto"===l&&(o.visible=Ki(o,h),o.visible&&(h=o))}return r}(t,r,o)}function Xi(t,e,i,n,r){const o=Math.abs(Math.sin(i)),s=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/s,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function $i(t,e,i){const r=t.drawingArea,{extra:o,additionalAngle:s,padding:a,size:l}=i,u=t.getPointPosition(e,r+o+a,s),h=Math.round((0,n.U)((0,n.al)(u.angle+n.H))),c=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(u.y,l.h,h),f=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(h),d=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(u.x,l.w,f);return{visible:!0,x:u.x,y:c,textAlign:f,left:d,top:c,right:d+l.w,bottom:c+l.h}}function Ki(t,e){if(!e)return!0;const{left:i,top:r,right:o,bottom:s}=t;return!((0,n.C)({x:i,y:r},e)||(0,n.C)({x:i,y:s},e)||(0,n.C)({x:o,y:r},e)||(0,n.C)({x:o,y:s},e))}function Ji(t,e,i){const{left:r,top:o,right:s,bottom:a}=i,{backdropColor:l}=e;if(!(0,n.k)(l)){const i=(0,n.ay)(e.borderRadius),u=(0,n.E)(e.backdropPadding);t.fillStyle=l;const h=r-u.left,c=o-u.top,f=s-r+u.width,d=a-o+u.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),(0,n.aw)(t,{x:h,y:c,w:f,h:d,radius:i}),t.fill()):t.fillRect(h,c,f,d)}}function Qi(t,e,i,r){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,n.T);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let n=1;n<r;n++)i=t.getPointPosition(n,e),o.lineTo(i.x,i.y)}}class Zi extends Ti{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:n.aM.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=(0,n.E)(Vi(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=(0,n.g)(t)&&!isNaN(t)?t:0,this.max=(0,n.g)(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Vi(this.options))}generateTickLabels(t){Ti.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=(0,n.Q)(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Yi(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=n.T/(this._pointLabels.length||1),i=this.options.startAngle||0;return(0,n.al)(t*e+(0,n.t)(i))}getDistanceFromCenterForValue(t){if((0,n.k)(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if((0,n.k)(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return(0,n.j)(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-n.H+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Qi(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:o}=e,s=this._pointLabels.length;let a,l,u;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:r}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const s=r.setContext(t.getPointLabelContext(o));Ji(i,s,e);const a=(0,n.a0)(s.font),{x:l,y:u,textAlign:h}=e;(0,n.Z)(i,t._pointLabels[o],l,u+a.lineHeight/2,a,{color:s.color,textAlign:h,textBaseline:"middle"})}}(this,s),r.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){l=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),n=r.setContext(i),a=o.setContext(i);!function(t,e,i,n,r){const o=t.ctx,s=e.circular,{color:a,lineWidth:l}=e;!s&&!n||!a||!l||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(r.dash||[]),o.lineDashOffset=r.dashOffset,o.beginPath(),Qi(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(this,n,l,s,a)}})),i.display){for(t.save(),a=s-1;a>=0;a--){const n=i.setContext(this.getPointLabelContext(a)),{color:r,lineWidth:o}=n;o&&r&&(t.lineWidth=o,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),u=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&this.min>=0&&!e.reverse)return;const l=i.setContext(this.getContext(a)),u=(0,n.a0)(l.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),l.showLabelBackdrop){t.font=u.string,s=t.measureText(r.label).width,t.fillStyle=l.backdropColor;const e=(0,n.E)(l.backdropPadding);t.fillRect(-s/2-e.left,-o-u.size/2-e.top,s+e.width,u.size+e.height)}(0,n.Z)(t,r.label,0,-o,u,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})})),t.restore()}drawTitle(){}}const tn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},en=Object.keys(tn);function nn(t,e){return t-e}function rn(t,e){if((0,n.k)(e))return null;const i=t._adapter,{parser:r,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"===typeof r&&(a=r(a)),(0,n.g)(a)||(a="string"===typeof r?i.parse(a,r):i.parse(a)),null===a?null:(o&&(a="week"!==o||!(0,n.x)(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function on(t,e,i,n){const r=en.length;for(let o=en.indexOf(t);o<r-1;++o){const t=tn[en[o]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(r*t.size))<=n)return en[o]}return en[r-1]}function sn(t,e,i){if(i){if(i.length){const{lo:r,hi:o}=(0,n.aQ)(i,e);t[i[r]>=e?i[r]:i[o]]=!0}}else t[e]=!0}function an(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s<o;++s)a=e[s],r[a]=s,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const r=t._adapter,o=+r.startOf(e[0].value,n),s=e[e.length-1].value;let a,l;for(a=o;a<=s;a=+r.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,r,i):n}class ln extends Bt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),r=this._adapter=new R._date(t.adapters.date);r.init(e),(0,n.ab)(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:rn(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function l(t){s||isNaN(t.min)||(r=Math.min(r,t.min)),a||isNaN(t.max)||(o=Math.max(o,t.max))}s&&a||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),r=(0,n.g)(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),o=(0,n.g)(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,s=this.max,a=(0,n.aP)(r,o,s);return this._unit=e.unit||(i.autoSkip?on(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(t,e,i,n,r){for(let o=en.length-1;o>=en.indexOf(i);o--){const i=en[o];if(tn[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return en[i?en.indexOf(i):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=en.indexOf(t)+1,i=en.length;e<i;++e)if(tn[en[e]].common)return en[e]}(this._unit):void 0,this.initOffsets(r),t.reverse&&a.reverse(),an(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,r=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),r=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),o=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;r=(0,n.S)(r,0,s),o=(0,n.S)(o,0,s),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,o=r.time,s=o.unit||on(o.minUnit,e,i,this._getLabelCapacity(e)),a=(0,n.v)(r.ticks.stepSize,1),l="week"===s&&o.isoWeekday,u=(0,n.x)(l)||!0===l,h={};let c,f,d=e;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":s),t.diff(i,e,s)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+s);const p="data"===r.ticks.source&&this.getDataTimestamps();for(c=d,f=0;c<i;c=+t.add(c,a,s),f++)sn(h,c,p);return c!==i&&"ticks"!==r.bounds&&1!==f||sn(h,c,p),Object.keys(h).sort(nn).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,r=e||i[n];return this._adapter.format(t,r)}_tickFormatFunction(t,e,i,r){const o=this.options,s=o.ticks.callback;if(s)return(0,n.Q)(s,[t,e,i],this);const a=o.time.displayFormats,l=this._unit,u=this._majorUnit,h=l&&a[l],c=u&&a[u],f=i[e],d=u&&c&&f&&f.major;return this._adapter.format(t,r||(d?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=(0,n.t)(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*s,h:i*s+a*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,an(this,[t],this._majorUnit),n),o=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(rn(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,n._)(t.sort(nn))}}function un(t,e,i){let r,o,s,a,l=0,u=t.length-1;i?(e>=t[l].pos&&e<=t[u].pos&&({lo:l,hi:u}=(0,n.B)(t,"pos",e)),({pos:r,time:s}=t[l]),({pos:o,time:a}=t[u])):(e>=t[l].time&&e<=t[u].time&&({lo:l,hi:u}=(0,n.B)(t,"time",e)),({time:r,pos:s}=t[l]),({time:o,pos:a}=t[u]));const h=o-r;return h?s+(a-s)*(e-r)/h:s}const hn=[I,Me,Ei,Object.freeze({__proto__:null,CategoryScale:Oi,LinearScale:ji,LogarithmicScale:Ui,RadialLinearScale:Zi,TimeScale:ln,TimeSeriesScale:class extends ln{static id="timeseries";static defaults=ln.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=un(e,this.min),this._tableRange=un(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,u;for(o=0,s=t.length;o<s;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o<s;++o)u=n[o+1],a=n[o-1],l=n[o],Math.round((u+a)/2)!==l&&r.push({time:l,pos:o/(s-1)});return r}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(un(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return un(this._table,i*this._tableRange+this._minPos,!0)}}})]},81692(t,e,i){"use strict";function n(t){return t+.5|0}i.d(e,{$:()=>Fe,A:()=>Tt,B:()=>It,C:()=>we,D:()=>Ct,E:()=>Te,F:()=>Y,G:()=>bi,H:()=>dt,I:()=>hi,J:()=>Di,K:()=>yi,L:()=>Ut,M:()=>ui,N:()=>Dt,O:()=>H,P:()=>lt,Q:()=>G,R:()=>ze,S:()=>Et,T:()=>ut,U:()=>At,V:()=>me,W:()=>Bt,X:()=>ve,Y:()=>_e,Z:()=>ke,_:()=>Ht,a:()=>Re,a0:()=>je,a1:()=>Gt,a2:()=>Yt,a3:()=>he,a4:()=>Q,a5:()=>nt,a6:()=>ce,a7:()=>ot,a8:()=>We,a9:()=>He,aA:()=>Fi,aB:()=>Ai,aC:()=>Xt,aD:()=>Si,aE:()=>xe,aF:()=>Lt,aG:()=>I,aH:()=>_t,aI:()=>yt,aJ:()=>wt,aK:()=>vt,aL:()=>St,aM:()=>ue,aN:()=>mt,aO:()=>be,aP:()=>jt,aQ:()=>Ot,aa:()=>Ue,ab:()=>Z,ac:()=>T,ad:()=>Vt,ae:()=>vi,af:()=>ye,ag:()=>st,ah:()=>Ii,ai:()=>X,aj:()=>at,ak:()=>Mt,al:()=>Pt,am:()=>Me,an:()=>li,ao:()=>Ni,ap:()=>Pi,aq:()=>wi,ar:()=>_i,as:()=>xi,at:()=>Ae,au:()=>Se,av:()=>De,aw:()=>Pe,ax:()=>Oe,ay:()=>Ie,az:()=>ki,b:()=>R,b4:()=>ft,b5:()=>pt,b6:()=>gt,c:()=>ie,d:()=>ge,e:()=>te,f:()=>it,g:()=>q,h:()=>rt,i:()=>z,j:()=>qe,k:()=>j,l:()=>zt,m:()=>U,n:()=>V,o:()=>ae,p:()=>Nt,q:()=>$t,r:()=>Wt,s:()=>bt,t:()=>Ft,u:()=>qt,v:()=>W,w:()=>Kt,x:()=>xt,y:()=>ei,z:()=>gi});const r=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return r(n(2.55*t),0,255)}function s(t){return r(n(255*t),0,255)}function a(t){return r(n(t/2.55)/100,0,1)}function l(t){return r(n(100*t),0,100)}const u={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},h=[..."0123456789ABCDEF"],c=t=>h[15&t],f=t=>h[(240&t)>>4]+h[15&t],d=t=>(240&t)>>4===(15&t);function p(t){var e=(t=>d(t.r)&&d(t.g)&&d(t.b)&&d(t.a))(t)?c:f;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const g=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function m(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function b(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function v(t,e,i){const n=m(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function y(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,u;return r!==o&&(u=r-o,l=s>.5?u/(2-r-o):u/(r+o),a=function(t,e,i,n,r){return t===r?(e-i)/n+(e<i?6:0):e===r?(i-t)/n+2:(t-e)/n+4}(e,i,n,u,r),a=60*a+.5),[0|a,l||0,s]}function D(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(s)}function x(t,e,i){return D(m,t,e,i)}function w(t){return(t%360+360)%360}function _(t){const e=g.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?o(+e[5]):s(+e[5]));const r=w(+e[2]),a=+e[3]/100,l=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return D(v,t,e,i)}(r,a,l):"hsv"===e[1]?function(t,e,i){return D(b,t,e,i)}(r,a,l):x(r,a,l),{r:i[0],g:i[1],b:i[2],a:n}}const F={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},A={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let S;function C(t){S||(S=function(){const t={},e=Object.keys(A),i=Object.keys(F);let n,r,o,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],r=0;r<i.length;r++)o=i[r],a=a.replace(o,F[o]);o=parseInt(A[s],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),S.transparent=[0,0,0,0]);const e=S[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const L=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const k=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,P=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function N(t,e,i){if(t){let n=y(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=x(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function B(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=s(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=s(e.a),e}function M(t){return"r"===t.charAt(0)?function(t){const e=L.exec(t);let i,n,s,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?o(t):r(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?o(i):r(i,0,255)),n=255&(e[4]?o(n):r(n,0,255)),s=255&(e[6]?o(s):r(s,0,255)),{r:i,g:n,b:s,a:a}}}(t):_(t)}class O{constructor(t){if(t instanceof O)return t;const e=typeof t;let i;"object"===e?i=B(t):"string"===e&&(i=function(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*u[t[1]],g:255&17*u[t[2]],b:255&17*u[t[3]],a:5===i?17*u[t[4]]:255}:7!==i&&9!==i||(e={r:u[t[1]]<<4|u[t[2]],g:u[t[3]]<<4|u[t[4]],b:u[t[5]]<<4|u[t[6]],a:9===i?u[t[7]]<<4|u[t[8]]:255})),e}(t)||C(t)||M(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=B(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?p(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=y(t),i=e[0],n=l(e[1]),r=l(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${a(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=i.a-n.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,i.r=255&l*i.r+r*n.r+.5,i.g=255&l*i.g+r*n.g+.5,i.b=255&l*i.b+r*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=P(a(t.r)),r=P(a(t.g)),o=P(a(t.b));return{r:s(k(n+i*(P(a(e.r))-n))),g:s(k(r+i*(P(a(e.g))-r))),b:s(k(o+i*(P(a(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new O(this.rgb)}alpha(t){return this._rgb.a=s(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=n(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return N(this._rgb,2,t),this}darken(t){return N(this._rgb,2,-t),this}saturate(t){return N(this._rgb,1,t),this}desaturate(t){return N(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=y(t);i[0]=w(i[0]+e),i=x(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function I(){}const T=(()=>{let t=0;return()=>t++})();function j(t){return null===t||void 0===t}function R(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function z(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function q(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function H(t,e){return q(t)?t:e}function W(t,e){return"undefined"===typeof t?e:t}const U=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,V=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function G(t,e,i){if(t&&"function"===typeof t.call)return t.apply(i,e)}function Y(t,e,i,n){let r,o,s;if(R(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<o;r++)e.call(i,t[r],r);else if(z(t))for(s=Object.keys(t),o=s.length,r=0;r<o;r++)e.call(i,t[s[r]],s[r])}function X(t,e){let i,n,r,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],o=e[i],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function $(t){if(R(t))return t.map($);if(z(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let r=0;for(;r<n;++r)e[i[r]]=$(t[i[r]]);return e}return t}function K(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function J(t,e,i,n){if(!K(t))return;const r=e[t],o=i[t];z(r)&&z(o)?Q(r,o,n):e[t]=$(o)}function Q(t,e,i){const n=R(e)?e:[e],r=n.length;if(!z(t))return t;const o=(i=i||{}).merger||J;let s;for(let a=0;a<r;++a){if(s=n[a],!z(s))continue;const e=Object.keys(s);for(let n=0,r=e.length;n<r;++n)o(e[n],t,s,i)}return t}function Z(t,e){return Q(t,e,{merger:tt})}function tt(t,e,i){if(!K(t))return;const n=e[t],r=i[t];z(n)&&z(r)?Z(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=$(r))}const et={"":t=>t,x:t=>t.x,y:t=>t.y};function it(t,e){const i=et[e]||(et[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const r of e)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function nt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const rt=t=>"undefined"!==typeof t,ot=t=>"function"===typeof t,st=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function at(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const lt=Math.PI,ut=2*lt,ht=ut+lt,ct=Number.POSITIVE_INFINITY,ft=lt/180,dt=lt/2,pt=lt/4,gt=2*lt/3,mt=Math.log10,bt=Math.sign;function vt(t,e,i){return Math.abs(t-e)<i}function yt(t){const e=Math.round(t);t=vt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(mt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Dt(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function xt(t){return!function(t){return"symbol"===typeof t||"object"===typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function wt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function _t(t,e,i){let n,r,o;for(n=0,r=t.length;n<r;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Ft(t){return t*(lt/180)}function At(t){return t*(180/lt)}function St(t){if(!q(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ct(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*lt&&(o+=ut),{angle:o,distance:r}}function Lt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kt(t,e){return(t-e+ht)%ut-lt}function Pt(t){return(t%ut+ut)%ut}function Nt(t,e,i,n){const r=Pt(t),o=Pt(e),s=Pt(i),a=Pt(o-r),l=Pt(s-r),u=Pt(r-o),h=Pt(r-s);return r===o||r===s||n&&o===s||a>l&&u<h}function Et(t,e,i){return Math.max(e,Math.min(i,t))}function Bt(t){return Et(t,-32768,32767)}function Mt(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Ot(t,e,i){i=i||(i=>t[i]<e);let n,r=t.length-1,o=0;for(;r-o>1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const It=(t,e,i,n)=>Ot(t,i,n?n=>{const r=t[n][e];return r<i||r===i&&t[n+1][e]===i}:n=>t[n][e]<i),Tt=(t,e,i)=>Ot(t,i,(n=>t[n][e]>=i));function jt(t,e,i){let n=0,r=t.length;for(;n<r&&t[n]<e;)n++;for(;r>n&&t[r-1]>i;)r--;return n>0||r<t.length?t.slice(n,r):t}const Rt=["push","pop","shift","splice","unshift"];function zt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Rt.forEach((e=>{const i="_onData"+nt(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const r=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"===typeof t[i]&&t[i](...e)})),r}})})))}function qt(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Rt.forEach((e=>{delete t[e]})),delete t._chartjs)}function Ht(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Wt="undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame;function Ut(t,e){let i=[],n=!1;return function(...r){i=r,n||(n=!0,Wt.call(window,(()=>{n=!1,t.apply(e,i)})))}}function Vt(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}const Gt=t=>"start"===t?"left":"end"===t?"right":"center",Yt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,Xt=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;function $t(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,vScale:a,_parsed:l}=t,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=s.axis,{min:c,max:f,minDefined:d,maxDefined:p}=s.getUserBounds();if(d){if(r=Math.min(It(l,h,c).lo,i?n:It(e,h,s.getPixelForValue(c)).lo),u){const t=l.slice(0,r+1).reverse().findIndex((t=>!j(t[a.axis])));r-=Math.max(0,t)}r=Et(r,0,n-1)}if(p){let t=Math.max(It(l,s.axis,f,!0).hi+1,i?0:It(e,h,s.getPixelForValue(f),!0).hi+1);if(u){const e=l.slice(t-1).findIndex((t=>!j(t[a.axis])));t+=Math.max(0,e)}o=Et(t,r,n)-r}else o=n-r}return{start:r,count:o}}function Kt(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}const Jt=t=>0===t||1===t,Qt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*ut/i),Zt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*ut/i)+1,te={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*dt),easeOutSine:t=>Math.sin(t*dt),easeInOutSine:t=>-.5*(Math.cos(lt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Jt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Jt(t)?t:Qt(t,.075,.3),easeOutElastic:t=>Jt(t)?t:Zt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Jt(t)?t:t<.5?.5*Qt(2*t,e,.45):.5+.5*Zt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-te.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*te.easeInBounce(2*t):.5*te.easeOutBounce(2*t-1)+.5};function ee(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ie(t){return ee(t)?t:new O(t)}function ne(t){return ee(t)?t:new O(t).saturate(.5).darken(.1).hexString()}const re=["x","y","borderWidth","radius","tension"],oe=["color","borderColor","backgroundColor"];const se=new Map;function ae(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=se.get(i);return n||(n=new Intl.NumberFormat(t,e),se.set(i,n)),n}(e,i).format(t)}const le={values:t=>R(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=mt(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ae(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(mt(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?le.numeric.call(this,t,e,i):""}};var ue={formatters:le};const he=Object.create(null),ce=Object.create(null);function fe(t,e){if(!e)return t;const i=e.split(".");for(let n=0,r=i.length;n<r;++n){const e=i[n];t=t[e]||(t[e]=Object.create(null))}return t}function de(t,e,i){return"string"===typeof e?Q(fe(t,e),i):Q(fe(t,""),e)}class pe{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ne(e.backgroundColor),this.hoverBorderColor=(t,e)=>ne(e.borderColor),this.hoverColor=(t,e)=>ne(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return de(this,t,e)}get(t){return fe(this,t)}describe(t,e){return de(ce,t,e)}override(t,e){return de(he,t,e)}route(t,e,i,n){const r=fe(this,t),o=fe(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return z(t)?Object.assign({},e,t):W(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ge=new pe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:oe},numbers:{type:"number",properties:re}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ue.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function me(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function be(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,u,h,c,f;for(l=0;l<a;l++)if(c=i[l],void 0===c||null===c||R(c)){if(R(c))for(u=0,h=c.length;u<h;u++)f=c[u],void 0===f||null===f||R(f)||(s=me(t,r,o,s,f))}else s=me(t,r,o,s,c);t.restore();const d=o.length/2;if(d>i.length){for(l=0;l<d;l++)delete r[o[l]];o.splice(0,d)}return s}function ve(t,e,i){const n=t.currentDevicePixelRatio,r=0!==i?Math.max(i/2,.5):0;return Math.round((e-r)*n)/n+r}function ye(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function De(t,e,i,n){xe(t,e,i,n,null)}function xe(t,e,i,n,r){let o,s,a,l,u,h,c,f;const d=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*ft;if(d&&"object"===typeof d&&(o=d.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),d){default:r?t.ellipse(i,n,r/2,g,0,0,ut):t.arc(i,n,g,0,ut),t.closePath();break;case"triangle":h=r?r/2:g,t.moveTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=gt,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=gt,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":u=.516*g,l=g-u,s=Math.cos(m+pt)*l,c=Math.cos(m+pt)*(r?r/2-u:l),a=Math.sin(m+pt)*l,f=Math.sin(m+pt)*(r?r/2-u:l),t.arc(i-c,n-a,u,m-lt,m-dt),t.arc(i+f,n-s,u,m-dt,m),t.arc(i+c,n+a,u,m,m+dt),t.arc(i-f,n+s,u,m+dt,m+lt),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=r?r/2:l,t.rect(i-h,n-l,2*h,2*l);break}m+=pt;case"rectRot":c=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(i-c,n-a),t.lineTo(i+f,n-s),t.lineTo(i+c,n+a),t.lineTo(i-f,n+s),t.closePath();break;case"crossRot":m+=pt;case"cross":c=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(i-c,n-a),t.lineTo(i+c,n+a),t.moveTo(i+f,n-s),t.lineTo(i-f,n+s);break;case"star":c=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(i-c,n-a),t.lineTo(i+c,n+a),t.moveTo(i+f,n-s),t.lineTo(i-f,n+s),m+=pt,c=Math.cos(m)*(r?r/2:g),s=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(i-c,n-a),t.lineTo(i+c,n+a),t.moveTo(i+f,n-s),t.lineTo(i-f,n+s);break;case"line":s=r?r/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(r?r/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function we(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function _e(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Fe(t){t.restore()}function Ae(t,e,i,n,r){if(!e)return t.lineTo(i.x,i.y);if("middle"===r){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===r!==!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Se(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Ce(t,e,i,n,r){if(r.strikethrough||r.underline){const o=t.measureText(n),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,u=i+o.actualBoundingBoxDescent,h=r.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,h),t.lineTo(a,h),t.stroke()}}function Le(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function ke(t,e,i,n,r,o={}){const s=R(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,u;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),j(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<s.length;++l)u=s[l],o.backdrop&&Le(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),j(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(u,i,n,o.maxWidth)),t.fillText(u,i,n,o.maxWidth),Ce(t,i,n,u,o),n+=Number(r.lineHeight);t.restore()}function Pe(t,e){const{x:i,y:n,w:r,h:o,radius:s}=e;t.arc(i+s.topLeft,n+s.topLeft,s.topLeft,1.5*lt,lt,!0),t.lineTo(i,n+o-s.bottomLeft),t.arc(i+s.bottomLeft,n+o-s.bottomLeft,s.bottomLeft,lt,dt,!0),t.lineTo(i+r-s.bottomRight,n+o),t.arc(i+r-s.bottomRight,n+o-s.bottomRight,s.bottomRight,dt,0,!0),t.lineTo(i+r,n+s.topRight),t.arc(i+r-s.topRight,n+s.topRight,s.topRight,0,-dt,!0),t.lineTo(i+s.topLeft,n)}const Ne=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Ee=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Be(t,e){const i=(""+t).match(Ne);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Me(t,e){const i={},n=z(e),r=n?Object.keys(e):e,o=z(t)?n?i=>W(t[i],t[e[i]]):e=>t[e]:()=>t;for(const s of r)i[s]=+o(s)||0;return i}function Oe(t){return Me(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ie(t){return Me(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Te(t){const e=Oe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function je(t,e){t=t||{},e=e||ge.font;let i=W(t.size,e.size);"string"===typeof i&&(i=parseInt(i,10));let n=W(t.style,e.style);n&&!(""+n).match(Ee)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:W(t.family,e.family),lineHeight:Be(W(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:W(t.weight,e.weight),string:""};return r.string=function(t){return!t||j(t.size)||j(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function Re(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;r<o;++r)if(s=t[r],void 0!==s&&(void 0!==e&&"function"===typeof s&&(s=s(e),a=!1),void 0!==i&&R(s)&&(s=s[i%s.length],a=!1),void 0!==s))return n&&!a&&(n.cacheable=!1),s}function ze(t,e,i){const{min:n,max:r}=t,o=V(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}function qe(t,e){return Object.assign(Object.create(t),e)}function He(t,e=[""],i,n,r=()=>t[0]){const o=i||t;"undefined"===typeof n&&(n=Ze("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:r,override:i=>He([i,...t],e,o,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ye(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ze(Ve(o,t),i),"undefined"!==typeof r)return Ge(t,r)?Je(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ti(t).includes(e),ownKeys:t=>ti(t),set(t,e,i){const n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function We(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ue(t,n),setContext:e=>We(t,e,i,n),override:r=>We(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ye(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];ot(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,s||n);a.delete(t),Ge(t,l)&&(l=Je(r._scopes,r,t,l));return l}(e,a,t,i));R(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if("undefined"!==typeof o.index&&n(t))return e[o.index%e.length];if(z(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Je(n,r,t,l);e.push(We(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Ge(e,a)&&(a=We(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Ue(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:ot(i)?i:()=>i,isIndexable:ot(n)?n:()=>n}}const Ve=(t,e)=>t?t+nt(e):e,Ge=(t,e)=>z(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ye(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function Xe(t,e,i){return ot(t)?t(e,i):t}const $e=(t,e)=>!0===t?e:"string"===typeof t?it(e,t):void 0;function Ke(t,e,i,n,r){for(const o of e){const e=$e(i,o);if(e){t.add(e);const o=Xe(e._fallback,i,r);if("undefined"!==typeof o&&o!==i&&o!==n)return o}else if(!1===e&&"undefined"!==typeof n&&i!==n)return null}return!1}function Je(t,e,i,n){const r=e._rootScopes,o=Xe(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Qe(a,s,i,o||i,n);return null!==l&&(("undefined"===typeof o||o===i||(l=Qe(a,s,o,l,n),null!==l))&&He(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(R(r)&&z(i))return i;return r||{}}(e,i,n))))}function Qe(t,e,i,n,r){for(;i;)i=Ke(t,e,i,n,r);return i}function Ze(t,e){for(const i of e){if(!i)continue;const e=i[t];if("undefined"!==typeof e)return e}}function ti(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function ei(t,e,i,n){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(n);let a,l,u,h;for(a=0,l=n;a<l;++a)u=a+i,h=e[u],s[a]={r:r.parse(it(h,o),u)};return s}const ii=Number.EPSILON||1e-14,ni=(t,e)=>e<t.length&&!t[e].skip&&t[e],ri=t=>"x"===t?"y":"x";function oi(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=Lt(o,r),l=Lt(s,o);let u=a/(a+l),h=l/(a+l);u=isNaN(u)?0:u,h=isNaN(h)?0:h;const c=n*u,f=n*h;return{previous:{x:o.x-c*(s.x-r.x),y:o.y-c*(s.y-r.y)},next:{x:o.x+f*(s.x-r.x),y:o.y+f*(s.y-r.y)}}}function si(t,e="x"){const i=ri(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,u=ni(t,0);for(s=0;s<n;++s)if(a=l,l=u,u=ni(t,s+1),l){if(u){const t=u[e]-l[e];r[s]=0!==t?(u[i]-l[i])/t:0}o[s]=a?u?bt(r[s-1])!==bt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(t,e,i){const n=t.length;let r,o,s,a,l,u=ni(t,0);for(let h=0;h<n-1;++h)l=u,u=ni(t,h+1),l&&u&&(vt(e[h],0,ii)?i[h]=i[h+1]=0:(r=i[h]/e[h],o=i[h+1]/e[h],a=Math.pow(r,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),i[h]=r*s*e[h],i[h+1]=o*s*e[h])))}(t,r,o),function(t,e,i="x"){const n=ri(i),r=t.length;let o,s,a,l=ni(t,0);for(let u=0;u<r;++u){if(s=a,a=l,l=ni(t,u+1),!a)continue;const r=a[i],h=a[n];s&&(o=(r-s[i])/3,a[`cp1${i}`]=r-o,a[`cp1${n}`]=h-o*e[u]),l&&(o=(l[i]-r)/3,a[`cp2${i}`]=r+o,a[`cp2${n}`]=h+o*e[u])}}(t,o,e)}function ai(t,e,i){return Math.max(Math.min(t,i),e)}function li(t,e,i,n,r){let o,s,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)si(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],l=oi(i,a,t[Math.min(o+1,s-(n?0:1))%s],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,r,o,s,a=we(t[0],e);for(i=0,n=t.length;i<n;++i)s=o,o=a,a=i<n-1&&we(t[i+1],e),o&&(r=t[i],s&&(r.cp1x=ai(r.cp1x,e.left,e.right),r.cp1y=ai(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=ai(r.cp2x,e.left,e.right),r.cp2y=ai(r.cp2y,e.top,e.bottom)))}(t,i)}function ui(){return"undefined"!==typeof window&&"undefined"!==typeof document}function hi(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ci(t,e,i){let n;return"string"===typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const fi=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const di=["top","right","bottom","left"];function pi(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=di[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function gi(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,r=fi(i),o="border-box"===r.boxSizing,s=pi(r,"padding"),a=pi(r,"border","width"),{x:l,y:u,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:r,offsetY:o}=n;let s,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:s,y:a,box:l}}(t,i),c=s.left+(h&&a.left),f=s.top+(h&&a.top);let{width:d,height:p}=e;return o&&(d-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-c)/d*i.width/n),y:Math.round((u-f)/p*i.height/n)}}const mi=t=>Math.round(10*t)/10;function bi(t,e,i,n){const r=fi(t),o=pi(r,"margin"),s=ci(r.maxWidth,t,"clientWidth")||ct,a=ci(r.maxHeight,t,"clientHeight")||ct,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=t&&hi(t);if(o){const t=o.getBoundingClientRect(),s=fi(o),a=pi(s,"border","width"),l=pi(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=ci(s.maxWidth,o,"clientWidth"),r=ci(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||ct,maxHeight:r||ct}}(t,e,i);let{width:u,height:h}=l;if("content-box"===r.boxSizing){const t=pi(r,"border","width"),e=pi(r,"padding");u-=e.width+t.width,h-=e.height+t.height}u=Math.max(0,u-o.width),h=Math.max(0,n?u/n:h-o.height),u=mi(Math.min(u,s,l.maxWidth)),h=mi(Math.min(h,a,l.maxHeight)),u&&!h&&(h=mi(u/2));return(void 0!==e||void 0!==i)&&n&&l.height&&h>l.height&&(h=l.height,u=mi(Math.floor(h*n))),{width:u,height:h}}function vi(t,e,i){const n=e||1,r=mi(t.height*n),o=mi(t.width*n);t.height=mi(t.height),t.width=mi(t.width);const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const yi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ui()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Di(t,e){const i=function(t,e){return fi(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function xi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function wi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function _i(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=xi(t,r,i),a=xi(r,o,i),l=xi(o,e,i),u=xi(s,a,i),h=xi(a,l,i);return xi(u,h,i)}function Fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ai(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Si(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ci(t){return"angle"===t?{between:Nt,compare:kt,normalize:Pt}:{between:Mt,compare:(t,e)=>t-e,normalize:t=>t}}function Li({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i===0,style:r}}function ki(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:u}=Ci(n),{start:h,end:c,loop:f,style:d}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=Ci(n),l=e.length;let u,h,{start:c,end:f,loop:d}=t;if(d){for(c+=l,f+=l,u=0,h=l;u<h&&s(a(e[c%l][n]),r,o);++u)c--,f--;c%=l,f%=l}return f<c&&(f+=l),{start:c,end:f,loop:d,style:t.style}}(t,e,i),p=[];let g,m,b,v=!1,y=null;const D=()=>v||l(r,b,g)&&0!==a(r,b),x=()=>!v||0===a(o,g)||l(o,b,g);for(let w=h,_=h;w<=c;++w)m=e[w%s],m.skip||(g=u(m[n]),g!==b&&(v=l(g,r,o),null===y&&D()&&(y=0===a(g,r)?w:_),null!==y&&x()&&(p.push(Li({start:y,end:w,loop:f,count:s,style:d})),y=null),_=w,b=g));return null!==y&&p.push(Li({start:y,end:c,loop:f,count:s,style:d})),p}function Pi(t,e){const i=[],n=t.segments;for(let r=0;r<n.length;r++){const o=ki(n[r],t.points,e);o.length&&i.push(...o)}return i}function Ni(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,i&&(o+=r);o>r&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);if(!0===n)return Ei(t,[{start:s,end:a,loop:o}],i,e);return Ei(t,function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a<s?a+r:a,!!t._fullLoop&&0===s&&a===r-1),i,e)}function Ei(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const r=t._chart.getContext(),o=Bi(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,l=i.length,u=[];let h=o,c=e[0].start,f=c;function d(t,e,n,r){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!==e%l&&(u.push({start:t%l,end:e%l,loop:n,style:r}),h=r,c=e%l)}}for(const p of e){c=a?c:p.start;let t,e=i[c%l];for(f=c+1;f<=p.end;f++){const o=i[f%l];t=Bi(n.setContext(qe(r,{type:"segment",p0:e,p1:o,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),Mi(t,h)&&d(c,f-1,p.loop,h),e=o,h=t}c<f-1&&d(c,f-1,p.loop,h)}return u}(t,e,i,n):e}function Bi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Mi(t,e){if(!e)return!1;const i=[],n=function(t,e){return ee(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function Oi(t,e,i){return t.options.clip?t[i]:e[i]}function Ii(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:Oi(i,e,"left"),right:Oi(i,e,"right"),top:Oi(n,e,"top"),bottom:Oi(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}},52365(t,e,i){"use strict";i.d(e,{A:()=>r});var n=i(43329);function r(t){return(0,n.w)(t,Date.now())}},16798(t,e,i){"use strict";i.d(e,{B:()=>o});var n=i(52365),r=i(84287);function o(t,e){return(0,r.k)(t,(0,n.A)(t),e)}},45710(t,e,i){"use strict";i.d(e,{R:()=>r});var n=i(29407);function r(t){return+(0,n.a)(t)<Date.now()}},99574(t,e,i){"use strict";i.d(e,{c:()=>r});var n=i(29407);function r(t,e){const i=(0,n.a)(t,e?.in);return i.setSeconds(0,0),i}},80696(t,e,i){"use strict";i.d(e,{R:()=>r});var n=i(6463);function r(t){return(0,n.o)(Date.now(),t)}},9618(t,e,i){"use strict";i.d(e,{R:()=>o});var n=i(43329),r=i(52365);function o(t){const e=(0,r.A)(t?.in),i=e.getFullYear(),o=e.getMonth(),s=e.getDate(),a=(0,n.w)(t?.in,0);return a.setFullYear(i,o,s+1),a.setHours(0,0,0,0),a}},90631(t,e,i){"use strict";i.d(e,{A:()=>n});const n=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},25708(t,e,i){"use strict";function n(t,e,i,n,r){n=n||{};var o=r.internal.scaleFactor,s=r.internal.getFontSize()/o,a=s*(r.getLineHeightFactor?r.getLineHeightFactor():1.15),l="",u=1;if("middle"!==n.valign&&"bottom"!==n.valign&&"center"!==n.halign&&"right"!==n.halign||(u=(l="string"===typeof t?t.split(/\r\n|\r|\n/g):t).length||1),i+=s*(2-1.15),"middle"===n.valign?i-=u/2*a:"bottom"===n.valign&&(i-=u*a),"center"===n.halign||"right"===n.halign){var h=s;if("center"===n.halign&&(h*=.5),l&&u>=1){for(var c=0;c<l.length;c++)r.text(l[c],e-r.getStringUnitWidth(l[c])*h,i),i+=a;return r}e-=r.getStringUnitWidth(t)*h}return"justify"===n.halign?r.text(t,e,i,{maxWidth:n.maxWidth||100,align:"justify"}):r.text(t,e,i),r}i.d(e,{cs:()=>X});var r={},o=function(){function t(t){this.jsPDFDocument=t,this.userStyles={textColor:t.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:t.internal.getFontSize(),fontStyle:t.internal.getFont().fontStyle,font:t.internal.getFont().fontName,lineWidth:t.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:t.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return t.setDefaults=function(t,e){void 0===e&&(e=null),e?e.__autoTableDocumentDefaults=t:r=t},t.unifyColor=function(t){return Array.isArray(t)?t:"number"===typeof t?[t,t,t]:"string"===typeof t?[t]:null},t.prototype.applyStyles=function(e,i){var n,r,o;void 0===i&&(i=!1),e.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(e.fontStyle);var s=this.jsPDFDocument.internal.getFont(),a=s.fontStyle,l=s.fontName;if(e.font&&(l=e.font),e.fontStyle){a=e.fontStyle;var u=this.getFontList()[l];u&&-1===u.indexOf(a)&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(u[0]),a=u[0])}if(this.jsPDFDocument.setFont(l,a),e.fontSize&&this.jsPDFDocument.setFontSize(e.fontSize),!i){var h=t.unifyColor(e.fillColor);h&&(n=this.jsPDFDocument).setFillColor.apply(n,h),(h=t.unifyColor(e.textColor))&&(r=this.jsPDFDocument).setTextColor.apply(r,h),(h=t.unifyColor(e.lineColor))&&(o=this.jsPDFDocument).setDrawColor.apply(o,h),"number"===typeof e.lineWidth&&this.jsPDFDocument.setLineWidth(e.lineWidth)}},t.prototype.splitTextToSize=function(t,e,i){return this.jsPDFDocument.splitTextToSize(t,e,i)},t.prototype.rect=function(t,e,i,n,r){return this.jsPDFDocument.rect(t,e,i,n,r)},t.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},t.prototype.getTextWidth=function(t){return this.jsPDFDocument.getTextWidth(t)},t.prototype.getDocument=function(){return this.jsPDFDocument},t.prototype.setPage=function(t){this.jsPDFDocument.setPage(t)},t.prototype.addPage=function(){return this.jsPDFDocument.addPage()},t.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},t.prototype.getGlobalOptions=function(){return r||{}},t.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},t.prototype.pageSize=function(){var t=this.jsPDFDocument.internal.pageSize;return null==t.width&&(t={width:t.getWidth(),height:t.getHeight()}),t},t.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},t.prototype.getLineHeightFactor=function(){var t=this.jsPDFDocument;return t.getLineHeightFactor?t.getLineHeightFactor():1.15},t.prototype.getLineHeight=function(t){return t/this.scaleFactor()*this.getLineHeightFactor()},t.prototype.pageNumber=function(){var t=this.jsPDFDocument.internal.getCurrentPageInfo();return t?t.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},t}(),s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},s(t,e)};function a(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}"function"===typeof SuppressedError&&SuppressedError;var l=function(t){function e(e){var i=t.call(this)||this;return i._element=e,i}return a(e,t),e}(Array);function u(t,e,i){return i.applyStyles(e,!0),(Array.isArray(t)?t:[t]).map((function(t){return i.getTextWidth(t)})).reduce((function(t,e){return Math.max(t,e)}),0)}function h(t,e,i,n){var r=e.settings.tableLineWidth,o=e.settings.tableLineColor;t.applyStyles({lineWidth:r,lineColor:o});var s=c(r,!1);s&&t.rect(i.x,i.y,e.getWidth(t.pageSize().width),n.y-i.y,s)}function c(t,e){var i=t>0,n=e||0===e;return i&&n?"DF":i?"S":n?"F":null}function f(t,e){var i,n,r,o;if(t=t||e,Array.isArray(t)){if(t.length>=4)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(3===t.length)return{top:t[0],right:t[1],bottom:t[2],left:t[1]};if(2===t.length)return{top:t[0],right:t[1],bottom:t[0],left:t[1]};t=1===t.length?t[0]:e}return"object"===typeof t?("number"===typeof t.vertical&&(t.top=t.vertical,t.bottom=t.vertical),"number"===typeof t.horizontal&&(t.right=t.horizontal,t.left=t.horizontal),{left:null!==(i=t.left)&&void 0!==i?i:e,top:null!==(n=t.top)&&void 0!==n?n:e,right:null!==(r=t.right)&&void 0!==r?r:e,bottom:null!==(o=t.bottom)&&void 0!==o?o:e}):("number"!==typeof t&&(t=e),{top:t,right:t,bottom:t,left:t})}function d(t,e){var i=f(e.settings.margin,0);return t.pageSize().width-(i.left+i.right)}function p(t,e,i,n,r){var o={},s=96/72,a=g(e,(function(t){return r.getComputedStyle(t).backgroundColor}));null!=a&&(o.fillColor=a);var l=g(e,(function(t){return r.getComputedStyle(t).color}));null!=l&&(o.textColor=l);var u=function(t,e){var i=[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft],n=96/(72/e),r=(parseInt(t.lineHeight)-parseInt(t.fontSize))/e/2,o=i.map((function(t){return parseInt(t||"0")/n})),s=f(o,0);r>s.top&&(s.top=r);r>s.bottom&&(s.bottom=r);return s}(n,i);u&&(o.cellPadding=u);var h="borderTopColor",c=s*i,d=n.borderTopWidth;if(n.borderBottomWidth===d&&n.borderRightWidth===d&&n.borderLeftWidth===d){var p=(parseFloat(d)||0)/c;p&&(o.lineWidth=p)}else o.lineWidth={top:(parseFloat(n.borderTopWidth)||0)/c,right:(parseFloat(n.borderRightWidth)||0)/c,bottom:(parseFloat(n.borderBottomWidth)||0)/c,left:(parseFloat(n.borderLeftWidth)||0)/c},o.lineWidth.top||(o.lineWidth.right?h="borderRightColor":o.lineWidth.bottom?h="borderBottomColor":o.lineWidth.left&&(h="borderLeftColor"));var m=g(e,(function(t){return r.getComputedStyle(t)[h]}));null!=m&&(o.lineColor=m);var b=["left","right","center","justify"];-1!==b.indexOf(n.textAlign)&&(o.halign=n.textAlign),-1!==(b=["middle","bottom","top"]).indexOf(n.verticalAlign)&&(o.valign=n.verticalAlign);var v=parseInt(n.fontSize||"");isNaN(v)||(o.fontSize=v/s);var y=function(t){var e="";("bold"===t.fontWeight||"bolder"===t.fontWeight||parseInt(t.fontWeight)>=700)&&(e="bold");"italic"!==t.fontStyle&&"oblique"!==t.fontStyle||(e+="italic");return e}(n);y&&(o.fontStyle=y);var D=(n.fontFamily||"").toLowerCase();return-1!==t.indexOf(D)&&(o.font=D),o}function g(t,e){var i=m(t,e);if(!i)return null;var n=i.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!n||!Array.isArray(n))return null;var r=[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])];return 0===parseInt(n[4])||isNaN(r[0])||isNaN(r[1])||isNaN(r[2])?null:r}function m(t,e){var i=e(t);return"rgba(0, 0, 0, 0)"===i||"transparent"===i||"initial"===i||"inherit"===i?null==t.parentElement?null:m(t.parentElement,e):i}function b(t,e,i,n,r){var o,s,a;void 0===n&&(n=!1),void 0===r&&(r=!1),a="string"===typeof e?i.document.querySelector(e):e;var l=Object.keys(t.getFontList()),u=t.scaleFactor(),h=[],c=[],f=[];if(!a)return console.error("Html table could not be found with input: ",e),{head:h,body:c,foot:f};for(var d=0;d<a.rows.length;d++){var p=a.rows[d],g=null===(s=null===(o=null===p||void 0===p?void 0:p.parentElement)||void 0===o?void 0:o.tagName)||void 0===s?void 0:s.toLowerCase(),m=v(l,u,i,p,n,r);m&&("thead"===g?h.push(m):"tfoot"===g?f.push(m):c.push(m))}return{head:h,body:c,foot:f}}function v(t,e,i,n,r,o){for(var s=new l(n),a=0;a<n.cells.length;a++){var u=n.cells[a],h=i.getComputedStyle(u);if(r||"none"!==h.display){var c=void 0;o&&(c=p(t,u,e,h,i)),s.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:c,_element:u,content:y(u)})}}var f=i.getComputedStyle(n);if(s.length>0&&(r||"none"!==f.display))return s}function y(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split(/<br.*?>/).map((function(t){return t.trim()})).join("\n"),e.innerText||e.textContent||""}function D(t,e,i,n,r){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),s=1;s<arguments.length;s++){var a=arguments[s];if(null!=a)for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o}function x(t,e){var i=new o(t),n=i.getDocumentOptions(),r=i.getGlobalOptions();!function(t,e,i){for(var n=0,r=[t,e,i];n<r.length;n++){var o=r[n];o&&"object"!==typeof o&&console.error("The options parameter should be of type object, is: "+typeof o),o.startY&&"number"!==typeof o.startY&&(console.error("Invalid value for startY option",o.startY),delete o.startY)}}(r,n,e);var s,a=D({},r,n,e);"undefined"!==typeof window&&(s=window);var l=function(t,e,i){for(var n={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},r=function(r){if("columnStyles"===r){var o=t[r],s=e[r],a=i[r];n.columnStyles=D({},o,s,a)}else{var l=[t,e,i].map((function(t){return t[r]||{}}));n[r]=D({},l[0],l[1],l[2])}},o=0,s=Object.keys(n);o<s.length;o++){r(s[o])}return n}(r,n,e),u=function(t,e,i){for(var n={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},r=0,o=[t,e,i];r<o.length;r++){var s=o[r];s.didParseCell&&n.didParseCell.push(s.didParseCell),s.willDrawCell&&n.willDrawCell.push(s.willDrawCell),s.didDrawCell&&n.didDrawCell.push(s.didDrawCell),s.willDrawPage&&n.willDrawPage.push(s.willDrawPage),s.didDrawPage&&n.didDrawPage.push(s.didDrawPage)}return n}(r,n,e),h=function(t,e){var i,n,r,o,s,a,l,u,h,c,d,p,g,m,b=f(e.margin,40/t.scaleFactor()),v=null!==(i=function(t,e){var i=t.getLastAutoTable(),n=t.scaleFactor(),r=t.pageNumber(),o=!1;if(i&&i.startPageNumber){o=i.startPageNumber+i.pageNumber-1===r}if("number"===typeof e)return e;if((null==e||!1===e)&&o&&null!=(null===i||void 0===i?void 0:i.finalY))return i.finalY+20/n;return null}(t,e.startY))&&void 0!==i?i:b.top;g=!0===e.showFoot?"everyPage":!1===e.showFoot?"never":null!==(n=e.showFoot)&&void 0!==n?n:"everyPage";m=!0===e.showHead?"everyPage":!1===e.showHead?"never":null!==(r=e.showHead)&&void 0!==r?r:"everyPage";var y=null!==(o=e.useCss)&&void 0!==o&&o,D=e.theme||(y?"plain":"striped"),x=!!e.horizontalPageBreak,w=null!==(s=e.horizontalPageBreakRepeat)&&void 0!==s?s:null;return{includeHiddenHtml:null!==(a=e.includeHiddenHtml)&&void 0!==a&&a,useCss:y,theme:D,startY:v,margin:b,pageBreak:null!==(l=e.pageBreak)&&void 0!==l?l:"auto",rowPageBreak:null!==(u=e.rowPageBreak)&&void 0!==u?u:"auto",tableWidth:null!==(h=e.tableWidth)&&void 0!==h?h:"auto",showHead:m,showFoot:g,tableLineWidth:null!==(c=e.tableLineWidth)&&void 0!==c?c:0,tableLineColor:null!==(d=e.tableLineColor)&&void 0!==d?d:200,horizontalPageBreak:x,horizontalPageBreakRepeat:w,horizontalPageBreakBehaviour:null!==(p=e.horizontalPageBreakBehaviour)&&void 0!==p?p:"afterAllRows"}}(i,a),c=function(t,e,i){var n=e.head||[],r=e.body||[],o=e.foot||[];if(e.html){var s=e.includeHiddenHtml;if(i){var a=b(t,e.html,i,s,e.useCss)||{};n=a.head||n,r=a.body||n,o=a.foot||n}else console.error("Cannot parse html in non browser environment")}var l=e.columns||function(t,e,i){var n=t[0]||e[0]||i[0]||[],r=[];return Object.keys(n).filter((function(t){return"_element"!==t})).forEach((function(t){var e,i=1;"object"!==typeof(e=Array.isArray(n)?n[parseInt(t)]:n[t])||Array.isArray(e)||(i=(null===e||void 0===e?void 0:e.colSpan)||1);for(var o=0;o<i;o++){var s={dataKey:Array.isArray(n)?r.length:t+(o>0?"_".concat(o):"")};r.push(s)}})),r}(n,r,o);return{columns:l,head:n,body:r,foot:o}}(i,a,s);return{id:e.tableId,content:c,hooks:u,styles:l,settings:h}}var w,_=function(t,e,i){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=i,this.doc=t.getDocument()},F=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.cell=n,a.row=r,a.column=o,a.section=r.section,a}return a(e,t),e}(_),A=function(){function t(t,e){this.pageNumber=1,this.id=t.id,this.settings=t.settings,this.styles=t.styles,this.hooks=t.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return t.prototype.getHeadHeight=function(t){return this.head.reduce((function(e,i){return e+i.getMaxCellHeight(t)}),0)},t.prototype.getFootHeight=function(t){return this.foot.reduce((function(e,i){return e+i.getMaxCellHeight(t)}),0)},t.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},t.prototype.callCellHooks=function(t,e,i,n,r,o){for(var s=0,a=e;s<a.length;s++){var l=!1===(0,a[s])(new F(t,this,i,n,r,o));if(i.text=Array.isArray(i.text)?i.text:[i.text],l)return!1}return!0},t.prototype.callEndPageHooks=function(t,e){t.applyStyles(t.userStyles);for(var i=0,n=this.hooks.didDrawPage;i<n.length;i++){(0,n[i])(new _(t,this,e))}},t.prototype.callWillDrawPageHooks=function(t,e){for(var i=0,n=this.hooks.willDrawPage;i<n.length;i++){(0,n[i])(new _(t,this,e))}},t.prototype.getWidth=function(t){if("number"===typeof this.settings.tableWidth)return this.settings.tableWidth;if("wrap"===this.settings.tableWidth)return this.columns.reduce((function(t,e){return t+e.wrappedWidth}),0);var e=this.settings.margin;return t-e.left-e.right},t}(),S=function(){function t(t,e,i,n,r){void 0===r&&(r=!1),this.height=0,this.raw=t,t instanceof l&&(this.raw=t._element,this.element=t._element),this.index=e,this.section=i,this.cells=n,this.spansMultiplePages=r}return t.prototype.getMaxCellHeight=function(t){var e=this;return t.reduce((function(t,i){var n;return Math.max(t,(null===(n=e.cells[i.index])||void 0===n?void 0:n.height)||0)}),0)},t.prototype.hasRowSpan=function(t){var e=this;return t.filter((function(t){var i=e.cells[t.index];return!!i&&i.rowSpan>1})).length>0},t.prototype.canEntireRowFit=function(t,e){return this.getMaxCellHeight(e)<=t},t.prototype.getMinimumRowHeight=function(t,e){var i=this;return t.reduce((function(t,n){var r=i.cells[n.index];if(!r)return 0;var o=e.getLineHeight(r.styles.fontSize),s=r.padding("vertical")+o;return s>t?s:t}),0)},t}(),C=function(){function t(t,e,i){var n;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=i,this.raw=t;var r=t;null==t||"object"!==typeof t||Array.isArray(t)?(this.rowSpan=1,this.colSpan=1):(this.rowSpan=t.rowSpan||1,this.colSpan=t.colSpan||1,r=null!==(n=t.content)&&void 0!==n?n:t,t._element&&(this.raw=t._element));var o=null!=r?""+r:"";this.text=o.split(/\r\n|\r|\n/g)}return t.prototype.getTextPos=function(){var t,e;if("top"===this.styles.valign)t=this.y+this.padding("top");else if("bottom"===this.styles.valign)t=this.y+this.height-this.padding("bottom");else{var i=this.height-this.padding("vertical");t=this.y+i/2+this.padding("top")}if("right"===this.styles.halign)e=this.x+this.width-this.padding("right");else if("center"===this.styles.halign){var n=this.width-this.padding("horizontal");e=this.x+n/2+this.padding("left")}else e=this.x+this.padding("left");return{x:e,y:t}},t.prototype.getContentHeight=function(t,e){void 0===e&&(e=1.15);var i=(Array.isArray(this.text)?this.text.length:1)*(this.styles.fontSize/t*e)+this.padding("vertical");return Math.max(i,this.styles.minCellHeight)},t.prototype.padding=function(t){var e=f(this.styles.cellPadding,0);return"vertical"===t?e.top+e.bottom:"horizontal"===t?e.left+e.right:e[t]},t}(),L=function(){function t(t,e,i){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=t,this.raw=e,this.index=i}return t.prototype.getMaxCustomCellWidth=function(t){for(var e=0,i=0,n=t.allRows();i<n.length;i++){var r=n[i].cells[this.index];r&&"number"===typeof r.styles.cellWidth&&(e=Math.max(e,r.styles.cellWidth))}return e},t}();function k(t,e){!function(t,e){var i=t.scaleFactor(),n=e.settings.horizontalPageBreak,r=d(t,e);e.allRows().forEach((function(o){for(var s=0,a=e.columns;s<a.length;s++){var l=a[s],h=o.cells[l.index];if(h){var c=e.hooks.didParseCell;e.callCellHooks(t,c,h,o,l,null);var f=h.padding("horizontal");h.contentWidth=u(h.text,h.styles,t)+f;var d=u(h.text.join(" ").split(/[^\S\u00A0]+/),h.styles,t);if(h.minReadableWidth=d+h.padding("horizontal"),"number"===typeof h.styles.cellWidth)h.minWidth=h.styles.cellWidth,h.wrappedWidth=h.styles.cellWidth;else if("wrap"===h.styles.cellWidth||!0===n)h.contentWidth>r?(h.minWidth=r,h.wrappedWidth=r):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var p=10/i;h.minWidth=h.styles.minCellWidth||p,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}})),e.allRows().forEach((function(t){for(var i=0,n=e.columns;i<n.length;i++){var r=n[i],o=t.cells[r.index];if(o&&1===o.colSpan)r.wrappedWidth=Math.max(r.wrappedWidth,o.wrappedWidth),r.minWidth=Math.max(r.minWidth,o.minWidth),r.minReadableWidth=Math.max(r.minReadableWidth,o.minReadableWidth);else{var s=e.styles.columnStyles[r.dataKey]||e.styles.columnStyles[r.index]||{},a=s.cellWidth||s.minCellWidth;a&&"number"===typeof a&&(r.minWidth=a,r.wrappedWidth=a)}o&&(o.colSpan>1&&!r.minWidth&&(r.minWidth=o.minWidth),o.colSpan>1&&!r.wrappedWidth&&(r.wrappedWidth=o.minWidth))}}))}(t,e);var i=[],n=0;e.columns.forEach((function(t){var r=t.getMaxCustomCellWidth(e);r?t.width=r:(t.width=t.wrappedWidth,i.push(t)),n+=t.width}));var r=e.getWidth(t.pageSize().width)-n;r&&(r=P(i,r,(function(t){return Math.max(t.minReadableWidth,t.minWidth)}))),r&&(r=P(i,r,(function(t){return t.minWidth}))),r=Math.abs(r),!e.settings.horizontalPageBreak&&r>.1/t.scaleFactor()&&(r=r<1?r:Math.round(r),console.log("Of the table content, ".concat(r," units width could not fit page"))),function(t){for(var e=t.allRows(),i=0;i<e.length;i++)for(var n=e[i],r=null,o=0,s=0,a=0;a<t.columns.length;a++){var l=t.columns[a];if((s-=1)>1&&t.columns[a+1])o+=l.width,delete n.cells[l.index];else if(r){var u=r;delete n.cells[l.index],r=null,u.width=l.width+o}else{if(!(u=n.cells[l.index]))continue;if(s=u.colSpan,o=0,u.colSpan>1){r=u,o+=l.width;continue}u.width=l.width+o}}}(e),function(t,e){for(var i={count:0,height:0},n=0,r=t.allRows();n<r.length;n++){for(var o=r[n],s=0,a=t.columns;s<a.length;s++){var l=a[s],u=o.cells[l.index];if(u){e.applyStyles(u.styles,!0);var h=u.width-u.padding("horizontal");if("linebreak"===u.styles.overflow)u.text=e.splitTextToSize(u.text,h+1/e.scaleFactor(),{fontSize:u.styles.fontSize});else if("ellipsize"===u.styles.overflow)u.text=N(u.text,h,u.styles,e,"...");else if("hidden"===u.styles.overflow)u.text=N(u.text,h,u.styles,e,"");else if("function"===typeof u.styles.overflow){var c=u.styles.overflow(u.text,h);u.text="string"===typeof c?[c]:c}u.contentHeight=u.getContentHeight(e.scaleFactor(),e.getLineHeightFactor());var f=u.contentHeight/u.rowSpan;u.rowSpan>1&&i.count*i.height<f*u.rowSpan?i={height:f,count:u.rowSpan}:i&&i.count>0&&i.height>f&&(f=i.height),f>o.height&&(o.height=f)}}i.count--}}(e,t),function(t){for(var e={},i=1,n=t.allRows(),r=0;r<n.length;r++)for(var o=n[r],s=0,a=t.columns;s<a.length;s++){var l=a[s],u=e[l.index];if(i>1)i--,delete o.cells[l.index];else if(u)u.cell.height+=o.height,i=u.cell.colSpan,delete o.cells[l.index],u.left--,u.left<=1&&delete e[l.index];else{var h=o.cells[l.index];if(!h)continue;if(h.height=o.height,h.rowSpan>1){var c=n.length-r,f=h.rowSpan>c?c:h.rowSpan;e[l.index]={cell:h,left:f,row:o}}}}}(e)}function P(t,e,i){for(var n=e,r=t.reduce((function(t,e){return t+e.wrappedWidth}),0),o=0;o<t.length;o++){var s=t[o],a=n*(s.wrappedWidth/r),l=s.width+a,u=i(s),h=l<u?u:l;e-=h-s.width,s.width=h}if(e=Math.round(1e10*e)/1e10){var c=t.filter((function(t){return!(e<0)||t.width>i(t)}));c.length&&(e=P(c,e,i))}return e}function N(t,e,i,n,r){return t.map((function(t){return function(t,e,i,n,r){var o=1e4*n.scaleFactor();if(e=Math.ceil(e*o)/o,e>=u(t,i,n))return t;for(;e<u(t+r,i,n)&&!(t.length<=1);)t=t.substring(0,t.length-1);return t.trim()+r}(t,e,i,n,r)}))}function E(t,e){var i=new o(t),n=function(t,e){var i=t.content,n=function(t){return t.map((function(t,e){var i,n;return n="object"===typeof t&&null!==(i=t.dataKey)&&void 0!==i?i:e,new L(n,t,e)}))}(i.columns);if(0===i.head.length){(r=M(n,"head"))&&i.head.push(r)}if(0===i.foot.length){var r;(r=M(n,"foot"))&&i.foot.push(r)}var o=t.settings.theme,s=t.styles;return{columns:n,head:B("head",i.head,n,s,o,e),body:B("body",i.body,n,s,o,e),foot:B("foot",i.foot,n,s,o,e)}}(e,i.scaleFactor()),r=new A(e,n);return k(i,r),i.applyStyles(i.userStyles),r}function B(t,e,i,n,r,o){var s={};return e.map((function(e,a){for(var l=0,u={},h=0,c=0,f=0,d=i;f<d.length;f++){var p=d[f];if(null==s[p.index]||0===s[p.index].left)if(0===c){var g=void 0,m={};"object"!==typeof(g=Array.isArray(e)?e[p.index-h-l]:e[p.dataKey])||Array.isArray(g)||(m=(null===g||void 0===g?void 0:g.styles)||{});var b=O(t,p,a,r,n,o,m),v=new C(g,b,t);u[p.dataKey]=v,u[p.index]=v,c=v.colSpan-1,s[p.index]={left:v.rowSpan-1,times:c}}else c--,h++;else s[p.index].left--,c=s[p.index].times,l++}return new S(e,a,t,u)}))}function M(t,e){var i={};return t.forEach((function(t){if(null!=t.raw){var n=function(t,e){if("head"===t){if("object"===typeof e)return e.header||null;if("string"===typeof e||"number"===typeof e)return e}else if("foot"===t&&"object"===typeof e)return e.footer;return null}(e,t.raw);null!=n&&(i[t.dataKey]=n)}})),Object.keys(i).length>0?i:null}function O(t,e,i,n,r,o,s){var a,l={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}}[n];"head"===t?a=r.headStyles:"body"===t?a=r.bodyStyles:"foot"===t&&(a=r.footStyles);var u=D({},l.table,l[t],r.styles,a),h=r.columnStyles[e.dataKey]||r.columnStyles[e.index]||{},c="body"===t?h:{},f="body"===t&&i%2===0?D({},l.alternateRow,r.alternateRowStyles):{},d=function(t){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/t,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}(o),p=D({},d,u,f,c);return D(p,s)}function I(t,e,i){var n;void 0===i&&(i={});var r=d(t,e),o=new Map,s=[],a=[],l=[];Array.isArray(e.settings.horizontalPageBreakRepeat)?l=e.settings.horizontalPageBreakRepeat:"string"!==typeof e.settings.horizontalPageBreakRepeat&&"number"!==typeof e.settings.horizontalPageBreakRepeat||(l=[e.settings.horizontalPageBreakRepeat]),l.forEach((function(t){var i=e.columns.find((function(e){return e.dataKey===t||e.index===t}));i&&!o.has(i.index)&&(o.set(i.index,!0),s.push(i.index),a.push(e.columns[i.index]),r-=i.wrappedWidth)}));for(var u=!0,h=null!==(n=null===i||void 0===i?void 0:i.start)&&void 0!==n?n:0;h<e.columns.length;)if(o.has(h))h++;else{var c=e.columns[h].wrappedWidth;if(!(u||r>=c))break;u=!1,s.push(h),a.push(e.columns[h]),r-=c,h++}return{colIndexes:s,columns:a,lastIndex:h-1}}function T(t,e){var i=e.settings,n=i.startY,r=i.margin,s={x:r.left,y:n},a=e.getHeadHeight(e.columns)+e.getFootHeight(e.columns),l=n+r.bottom+a;"avoid"===i.pageBreak&&(l+=e.body.reduce((function(t,e){return t+e.height}),0));var u=new o(t);("always"===i.pageBreak||null!=i.startY&&l>u.pageSize().height)&&(Y(u),s.y=r.top),e.callWillDrawPageHooks(u,s);var c=D({},s);e.startPageNumber=u.pageNumber(),i.horizontalPageBreak?function(t,e,i,n){var r=function(t,e){for(var i=[],n=0;n<e.columns.length;n++){var r=I(t,e,{start:n});r.columns.length&&(i.push(r),n=r.lastIndex)}return i}(t,e),o=e.settings;if("afterAllRows"===o.horizontalPageBreakBehaviour)r.forEach((function(r,o){t.applyStyles(t.userStyles),o>0?G(t,e,i,n,r.columns,!0):j(t,e,n,r.columns),function(t,e,i,n,r){t.applyStyles(t.userStyles),e.body.forEach((function(o,s){var a=s===e.body.length-1;H(t,e,o,a,i,n,r)}))}(t,e,i,n,r.columns),z(t,e,n,r.columns)}));else for(var s=-1,a=r[0],l=function(){var o=s;if(a){t.applyStyles(t.userStyles);var l=a.columns;s>=0?G(t,e,i,n,l,!0):j(t,e,n,l),o=R(t,e,s+1,n,l),z(t,e,n,l)}var u=o-s;r.slice(1).forEach((function(r){t.applyStyles(t.userStyles),G(t,e,i,n,r.columns,!0),R(t,e,s+1,n,r.columns,u),z(t,e,n,r.columns)})),s=o};s<e.body.length-1;)l()}(u,e,c,s):(u.applyStyles(u.userStyles),"firstPage"!==i.showHead&&"everyPage"!==i.showHead||e.head.forEach((function(t){return W(u,e,t,s,e.columns)})),u.applyStyles(u.userStyles),e.body.forEach((function(t,i){var n=i===e.body.length-1;H(u,e,t,n,c,s,e.columns)})),u.applyStyles(u.userStyles),"lastPage"!==i.showFoot&&"everyPage"!==i.showFoot||e.foot.forEach((function(t){return W(u,e,t,s,e.columns)}))),h(u,e,c,s),e.callEndPageHooks(u,s),e.finalY=s.y,t.lastAutoTable=e,u.applyStyles(u.userStyles)}function j(t,e,i,n){var r=e.settings;t.applyStyles(t.userStyles),"firstPage"!==r.showHead&&"everyPage"!==r.showHead||e.head.forEach((function(r){return W(t,e,r,i,n)}))}function R(t,e,i,n,r,o){t.applyStyles(t.userStyles),o=null!==o&&void 0!==o?o:e.body.length;var s=Math.min(i+o,e.body.length),a=-1;return e.body.slice(i,s).forEach((function(o,s){var l=i+s===e.body.length-1,u=V(t,e,l,n);o.canEntireRowFit(u,r)&&(W(t,e,o,n,r),a=i+s)})),a}function z(t,e,i,n){var r=e.settings;t.applyStyles(t.userStyles),"lastPage"!==r.showFoot&&"everyPage"!==r.showFoot||e.foot.forEach((function(r){return W(t,e,r,i,n)}))}function q(t,e,i){var n=i.getLineHeight(t.styles.fontSize),r=t.padding("vertical"),o=Math.floor((e-r)/n);return Math.max(0,o)}function H(t,e,i,n,r,o,s){var a=V(t,e,n,o);if(i.canEntireRowFit(a,s))W(t,e,i,o,s);else if(function(t,e,i,n){var r=t.pageSize().height,o=n.settings.margin,s=r-(o.top+o.bottom);"body"===e.section&&(s-=n.getHeadHeight(n.columns)+n.getFootHeight(n.columns));var a=e.getMinimumRowHeight(n.columns,t),l=a<i;if(a>s)return console.log("Will not be able to print row ".concat(e.index," correctly since it's minimum height is larger than page height")),!0;if(!l)return!1;var u=e.hasRowSpan(n.columns);return e.getMaxCellHeight(n.columns)>s?(u&&console.log("The content of row ".concat(e.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!u&&"avoid"!==n.settings.rowPageBreak}(t,i,a,e)){var l=function(t,e,i,n){var r={};t.spansMultiplePages=!0,t.height=0;for(var o=0,s=0,a=i.columns;s<a.length;s++){var l=a[s];if(m=t.cells[l.index]){Array.isArray(m.text)||(m.text=[m.text]),(g=D(g=new C(m.raw,m.styles,m.section),m)).text=[];var u=q(m,e,n);m.text.length>u&&(g.text=m.text.splice(u,m.text.length));var h=n.scaleFactor(),c=n.getLineHeightFactor();m.contentHeight=m.getContentHeight(h,c),m.contentHeight>=e&&(m.contentHeight=e,g.styles.minCellHeight-=e),m.contentHeight>t.height&&(t.height=m.contentHeight),g.contentHeight=g.getContentHeight(h,c),g.contentHeight>o&&(o=g.contentHeight),r[l.index]=g}}var f=new S(t.raw,-1,t.section,r,!0);f.height=o;for(var d=0,p=i.columns;d<p.length;d++){var g,m;l=p[d],(g=f.cells[l.index])&&(g.height=f.height),(m=t.cells[l.index])&&(m.height=t.height)}return f}(i,a,e,t);W(t,e,i,o,s),G(t,e,r,o,s),H(t,e,l,n,r,o,s)}else G(t,e,r,o,s),H(t,e,i,n,r,o,s)}function W(t,e,i,r,o){r.x=e.settings.margin.left;for(var s=0,a=o;s<a.length;s++){var l=a[s],u=i.cells[l.index];if(u)if(t.applyStyles(u.styles),u.x=r.x,u.y=r.y,!1!==e.callCellHooks(t,e.hooks.willDrawCell,u,i,l,r)){U(t,u,r);var h=u.getTextPos();n(u.text,h.x,h.y,{halign:u.styles.halign,valign:u.styles.valign,maxWidth:Math.ceil(u.width-u.padding("left")-u.padding("right"))},t.getDocument()),e.callCellHooks(t,e.hooks.didDrawCell,u,i,l,r),r.x+=l.width}else r.x+=l.width;else r.x+=l.width}r.y+=i.height}function U(t,e,i){var n=e.styles;if(t.getDocument().setFillColor(t.getDocument().getFillColor()),"number"===typeof n.lineWidth){var r=c(n.lineWidth,n.fillColor);r&&t.rect(e.x,i.y,e.width,e.height,r)}else"object"===typeof n.lineWidth&&(n.fillColor&&t.rect(e.x,i.y,e.width,e.height,"F"),function(t,e,i,n){var r,o,s,a;n.top&&(r=i.x,o=i.y,s=i.x+e.width,a=i.y,n.right&&(s+=.5*n.right),n.left&&(r-=.5*n.left),l(n.top,r,o,s,a));n.bottom&&(r=i.x,o=i.y+e.height,s=i.x+e.width,a=i.y+e.height,n.right&&(s+=.5*n.right),n.left&&(r-=.5*n.left),l(n.bottom,r,o,s,a));n.left&&(r=i.x,o=i.y,s=i.x,a=i.y+e.height,n.top&&(o-=.5*n.top),n.bottom&&(a+=.5*n.bottom),l(n.left,r,o,s,a));n.right&&(r=i.x+e.width,o=i.y,s=i.x+e.width,a=i.y+e.height,n.top&&(o-=.5*n.top),n.bottom&&(a+=.5*n.bottom),l(n.right,r,o,s,a));function l(e,i,n,r,o){t.getDocument().setLineWidth(e),t.getDocument().line(i,n,r,o,"S")}}(t,e,i,n.lineWidth))}function V(t,e,i,n){var r=e.settings.margin.bottom,o=e.settings.showFoot;return("everyPage"===o||"lastPage"===o&&i)&&(r+=e.getFootHeight(e.columns)),t.pageSize().height-n.y-r}function G(t,e,i,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=!1),t.applyStyles(t.userStyles),"everyPage"!==e.settings.showFoot||o||e.foot.forEach((function(i){return W(t,e,i,n,r)})),e.callEndPageHooks(t,n);var s=e.settings.margin;h(t,e,i,n),Y(t),e.pageNumber++,n.x=s.left,n.y=s.top,i.y=s.top,e.callWillDrawPageHooks(t,n),"everyPage"===e.settings.showHead&&(e.head.forEach((function(i){return W(t,e,i,n,r)})),t.applyStyles(t.userStyles))}function Y(t){var e=t.pageNumber();return t.setPage(e+1),t.pageNumber()===e&&(t.addPage(),!0)}function X(t,e){T(t,E(t,x(t,e)))}try{if("undefined"!==typeof window&&window){var $=window,K=$.jsPDF||(null===(w=$.jspdf)||void 0===w?void 0:w.jsPDF);K&&function(t){t.API.autoTable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return T(this,E(this,x(this,t[0]))),this},t.API.lastAutoTable=!1,t.API.autoTableText=function(t,e,i,r){n(t,e,i,r,this)},t.API.autoTableSetDefaults=function(t){return o.setDefaults(t,this),this},t.autoTableSetDefaults=function(t,e){o.setDefaults(t,e)},t.API.autoTableHtmlToJson=function(t,e){var i;if(void 0===e&&(e=!1),"undefined"===typeof window)return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var n=b(new o(this),t,window,e,!1),r=n.head,s=n.body;return{columns:(null===(i=r[0])||void 0===i?void 0:i.map((function(t){return t.content})))||[],rows:s,data:s}}}(K)}}catch(J){console.error("Could not apply autoTable plugin",J)}},44731(t,e,i){"use strict";i.d(e,{nu:()=>g,t1:()=>f,yP:()=>p});var n=i(74848),r=i(96540),o=i(66118);const s="label";function a(t,e){"function"===typeof t?t(e):t&&(t.current=e)}function l(t,e){t.labels=e}function u(t,e,i=s){const n=[];t.datasets=e.map((e=>{const r=t.datasets.find((t=>t[i]===e[i]));return r&&e.data&&!n.includes(r)?(n.push(r),Object.assign(r,e),r):{...e}}))}function h(t,e=s){const i={labels:[],datasets:[]};return l(i,t.labels),u(i,t.datasets,e),i}function c(t,e){const{height:i=150,width:s=300,redraw:c=!1,datasetIdKey:f,type:d,data:p,options:g,plugins:m=[],fallbackContent:b,updateMode:v,...y}=t,D=(0,r.useRef)(null),x=(0,r.useRef)(null),w=()=>{D.current&&(x.current=new o.t1(D.current,{type:d,data:h(p,f),options:g&&{...g},plugins:m}),a(e,x.current))},_=()=>{a(e,null),x.current&&(x.current.destroy(),x.current=null)};return(0,r.useEffect)((()=>{!c&&x.current&&g&&function(t,e){const i=t.options;i&&e&&Object.assign(i,e)}(x.current,g)}),[c,g]),(0,r.useEffect)((()=>{!c&&x.current&&l(x.current.config.data,p.labels)}),[c,p.labels]),(0,r.useEffect)((()=>{!c&&x.current&&p.datasets&&u(x.current.config.data,p.datasets,f)}),[c,p.datasets]),(0,r.useEffect)((()=>{x.current&&(c?(_(),setTimeout(w)):x.current.update(v))}),[c,g,p.labels,p.datasets,v]),(0,r.useEffect)((()=>{x.current&&(_(),setTimeout(w))}),[d]),(0,r.useEffect)((()=>(w(),()=>_())),[]),(0,n.jsx)("canvas",{ref:D,role:"img",height:i,width:s,...y,children:b})}const f=(0,r.forwardRef)(c);function d(t,e){return o.t1.register(e),(0,r.forwardRef)(((e,i)=>(0,n.jsx)(f,{...e,ref:i,type:t})))}const p=d("bar",o.A6),g=d("doughnut",o.ju)}}]);