CyberChef/Compression.js

177 lines
160 KiB
JavaScript
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

/**
* CyberChef - The Cyber Swiss Army Knife
*
* @copyright Crown Copyright 2016
* @license Apache-2.0
*
* Copyright 2016 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1502)}({0:function(e,t,r){"use strict";var n=r(15),i=r.n(n),a=r(10),o=r(7),u=r(19),s=r(18);function f(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){f(a,n,i,o,u,"next",e)}function u(e){f(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,r=null,n=[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),Array.prototype.map.call(e,function(e,t){n[t]=e}),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"object"==typeof window&&window.app&&!window.app.options.treatAsUtf8&&(t=e.byteArrayToChars(e.strToByteArray(t)));return t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),r||(t=t.replace(/[\x09-\x10\x0D\u2028\u2029]/g,".")),t}},{key:"parseEscapedChars",value:function(e){return e.replace(/(\\)?\\([bfnrtv0'"]|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\})/g,function(e,t,r){if("\\"===t)return"\\"+r;switch(r[0]){case"0":return"\0";case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(r.substr(1),16));case"u":return"{"===r[1]?String.fromCodePoint(parseInt(r.slice(2,-1),16)):String.fromCharCode(parseInt(r.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var r=[],n=0;n<t.length;n++)if(n<t.length-2&&"-"===t[n+1]&&"\\"!==t[n]){for(var i=e.ord(t[n]),a=e.ord(t[n+2]),o=i;o<=a;o++)r.push(e.chr(o));n+=2}else n<t.length-2&&"\\"===t[n]&&"-"===t[n+1]?(r.push("-"),n++):r.push(t[n]);return r}},{key:"convertToByteArray",value:function(t,r){switch(r.toLowerCase()){case"binary":return Object(s.a)(t);case"hex":return Object(o.c)(t);case"decimal":return Object(u.a)(t);case"base64":return Object(a.b)(t,null,"byteArray");case"utf8":return e.strToUtf8ByteArray(t);case"latin1":default:return e.strToByteArray(t)}}},{key:"convertToByteString",value:function(t,r){switch(r.toLowerCase()){case"binary":return e.byteArrayToChars(Object(s.a)(t));case"hex":return e.byteArrayToChars(Object(o.c)(t));case"decimal":return e.byteArrayToChars(Object(u.a)(t));case"base64":return e.byteArrayToChars(Object(a.b)(t,null,"byteArray"));case"utf8":return i.a.encode(t);case"latin1":default:return t}}},{key:"strToByteArray",value:function(t){for(var r,n=new Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ByteArray(t);return n}},{key:"strToUtf8ByteArray",value:function(t){var r=i.a.encode(t);return t.length!==r.length&&("function"==typeof importScripts?self.setOption("attemptHighlight",!1):"object"==typeof window&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(r)}},{key:"strToCharcode",value:function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(n<t.length-1&&i>=55296&&i<56320){var a=t[n+1].charCodeAt(0);a>=56320&&a<57344&&(i=e.ord(t[n]+t[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(t){var r=e.byteArrayToChars(t);try{var n=i.a.decode(r);return r.length!==n.length&&("function"==typeof importScripts?self.setOption("attemptHighlight",!1):"object"==typeof window&&(window.app.options.attemptHighlight=!1)),n}catch(e){return r}}},{key:"byteArrayToChars",value:function(e){if(!e)return"";for(var t="",r=0;r<e.length;)t+=String.fromCharCode(e[r++]);return t}},{key:"arrayBufferToStr",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Array.prototype.slice.call(new Uint8Array(t));return r?e.byteArrayToUtf8(n):e.byteArrayToChars(n)}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],a=!1,o=!1,u="",s=[],f=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var c=0;c<e.length;c++)t=e[c],r=e[c+1]||"",a?(u+=t,a=!1):'"'!==t||o?'"'===t&&o?'"'===r?a=!0:o=!1:!o&&n.indexOf(t)>=0?(s.push(u),u=""):!o&&i.indexOf(t)>=0?(s.push(u),u="",f.push(s),s=[],i.indexOf(r)>=0&&r!==t&&c++):u+=t:o=!0;return s.length&&(s.push(u),f.push(s)),f}},{key:"stripHtmlTags",value:function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=e.replace(/<(script|style)[^>]*>.*<\/(script|style)>/gim,"")),e.replace(/<[^>]+>/g,"")}},{key:"escapeHtml",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};return e.replace(/[&<>"'\/`]/g,function(e){return t[e]})}},{key:"unescapeHtml",value:function(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`"};return e.replace(/&#?x?[a-z0-9]{2,4};/gi,function(e){return t[e]||e})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",a="",o="";return e.forEach(function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),a=e.disabled?"/disabled":"",o=e.breakpoint?"/breakpoint":"",r+="".concat(n,"(").concat(i).concat(a).concat(o,")"),t&&(r+="\n")}),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)\/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|[^\\]\\\\)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var a={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(a.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(a.breakpoint=!0),i.push(a)}return i}},{key:"displayFilesAsHTML",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var n,i,o,u,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=function(t){return"<div class='card' style='white-space: normal;'>\n <div class='card-header'>\n <h6 class=\"mb-0\">\n ".concat(e.escapeHtml(t.name),"\n </h6>\n </div>\n </div>")},i=function(t,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+Object(a.c)(t))+"'>"}return"<pre>".concat(e.escapeHtml(e.arrayBufferToStr(t.buffer)),"</pre>")},o=function(){var t=c(regeneratorRuntime.mark(function t(r,n){var a,o,u;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.readFile(r);case 2:return a=t.sent,o=new Blob([a],{type:"octet/stream"}),u="<div class='card' style='white-space: normal;'>\n <div class='card-header' id='heading".concat(n,"'>\n <h6 class='mb-0'>\n <a class='collapsed'\n data-toggle='collapse'\n href='#collapse").concat(n,"'\n aria-expanded='false'\n aria-controls='collapse").concat(n,"'\n title=\"Show/hide contents of '").concat(e.escapeHtml(r.name),"'\">\n ").concat(e.escapeHtml(r.name),"</a>\n <span class='float-right' style=\"margin-top: -3px\">\n ").concat(r.size.toLocaleString(),' bytes\n <a title="Download ').concat(e.escapeHtml(r.name),"\"\n href='").concat(URL.createObjectURL(o),"'\n download='").concat(e.escapeHtml(r.name),'\'>\n <i class="material-icons" style="vertical-align: bottom">save</i>\n </a>\n </span>\n </h6>\n </div>\n <div id=\'collapse').concat(n,"' class='collapse' aria-labelledby='heading").concat(n,"' data-parent=\"#files\">\n <div class='card-body'>\n ").concat(i(a,r.type),"\n </div>\n </div>\n </div>"),t.abrupt("return",u);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}(),u="<div style='padding: 5px; white-space: normal;'>\n ".concat(r.length,' file(s) found\n </div><div id="files" style="padding: 20px">'),s=0;case 5:if(!(s<r.length)){t.next=17;break}if(!r[s].name.endsWith("/")){t.next=10;break}u+=n(r[s]),t.next=14;break;case 10:return t.t0=u,t.next=13,o(r[s],s);case 13:u=t.t0+=t.sent;case 14:s++,t.next=5;break;case 17:return t.abrupt("return",u+="</div>");case 18:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("=");2!==i.length?r[t[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(e){return new Promise(function(t,r){var n=new FileReader,i=new Uint8Array(e.size),a=0,o=function(){if(a>=e.size)t(i);else{var r=e.slice(a,a+10485760);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),a),a+=10485760,o()},n.onerror=function(e){r(n.error.message)},o()})}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(t,r){return r?e.gcd(r,t%r):t}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r<t;r++)if(e*r%26==1)return r}},{key:"charRep",value:function(e){return{Space:" ",Comma:",","Semi-colon":";",Colon:":","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}}],r&&l(t.prototype,r),n&&l(t,n),e}();t.a=h,Array.prototype.unique=function(){for(var e={},t=[],r=0,n=this.length;r<n;r++)e.hasOwnProperty(this[r])||(t.push(this[r]),e[this[r]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce(function(e,t){return e+t},0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1},String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})},1:function(e,t,r){"use strict";var n=r(9),i=r(0),a=r(7);function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,t&&this._parseConfig(t)}var t,r,n;return t=e,n=[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return i.a.parseEscapedChars(e);case"byteArray":return"string"==typeof e?(e=e.replace(/\s+/g,""),Object(a.c)(e)):e;case"number":if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+i.a.truncate(e.toString(),10);return r;default:return e}}}],(r=[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0}},{key:"config",get:function(){return this._value}},{key:"value",set:function(t){this._value=e.prepare(t,this.type)},get:function(){return this._value}}])&&o(t.prototype,r),n&&o(t,n),e}();function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}var t,r,i;return t=e,(r=[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"inputType",set:function(e){this._inputType=n.a.typeEnum(e)},get:function(){return n.a.enumLookup(this._inputType)}},{key:"outputType",set:function(e){this._outputType=n.a.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)},get:function(){return n.a.enumLookup(this._outputType)}},{key:"presentType",set:function(e){this._presentType=n.a.typeEnum(e)},get:function(){return n.a.enumLookup(this._presentType)}},{key:"args",set:function(e){var t=this;e.forEach(function(e){var r=new u(e);t.addIngredient(r)})},get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),t})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"ingValues",set:function(e){var t=this;e.forEach(function(e,r){t._ingList[r].value=e})},get:function(){return this._ingList.map(function(e){return e.value})}},{key:"breakpoint",set:function(e){this._breakpoint=!!e},get:function(){return this._breakpoint}},{key:"disabled",set:function(e){this._disabled=!!e},get:function(){return this._disabled}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])&&s(t.prototype,r),i&&s(t,i),e}();t.a=f},10:function(e,t,r){"use strict";r.d(t,"c",function(){return i}),r.d(t,"b",function(){return a}),r.d(t,"a",function(){return o});var n=r(0);
/**
* Base64 functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";"string"==typeof e&&(e=n.a.strToByteArray(e)),t=n.a.expandAlphRange(t).join("");for(var r,i,a,o,u,s,f,c="",l=0;l<e.length;)o=(r=e[l++])>>2,u=(3&r)<<4|(i=e[l++])>>4,s=(15&i)<<2|(a=e[l++])>>6,f=63&a,isNaN(i)?s=f=64:isNaN(a)&&(f=64),c+=t.charAt(o)+t.charAt(u)+t.charAt(s)+t.charAt(f);return c}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"string"===r?"":[];t=t||"A-Za-z0-9+/=",t=n.a.expandAlphRange(t).join("");var a,o,u,s,f,c,l=[],h=0;if(i){var p=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(p,"")}for(;h<e.length;)a=t.indexOf(e.charAt(h++))<<2|(s=-1===(s=t.indexOf(e.charAt(h++)||"="))?64:s)>>4,o=(15&s)<<4|(f=-1===(f=t.indexOf(e.charAt(h++)||"="))?64:f)>>2,u=(3&f)<<6|(c=-1===(c=t.indexOf(e.charAt(h++)||"="))?64:c),l.push(a),64!==f&&l.push(o),64!==c&&l.push(u);return"string"===r?n.a.byteArrayToUtf8(l):l}var o=[{name:"Standard (RFC 4648): A-Za-z0-9+/=",value:"A-Za-z0-9+/="},{name:"URL safe (RFC 4648 §5): A-Za-z0-9-_",value:"A-Za-z0-9-_"},{name:"Filename safe: A-Za-z0-9+-=",value:"A-Za-z0-9+\\-="},{name:"itoa64: ./0-9A-Za-z=",value:"./0-9A-Za-z="},{name:"XML: A-Za-z0-9_.",value:"A-Za-z0-9_."},{name:"y64: A-Za-z0-9._-",value:"A-Za-z0-9._-"},{name:"z64: 0-9a-zA-Z+/=",value:"0-9a-zA-Z+/="},{name:"Radix-64 (RFC 4880): 0-9A-Za-z+/=",value:"0-9A-Za-z+/="},{name:"Uuencoding: [space]-_",value:" -_"},{name:"Xxencoding: +-0-9A-Za-z",value:"+\\-0-9A-Za-z"},{name:"BinHex: !-,-0-689@A-NP-VX-Z[`a-fh-mp-r",value:"!-,-0-689@A-NP-VX-Z[`a-fh-mp-r"},{name:"ROT13: N-ZA-Mn-za-m0-9+/=",value:"N-ZA-Mn-za-m0-9+/="},{name:"UNIX crypt: ./0-9A-Za-z",value:"./0-9A-Za-z"}]},12:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}
/**
* Custom error type for handling Dish type errors.
* i.e. where the Dish cannot be successfully translated between types
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var s=function(e){function t(){var e,r,a,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var s=arguments.length,f=new Array(s),c=0;c<s;c++)f[c]=arguments[c];return a=this,(r=!(u=(e=i(t)).call.apply(e,[this].concat(f)))||"object"!==n(u)&&"function"!=typeof u?o(a):u).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(o(o(r)),t),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,u(Error)),t}();t.a=s},14:function(e,t,r){var n,i;!function(a,o){"use strict";void 0===(i="function"==typeof(n=function(){var e=function(){},t="undefined",r=["trace","debug","info","warn","error"];function n(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function i(t,n){for(var i=0;i<r.length;i++){var a=r[i];this[a]=i<t?e:this.methodFactory(a,t,n)}this.log=this.debug}function a(r,a,o){return function(r){"debug"===r&&(r="log");return typeof console!==t&&(void 0!==console[r]?n(console,r):void 0!==console.log?n(console,"log"):e)}(r)||function(e,r,n){return function(){typeof console!==t&&(i.call(this,r,n),this[e].apply(this,arguments))}}.apply(this,arguments)}function o(e,n,o){var u,s=this,f="loglevel";function c(){var e;if(typeof window!==t){try{e=window.localStorage[f]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(f)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}e&&(f+=":"+e),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=o||a,s.getLevel=function(){return u},s.setLevel=function(n,a){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(u=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[f]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+n+";"}catch(e){}}(n),i.call(s,n,e),typeof console===t&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){c()||s.setLevel(e,!1)},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var l=c();null==l&&(l=null==n?"WARN":n),s.setLevel(l,!1)}var u=new o,s={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=s[e];return t||(t=s[e]=new o(e,u.getLevel(),u.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return u.noConflict=function(){return typeof window!==t&&window.log===u&&(window.log=f),u},u.getLoggers=function(){return s},u})?n.call(t,r,t,e):n)||(e.exports=i)}()},15:function(e,t,r){!function(e){var t,r,n,i=String.fromCharCode;function a(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function o(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function u(e,t){return i(e>>t&63|128)}function s(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(o(e),t=i(e>>12&15|224),t+=u(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=u(e,12),t+=u(e,6)),t+=i(63&e|128)}function f(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|f()<<6|f())>=2048)return o(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=a(e),r=t.length,n=-1,i="";++n<r;)i+=s(t[n]);return i},e.decode=function(e){t=a(e),r=t.length,n=0;for(var o,u=[];!1!==(o=c());)u.push(o);return function(e){for(var t,r=e.length,n=-1,a="";++n<r;)(t=e[n])>65535&&(a+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),a+=i(t);return a}(u)}}(t)},1502:function(e,t,r){"use strict";r.r(t);var n=r(1),i={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var a=0;i>0;){var o=8-t;i>=o?(a<<=o,a|=n[o]&e[r++],t=0,i-=o):(a<<=i,a|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return a}},simple:function(e){var t=i.header(e),r="",n="";do{r+=n,n=i.decompress(e,t)}while(-1!=n);return r},header:function(e){if(4348520!=e(24))throw"No magic number found";var t=e(8)-48;if(t<1||t>9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=1e5*t,i="",a=0;a<6;a++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"Not valid bzip data";if(e(32),e(1))throw"Unsupported obsolete version";var o=e(24);if(o>n)throw"Initial position larger than buffer size";var u=e(16),s=new Uint8Array(256),f=0;for(a=0;a<16;a++)if(u&1<<15-a){var c=e(16);for(b=0;b<16;b++)c&1<<15-b&&(s[f++]=16*a+b)}var l=e(3);if(l<2||l>6)throw"Error 1";var h=e(15);if(0==h)throw"Error";var p=[];for(a=0;a<l;a++)p[a]=a;var y=new Uint8Array(32768);for(a=0;a<h;a++){for(var b=0;e(1);b++)if(b>=l)throw"Error 2";var g=p[b];p.splice(b,1),p.splice(0,0,g),y[a]=g}var d=f+2,v=[];for(b=0;b<l;b++){var m,w,A,k=new Uint8Array(258),F=new Uint8Array(21);u=e(5);for(a=0;a<d;a++){for(;;){if(u<1||u>20)throw"Error 3";if(!e(1))break;e(1)?u--:u++}k[a]=u}m=w=k[0];for(a=1;a<d;a++)k[a]>w?w=k[a]:k[a]<m&&(m=k[a]);(A=v[b]={}).permute=new Uint32Array(258),A.limit=new Uint32Array(21),A.base=new Uint32Array(21),A.minLen=m,A.maxLen=w;var E=A.base.subarray(1),B=A.limit.subarray(1),C=0;for(a=m;a<=w;a++)for(u=0;u<d;u++)k[u]==a&&(A.permute[C++]=u);for(a=m;a<=w;a++)F[a]=B[a]=0;for(a=0;a<d;a++)F[k[a]]++;for(C=u=0,a=m;a<w;a++)C+=F[a],B[a]=C-1,C<<=1,E[a+1]=C-(u+=F[a]);B[w]=C+F[w]-1,E[m]=0}var U,S,O,D=new Uint32Array(256);for(a=0;a<256;a++)p[a]=a;U=S=d=O=0;for(var T=new Uint32Array(n);;){if(!d--){if(d=49,O>=h)throw"Error 4";E=(A=v[y[O++]]).base.subarray(1),B=A.limit.subarray(1)}for(b=e(a=A.minLen);;){if(a>A.maxLen)throw"Error 5";if(b<=B[a])break;a++,b=b<<1|e(1)}if((b-=E[a])<0||b>=258)throw"Error 6";var x=A.permute[b];if(0!=x&&1!=x){if(U){if(U=0,S+u>=n)throw"Error 7";for(D[g=s[p[0]]]+=u;u--;)T[S++]=g}if(x>f)break;if(S>=n)throw"Error 8";g=p[a=x-1],p.splice(a,1),p.splice(0,0,g),D[g=s[g]]++,T[S++]=g}else U||(U=1,u=0),u+=0==x?U:2*U,U<<=1}if(o<0||o>=S)throw"Error 9";for(b=0,a=0;a<256;a++)c=b+D[a],D[a]=b,b=c;for(a=0;a<S;a++)T[D[g=255&T[a]]]|=a<<8,D[g]++;var _=0,R=0,N=0;S&&(R=255&(_=T[o]),_>>=8,N=-1),S=S;var I,j,P,L="";for(r||(r=1/0);S;){for(S--,j=R,R=255&(_=T[_]),_>>=8,3==N++?(I=R,P=j,R=-1):(I=1,P=R);I--;)if(L+=String.fromCharCode(P),!--r)return L;R!=j&&(N=0)}return L}},a=i,o=r(3);
/** @license
========================================================================
bzip2.js - a small bzip2 decompression implementation
Copyright 2011 by antimatter15 (antimatter15@gmail.com)
Based on micro-bunzip by Rob Landley (rob@landley.net).
Copyright (c) 2011 by antimatter15 (antimatter15@gmail.com).
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var h=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=f(this,c(t).call(this))).name="Bzip2 Decompress",e.module="Compression",e.description="Decompresses data using the Bzip2 algorithm.",e.infoURL="https://wikipedia.org/wiki/Bzip2",e.inputType="byteArray",e.outputType="string",e.args=[],e.patterns=[{match:"^\\x42\\x5a\\x68",flags:"",args:[]}],e}var r,i,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new Uint8Array(e);try{var n=a.array(r);return a.simple(n)}catch(e){throw new o.a(e)}}}])&&s(r.prototype,i),u&&s(r,u),t}(),p=r(159),y=r.n(p);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var w=y.a.Zlib,A=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=d(this,v(t).call(this))).name="Gunzip",e.module="Compression",e.description="Decompresses data which has been compressed using the deflate algorithm with gzip headers.",e.infoURL="https://wikipedia.org/wiki/Gzip",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[],e.patterns=[{match:"^\\x1f\\x8b\\x08",flags:"",args:[]}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new w.Gunzip(new Uint8Array(e));return new Uint8Array(r.decompress()).buffer}}])&&g(r.prototype,i),a&&g(r,a),t}(),k=y.a.Zlib,F=["Dynamic Huffman Coding","Fixed Huffman Coding","None (Store)"],E=["Adaptive","Block"],B={"Fixed Huffman Coding":k.Deflate.CompressionType.FIXED,"Dynamic Huffman Coding":k.Deflate.CompressionType.DYNAMIC,"None (Store)":k.Deflate.CompressionType.NONE};function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function S(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var T=y.a.Zlib,x=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=S(this,O(t).call(this))).name="Gzip",e.module="Compression",e.description="Compresses data using the deflate algorithm with gzip headers.",e.infoURL="https://wikipedia.org/wiki/Gzip",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[{name:"Compression type",type:"option",value:F},{name:"Filename (optional)",type:"string",value:""},{name:"Comment (optional)",type:"string",value:""},{name:"Include file checksum",type:"boolean",value:!1}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=t[1],n=t[2],i={deflateOptions:{compressionType:B[t[0]]},flags:{fhcrc:t[3]}};r.length&&(i.flags.fname=!0,i.filename=r),n.length&&(i.flags.fcommenct=!0,i.comment=n);var a=new T.Gzip(new Uint8Array(e),i);return new Uint8Array(a.compress()).buffer}}])&&U(r.prototype,i),a&&U(r,a),t}(),_=r(779);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var L=r.n(_).a.Zlib,z={"Fixed Huffman Coding":L.RawDeflate.CompressionType.FIXED,"Dynamic Huffman Coding":L.RawDeflate.CompressionType.DYNAMIC,"None (Store)":L.RawDeflate.CompressionType.NONE},M=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=I(this,j(t).call(this))).name="Raw Deflate",e.module="Compression",e.description="Compresses data using the deflate algorithm with no headers.",e.infoURL="https://wikipedia.org/wiki/DEFLATE",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[{name:"Compression type",type:"option",value:F}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new L.RawDeflate(new Uint8Array(e),{compressionType:z[t[0]]});return new Uint8Array(r.compress()).buffer}}])&&N(r.prototype,i),a&&N(r,a),t}(),Z=r(780);function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t){return!t||"object"!==G(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var J=r.n(Z).a.Zlib,$={Adaptive:J.RawInflate.BufferType.ADAPTIVE,Block:J.RawInflate.BufferType.BLOCK},K=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Y(this,V(t).call(this))).name="Raw Inflate",e.module="Compression",e.description="Decompresses data which has been compressed using the deflate algorithm with no headers.",e.infoURL="https://wikipedia.org/wiki/DEFLATE",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[{name:"Start index",type:"number",value:0},{name:"Initial output buffer size",type:"number",value:0},{name:"Buffer expansion type",type:"option",value:E},{name:"Resize buffer after decompression",type:"boolean",value:!1},{name:"Verify result",type:"boolean",value:!1}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new J.RawInflate(new Uint8Array(e),{index:t[0],bufferSize:t[1],bufferType:$[t[2]],resize:t[3],verify:t[4]}),n=new Uint8Array(r.decompress());if(n.length>158&&93===n[0]&&93===n[5]){for(var i=!1,a=0;a<155;a+=5)93!==n[a]&&(i=!0);if(!i)throw new o.a("Error: Unable to inflate data")}return n.buffer}}])&&H(r.prototype,i),a&&H(r,a),t}(),W=r(0);function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ee(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author tlwr [toby@toby.codes]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var ne=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ee(this,te(t).call(this))).name="Tar",e.module="Compression",e.description="Packs the input into a tarball.<br><br>No support for multiple files at this time.",e.infoURL="https://wikipedia.org/wiki/Tar_(computing)",e.inputType="byteArray",e.outputType="File",e.args=[{name:"Filename",type:"string",value:"file.txt"}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=function(){this.bytes=new Array(512),this.position=0};r.prototype.addEmptyBlock=function(){var e=new Array(512);e.fill(0),this.bytes=this.bytes.concat(e)},r.prototype.writeBytes=function(e){var t=this;this.position+e.length>this.bytes.length&&this.addEmptyBlock(),Array.prototype.forEach.call(e,function(e,r){void 0!==e.charCodeAt&&(e=e.charCodeAt()),t.bytes[t.position]=e,t.position+=1})},r.prototype.writeEndBlocks=function(){for(var e=0;e<2;e++)this.addEmptyBlock()};var n=e.length.toString(8).padStart(11,"0"),i=Math.floor(Date.now()/1e3).toString(8).padStart(11,"0"),a={fileName:W.a.padBytesRight(t[0],100),fileMode:W.a.padBytesRight("0000664",8),ownerUID:W.a.padBytesRight("0",8),ownerGID:W.a.padBytesRight("0",8),size:W.a.padBytesRight(n,12),lastModTime:W.a.padBytesRight(i,12),checksum:" ",type:"0",linkedFileName:W.a.padBytesRight("",100),USTARFormat:W.a.padBytesRight("ustar",6),version:"00",ownerUserName:W.a.padBytesRight("",32),ownerGroupName:W.a.padBytesRight("",32),deviceMajor:W.a.padBytesRight("",8),deviceMinor:W.a.padBytesRight("",8),fileNamePrefix:W.a.padBytesRight("",155)},o=0;for(var u in a){var s=a[u];Array.prototype.forEach.call(s,function(e){void 0!==e.charCodeAt?o+=e.charCodeAt():o+=e})}o=W.a.padBytesRight(o.toString(8).padStart(7,"0"),8),a.checksum=o;var f=new r;return f.writeBytes(a.fileName),f.writeBytes(a.fileMode),f.writeBytes(a.ownerUID),f.writeBytes(a.ownerGID),f.writeBytes(a.size),f.writeBytes(a.lastModTime),f.writeBytes(a.checksum),f.writeBytes(a.type),f.writeBytes(a.linkedFileName),f.writeBytes(a.USTARFormat),f.writeBytes(a.version),f.writeBytes(a.ownerUserName),f.writeBytes(a.ownerGroupName),f.writeBytes(a.deviceMajor),f.writeBytes(a.deviceMinor),f.writeBytes(a.fileNamePrefix),f.writeBytes(W.a.padBytesRight("",12)),f.writeBytes(e),f.writeEndBlocks(),new File([new Uint8Array(f.bytes)],t[0])}}])&&Q(r.prototype,i),a&&Q(r,a),t}();function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,i)}function oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ue(e,t){return!t||"object"!==ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author tlwr [toby@toby.codes]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var ce=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ue(this,se(t).call(this))).name="Untar",e.module="Compression",e.description="Unpacks a tarball and displays it per file.",e.infoURL="https://wikipedia.org/wiki/Tar_(computing)",e.inputType="byteArray",e.outputType="List<File>",e.presentType="html",e.args=[],e.patterns=[{match:"^.{257}\\x75\\x73\\x74\\x61\\x72",flags:"",args:[]}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fe(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=function(e){this.bytes=e,this.position=0};r.prototype.getBytes=function(e){var t=this.position+e,r=this.bytes.slice(this.position,t);return this.position=t,r},r.prototype.readString=function(e){for(var t="",r=this.position;r<this.position+e;r++){var n=this.bytes[r];if(0===n)break;t+=String.fromCharCode(n)}return this.position+=e,t},r.prototype.readInt=function(e,t){var r=this.readString(e);return parseInt(r,t)},r.prototype.hasMore=function(){return this.position<this.bytes.length};for(var n=new r(e),i=[];n.hasMore();){var a=n.position+512,o={fileName:n.readString(100),fileMode:n.readString(8),ownerUID:n.readString(8),ownerGID:n.readString(8),size:parseInt(n.readString(12),8),lastModTime:new Date(1e3*n.readInt(12,8)),checksum:n.readString(8),type:n.readString(1),linkedFileName:n.readString(100),USTARFormat:n.readString(6).indexOf("ustar")>=0};if(o.USTARFormat&&(o.version=n.readString(2),o.ownerUserName=n.readString(32),o.ownerGroupName=n.readString(32),o.deviceMajor=n.readString(8),o.deviceMinor=n.readString(8),o.filenamePrefix=n.readString(155)),n.position=a,"0"===o.type){var u=n.position+o.size;o.size%512!=0&&(u+=512-o.size%512),o.bytes=n.getBytes(o.size),i.push(new File([new Uint8Array(o.bytes)],o.fileName)),n.position=u}else"5"===o.type&&i.push(new File([new Uint8Array(o.bytes)],o.fileName))}return i}},{key:"present",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.a.displayFilesAsHTML(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){ae(a,n,i,o,u,"next",e)}function u(e){ae(a,n,i,o,u,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()}])&&oe(r.prototype,i),a&&oe(r,a),t}(),le=r(781);function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,i)}function ye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function be(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var ve=r.n(le).a.Zlib,me=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=be(this,ge(t).call(this))).name="Unzip",e.module="Compression",e.description="Decompresses data using the PKZIP algorithm and displays it per file, with support for passwords.",e.infoURL="https://wikipedia.org/wiki/Zip_(file_format)",e.inputType="ArrayBuffer",e.outputType="List<File>",e.presentType="html",e.args=[{name:"Password",type:"binaryString",value:""},{name:"Verify result",type:"boolean",value:!1}],e.patterns=[{match:"^\\x50\\x4b(?:\\x03|\\x05|\\x07)(?:\\x04|\\x06|\\x08)",flags:"",args:["",!1]}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&de(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r={password:W.a.strToByteArray(t[0]),verify:t[1]},n=new ve.Unzip(new Uint8Array(e),r);return n.getFilenames().map(function(e){var t=n.decompress(e);return new File([t],e)})}},{key:"present",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.a.displayFilesAsHTML(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){pe(a,n,i,o,u,"next",e)}function u(e){pe(a,n,i,o,u,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()}])&&ye(r.prototype,i),a&&ye(r,a),t}(),we=r(782);function Ae(e){return(Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fe(e,t){return!t||"object"!==Ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Be(e,t){return(Be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Ce=r.n(we).a.Zlib,Ue={Deflate:Ce.Zip.CompressionMethod.DEFLATE,"None (Store)":Ce.Zip.CompressionMethod.STORE},Se={MSDOS:Ce.Zip.OperatingSystem.MSDOS,Unix:Ce.Zip.OperatingSystem.UNIX,Macintosh:Ce.Zip.OperatingSystem.MACINTOSH},Oe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Fe(this,Ee(t).call(this))).name="Zip",e.module="Compression",e.description="Compresses data using the PKZIP algorithm with the given filename.<br><br>No support for multiple files at this time.",e.infoURL="https://wikipedia.org/wiki/Zip_(file_format)",e.inputType="ArrayBuffer",e.outputType="File",e.args=[{name:"Filename",type:"string",value:"file.txt"},{name:"Comment",type:"string",value:""},{name:"Password",type:"binaryString",value:""},{name:"Compression method",type:"option",value:["Deflate","None (Store)"]},{name:"Operating system",type:"option",value:["MSDOS","Unix","Macintosh"]},{name:"Compression type",type:"option",value:F}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Be(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=t[0],n=W.a.strToByteArray(t[2]),i={filename:W.a.strToByteArray(r),comment:W.a.strToByteArray(t[1]),compressionMethod:Ue[t[3]],os:Se[t[4]],deflateOption:{compressionType:B[t[5]]}},a=new Ce.Zip;return n.length&&a.setPassword(n),a.addFile(new Uint8Array(e),i),new File([a.compress()],r)}}])&&ke(r.prototype,i),a&&ke(r,a),t}();function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xe(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Ne=y.a.Zlib,Ie=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=xe(this,_e(t).call(this))).name="Zlib Deflate",e.module="Compression",e.description="Compresses data using the deflate algorithm adding zlib headers.",e.infoURL="https://wikipedia.org/wiki/Zlib",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[{name:"Compression type",type:"option",value:F}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new Ne.Deflate(new Uint8Array(e),{compressionType:B[t[0]]});return new Uint8Array(r.compress()).buffer}}])&&Te(r.prototype,i),a&&Te(r,a),t}();function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Le(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/var Ze=y.a.Zlib,Ge={Adaptive:Ze.Inflate.BufferType.ADAPTIVE,Block:Ze.Inflate.BufferType.BLOCK},He=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Le(this,ze(t).call(this))).name="Zlib Inflate",e.module="Compression",e.description="Decompresses data which has been compressed using the deflate algorithm with zlib headers.",e.infoURL="https://wikipedia.org/wiki/Zlib",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.args=[{name:"Start index",type:"number",value:0},{name:"Initial output buffer size",type:"number",value:0},{name:"Buffer expansion type",type:"option",value:E},{name:"Resize buffer after decompression",type:"boolean",value:!1},{name:"Verify result",type:"boolean",value:!1}],e.patterns=[{match:"^\\x78(\\x01|\\x9c|\\xda|\\x5e)",flags:"",args:[0,0,"Adaptive",!1,!1]}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Me(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(e,t){var r=new Ze.Inflate(new Uint8Array(e),{index:t[0],bufferSize:t[1],bufferType:Ge[t[2]],resize:t[3],verify:t[4]});return new Uint8Array(r.decompress()).buffer}}])&&Pe(r.prototype,i),a&&Pe(r,a),t}(),Ye="undefined"==typeof self?{}:self.OpModules||{};Ye.Compression={"Bzip2 Decompress":h,Gunzip:A,Gzip:x,"Raw Deflate":M,"Raw Inflate":K,Tar:ne,Untar:ce,Unzip:me,Zip:Oe,"Zlib Deflate":Ie,"Zlib Inflate":He};t.default=Ye},159:function(e,t){
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";function e(e){throw e}var t=void 0,r=!0,n=this;function i(e,r){var i,a=e.split("."),o=n;!(a[0]in o)&&o.execScript&&o.execScript("var "+a[0]);for(;a.length&&(i=a.shift());)a.length||r===t?o=o[i]?o[i]:o[i]={}:o[i]=r}var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function o(t,r){this.index="number"==typeof r?r:0,this.m=0,this.buffer=t instanceof(a?Uint8Array:Array)?t:new(a?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&e(Error("invalid index")),this.buffer.length<=this.index&&this.f()}o.prototype.f=function(){var e,t=this.buffer,r=t.length,n=new(a?Uint8Array:Array)(r<<1);if(a)n.set(t);else for(e=0;e<r;++e)n[e]=t[e];return this.buffer=n},o.prototype.d=function(e,t,r){var n,i=this.buffer,a=this.index,o=this.m,u=i[a];if(r&&1<t&&(e=8<t?(h[255&e]<<24|h[e>>>8&255]<<16|h[e>>>16&255]<<8|h[e>>>24&255])>>32-t:h[e]>>8-t),8>t+o)u=u<<t|e,o+=t;else for(n=0;n<t;++n)u=u<<1|e>>t-n-1&1,8==++o&&(o=0,i[a++]=h[u],u=0,a===i.length&&(i=this.f()));i[a]=u,this.buffer=i,this.m=o,this.index=a},o.prototype.finish=function(){var e,t=this.buffer,r=this.index;return 0<this.m&&(t[r]<<=8-this.m,t[r]=h[t[r]],r++),a?e=t.subarray(0,r):(t.length=r,e=t),e};var u,s=new(a?Uint8Array:Array)(256);for(u=0;256>u;++u){for(var f=l=u,c=7,l=l>>>1;l;l>>>=1)f<<=1,f|=1&l,--c;s[u]=(f<<c&255)>>>0}var h=s;function p(e,t,r){var n,i="number"==typeof t?t:t=0,a="number"==typeof r?r:e.length;for(n=-1,i=7&a;i--;++t)n=n>>>8^b[255&(n^e[t])];for(i=a>>3;i--;t+=8)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^b[255&(n^e[t])])>>>8^b[255&(n^e[t+1])])>>>8^b[255&(n^e[t+2])])>>>8^b[255&(n^e[t+3])])>>>8^b[255&(n^e[t+4])])>>>8^b[255&(n^e[t+5])])>>>8^b[255&(n^e[t+6])])>>>8^b[255&(n^e[t+7])];return(4294967295^n)>>>0}var y=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],b=a?new Uint32Array(y):y;function g(){}function d(e){this.buffer=new(a?Uint16Array:Array)(2*e),this.length=0}function v(e){var t,r,n,i,o,u,s,f,c,l,h=e.length,p=0,y=Number.POSITIVE_INFINITY;for(f=0;f<h;++f)e[f]>p&&(p=e[f]),e[f]<y&&(y=e[f]);for(t=1<<p,r=new(a?Uint32Array:Array)(t),n=1,i=0,o=2;n<=p;){for(f=0;f<h;++f)if(e[f]===n){for(u=0,s=i,c=0;c<n;++c)u=u<<1|1&s,s>>=1;for(l=n<<16|f,c=u;c<t;c+=o)r[c]=l;++i}++n,i<<=1,o<<=1}return[r,p,y]}function m(e,t){this.k=A,this.I=0,this.input=a&&e instanceof Array?new Uint8Array(e):e,this.b=0,t&&(t.lazy&&(this.I=t.lazy),"number"==typeof t.compressionType&&(this.k=t.compressionType),t.outputBuffer&&(this.a=a&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.b=t.outputIndex)),this.a||(this.a=new(a?Uint8Array:Array)(32768))}g.prototype.getName=function(){return this.name},g.prototype.getData=function(){return this.data},g.prototype.X=function(){return this.Y},d.prototype.getParent=function(e){return 2*((e-2)/4|0)},d.prototype.push=function(e,t){var r,n,i,a=this.buffer;for(r=this.length,a[this.length++]=t,a[this.length++]=e;0<r&&(n=this.getParent(r),a[r]>a[n]);)i=a[r],a[r]=a[n],a[n]=i,i=a[r+1],a[r+1]=a[n+1],a[n+1]=i,r=n;return this.length},d.prototype.pop=function(){var e,t,r,n,i,a=this.buffer;for(t=a[0],e=a[1],this.length-=2,a[0]=a[this.length],a[1]=a[this.length+1],i=0;!((n=2*i+2)>=this.length)&&(n+2<this.length&&a[n+2]>a[n]&&(n+=2),a[n]>a[i]);)r=a[i],a[i]=a[n],a[n]=r,r=a[i+1],a[i+1]=a[n+1],a[n+1]=r,i=n;return{index:e,value:t,length:this.length}};var w,A=2,k={NONE:0,v:1,o:A,aa:3},F=[];for(w=0;288>w;w++)switch(r){case 143>=w:F.push([w+48,8]);break;case 255>=w:F.push([w-144+400,9]);break;case 279>=w:F.push([w-256+0,7]);break;case 287>=w:F.push([w-280+192,8]);break;default:e("invalid literal: "+w)}function E(e,t){this.length=e,this.P=t}m.prototype.g=function(){var n,i,u,s,f=this.input;switch(this.k){case 0:for(u=0,s=f.length;u<s;){var c,l,h,p=i=a?f.subarray(u,u+65535):f.slice(u,u+65535),y=(u+=i.length)===s,b=t,g=t,d=this.a,v=this.b;if(a){for(d=new Uint8Array(this.a.buffer);d.length<=v+p.length+5;)d=new Uint8Array(d.length<<1);d.set(this.a)}if(c=y?1:0,d[v++]=0|c,h=65536+~(l=p.length)&65535,d[v++]=255&l,d[v++]=l>>>8&255,d[v++]=255&h,d[v++]=h>>>8&255,a)d.set(p,v),v+=p.length,d=d.subarray(0,v);else{for(b=0,g=p.length;b<g;++b)d[v++]=p[b];d.length=v}this.b=v,this.a=d}break;case 1:var m=new o(a?new Uint8Array(this.a.buffer):this.a,this.b);m.d(1,1,r),m.d(1,2,r);var w,k,E,B=U(this,f);for(w=0,k=B.length;w<k;w++)if(E=B[w],o.prototype.d.apply(m,F[E]),256<E)m.d(B[++w],B[++w],r),m.d(B[++w],5),m.d(B[++w],B[++w],r);else if(256===E)break;this.a=m.finish(),this.b=this.a.length;break;case A:var C,S,T,x,_,R,N,I,j,P,L,z,M,Z,G,H=new o(a?new Uint8Array(this.a.buffer):this.a,this.b),Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=Array(19);for(C=A,H.d(1,1,r),H.d(C,2,r),S=U(this,f),N=D(R=O(this.V,15)),j=D(I=O(this.U,7)),T=286;257<T&&0===R[T-1];T--);for(x=30;1<x&&0===I[x-1];x--);var q,J,$,K,W,X,Q=T,ee=x,te=new(a?Uint32Array:Array)(Q+ee),re=new(a?Uint32Array:Array)(316),ne=new(a?Uint8Array:Array)(19);for(q=J=0;q<Q;q++)te[J++]=R[q];for(q=0;q<ee;q++)te[J++]=I[q];if(!a)for(q=0,K=ne.length;q<K;++q)ne[q]=0;for(q=W=0,K=te.length;q<K;q+=J){for(J=1;q+J<K&&te[q+J]===te[q];++J);if($=J,0===te[q])if(3>$)for(;0<$--;)re[W++]=0,ne[0]++;else for(;0<$;)(X=138>$?$:138)>$-3&&X<$&&(X=$-3),10>=X?(re[W++]=17,re[W++]=X-3,ne[17]++):(re[W++]=18,re[W++]=X-11,ne[18]++),$-=X;else if(re[W++]=te[q],ne[te[q]]++,3>--$)for(;0<$--;)re[W++]=te[q],ne[te[q]]++;else for(;0<$;)(X=6>$?$:6)>$-3&&X<$&&(X=$-3),re[W++]=16,re[W++]=X-3,ne[16]++,$-=X}for(n=a?re.subarray(0,W):re.slice(0,W),P=O(ne,7),Z=0;19>Z;Z++)V[Z]=P[Y[Z]];for(_=19;4<_&&0===V[_-1];_--);for(L=D(P),H.d(T-257,5,r),H.d(x-1,5,r),H.d(_-4,4,r),Z=0;Z<_;Z++)H.d(V[Z],3,r);for(Z=0,G=n.length;Z<G;Z++)if(z=n[Z],H.d(L[z],P[z],r),16<=z){switch(Z++,z){case 16:M=2;break;case 17:M=3;break;case 18:M=7;break;default:e("invalid code: "+z)}H.d(n[Z],M,r)}var ie,ae,oe,ue,se,fe,ce,le,he=[N,R],pe=[j,I];for(se=he[0],fe=he[1],ce=pe[0],le=pe[1],ie=0,ae=S.length;ie<ae;++ie)if(oe=S[ie],H.d(se[oe],fe[oe],r),256<oe)H.d(S[++ie],S[++ie],r),ue=S[++ie],H.d(ce[ue],le[ue],r),H.d(S[++ie],S[++ie],r);else if(256===oe)break;this.a=H.finish(),this.b=this.a.length;break;default:e("invalid compression type")}return this.a};var B=function(){function t(t){switch(r){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n,i,a=[];for(n=3;258>=n;n++)i=t(n),a[n]=i[2]<<24|i[1]<<16|i[0];return a}(),C=a?new Uint32Array(B):B;function U(n,i){function o(t,n){var i,a,o,u,s=t.P,f=[],c=0;switch(i=C[t.length],f[c++]=65535&i,f[c++]=i>>16&255,f[c++]=i>>24,r){case 1===s:a=[0,s-1,0];break;case 2===s:a=[1,s-2,0];break;case 3===s:a=[2,s-3,0];break;case 4===s:a=[3,s-4,0];break;case 6>=s:a=[4,s-5,1];break;case 8>=s:a=[5,s-7,1];break;case 12>=s:a=[6,s-9,2];break;case 16>=s:a=[7,s-13,2];break;case 24>=s:a=[8,s-17,3];break;case 32>=s:a=[9,s-25,3];break;case 48>=s:a=[10,s-33,4];break;case 64>=s:a=[11,s-49,4];break;case 96>=s:a=[12,s-65,5];break;case 128>=s:a=[13,s-97,5];break;case 192>=s:a=[14,s-129,6];break;case 256>=s:a=[15,s-193,6];break;case 384>=s:a=[16,s-257,7];break;case 512>=s:a=[17,s-385,7];break;case 768>=s:a=[18,s-513,8];break;case 1024>=s:a=[19,s-769,8];break;case 1536>=s:a=[20,s-1025,9];break;case 2048>=s:a=[21,s-1537,9];break;case 3072>=s:a=[22,s-2049,10];break;case 4096>=s:a=[23,s-3073,10];break;case 6144>=s:a=[24,s-4097,11];break;case 8192>=s:a=[25,s-6145,11];break;case 12288>=s:a=[26,s-8193,12];break;case 16384>=s:a=[27,s-12289,12];break;case 24576>=s:a=[28,s-16385,13];break;case 32768>=s:a=[29,s-24577,13];break;default:e("invalid distance")}for(i=a,f[c++]=i[0],f[c++]=i[1],f[c++]=i[2],o=0,u=f.length;o<u;++o)d[v++]=f[o];w[f[0]]++,A[f[3]]++,m=t.length+n-1,y=null}var u,s,f,c,l,h,p,y,b,g={},d=a?new Uint16Array(2*i.length):[],v=0,m=0,w=new(a?Uint32Array:Array)(286),A=new(a?Uint32Array:Array)(30),k=n.I;if(!a){for(f=0;285>=f;)w[f++]=0;for(f=0;29>=f;)A[f++]=0}for(w[256]=1,u=0,s=i.length;u<s;++u){for(f=l=0,c=3;f<c&&u+f!==s;++f)l=l<<8|i[u+f];if(g[l]===t&&(g[l]=[]),h=g[l],!(0<m--)){for(;0<h.length&&32768<u-h[0];)h.shift();if(u+3>=s){for(y&&o(y,-1),f=0,c=s-u;f<c;++f)b=i[u+f],d[v++]=b,++w[b];break}0<h.length?(p=S(i,u,h),y?y.length<p.length?(b=i[u-1],d[v++]=b,++w[b],o(p,0)):o(y,-1):p.length<k?y=p:o(p,0)):y?o(y,-1):(b=i[u],d[v++]=b,++w[b])}h.push(u)}return d[v++]=256,w[256]++,n.V=w,n.U=A,a?d.subarray(0,v):d}function S(e,t,r){var n,i,a,o,u,s,f=0,c=e.length;o=0,s=r.length;e:for(;o<s;o++){if(n=r[s-o-1],a=3,3<f){for(u=f;3<u;u--)if(e[n+u-1]!==e[t+u-1])continue e;a=f}for(;258>a&&t+a<c&&e[n+a]===e[t+a];)++a;if(a>f&&(i=n,f=a),258===a)break}return new E(f,t-i)}function O(e,t){var r,n,i,o,u,s=e.length,f=new d(572),c=new(a?Uint8Array:Array)(s);if(!a)for(o=0;o<s;o++)c[o]=0;for(o=0;o<s;++o)0<e[o]&&f.push(o,e[o]);if(r=Array(f.length/2),n=new(a?Uint32Array:Array)(f.length/2),1===r.length)return c[f.pop().index]=1,c;for(o=0,u=f.length/2;o<u;++o)r[o]=f.pop(),n[o]=r[o].value;for(i=function(e,t,r){function n(e){var r=y[e][b[e]];r===t?(n(e+1),n(e+1)):--h[r],++b[e]}var i,o,u,s,f,c=new(a?Uint16Array:Array)(r),l=new(a?Uint8Array:Array)(r),h=new(a?Uint8Array:Array)(t),p=Array(r),y=Array(r),b=Array(r),g=(1<<r)-t,d=1<<r-1;for(c[r-1]=t,o=0;o<r;++o)g<d?l[o]=0:(l[o]=1,g-=d),g<<=1,c[r-2-o]=(c[r-1-o]/2|0)+t;for(c[0]=l[0],p[0]=Array(c[0]),y[0]=Array(c[0]),o=1;o<r;++o)c[o]>2*c[o-1]+l[o]&&(c[o]=2*c[o-1]+l[o]),p[o]=Array(c[o]),y[o]=Array(c[o]);for(i=0;i<t;++i)h[i]=r;for(u=0;u<c[r-1];++u)p[r-1][u]=e[u],y[r-1][u]=u;for(i=0;i<r;++i)b[i]=0;for(1===l[r-1]&&(--h[0],++b[r-1]),o=r-2;0<=o;--o){for(s=i=0,f=b[o+1],u=0;u<c[o];u++)(s=p[o+1][f]+p[o+1][f+1])>e[i]?(p[o][u]=s,y[o][u]=t,f+=2):(p[o][u]=e[i],y[o][u]=i,++i);b[o]=0,1===l[o]&&n(o)}return h}(n,n.length,t),o=0,u=r.length;o<u;++o)c[r[o].index]=i[o];return c}function D(e){var t,r,n,i,o=new(a?Uint16Array:Array)(e.length),u=[],s=[],f=0;for(t=0,r=e.length;t<r;t++)u[e[t]]=1+(0|u[e[t]]);for(t=1,r=16;t<=r;t++)s[t]=f,f+=0|u[t],f<<=1;for(t=0,r=e.length;t<r;t++)for(f=s[e[t]],s[e[t]]+=1,n=o[t]=0,i=e[t];n<i;n++)o[t]=o[t]<<1|1&f,f>>>=1;return o}function T(e,t){this.input=e,this.b=this.c=0,this.i={},t&&(t.flags&&(this.i=t.flags),"string"==typeof t.filename&&(this.filename=t.filename),"string"==typeof t.comment&&(this.A=t.comment),t.deflateOptions&&(this.l=t.deflateOptions)),this.l||(this.l={})}T.prototype.g=function(){var e,r,n,i,o,u,s,f,c=new(a?Uint8Array:Array)(32768),l=0,h=this.input,y=this.c,b=this.filename,g=this.A;if(c[l++]=31,c[l++]=139,c[l++]=8,e=0,this.i.fname&&(e|=R),this.i.fcomment&&(e|=N),this.i.fhcrc&&(e|=_),c[l++]=e,r=(Date.now?Date.now():+new Date)/1e3|0,c[l++]=255&r,c[l++]=r>>>8&255,c[l++]=r>>>16&255,c[l++]=r>>>24&255,c[l++]=0,c[l++]=x,this.i.fname!==t){for(s=0,f=b.length;s<f;++s)255<(u=b.charCodeAt(s))&&(c[l++]=u>>>8&255),c[l++]=255&u;c[l++]=0}if(this.i.comment){for(s=0,f=g.length;s<f;++s)255<(u=g.charCodeAt(s))&&(c[l++]=u>>>8&255),c[l++]=255&u;c[l++]=0}return this.i.fhcrc&&(n=65535&p(c,0,l),c[l++]=255&n,c[l++]=n>>>8&255),this.l.outputBuffer=c,this.l.outputIndex=l,c=(o=new m(h,this.l)).g(),l=o.b,a&&(l+8>c.buffer.byteLength?(this.a=new Uint8Array(l+8),this.a.set(new Uint8Array(c.buffer)),c=this.a):c=new Uint8Array(c.buffer)),i=p(h,t,t),c[l++]=255&i,c[l++]=i>>>8&255,c[l++]=i>>>16&255,c[l++]=i>>>24&255,f=h.length,c[l++]=255&f,c[l++]=f>>>8&255,c[l++]=f>>>16&255,c[l++]=f>>>24&255,this.c=y,a&&l<c.length&&(this.a=c=c.subarray(0,l)),c};var x=255,_=2,R=8,N=16;function I(t,r){switch(this.p=[],this.q=32768,this.e=this.j=this.c=this.u=0,this.input=a?new Uint8Array(t):t,this.w=!1,this.r=P,this.L=!1,!r&&(r={})||(r.index&&(this.c=r.index),r.bufferSize&&(this.q=r.bufferSize),r.bufferType&&(this.r=r.bufferType),r.resize&&(this.L=r.resize)),this.r){case j:this.b=32768,this.a=new(a?Uint8Array:Array)(32768+this.q+258);break;case P:this.b=0,this.a=new(a?Uint8Array:Array)(this.q),this.f=this.T,this.B=this.Q,this.s=this.S;break;default:e(Error("invalid inflate mode"))}}var j=0,P=1,L={N:j,M:P};I.prototype.h=function(){for(;!this.w;){var n=ie(this,3);switch(1&n&&(this.w=r),n>>>=1){case 0:var i=this.input,o=this.c,u=this.a,s=this.b,f=i.length,c=t,l=u.length,h=t;switch(this.e=this.j=0,o+1>=f&&e(Error("invalid uncompressed block header: LEN")),c=i[o++]|i[o++]<<8,o+1>=f&&e(Error("invalid uncompressed block header: NLEN")),c===~(i[o++]|i[o++]<<8)&&e(Error("invalid uncompressed block header: length verify")),o+c>i.length&&e(Error("input buffer is broken")),this.r){case j:for(;s+c>u.length;){if(c-=h=l-s,a)u.set(i.subarray(o,o+h),s),s+=h,o+=h;else for(;h--;)u[s++]=i[o++];this.b=s,u=this.f(),s=this.b}break;case P:for(;s+c>u.length;)u=this.f({F:2});break;default:e(Error("invalid inflate mode"))}if(a)u.set(i.subarray(o,o+c),s),s+=c,o+=c;else for(;c--;)u[s++]=i[o++];this.c=o,this.b=s,this.a=u;break;case 1:this.s(te,ne);break;case 2:var p,y,b,g,d=ie(this,5)+257,m=ie(this,5)+1,w=ie(this,4)+4,A=new(a?Uint8Array:Array)(G.length),k=t,F=t,E=t,B=t,C=t;for(C=0;C<w;++C)A[G[C]]=ie(this,3);if(!a)for(C=w,w=A.length;C<w;++C)A[G[C]]=0;for(p=v(A),k=new(a?Uint8Array:Array)(d+m),C=0,g=d+m;C<g;)switch(F=ae(this,p),F){case 16:for(B=3+ie(this,2);B--;)k[C++]=E;break;case 17:for(B=3+ie(this,3);B--;)k[C++]=0;E=0;break;case 18:for(B=11+ie(this,7);B--;)k[C++]=0;E=0;break;default:E=k[C++]=F}y=v(a?k.subarray(0,d):k.slice(0,d)),b=v(a?k.subarray(d):k.slice(d)),this.s(y,b);break;default:e(Error("unknown BTYPE: "+n))}}return this.B()};var z,M,Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=a?new Uint16Array(Z):Z,H=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],Y=a?new Uint16Array(H):H,V=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],q=a?new Uint8Array(V):V,J=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],$=a?new Uint16Array(J):J,K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=a?new Uint8Array(K):K,X=new(a?Uint8Array:Array)(288);for(z=0,M=X.length;z<M;++z)X[z]=143>=z?8:255>=z?9:279>=z?7:8;var Q,ee,te=v(X),re=new(a?Uint8Array:Array)(30);for(Q=0,ee=re.length;Q<ee;++Q)re[Q]=5;var ne=v(re);function ie(t,r){for(var n,i=t.j,a=t.e,o=t.input,u=t.c,s=o.length;a<r;)u>=s&&e(Error("input buffer is broken")),i|=o[u++]<<a,a+=8;return n=i&(1<<r)-1,t.j=i>>>r,t.e=a-r,t.c=u,n}function ae(t,r){for(var n,i,a=t.j,o=t.e,u=t.input,s=t.c,f=u.length,c=r[0],l=r[1];o<l&&!(s>=f);)a|=u[s++]<<o,o+=8;return(i=(n=c[a&(1<<l)-1])>>>16)>o&&e(Error("invalid code length: "+i)),t.j=a>>i,t.e=o-i,t.c=s,65535&n}function oe(e){this.input=e,this.c=0,this.t=[],this.D=!1}function ue(e){if("string"==typeof e){var t,r,n=e.split("");for(t=0,r=n.length;t<r;t++)n[t]=(255&n[t].charCodeAt(0))>>>0;e=n}for(var i,a=1,o=0,u=e.length,s=0;0<u;){u-=i=1024<u?1024:u;do{o+=a+=e[s++]}while(--i);a%=65521,o%=65521}return(o<<16|a)>>>0}function se(t,r){var n,i;switch(this.input=t,this.c=0,!r&&(r={})||(r.index&&(this.c=r.index),r.verify&&(this.Z=r.verify)),n=t[this.c++],i=t[this.c++],15&n){case fe:this.method=fe;break;default:e(Error("unsupported compression method"))}0!=((n<<8)+i)%31&&e(Error("invalid fcheck flag:"+((n<<8)+i)%31)),32&i&&e(Error("fdict flag is not supported")),this.K=new I(t,{index:this.c,bufferSize:r.bufferSize,bufferType:r.bufferType,resize:r.resize})}I.prototype.s=function(e,t){var r=this.a,n=this.b;this.C=e;for(var i,a,o,u,s=r.length-258;256!==(i=ae(this,e));)if(256>i)n>=s&&(this.b=n,r=this.f(),n=this.b),r[n++]=i;else for(u=Y[a=i-257],0<q[a]&&(u+=ie(this,q[a])),i=ae(this,t),o=$[i],0<W[i]&&(o+=ie(this,W[i])),n>=s&&(this.b=n,r=this.f(),n=this.b);u--;)r[n]=r[n++-o];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},I.prototype.S=function(e,t){var r=this.a,n=this.b;this.C=e;for(var i,a,o,u,s=r.length;256!==(i=ae(this,e));)if(256>i)n>=s&&(s=(r=this.f()).length),r[n++]=i;else for(u=Y[a=i-257],0<q[a]&&(u+=ie(this,q[a])),i=ae(this,t),o=$[i],0<W[i]&&(o+=ie(this,W[i])),n+u>s&&(s=(r=this.f()).length);u--;)r[n]=r[n++-o];for(;8<=this.e;)this.e-=8,this.c--;this.b=n},I.prototype.f=function(){var e,t,r=new(a?Uint8Array:Array)(this.b-32768),n=this.b-32768,i=this.a;if(a)r.set(i.subarray(32768,r.length));else for(e=0,t=r.length;e<t;++e)r[e]=i[e+32768];if(this.p.push(r),this.u+=r.length,a)i.set(i.subarray(n,n+32768));else for(e=0;32768>e;++e)i[e]=i[n+e];return this.b=32768,i},I.prototype.T=function(e){var t,r,n,i=this.input.length/this.c+1|0,o=this.input,u=this.a;return e&&("number"==typeof e.F&&(i=e.F),"number"==typeof e.O&&(i+=e.O)),2>i?r=(n=(o.length-this.c)/this.C[2]/2*258|0)<u.length?u.length+n:u.length<<1:r=u.length*i,a?(t=new Uint8Array(r)).set(u):t=u,this.a=t},I.prototype.B=function(){var e,t,r,n,i,o=0,u=this.a,s=this.p,f=new(a?Uint8Array:Array)(this.u+(this.b-32768));if(0===s.length)return a?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(t=0,r=s.length;t<r;++t)for(n=0,i=(e=s[t]).length;n<i;++n)f[o++]=e[n];for(t=32768,r=this.b;t<r;++t)f[o++]=u[t];return this.p=[],this.buffer=f},I.prototype.Q=function(){var e,t=this.b;return a?this.L?(e=new Uint8Array(t)).set(this.a.subarray(0,t)):e=this.a.subarray(0,t):(this.a.length>t&&(this.a.length=t),e=this.a),this.buffer=e},oe.prototype.W=function(){return this.D||this.h(),this.t.slice()},oe.prototype.h=function(){for(var n=this.input.length;this.c<n;){var i,o,u=new g,s=t,f=t,c=t,l=t,h=t,y=t,b=t,d=this.input,v=this.c;switch(u.G=d[v++],u.H=d[v++],(31!==u.G||139!==u.H)&&e(Error("invalid file signature:"+u.G+","+u.H)),u.z=d[v++],u.z){case 8:break;default:e(Error("unknown compression method: "+u.z))}if(u.n=d[v++],o=d[v++]|d[v++]<<8|d[v++]<<16|d[v++]<<24,u.Y=new Date(1e3*o),u.ea=d[v++],u.da=d[v++],0<(4&u.n)&&(u.$=d[v++]|d[v++]<<8,v+=u.$),0<(u.n&R)){for(y=[],h=0;0<(l=d[v++]);)y[h++]=String.fromCharCode(l);u.name=y.join("")}if(0<(u.n&N)){for(y=[],h=0;0<(l=d[v++]);)y[h++]=String.fromCharCode(l);u.A=y.join("")}0<(u.n&_)&&(u.R=65535&p(d,0,v),u.R!==(d[v++]|d[v++]<<8)&&e(Error("invalid header crc16"))),s=d[d.length-4]|d[d.length-3]<<8|d[d.length-2]<<16|d[d.length-1]<<24,d.length-v-4-4<512*s&&(c=s),f=new I(d,{index:v,bufferSize:c}),u.data=i=f.h(),v=f.c,u.ba=b=(d[v++]|d[v++]<<8|d[v++]<<16|d[v++]<<24)>>>0,p(i,t,t)!==b&&e(Error("invalid CRC-32 checksum: 0x"+p(i,t,t).toString(16)+" / 0x"+b.toString(16))),u.ca=s=(d[v++]|d[v++]<<8|d[v++]<<16|d[v++]<<24)>>>0,(4294967295&i.length)!==s&&e(Error("invalid input size: "+(4294967295&i.length)+" / "+s)),this.t.push(u),this.c=v}this.D=r;var m,w,A,k=this.t,F=0,E=0;for(m=0,w=k.length;m<w;++m)E+=k[m].data.length;if(a)for(A=new Uint8Array(E),m=0;m<w;++m)A.set(k[m].data,F),F+=k[m].data.length;else{for(A=[],m=0;m<w;++m)A[m]=k[m].data;A=Array.prototype.concat.apply([],A)}return A},se.prototype.h=function(){var t,r=this.input;return t=this.K.h(),this.c=this.K.c,this.Z&&((r[this.c++]<<24|r[this.c++]<<16|r[this.c++]<<8|r[this.c++])>>>0!==ue(t)&&e(Error("invalid adler-32 checksum"))),t};var fe=8;function ce(e,t){this.input=e,this.a=new(a?Uint8Array:Array)(32768),this.k=le.o;var r,n={};for(r in!t&&(t={})||"number"!=typeof t.compressionType||(this.k=t.compressionType),t)n[r]=t[r];n.outputBuffer=this.a,this.J=new m(this.input,n)}var le=k;function he(e,t){var r,n,a,o;if(Object.keys)r=Object.keys(t);else for(n in r=[],a=0,t)r[a++]=n;for(a=0,o=r.length;a<o;++a)i(e+"."+(n=r[a]),t[n])}ce.prototype.g=function(){var t,r,n,i,o,u,s,f=0;switch(s=this.a,t=fe){case fe:r=Math.LOG2E*Math.log(32768)-8;break;default:e(Error("invalid compression method"))}switch(n=r<<4|t,s[f++]=n,t){case fe:switch(this.k){case le.NONE:o=0;break;case le.v:o=1;break;case le.o:o=2;break;default:e(Error("unsupported compression type"))}break;default:e(Error("invalid compression method"))}return i=o<<6|0,s[f++]=i|31-(256*n+i)%31,u=ue(this.input),this.J.b=f,f=(s=this.J.g()).length,a&&((s=new Uint8Array(s.buffer)).length<=f+4&&(this.a=new Uint8Array(s.length+4),this.a.set(s),s=this.a),s=s.subarray(0,f+4)),s[f++]=u>>24&255,s[f++]=u>>16&255,s[f++]=u>>8&255,s[f++]=255&u,s},i("Zlib.Inflate",se),i("Zlib.Inflate.prototype.decompress",se.prototype.h),he("Zlib.Inflate.BufferType",{ADAPTIVE:L.M,BLOCK:L.N}),i("Zlib.Deflate",ce),i("Zlib.Deflate.compress",function(e,t){return new ce(e,t).g()}),i("Zlib.Deflate.prototype.compress",ce.prototype.g),he("Zlib.Deflate.CompressionType",{NONE:le.NONE,FIXED:le.v,DYNAMIC:le.o}),i("Zlib.Gzip",T),i("Zlib.Gzip.prototype.compress",T.prototype.g),i("Zlib.Gunzip",oe),i("Zlib.Gunzip.prototype.decompress",oe.prototype.h),i("Zlib.Gunzip.prototype.getMembers",oe.prototype.W),i("Zlib.GunzipMember",g),i("Zlib.GunzipMember.prototype.getName",g.prototype.getName),i("Zlib.GunzipMember.prototype.getData",g.prototype.getData),i("Zlib.GunzipMember.prototype.getMtime",g.prototype.X)}).call(this)},18:function(e,t,r){"use strict";r.d(t,"b",function(){return i}),r.d(t,"a",function(){return a});var n=r(0);
/**
* Binary functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(!e)return"";t=n.a.charRep(t);for(var i="",a=0;a<e.length;a++)i+=e[a].toString(2).padStart(r,"0")+t;return t.length?i.slice(0,-t.length):i}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,i=n.a.regexRep(t);e=e.replace(i,"");for(var a=[],o=0;o<e.length;o+=r)a.push(parseInt(e.substr(o,r),2));return a}},19:function(e,t,r){"use strict";r.d(t,"a",function(){return i});var n=r(0);
/**
* Decimal functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";t=n.a.charRep(t);var r=[],i=e.split(t);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var a=0;a<i.length;a++)r[a]=parseInt(i[a],10);return r}},3:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}
/**
* Custom error type for handling operation input errors.
* i.e. where the operation can handle the error and print a message to the screen.
*
* @author d98762625 [d98762625@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/var s=function(e){function t(){var e,r,a,u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var s=arguments.length,f=new Array(s),c=0;c<s;c++)f[c]=arguments[c];return a=this,(r=!(u=(e=i(t)).call.apply(e,[this].concat(f)))||"object"!==n(u)&&"function"!=typeof u?o(a):u).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(o(o(r)),t),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,u(Error)),t}();t.a=s},4:function(e,t,r){var n;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,s=Math.floor,f="[BigNumber Error] ",c=f+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,p=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,g=1e9;function d(e){var t=0|e;return e>0||e===t?t:t-1}function v(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=h-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function m(e,t){var r,n,i=e.c,a=t.c,o=e.s,u=t.s,s=e.e,f=t.e;if(!o||!u)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-u:o;if(o!=u)return o;if(r=o<0,n=s==f,!i||!a)return n?0:!i^r?1:-1;if(!n)return s>f^r?1:-1;for(u=(s=i.length)<(f=a.length)?s:f,o=0;o<u;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return s==f?0:s>f^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==(e<0?u(e):s(e)))throw Error(f+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function A(e){var t=e.c.length-1;return d(e.e/h)==t&&e.c[t]%2!=0}function k(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function F(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(a=function e(t){var r,n,i,a,E,B,C,U,S,O=Z.prototype={constructor:Z,toString:null,valueOf:null},D=new Z(1),T=20,x=4,_=-7,R=21,N=-1e7,I=1e7,j=!1,P=1,L=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz";function Z(e,t){var r,a,u,f,l,y,b,g,d=this;if(!(d instanceof Z))return new Z(e,t);if(null==t){if(e instanceof Z)return d.s=e.s,d.e=e.e,void(d.c=(e=e.c)?e.slice():e);if((y="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(f=0,l=e;l>=10;l/=10,f++);return d.e=f,void(d.c=[e])}g=String(e)}else{if(g=String(e),!o.test(g))return i(d,g,y);d.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(f=g.indexOf("."))>-1&&(g=g.replace(".","")),(l=g.search(/e/i))>0?(f<0&&(f=l),f+=+g.slice(l+1),g=g.substring(0,l)):f<0&&(f=g.length)}else{if(w(t,2,M.length,"Base"),g=String(e),10==t)return V(d=new Z(e instanceof Z?e:g),T+d.e+1,x);if(y="number"==typeof e){if(0*e!=0)return i(d,g,y,t);if(d.s=1/e<0?(g=g.slice(1),-1):1,Z.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(c+e);y=!1}else d.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=M.slice(0,t),f=l=0,b=g.length;l<b;l++)if(r.indexOf(a=g.charAt(l))<0){if("."==a){if(l>f){f=b;continue}}else if(!u&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){u=!0,l=-1,f=0;continue}return i(d,String(e),y,t)}(f=(g=n(g,t,10,d.s)).indexOf("."))>-1?g=g.replace(".",""):f=g.length}for(l=0;48===g.charCodeAt(l);l++);for(b=g.length;48===g.charCodeAt(--b););if(g=g.slice(l,++b)){if(b-=l,y&&Z.DEBUG&&b>15&&(e>p||e!==s(e)))throw Error(c+d.s*e);if((f=f-l-1)>I)d.c=d.e=null;else if(f<N)d.c=[d.e=0];else{if(d.e=f,d.c=[],l=(f+1)%h,f<0&&(l+=h),l<b){for(l&&d.c.push(+g.slice(0,l)),b-=h;l<b;)d.c.push(+g.slice(l,l+=h));g=g.slice(l),l=h-g.length}else l-=b;for(;l--;g+="0");d.c.push(+g)}}else d.c=[d.e=0]}function G(e,t,r,n){var i,a,o,u,s;if(null==r?r=x:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)s=v(e.c),s=1==n||2==n&&(o<=_||o>=R)?k(s,o):F(s,o,"0");else if(a=(e=V(new Z(e),t,r)).e,u=(s=v(e.c)).length,1==n||2==n&&(t<=a||a<=_)){for(;u<t;s+="0",u++);s=k(s,a)}else if(t-=o,s=F(s,a,"0"),a+1>u){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=a-u)>0)for(a+1==u&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function H(e,t){for(var r,n=1,i=new Z(e[0]);n<e.length;n++){if(!(r=new Z(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function Y(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*h-1)>I?e.c=e.e=null:r<N?e.c=[e.e=0]:(e.e=r,e.c=t),e}function V(e,t,r,n){var i,a,o,f,c,p,b,g=e.c,d=y;if(g){e:{for(i=1,f=g[0];f>=10;f/=10,i++);if((a=t-i)<0)a+=h,o=t,b=(c=g[p=0])/d[i-o-1]%10|0;else if((p=u((a+1)/h))>=g.length){if(!n)break e;for(;g.length<=p;g.push(0));c=b=0,i=1,o=(a%=h)-h+1}else{for(c=f=g[p],i=1;f>=10;f/=10,i++);b=(o=(a%=h)-h+i)<0?0:c/d[i-o-1]%10|0}if(n=n||t<0||null!=g[p+1]||(o<0?c:c%d[i-o-1]),n=r<4?(b||n)&&(0==r||r==(e.s<0?3:2)):b>5||5==b&&(4==r||n||6==r&&(a>0?o>0?c/d[i-o]:0:g[p-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=d[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=p,f=1,p--):(g.length=p+1,f=d[h-a],g[p]=o>0?s(c/d[i-o]%d[o])*f:0),n)for(;;){if(0==p){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=f,f=1;o>=10;o/=10,f++);a!=f&&(e.e++,g[0]==l&&(g[0]=1));break}if(g[p]+=f,g[p]!=l)break;g[p--]=0,f=1}for(a=g.length;0===g[--a];g.pop());}e.e>I?e.c=e.e=null:e.e<N&&(e.c=[e.e=0])}return e}function q(e){var t,r=e.e;return null===r?e.toString():(t=v(e.c),t=r<=_||r>=R?k(t,r):F(t,r,"0"),e.s<0?"-"+t:t)}return Z.clone=e,Z.ROUND_UP=0,Z.ROUND_DOWN=1,Z.ROUND_CEIL=2,Z.ROUND_FLOOR=3,Z.ROUND_HALF_UP=4,Z.ROUND_HALF_DOWN=5,Z.ROUND_HALF_EVEN=6,Z.ROUND_HALF_CEIL=7,Z.ROUND_HALF_FLOOR=8,Z.EUCLID=9,Z.config=Z.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,g,t),T=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),x=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-g,0,t),w(r[1],0,g,t),_=r[0],R=r[1]):(w(r,-g,g,t),_=-(R=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-g,-1,t),w(r[1],1,g,t),N=r[0],I=r[1];else{if(w(r,-g,g,t),!r)throw Error(f+t+" cannot be zero: "+r);N=-(I=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(f+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!r,Error(f+"crypto unavailable");j=r}else j=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),P=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,g,t),L=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(f+t+" not an object: "+r);z=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+t+" invalid: "+r);M=r}}return{DECIMAL_PLACES:T,ROUNDING_MODE:x,EXPONENTIAL_AT:[_,R],RANGE:[N,I],CRYPTO:j,MODULO_MODE:P,POW_PRECISION:L,FORMAT:z,ALPHABET:M}},Z.isBigNumber=function(e){return e instanceof Z||e&&!0===e._isBigNumber||!1},Z.maximum=Z.max=function(){return H(arguments,O.lt)},Z.minimum=Z.min=function(){return H(arguments,O.gt)},Z.random=(a=9007199254740992*Math.random()&2097151?function(){return s(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,c=0,l=[],p=new Z(D);if(null==e?e=T:w(e,0,g),i=u(e/h),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(o=131072*t[c]+(t[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(l.push(o%1e14),c+=2);c=i/2}else{if(!crypto.randomBytes)throw j=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(i*=7);c<i;)(o=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(l.push(o%1e14),c+=7);c=i/7}if(!j)for(;c<i;)(o=a())<9e15&&(l[c++]=o%1e14);for(i=l[--c],e%=h,i&&e&&(o=y[h-e],l[c]=s(i/o)*o);0===l[c];l.pop(),c--);if(c<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=h);for(c=1,o=l[0];o>=10;o/=10,c++);c<h&&(n-=h-c)}return p.e=n,p.c=l,p}),Z.sum=function(){for(var e=1,t=arguments,r=new Z(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){function e(e,t,r,n){for(var i,a,o=[0],u=0,s=e.length;u<s;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(u++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(t,n,i,a,o){var u,s,f,c,l,h,p,y,b=t.indexOf("."),g=T,d=x;for(b>=0&&(c=L,L=0,t=t.replace(".",""),h=(y=new Z(n)).pow(t.length-b),L=c,y.c=e(F(v(h.c),h.e,"0"),10,i,"0123456789"),y.e=y.c.length),f=c=(p=e(t,n,i,o?(u=M,"0123456789"):(u="0123456789",M))).length;0==p[--c];p.pop());if(!p[0])return u.charAt(0);if(b<0?--f:(h.c=p,h.e=f,h.s=a,p=(h=r(h,y,g,d,i)).c,l=h.r,f=h.e),b=p[s=f+g+1],c=i/2,l=l||s<0||null!=p[s+1],l=d<4?(null!=b||l)&&(0==d||d==(h.s<0?3:2)):b>c||b==c&&(4==d||l||6==d&&1&p[s-1]||d==(h.s<0?8:7)),s<1||!p[0])t=l?F(u.charAt(1),-g,u.charAt(0)):u.charAt(0);else{if(p.length=s,l)for(--i;++p[--s]>i;)p[s]=0,s||(++f,p=[1].concat(p));for(c=p.length;!p[--c];);for(b=0,t="";b<=c;t+=u.charAt(p[b++]));t=F(t,f,u.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,a,o,u=0,s=e.length,f=t%b,c=t/b|0;for(e=e.slice();s--;)u=((i=f*(a=e[s]%b)+(n=c*a+(o=e[s]/b|0)*f)%b*b+u)/r|0)+(n/b|0)+c*o,e[s]=i%r;return u&&(e=[u].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,a,o,u){var f,c,p,y,b,g,v,m,w,A,k,F,E,B,C,U,S,O=n.s==i.s?1:-1,D=n.c,T=i.c;if(!(D&&D[0]&&T&&T[0]))return new Z(n.s&&i.s&&(D?!T||D[0]!=T[0]:T)?D&&0==D[0]||!T?0*O:O/0:NaN);for(w=(m=new Z(O)).c=[],O=a+(c=n.e-i.e)+1,u||(u=l,c=d(n.e/h)-d(i.e/h),O=O/h|0),p=0;T[p]==(D[p]||0);p++);if(T[p]>(D[p]||0)&&c--,O<0)w.push(1),y=!0;else{for(B=D.length,U=T.length,p=0,O+=2,(b=s(u/(T[0]+1)))>1&&(T=e(T,b,u),D=e(D,b,u),U=T.length,B=D.length),E=U,k=(A=D.slice(0,U)).length;k<U;A[k++]=0);S=T.slice(),S=[0].concat(S),C=T[0],T[1]>=u/2&&C++;do{if(b=0,(f=t(T,A,U,k))<0){if(F=A[0],U!=k&&(F=F*u+(A[1]||0)),(b=s(F/C))>1)for(b>=u&&(b=u-1),v=(g=e(T,b,u)).length,k=A.length;1==t(g,A,v,k);)b--,r(g,U<v?S:T,v,u),v=g.length,f=1;else 0==b&&(f=b=1),v=(g=T.slice()).length;if(v<k&&(g=[0].concat(g)),r(A,g,k,u),k=A.length,-1==f)for(;t(T,A,U,k)<1;)b++,r(A,U<k?S:T,k,u),k=A.length}else 0===f&&(b++,A=[0]);w[p++]=b,A[0]?A[k++]=D[E]||0:(A=[D[E]],k=1)}while((E++<B||null!=A[0])&&O--);y=null!=A[0],w[0]||w.splice(0,1)}if(u==l){for(p=1,O=w[0];O>=10;O/=10,p++);V(m,a+(m.e=p+c*h-1)+1,o,y)}else m.e=c,m.r=+y;return m}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,C=/^\.([^.]+)$/,U=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(S,"");if(U.test(a))e.s=isNaN(a)?null:a<0?-1:1,e.c=e.e=null;else{if(!r&&(a=a.replace(E,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,a=a.replace(B,"$1").replace(C,"0.$1")),t!=a))return new Z(a,i);if(Z.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+t);e.c=e.e=e.s=null}},O.absoluteValue=O.abs=function(){var e=new Z(this);return e.s<0&&(e.s=1),e},O.comparedTo=function(e,t){return m(this,new Z(e,t))},O.decimalPlaces=O.dp=function(e,t){var r,n,i,a=this;if(null!=e)return w(e,0,g),null==t?t=x:w(t,0,8),V(new Z(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-d(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},O.dividedBy=O.div=function(e,t){return r(this,new Z(e,t),T,x)},O.dividedToIntegerBy=O.idiv=function(e,t){return r(this,new Z(e,t),0,1)},O.exponentiatedBy=O.pow=function(e,t){var r,n,i,a,o,c,l,p,y=this;if((e=new Z(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+q(e));if(null!=t&&(t=new Z(t)),o=e.e>14,!y.c||!y.c[0]||1==y.c[0]&&!y.e&&1==y.c.length||!e.c||!e.c[0])return p=new Z(Math.pow(+q(y),o?2-A(e):+q(e))),t?p.mod(t):p;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new Z(NaN);(n=!c&&y.isInteger()&&t.isInteger())&&(y=y.mod(t))}else{if(e.e>9&&(y.e>0||y.e<-1||(0==y.e?y.c[0]>1||o&&y.c[1]>=24e7:y.c[0]<8e13||o&&y.c[0]<=9999975e7)))return a=y.s<0&&A(e)?-0:0,y.e>-1&&(a=1/a),new Z(c?1/a:a);L&&(a=u(L/h+2))}for(o?(r=new Z(.5),c&&(e.s=1),l=A(e)):l=(i=Math.abs(+q(e)))%2,p=new Z(D);;){if(l){if(!(p=p.times(y)).c)break;a?p.c.length>a&&(p.c.length=a):n&&(p=p.mod(t))}if(i){if(0===(i=s(i/2)))break;l=i%2}else if(V(e=e.times(r),e.e+1,1),e.e>14)l=A(e);else{if(0==(i=+q(e)))break;l=i%2}y=y.times(y),a?y.c&&y.c.length>a&&(y.c.length=a):n&&(y=y.mod(t))}return n?p:(c&&(p=D.div(p)),t?p.mod(t):a?V(p,L,x,void 0):p)},O.integerValue=function(e){var t=new Z(this);return null==e?e=x:w(e,0,8),V(t,t.e+1,e)},O.isEqualTo=O.eq=function(e,t){return 0===m(this,new Z(e,t))},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(e,t){return m(this,new Z(e,t))>0},O.isGreaterThanOrEqualTo=O.gte=function(e,t){return 1===(t=m(this,new Z(e,t)))||0===t},O.isInteger=function(){return!!this.c&&d(this.e/h)>this.c.length-2},O.isLessThan=O.lt=function(e,t){return m(this,new Z(e,t))<0},O.isLessThanOrEqualTo=O.lte=function(e,t){return-1===(t=m(this,new Z(e,t)))||0===t},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.minus=function(e,t){var r,n,i,a,o=this,u=o.s;if(t=(e=new Z(e,t)).s,!u||!t)return new Z(NaN);if(u!=t)return e.s=-t,o.plus(e);var s=o.e/h,f=e.e/h,c=o.c,p=e.c;if(!s||!f){if(!c||!p)return c?(e.s=-t,e):new Z(p?o:NaN);if(!c[0]||!p[0])return p[0]?(e.s=-t,e):new Z(c[0]?o:3==x?-0:0)}if(s=d(s),f=d(f),c=c.slice(),u=s-f){for((a=u<0)?(u=-u,i=c):(f=s,i=p),i.reverse(),t=u;t--;i.push(0));i.reverse()}else for(n=(a=(u=c.length)<(t=p.length))?u:t,u=t=0;t<n;t++)if(c[t]!=p[t]){a=c[t]<p[t];break}if(a&&(i=c,c=p,p=i,e.s=-e.s),(t=(n=p.length)-(r=c.length))>0)for(;t--;c[r++]=0);for(t=l-1;n>u;){if(c[--n]<p[n]){for(r=n;r&&!c[--r];c[r]=t);--c[r],c[n]+=l}c[n]-=p[n]}for(;0==c[0];c.splice(0,1),--f);return c[0]?Y(e,c,f):(e.s=3==x?-1:1,e.c=[e.e=0],e)},O.modulo=O.mod=function(e,t){var n,i,a=this;return e=new Z(e,t),!a.c||!e.s||e.c&&!e.c[0]?new Z(NaN):!e.c||a.c&&!a.c[0]?new Z(a):(9==P?(i=e.s,e.s=1,n=r(a,e,0,3),e.s=i,n.s*=i):n=r(a,e,0,P),(e=a.minus(n.times(e))).c[0]||1!=P||(e.s=a.s),e)},O.multipliedBy=O.times=function(e,t){var r,n,i,a,o,u,s,f,c,p,y,g,v,m,w,A=this,k=A.c,F=(e=new Z(e,t)).c;if(!(k&&F&&k[0]&&F[0]))return!A.s||!e.s||k&&!k[0]&&!F||F&&!F[0]&&!k?e.c=e.e=e.s=null:(e.s*=A.s,k&&F?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=d(A.e/h)+d(e.e/h),e.s*=A.s,(s=k.length)<(p=F.length)&&(v=k,k=F,F=v,i=s,s=p,p=i),i=s+p,v=[];i--;v.push(0));for(m=l,w=b,i=p;--i>=0;){for(r=0,y=F[i]%w,g=F[i]/w|0,a=i+(o=s);a>i;)r=((f=y*(f=k[--o]%w)+(u=g*f+(c=k[o]/w|0)*y)%w*w+v[a]+r)/m|0)+(u/w|0)+g*c,v[a--]=f%m;v[a]=r}return r?++n:v.splice(0,1),Y(e,v,n)},O.negated=function(){var e=new Z(this);return e.s=-e.s||null,e},O.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new Z(e,t)).s,!i||!t)return new Z(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/h,o=e.e/h,u=n.c,s=e.c;if(!a||!o){if(!u||!s)return new Z(i/0);if(!u[0]||!s[0])return s[0]?e:new Z(u[0]?n:0*i)}if(a=d(a),o=d(o),u=u.slice(),i=a-o){for(i>0?(o=a,r=s):(i=-i,r=u),r.reverse();i--;r.push(0));r.reverse()}for((i=u.length)-(t=s.length)<0&&(r=s,s=u,u=r,t=i),i=0;t;)i=(u[--t]=u[t]+s[t]+i)/l|0,u[t]=l===u[t]?0:u[t]%l;return i&&(u=[i].concat(u),++o),Y(e,u,o)},O.precision=O.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=x:w(t,0,8),V(new Z(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},O.shiftedBy=function(e){return w(e,-p,p),this.times("1e"+e)},O.squareRoot=O.sqrt=function(){var e,t,n,i,a,o=this,u=o.c,s=o.s,f=o.e,c=T+4,l=new Z("0.5");if(1!==s||!u||!u[0])return new Z(!s||s<0&&(!u||u[0])?NaN:u?o:1/0);if(0==(s=Math.sqrt(+q(o)))||s==1/0?(((t=v(u)).length+f)%2==0&&(t+="0"),s=Math.sqrt(+t),f=d((f+1)/2)-(f<0||f%2),n=new Z(t=s==1/0?"1e"+f:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+f)):n=new Z(s+""),n.c[0])for((s=(f=n.e)+c)<3&&(s=0);;)if(a=n,n=l.times(a.plus(r(o,a,c,1))),v(a.c).slice(0,s)===(t=v(n.c)).slice(0,s)){if(n.e<f&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(V(n,n.e+T+2,1),e=!n.times(n).eq(o));break}if(!i&&(V(a,a.e+T+2,0),a.times(a).eq(o))){n=a;break}c+=4,s+=4,i=1}return V(n,n.e+T+1,x,e)},O.toExponential=function(e,t){return null!=e&&(w(e,0,g),e++),G(this,e,t,1)},O.toFixed=function(e,t){return null!=e&&(w(e,0,g),e=e+this.e+1),G(this,e,t)},O.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=z;else if("object"!=typeof r)throw Error(f+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var a,o=n.split("."),u=+r.groupSize,s=+r.secondaryGroupSize,c=r.groupSeparator||"",l=o[0],h=o[1],p=i.s<0,y=p?l.slice(1):l,b=y.length;if(s&&(a=u,u=s,s=a,b-=a),u>0&&b>0){for(a=b%u||u,l=y.substr(0,a);a<b;a+=u)l+=c+y.substr(a,u);s>0&&(l+=c+y.slice(a)),p&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},O.toFraction=function(e){var t,n,i,a,o,u,s,c,l,p,b,g,d=this,m=d.c;if(null!=e&&(!(s=new Z(e)).isInteger()&&(s.c||1!==s.s)||s.lt(D)))throw Error(f+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+q(s));if(!m)return new Z(d);for(t=new Z(D),l=n=new Z(D),i=c=new Z(D),g=v(m),o=t.e=g.length-d.e-1,t.c[0]=y[(u=o%h)<0?h+u:u],e=!e||s.comparedTo(t)>0?o>0?t:l:s,u=I,I=1/0,s=new Z(g),c.c[0]=0;p=r(s,t,0,1),1!=(a=n.plus(p.times(i))).comparedTo(e);)n=i,i=a,l=c.plus(p.times(a=l)),c=a,t=s.minus(p.times(a=t)),s=a;return a=r(e.minus(n),i,0,1),c=c.plus(a.times(l)),n=n.plus(a.times(i)),c.s=l.s=d.s,b=r(l,i,o*=2,x).minus(d).abs().comparedTo(r(c,n,o,x).minus(d).abs())<1?[l,i]:[c,n],I=u,b},O.toNumber=function(){return+q(this)},O.toPrecision=function(e,t){return null!=e&&w(e,1,g),G(this,e,t,2)},O.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=_||a>=R?k(v(r.c),a):F(v(r.c),a,"0"):10===e?t=F(v((r=V(new Z(r),T+a+1,x)).c),r.e,"0"):(w(e,2,M.length,"Base"),t=n(F(v(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},O.valueOf=O.toJSON=function(){return q(this)},O._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(O[Symbol.toStringTag]="BigNumber",O[Symbol.for("nodejs.util.inspect.custom")]=O.valueOf),null!=t&&Z.set(t),Z}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},7:function(e,t,r){"use strict";r.d(t,"d",function(){return i}),r.d(t,"e",function(){return a}),r.d(t,"c",function(){return o}),r.d(t,"b",function(){return u}),r.d(t,"a",function(){return s});var n=r(0);
/**
* Hexadecimal functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e)return"";for(var n="",i=0;i<e.length;i++)n+=e[i].toString(16).padStart(r,"0")+t;return"0x"===t&&(n="0x"+n),"\\x"===t&&(n="\\x"+n),t.length?n.slice(0,-t.length):n}function a(e){if(!e)return"";for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("None"!==t){var i="Auto"===t?/[^a-f\d]/gi:n.a.regexRep(t);e=e.replace(i,"")}for(var a=[],o=0;o<e.length;o+=r)a.push(parseInt(e.substr(o,r),16));return a}var u=["Space","Comma","Semi-colon","Colon","Line feed","CRLF","0x","\\x","None"],s=["Auto"].concat(u)},779:function(e,t){
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var e=void 0,t=!0,r=this;function n(t,n){var i,a=t.split("."),o=r;!(a[0]in o)&&o.execScript&&o.execScript("var "+a[0]);for(;a.length&&(i=a.shift());)a.length||n===e?o=o[i]?o[i]:o[i]={}:o[i]=n}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function a(e,t){if(this.index="number"==typeof t?t:0,this.d=0,this.buffer=e instanceof(i?Uint8Array:Array)?e:new(i?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&o(this)}function o(e){var t,r=e.buffer,n=r.length,a=new(i?Uint8Array:Array)(n<<1);if(i)a.set(r);else for(t=0;t<n;++t)a[t]=r[t];return e.buffer=a}a.prototype.a=function(e,t,r){var n,i=this.buffer,a=this.index,u=this.d,s=i[a];if(r&&1<t&&(e=8<t?(h[255&e]<<24|h[e>>>8&255]<<16|h[e>>>16&255]<<8|h[e>>>24&255])>>32-t:h[e]>>8-t),8>t+u)s=s<<t|e,u+=t;else for(n=0;n<t;++n)s=s<<1|e>>t-n-1&1,8==++u&&(u=0,i[a++]=h[s],s=0,a===i.length&&(i=o(this)));i[a]=s,this.buffer=i,this.d=u,this.index=a},a.prototype.finish=function(){var e,t=this.buffer,r=this.index;return 0<this.d&&(t[r]<<=8-this.d,t[r]=h[t[r]],r++),i?e=t.subarray(0,r):(t.length=r,e=t),e};var u,s=new(i?Uint8Array:Array)(256);for(u=0;256>u;++u){for(var f=l=u,c=7,l=l>>>1;l;l>>>=1)f<<=1,f|=1&l,--c;s[u]=(f<<c&255)>>>0}var h=s;function p(e){this.buffer=new(i?Uint16Array:Array)(2*e),this.length=0}function y(e,t){this.e=g,this.f=0,this.input=i&&e instanceof Array?new Uint8Array(e):e,this.c=0,t&&(t.lazy&&(this.f=t.lazy),"number"==typeof t.compressionType&&(this.e=t.compressionType),t.outputBuffer&&(this.b=i&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.c=t.outputIndex)),this.b||(this.b=new(i?Uint8Array:Array)(32768))}p.prototype.getParent=function(e){return 2*((e-2)/4|0)},p.prototype.push=function(e,t){var r,n,i,a=this.buffer;for(r=this.length,a[this.length++]=t,a[this.length++]=e;0<r&&(n=this.getParent(r),a[r]>a[n]);)i=a[r],a[r]=a[n],a[n]=i,i=a[r+1],a[r+1]=a[n+1],a[n+1]=i,r=n;return this.length},p.prototype.pop=function(){var e,t,r,n,i,a=this.buffer;for(t=a[0],e=a[1],this.length-=2,a[0]=a[this.length],a[1]=a[this.length+1],i=0;!((n=2*i+2)>=this.length)&&(n+2<this.length&&a[n+2]>a[n]&&(n+=2),a[n]>a[i]);)r=a[i],a[i]=a[n],a[n]=r,r=a[i+1],a[i+1]=a[n+1],a[n+1]=r,i=n;return{index:e,value:t,length:this.length}};var b,g=2,d=[];for(b=0;288>b;b++)switch(t){case 143>=b:d.push([b+48,8]);break;case 255>=b:d.push([b-144+400,9]);break;case 279>=b:d.push([b-256+0,7]);break;case 287>=b:d.push([b-280+192,8]);break;default:throw"invalid literal: "+b}function v(e,t){this.length=e,this.g=t}y.prototype.h=function(){var r,n,o,u,s=this.input;switch(this.e){case 0:for(o=0,u=s.length;o<u;){var f,c,l,h=n=i?s.subarray(o,o+65535):s.slice(o,o+65535),p=(o+=n.length)===u,y=e,b=e,v=this.b,m=this.c;if(i){for(v=new Uint8Array(this.b.buffer);v.length<=m+h.length+5;)v=new Uint8Array(v.length<<1);v.set(this.b)}if(f=p?1:0,v[m++]=0|f,l=65536+~(c=h.length)&65535,v[m++]=255&c,v[m++]=c>>>8&255,v[m++]=255&l,v[m++]=l>>>8&255,i)v.set(h,m),m+=h.length,v=v.subarray(0,m);else{for(y=0,b=h.length;y<b;++y)v[m++]=h[y];v.length=m}this.c=m,this.b=v}break;case 1:var w=new a(i?new Uint8Array(this.b.buffer):this.b,this.c);w.a(1,1,t),w.a(1,2,t);var k,B,C,U=A(this,s);for(k=0,B=U.length;k<B;k++)if(C=U[k],a.prototype.a.apply(w,d[C]),256<C)w.a(U[++k],U[++k],t),w.a(U[++k],5),w.a(U[++k],U[++k],t);else if(256===C)break;this.b=w.finish(),this.c=this.b.length;break;case g:var S,O,D,T,x,_,R,N,I,j,P,L,z,M,Z,G=new a(i?new Uint8Array(this.b.buffer):this.b,this.c),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=Array(19);for(S=g,G.a(1,1,t),G.a(S,2,t),O=A(this,s),R=E(_=F(this.j,15)),I=E(N=F(this.i,7)),D=286;257<D&&0===_[D-1];D--);for(T=30;1<T&&0===N[T-1];T--);var V,q,J,$,K,W,X=D,Q=T,ee=new(i?Uint32Array:Array)(X+Q),te=new(i?Uint32Array:Array)(316),re=new(i?Uint8Array:Array)(19);for(V=q=0;V<X;V++)ee[q++]=_[V];for(V=0;V<Q;V++)ee[q++]=N[V];if(!i)for(V=0,$=re.length;V<$;++V)re[V]=0;for(V=K=0,$=ee.length;V<$;V+=q){for(q=1;V+q<$&&ee[V+q]===ee[V];++q);if(J=q,0===ee[V])if(3>J)for(;0<J--;)te[K++]=0,re[0]++;else for(;0<J;)(W=138>J?J:138)>J-3&&W<J&&(W=J-3),10>=W?(te[K++]=17,te[K++]=W-3,re[17]++):(te[K++]=18,te[K++]=W-11,re[18]++),J-=W;else if(te[K++]=ee[V],re[ee[V]]++,3>--J)for(;0<J--;)te[K++]=ee[V],re[ee[V]]++;else for(;0<J;)(W=6>J?J:6)>J-3&&W<J&&(W=J-3),te[K++]=16,te[K++]=W-3,re[16]++,J-=W}for(r=i?te.subarray(0,K):te.slice(0,K),j=F(re,7),M=0;19>M;M++)Y[M]=j[H[M]];for(x=19;4<x&&0===Y[x-1];x--);for(P=E(j),G.a(D-257,5,t),G.a(T-1,5,t),G.a(x-4,4,t),M=0;M<x;M++)G.a(Y[M],3,t);for(M=0,Z=r.length;M<Z;M++)if(L=r[M],G.a(P[L],j[L],t),16<=L){switch(M++,L){case 16:z=2;break;case 17:z=3;break;case 18:z=7;break;default:throw"invalid code: "+L}G.a(r[M],z,t)}var ne,ie,ae,oe,ue,se,fe,ce,le=[R,_],he=[I,N];for(ue=le[0],se=le[1],fe=he[0],ce=he[1],ne=0,ie=O.length;ne<ie;++ne)if(ae=O[ne],G.a(ue[ae],se[ae],t),256<ae)G.a(O[++ne],O[++ne],t),oe=O[++ne],G.a(fe[oe],ce[oe],t),G.a(O[++ne],O[++ne],t);else if(256===ae)break;this.b=G.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var m=function(){function e(e){switch(t){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw"invalid length: "+e}}var r,n,i=[];for(r=3;258>=r;r++)n=e(r),i[r]=n[2]<<24|n[1]<<16|n[0];return i}(),w=i?new Uint32Array(m):m;function A(r,n){function a(e,r){var n,i,a,o,u=e.g,s=[],f=0;switch(n=w[e.length],s[f++]=65535&n,s[f++]=n>>16&255,s[f++]=n>>24,t){case 1===u:i=[0,u-1,0];break;case 2===u:i=[1,u-2,0];break;case 3===u:i=[2,u-3,0];break;case 4===u:i=[3,u-4,0];break;case 6>=u:i=[4,u-5,1];break;case 8>=u:i=[5,u-7,1];break;case 12>=u:i=[6,u-9,2];break;case 16>=u:i=[7,u-13,2];break;case 24>=u:i=[8,u-17,3];break;case 32>=u:i=[9,u-25,3];break;case 48>=u:i=[10,u-33,4];break;case 64>=u:i=[11,u-49,4];break;case 96>=u:i=[12,u-65,5];break;case 128>=u:i=[13,u-97,5];break;case 192>=u:i=[14,u-129,6];break;case 256>=u:i=[15,u-193,6];break;case 384>=u:i=[16,u-257,7];break;case 512>=u:i=[17,u-385,7];break;case 768>=u:i=[18,u-513,8];break;case 1024>=u:i=[19,u-769,8];break;case 1536>=u:i=[20,u-1025,9];break;case 2048>=u:i=[21,u-1537,9];break;case 3072>=u:i=[22,u-2049,10];break;case 4096>=u:i=[23,u-3073,10];break;case 6144>=u:i=[24,u-4097,11];break;case 8192>=u:i=[25,u-6145,11];break;case 12288>=u:i=[26,u-8193,12];break;case 16384>=u:i=[27,u-12289,12];break;case 24576>=u:i=[28,u-16385,13];break;case 32768>=u:i=[29,u-24577,13];break;default:throw"invalid distance"}for(n=i,s[f++]=n[0],s[f++]=n[1],s[f++]=n[2],a=0,o=s.length;a<o;++a)g[d++]=s[a];m[s[0]]++,A[s[3]]++,v=e.length+r-1,p=null}var o,u,s,f,c,l,h,p,y,b={},g=i?new Uint16Array(2*n.length):[],d=0,v=0,m=new(i?Uint32Array:Array)(286),A=new(i?Uint32Array:Array)(30),F=r.f;if(!i){for(s=0;285>=s;)m[s++]=0;for(s=0;29>=s;)A[s++]=0}for(m[256]=1,o=0,u=n.length;o<u;++o){for(s=c=0,f=3;s<f&&o+s!==u;++s)c=c<<8|n[o+s];if(b[c]===e&&(b[c]=[]),l=b[c],!(0<v--)){for(;0<l.length&&32768<o-l[0];)l.shift();if(o+3>=u){for(p&&a(p,-1),s=0,f=u-o;s<f;++s)y=n[o+s],g[d++]=y,++m[y];break}0<l.length?(h=k(n,o,l),p?p.length<h.length?(y=n[o-1],g[d++]=y,++m[y],a(h,0)):a(p,-1):h.length<F?p=h:a(h,0)):p?a(p,-1):(y=n[o],g[d++]=y,++m[y])}l.push(o)}return g[d++]=256,m[256]++,r.j=m,r.i=A,i?g.subarray(0,d):g}function k(e,t,r){var n,i,a,o,u,s,f=0,c=e.length;o=0,s=r.length;e:for(;o<s;o++){if(n=r[s-o-1],a=3,3<f){for(u=f;3<u;u--)if(e[n+u-1]!==e[t+u-1])continue e;a=f}for(;258>a&&t+a<c&&e[n+a]===e[t+a];)++a;if(a>f&&(i=n,f=a),258===a)break}return new v(f,t-i)}function F(e,t){var r,n,a,o,u,s=e.length,f=new p(572),c=new(i?Uint8Array:Array)(s);if(!i)for(o=0;o<s;o++)c[o]=0;for(o=0;o<s;++o)0<e[o]&&f.push(o,e[o]);if(r=Array(f.length/2),n=new(i?Uint32Array:Array)(f.length/2),1===r.length)return c[f.pop().index]=1,c;for(o=0,u=f.length/2;o<u;++o)r[o]=f.pop(),n[o]=r[o].value;for(a=function(e,t,r){function n(e){var r=y[e][b[e]];r===t?(n(e+1),n(e+1)):--h[r],++b[e]}var a,o,u,s,f,c=new(i?Uint16Array:Array)(r),l=new(i?Uint8Array:Array)(r),h=new(i?Uint8Array:Array)(t),p=Array(r),y=Array(r),b=Array(r),g=(1<<r)-t,d=1<<r-1;for(c[r-1]=t,o=0;o<r;++o)g<d?l[o]=0:(l[o]=1,g-=d),g<<=1,c[r-2-o]=(c[r-1-o]/2|0)+t;for(c[0]=l[0],p[0]=Array(c[0]),y[0]=Array(c[0]),o=1;o<r;++o)c[o]>2*c[o-1]+l[o]&&(c[o]=2*c[o-1]+l[o]),p[o]=Array(c[o]),y[o]=Array(c[o]);for(a=0;a<t;++a)h[a]=r;for(u=0;u<c[r-1];++u)p[r-1][u]=e[u],y[r-1][u]=u;for(a=0;a<r;++a)b[a]=0;for(1===l[r-1]&&(--h[0],++b[r-1]),o=r-2;0<=o;--o){for(s=a=0,f=b[o+1],u=0;u<c[o];u++)(s=p[o+1][f]+p[o+1][f+1])>e[a]?(p[o][u]=s,y[o][u]=t,f+=2):(p[o][u]=e[a],y[o][u]=a,++a);b[o]=0,1===l[o]&&n(o)}return h}(n,n.length,t),o=0,u=r.length;o<u;++o)c[r[o].index]=a[o];return c}function E(e){var t,r,n,a,o=new(i?Uint16Array:Array)(e.length),u=[],s=[],f=0;for(t=0,r=e.length;t<r;t++)u[e[t]]=1+(0|u[e[t]]);for(t=1,r=16;t<=r;t++)s[t]=f,f+=0|u[t],f<<=1;for(t=0,r=e.length;t<r;t++)for(f=s[e[t]],s[e[t]]+=1,n=o[t]=0,a=e[t];n<a;n++)o[t]=o[t]<<1|1&f,f>>>=1;return o}n("Zlib.RawDeflate",y),n("Zlib.RawDeflate.prototype.compress",y.prototype.h);var B,C,U,S,O={NONE:0,FIXED:1,DYNAMIC:g};if(Object.keys)B=Object.keys(O);else for(C in B=[],U=0,O)B[U++]=C;for(U=0,S=B.length;U<S;++U)n("Zlib.RawDeflate.CompressionType."+(C=B[U]),O[C])}).call(this)},780:function(e,t){
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var e=void 0,t=this;function r(r,n){var i,a=r.split("."),o=t;!(a[0]in o)&&o.execScript&&o.execScript("var "+a[0]);for(;a.length&&(i=a.shift());)a.length||n===e?o=o[i]?o[i]:o[i]={}:o[i]=n}var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(e){var t,r,i,a,o,u,s,f,c,l,h=e.length,p=0,y=Number.POSITIVE_INFINITY;for(f=0;f<h;++f)e[f]>p&&(p=e[f]),e[f]<y&&(y=e[f]);for(t=1<<p,r=new(n?Uint32Array:Array)(t),i=1,a=0,o=2;i<=p;){for(f=0;f<h;++f)if(e[f]===i){for(u=0,s=a,c=0;c<i;++c)u=u<<1|1&s,s>>=1;for(l=i<<16|f,c=u;c<t;c+=o)r[c]=l;++a}++i,a<<=1,o<<=1}return[r,p,y]}function a(e,t){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=n?new Uint8Array(e):e,this.l=!1,this.i=u,this.p=!1,!t&&(t={})||(t.index&&(this.d=t.index),t.bufferSize&&(this.h=t.bufferSize),t.bufferType&&(this.i=t.bufferType),t.resize&&(this.p=t.resize)),this.i){case o:this.a=32768,this.b=new(n?Uint8Array:Array)(32768+this.h+258);break;case u:this.a=0,this.b=new(n?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}var o=0,u=1;a.prototype.t=function(){for(;!this.l;){var t=C(this,3);switch(1&t&&(this.l=!0),t>>>=1){case 0:var r=this.input,a=this.d,s=this.b,f=this.a,c=r.length,h=e,p=s.length,y=e;if(this.c=this.f=0,a+1>=c)throw Error("invalid uncompressed block header: LEN");if(h=r[a++]|r[a++]<<8,a+1>=c)throw Error("invalid uncompressed block header: NLEN");if(h===~(r[a++]|r[a++]<<8))throw Error("invalid uncompressed block header: length verify");if(a+h>r.length)throw Error("input buffer is broken");switch(this.i){case o:for(;f+h>s.length;){if(h-=y=p-f,n)s.set(r.subarray(a,a+y),f),f+=y,a+=y;else for(;y--;)s[f++]=r[a++];this.a=f,s=this.e(),f=this.a}break;case u:for(;f+h>s.length;)s=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(n)s.set(r.subarray(a,a+h),f),f+=h,a+=h;else for(;h--;)s[f++]=r[a++];this.d=a,this.a=f,this.b=s;break;case 1:this.j(F,B);break;case 2:var b,g,d,v,m=C(this,5)+257,w=C(this,5)+1,A=C(this,4)+4,k=new(n?Uint8Array:Array)(l.length),E=e,S=e,O=e,D=e,T=e;for(T=0;T<A;++T)k[l[T]]=C(this,3);if(!n)for(T=A,A=k.length;T<A;++T)k[l[T]]=0;for(b=i(k),E=new(n?Uint8Array:Array)(m+w),T=0,v=m+w;T<v;)switch(S=U(this,b),S){case 16:for(D=3+C(this,2);D--;)E[T++]=O;break;case 17:for(D=3+C(this,3);D--;)E[T++]=0;O=0;break;case 18:for(D=11+C(this,7);D--;)E[T++]=0;O=0;break;default:O=E[T++]=S}g=i(n?E.subarray(0,m):E.slice(0,m)),d=i(n?E.subarray(m):E.slice(m)),this.j(g,d);break;default:throw Error("unknown BTYPE: "+t)}}return this.m()};var s,f,c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=n?new Uint16Array(c):c,h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=n?new Uint16Array(h):h,y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],b=n?new Uint8Array(y):y,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],d=n?new Uint16Array(g):g,v=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],m=n?new Uint8Array(v):v,w=new(n?Uint8Array:Array)(288);for(s=0,f=w.length;s<f;++s)w[s]=143>=s?8:255>=s?9:279>=s?7:8;var A,k,F=i(w),E=new(n?Uint8Array:Array)(30);for(A=0,k=E.length;A<k;++A)E[A]=5;var B=i(E);function C(e,t){for(var r,n=e.f,i=e.c,a=e.input,o=e.d,u=a.length;i<t;){if(o>=u)throw Error("input buffer is broken");n|=a[o++]<<i,i+=8}return r=n&(1<<t)-1,e.f=n>>>t,e.c=i-t,e.d=o,r}function U(e,t){for(var r,n,i=e.f,a=e.c,o=e.input,u=e.d,s=o.length,f=t[0],c=t[1];a<c&&!(u>=s);)i|=o[u++]<<a,a+=8;if((n=(r=f[i&(1<<c)-1])>>>16)>a)throw Error("invalid code length: "+n);return e.f=i>>n,e.c=a-n,e.d=u,65535&r}a.prototype.j=function(e,t){var r=this.b,n=this.a;this.n=e;for(var i,a,o,u,s=r.length-258;256!==(i=U(this,e));)if(256>i)n>=s&&(this.a=n,r=this.e(),n=this.a),r[n++]=i;else for(u=p[a=i-257],0<b[a]&&(u+=C(this,b[a])),i=U(this,t),o=d[i],0<m[i]&&(o+=C(this,m[i])),n>=s&&(this.a=n,r=this.e(),n=this.a);u--;)r[n]=r[n++-o];for(;8<=this.c;)this.c-=8,this.d--;this.a=n},a.prototype.s=function(e,t){var r=this.b,n=this.a;this.n=e;for(var i,a,o,u,s=r.length;256!==(i=U(this,e));)if(256>i)n>=s&&(s=(r=this.e()).length),r[n++]=i;else for(u=p[a=i-257],0<b[a]&&(u+=C(this,b[a])),i=U(this,t),o=d[i],0<m[i]&&(o+=C(this,m[i])),n+u>s&&(s=(r=this.e()).length);u--;)r[n]=r[n++-o];for(;8<=this.c;)this.c-=8,this.d--;this.a=n},a.prototype.e=function(){var e,t,r=new(n?Uint8Array:Array)(this.a-32768),i=this.a-32768,a=this.b;if(n)r.set(a.subarray(32768,r.length));else for(e=0,t=r.length;e<t;++e)r[e]=a[e+32768];if(this.g.push(r),this.k+=r.length,n)a.set(a.subarray(i,i+32768));else for(e=0;32768>e;++e)a[e]=a[i+e];return this.a=32768,a},a.prototype.u=function(e){var t,r,i,a=this.input.length/this.d+1|0,o=this.input,u=this.b;return e&&("number"==typeof e.o&&(a=e.o),"number"==typeof e.q&&(a+=e.q)),2>a?r=(i=(o.length-this.d)/this.n[2]/2*258|0)<u.length?u.length+i:u.length<<1:r=u.length*a,n?(t=new Uint8Array(r)).set(u):t=u,this.b=t},a.prototype.m=function(){var e,t,r,i,a,o=0,u=this.b,s=this.g,f=new(n?Uint8Array:Array)(this.k+(this.a-32768));if(0===s.length)return n?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(t=0,r=s.length;t<r;++t)for(i=0,a=(e=s[t]).length;i<a;++i)f[o++]=e[i];for(t=32768,r=this.a;t<r;++t)f[o++]=u[t];return this.g=[],this.buffer=f},a.prototype.r=function(){var e,t=this.a;return n?this.p?(e=new Uint8Array(t)).set(this.b.subarray(0,t)):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},r("Zlib.RawInflate",a),r("Zlib.RawInflate.prototype.decompress",a.prototype.t);var S,O,D,T,x={ADAPTIVE:u,BLOCK:o};if(Object.keys)S=Object.keys(x);else for(O in S=[],D=0,x)S[D++]=O;for(D=0,T=S.length;D<T;++D)r("Zlib.RawInflate.BufferType."+(O=S[D]),x[O])}).call(this)},781:function(module,exports){
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";function l(e){throw e}var r=void 0,t,aa=this;function v(e,t){var n,i=e.split("."),a=aa;!(i[0]in a)&&a.execScript&&a.execScript("var "+i[0]);for(;i.length&&(n=i.shift());)i.length||t===r?a=a[n]?a[n]:a[n]={}:a[n]=t}var y="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,z;for(new(y?Uint8Array:Array)(256),z=0;256>z;++z)for(var B=z,ba=7,B=B>>>1;B;B>>>=1)--ba;var ca=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],C=y?new Uint32Array(ca):ca,a;if(aa.Uint8Array!==r)try{eval("String.fromCharCode.apply(null, new Uint8Array([0]));")}catch(e){String.fromCharCode.apply=(a=String.fromCharCode.apply,function(e,t){return a.call(String.fromCharCode,e,Array.prototype.slice.call(t))})}function D(e){var t,r,n,i,a,o,u,s,f,c,l=e.length,h=0,p=Number.POSITIVE_INFINITY;for(s=0;s<l;++s)e[s]>h&&(h=e[s]),e[s]<p&&(p=e[s]);for(t=1<<h,r=new(y?Uint32Array:Array)(t),n=1,i=0,a=2;n<=h;){for(s=0;s<l;++s)if(e[s]===n){for(o=0,u=i,f=0;f<n;++f)o=o<<1|1&u,u>>=1;for(c=n<<16|s,f=o;f<t;f+=a)r[f]=c;++i}++n,i<<=1,a<<=1}return[r,h,p]}var F=[],G;for(G=0;288>G;G++)switch(!0){case 143>=G:F.push([G+48,8]);break;case 255>=G:F.push([G-144+400,9]);break;case 279>=G:F.push([G-256+0,7]);break;case 287>=G:F.push([G-280+192,8]);break;default:l("invalid literal: "+G)}var fa=function(){function e(e){switch(!0){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:l("invalid length: "+e)}}var t,r,n=[];for(t=3;258>=t;t++)r=e(t),n[t]=r[2]<<24|r[1]<<16|r[0];return n}();function I(e,t){switch(this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=y?new Uint8Array(e):e,this.u=!1,this.n=J,this.K=!1,!t&&(t={})||(t.index&&(this.c=t.index),t.bufferSize&&(this.m=t.bufferSize),t.bufferType&&(this.n=t.bufferType),t.resize&&(this.K=t.resize)),this.n){case ga:this.a=32768,this.b=new(y?Uint8Array:Array)(32768+this.m+258);break;case J:this.a=0,this.b=new(y?Uint8Array:Array)(this.m),this.e=this.W,this.B=this.R,this.q=this.V;break;default:l(Error("invalid inflate mode"))}}y&&new Uint32Array(fa);var ga=0,J=1;I.prototype.r=function(){for(;!this.u;){var e=K(this,3);switch(1&e&&(this.u=!0),e>>>=1){case 0:var t=this.input,n=this.c,i=this.b,a=this.a,o=t.length,u=r,s=i.length,f=r;switch(this.d=this.f=0,n+1>=o&&l(Error("invalid uncompressed block header: LEN")),u=t[n++]|t[n++]<<8,n+1>=o&&l(Error("invalid uncompressed block header: NLEN")),u===~(t[n++]|t[n++]<<8)&&l(Error("invalid uncompressed block header: length verify")),n+u>t.length&&l(Error("input buffer is broken")),this.n){case ga:for(;a+u>i.length;){if(u-=f=s-a,y)i.set(t.subarray(n,n+f),a),a+=f,n+=f;else for(;f--;)i[a++]=t[n++];this.a=a,i=this.e(),a=this.a}break;case J:for(;a+u>i.length;)i=this.e({H:2});break;default:l(Error("invalid inflate mode"))}if(y)i.set(t.subarray(n,n+u),a),a+=u,n+=u;else for(;u--;)i[a++]=t[n++];this.c=n,this.a=a,this.b=i;break;case 1:this.q(ha,ia);break;case 2:var c,h,p,b,g=K(this,5)+257,d=K(this,5)+1,v=K(this,4)+4,m=new(y?Uint8Array:Array)(L.length),w=r,A=r,k=r,F=r,E=r;for(E=0;E<v;++E)m[L[E]]=K(this,3);if(!y)for(E=v,v=m.length;E<v;++E)m[L[E]]=0;for(c=D(m),w=new(y?Uint8Array:Array)(g+d),E=0,b=g+d;E<b;)switch(A=M(this,c),A){case 16:for(F=3+K(this,2);F--;)w[E++]=k;break;case 17:for(F=3+K(this,3);F--;)w[E++]=0;k=0;break;case 18:for(F=11+K(this,7);F--;)w[E++]=0;k=0;break;default:k=w[E++]=A}h=D(y?w.subarray(0,g):w.slice(0,g)),p=D(y?w.subarray(g):w.slice(g)),this.q(h,p);break;default:l(Error("unknown BTYPE: "+e))}}return this.B()};var ja=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=y?new Uint16Array(ja):ja,ka=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],la=y?new Uint16Array(ka):ka,ma=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],N=y?new Uint8Array(ma):ma,na=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],oa=y?new Uint16Array(na):na,pa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=y?new Uint8Array(pa):pa,Q=new(y?Uint8Array:Array)(288),R,qa;for(R=0,qa=Q.length;R<qa;++R)Q[R]=143>=R?8:255>=R?9:279>=R?7:8;var ha=D(Q),S=new(y?Uint8Array:Array)(30),T,ra;for(T=0,ra=S.length;T<ra;++T)S[T]=5;var ia=D(S);function K(e,t){for(var r,n=e.f,i=e.d,a=e.input,o=e.c,u=a.length;i<t;)o>=u&&l(Error("input buffer is broken")),n|=a[o++]<<i,i+=8;return r=n&(1<<t)-1,e.f=n>>>t,e.d=i-t,e.c=o,r}function M(e,t){for(var r,n,i=e.f,a=e.d,o=e.input,u=e.c,s=o.length,f=t[0],c=t[1];a<c&&!(u>=s);)i|=o[u++]<<a,a+=8;return(n=(r=f[i&(1<<c)-1])>>>16)>a&&l(Error("invalid code length: "+n)),e.f=i>>n,e.d=a-n,e.c=u,65535&r}function U(e){e=e||{},this.files=[],this.v=e.comment}function V(e,t){t=t||{},this.input=y&&e instanceof Array?new Uint8Array(e):e,this.c=0,this.ba=t.verify||!1,this.j=t.password}t=I.prototype,t.q=function(e,t){var r=this.b,n=this.a;this.C=e;for(var i,a,o,u,s=r.length-258;256!==(i=M(this,e));)if(256>i)n>=s&&(this.a=n,r=this.e(),n=this.a),r[n++]=i;else for(u=la[a=i-257],0<N[a]&&(u+=K(this,N[a])),i=M(this,t),o=oa[i],0<P[i]&&(o+=K(this,P[i])),n>=s&&(this.a=n,r=this.e(),n=this.a);u--;)r[n]=r[n++-o];for(;8<=this.d;)this.d-=8,this.c--;this.a=n},t.V=function(e,t){var r=this.b,n=this.a;this.C=e;for(var i,a,o,u,s=r.length;256!==(i=M(this,e));)if(256>i)n>=s&&(s=(r=this.e()).length),r[n++]=i;else for(u=la[a=i-257],0<N[a]&&(u+=K(this,N[a])),i=M(this,t),o=oa[i],0<P[i]&&(o+=K(this,P[i])),n+u>s&&(s=(r=this.e()).length);u--;)r[n]=r[n++-o];for(;8<=this.d;)this.d-=8,this.c--;this.a=n},t.e=function(){var e,t,r=new(y?Uint8Array:Array)(this.a-32768),n=this.a-32768,i=this.b;if(y)r.set(i.subarray(32768,r.length));else for(e=0,t=r.length;e<t;++e)r[e]=i[e+32768];if(this.l.push(r),this.t+=r.length,y)i.set(i.subarray(n,n+32768));else for(e=0;32768>e;++e)i[e]=i[n+e];return this.a=32768,i},t.W=function(e){var t,r,n,i=this.input.length/this.c+1|0,a=this.input,o=this.b;return e&&("number"==typeof e.H&&(i=e.H),"number"==typeof e.P&&(i+=e.P)),2>i?r=(n=(a.length-this.c)/this.C[2]/2*258|0)<o.length?o.length+n:o.length<<1:r=o.length*i,y?(t=new Uint8Array(r)).set(o):t=o,this.b=t},t.B=function(){var e,t,r,n,i,a=0,o=this.b,u=this.l,s=new(y?Uint8Array:Array)(this.t+(this.a-32768));if(0===u.length)return y?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(t=0,r=u.length;t<r;++t)for(n=0,i=(e=u[t]).length;n<i;++n)s[a++]=e[n];for(t=32768,r=this.a;t<r;++t)s[a++]=o[t];return this.l=[],this.buffer=s},t.R=function(){var e,t=this.a;return y?this.K?(e=new Uint8Array(t)).set(this.b.subarray(0,t)):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},U.prototype.L=function(e){this.j=e},U.prototype.s=function(e){var t=65535&e[2]|2;return t*(1^t)>>8&255},U.prototype.k=function(e,t){e[0]=(C[255&(e[0]^t)]^e[0]>>>8)>>>0,e[1]=1+(6681*(20173*(e[1]+(255&e[0]))>>>0)>>>0)>>>0,e[2]=(C[255&(e[2]^e[1]>>>24)]^e[2]>>>8)>>>0},U.prototype.T=function(e){var t,r,n=[305419896,591751049,878082192];for(y&&(n=new Uint32Array(n)),t=0,r=e.length;t<r;++t)this.k(n,255&e[t]);return n};var sa={O:0,M:8},W=[80,75,1,2],Y=[80,75,3,4],Z=[80,75,5,6];function ta(e,t){this.input=e,this.offset=t}function ua(e,t){this.input=e,this.offset=t}ta.prototype.parse=function(){var e=this.input,t=this.offset;(e[t++]!==W[0]||e[t++]!==W[1]||e[t++]!==W[2]||e[t++]!==W[3])&&l(Error("invalid file header signature")),this.version=e[t++],this.ia=e[t++],this.Z=e[t++]|e[t++]<<8,this.I=e[t++]|e[t++]<<8,this.A=e[t++]|e[t++]<<8,this.time=e[t++]|e[t++]<<8,this.U=e[t++]|e[t++]<<8,this.p=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.z=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.J=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.h=e[t++]|e[t++]<<8,this.g=e[t++]|e[t++]<<8,this.F=e[t++]|e[t++]<<8,this.ea=e[t++]|e[t++]<<8,this.ga=e[t++]|e[t++]<<8,this.fa=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,this.$=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.filename=String.fromCharCode.apply(null,y?e.subarray(t,t+=this.h):e.slice(t,t+=this.h)),this.X=y?e.subarray(t,t+=this.g):e.slice(t,t+=this.g),this.v=y?e.subarray(t,t+this.F):e.slice(t,t+this.F),this.length=t-this.offset};var va={N:1,ca:8,da:2048};function $(e){var t,n,i,a,o=[],u={};if(!e.i){if(e.o===r){var s,f=e.input;if(!e.D)e:{var c,h=e.input;for(c=h.length-12;0<c;--c)if(h[c]===Z[0]&&h[c+1]===Z[1]&&h[c+2]===Z[2]&&h[c+3]===Z[3]){e.D=c;break e}l(Error("End of Central Directory Record not found"))}s=e.D,(f[s++]!==Z[0]||f[s++]!==Z[1]||f[s++]!==Z[2]||f[s++]!==Z[3])&&l(Error("invalid signature")),e.ha=f[s++]|f[s++]<<8,e.ja=f[s++]|f[s++]<<8,e.ka=f[s++]|f[s++]<<8,e.aa=f[s++]|f[s++]<<8,e.Q=(f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24)>>>0,e.o=(f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24)>>>0,e.w=f[s++]|f[s++]<<8,e.v=y?f.subarray(s,s+e.w):f.slice(s,s+e.w)}for(t=e.o,i=0,a=e.aa;i<a;++i)(n=new ta(e.input,t)).parse(),t+=n.length,o[i]=n,u[n.filename]=i;e.Q<t-e.o&&l(Error("invalid file header size")),e.i=o,e.G=u}}function wa(e,t,r){return r^=e.s(t),e.k(t,r),r}ua.prototype.parse=function(){var e=this.input,t=this.offset;(e[t++]!==Y[0]||e[t++]!==Y[1]||e[t++]!==Y[2]||e[t++]!==Y[3])&&l(Error("invalid local file header signature")),this.Z=e[t++]|e[t++]<<8,this.I=e[t++]|e[t++]<<8,this.A=e[t++]|e[t++]<<8,this.time=e[t++]|e[t++]<<8,this.U=e[t++]|e[t++]<<8,this.p=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.z=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.J=(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0,this.h=e[t++]|e[t++]<<8,this.g=e[t++]|e[t++]<<8,this.filename=String.fromCharCode.apply(null,y?e.subarray(t,t+=this.h):e.slice(t,t+=this.h)),this.X=y?e.subarray(t,t+=this.g):e.slice(t,t+=this.g),this.length=t-this.offset},t=V.prototype,t.Y=function(){var e,t,r,n=[];for(this.i||$(this),e=0,t=(r=this.i).length;e<t;++e)n[e]=r[e].filename;return n},t.r=function(e,t){var n,i;this.G||$(this),(n=this.G[e])===r&&l(Error(e+" not found")),i=t||{};var a,o,u,s,f,c,h,p,b=this.input,g=this.i;if(g||$(this),g[n]===r&&l(Error("wrong index")),o=g[n].$,(a=new ua(this.input,o)).parse(),o+=a.length,u=a.z,0!=(a.I&va.N)){for(!i.password&&!this.j&&l(Error("please set password")),c=this.S(i.password||this.j),h=o,p=o+12;h<p;++h)wa(this,c,b[h]);for(h=o+=12,p=o+(u-=12);h<p;++h)b[h]=wa(this,c,b[h])}switch(a.A){case sa.O:s=y?this.input.subarray(o,o+u):this.input.slice(o,o+u);break;case sa.M:s=new I(this.input,{index:o,bufferSize:a.J}).r();break;default:l(Error("unknown compression type"))}if(this.ba){var d,v=r,m="number"==typeof v?v:v=0,w=s.length;for(d=-1,m=7&w;m--;++v)d=d>>>8^C[255&(d^s[v])];for(m=w>>3;m--;v+=8)d=(d=(d=(d=(d=(d=(d=(d=d>>>8^C[255&(d^s[v])])>>>8^C[255&(d^s[v+1])])>>>8^C[255&(d^s[v+2])])>>>8^C[255&(d^s[v+3])])>>>8^C[255&(d^s[v+4])])>>>8^C[255&(d^s[v+5])])>>>8^C[255&(d^s[v+6])])>>>8^C[255&(d^s[v+7])];f=(4294967295^d)>>>0,a.p!==f&&l(Error("wrong crc: file=0x"+a.p.toString(16)+", data=0x"+f.toString(16)))}return s},t.L=function(e){this.j=e},t.k=U.prototype.k,t.S=U.prototype.T,t.s=U.prototype.s,v("Zlib.Unzip",V),v("Zlib.Unzip.prototype.decompress",V.prototype.r),v("Zlib.Unzip.prototype.getFilenames",V.prototype.Y),v("Zlib.Unzip.prototype.setPassword",V.prototype.L)}).call(this)},782:function(e,t){
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var e=void 0,t=!0,r=this;function n(t,n){var i,a=t.split("."),o=r;!(a[0]in o)&&o.execScript&&o.execScript("var "+a[0]);for(;a.length&&(i=a.shift());)a.length||n===e?o=o[i]?o[i]:o[i]={}:o[i]=n}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function a(e,t){if(this.index="number"==typeof t?t:0,this.f=0,this.buffer=e instanceof(i?Uint8Array:Array)?e:new(i?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&o(this)}function o(e){var t,r=e.buffer,n=r.length,a=new(i?Uint8Array:Array)(n<<1);if(i)a.set(r);else for(t=0;t<n;++t)a[t]=r[t];return e.buffer=a}a.prototype.b=function(e,t,r){var n,i=this.buffer,a=this.index,u=this.f,s=i[a];if(r&&1<t&&(e=8<t?(h[255&e]<<24|h[e>>>8&255]<<16|h[e>>>16&255]<<8|h[e>>>24&255])>>32-t:h[e]>>8-t),8>t+u)s=s<<t|e,u+=t;else for(n=0;n<t;++n)s=s<<1|e>>t-n-1&1,8==++u&&(u=0,i[a++]=h[s],s=0,a===i.length&&(i=o(this)));i[a]=s,this.buffer=i,this.f=u,this.index=a},a.prototype.finish=function(){var e,t=this.buffer,r=this.index;return 0<this.f&&(t[r]<<=8-this.f,t[r]=h[t[r]],r++),i?e=t.subarray(0,r):(t.length=r,e=t),e};var u,s=new(i?Uint8Array:Array)(256);for(u=0;256>u;++u){for(var f=l=u,c=7,l=l>>>1;l;l>>>=1)f<<=1,f|=1&l,--c;s[u]=(f<<c&255)>>>0}var h=s;function p(t){var r,n=e,i="number"==typeof n?n:n=0,a=t.length;for(r=-1,i=7&a;i--;++n)r=r>>>8^b[255&(r^t[n])];for(i=a>>3;i--;n+=8)r=(r=(r=(r=(r=(r=(r=(r=r>>>8^b[255&(r^t[n])])>>>8^b[255&(r^t[n+1])])>>>8^b[255&(r^t[n+2])])>>>8^b[255&(r^t[n+3])])>>>8^b[255&(r^t[n+4])])>>>8^b[255&(r^t[n+5])])>>>8^b[255&(r^t[n+6])])>>>8^b[255&(r^t[n+7])];return(4294967295^r)>>>0}var y=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],b=i?new Uint32Array(y):y;function g(e){this.buffer=new(i?Uint16Array:Array)(2*e),this.length=0}function d(e,t){this.k=m,this.l=0,this.input=i&&e instanceof Array?new Uint8Array(e):e,this.e=0,t&&(t.lazy&&(this.l=t.lazy),"number"==typeof t.compressionType&&(this.k=t.compressionType),t.outputBuffer&&(this.c=i&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.e=t.outputIndex)),this.c||(this.c=new(i?Uint8Array:Array)(32768))}g.prototype.getParent=function(e){return 2*((e-2)/4|0)},g.prototype.push=function(e,t){var r,n,i,a=this.buffer;for(r=this.length,a[this.length++]=t,a[this.length++]=e;0<r&&(n=this.getParent(r),a[r]>a[n]);)i=a[r],a[r]=a[n],a[n]=i,i=a[r+1],a[r+1]=a[n+1],a[n+1]=i,r=n;return this.length},g.prototype.pop=function(){var e,t,r,n,i,a=this.buffer;for(t=a[0],e=a[1],this.length-=2,a[0]=a[this.length],a[1]=a[this.length+1],i=0;!((n=2*i+2)>=this.length)&&(n+2<this.length&&a[n+2]>a[n]&&(n+=2),a[n]>a[i]);)r=a[i],a[i]=a[n],a[n]=r,r=a[i+1],a[i+1]=a[n+1],a[n+1]=r,i=n;return{index:e,value:t,length:this.length}};var v,m=2,w=[];for(v=0;288>v;v++)switch(t){case 143>=v:w.push([v+48,8]);break;case 255>=v:w.push([v-144+400,9]);break;case 279>=v:w.push([v-256+0,7]);break;case 287>=v:w.push([v-280+192,8]);break;default:throw"invalid literal: "+v}function A(e,t){this.length=e,this.n=t}d.prototype.g=function(){var r,n,o,u,s=this.input;switch(this.k){case 0:for(o=0,u=s.length;o<u;){var f,c,l,h=n=i?s.subarray(o,o+65535):s.slice(o,o+65535),p=(o+=n.length)===u,y=e,b=e,g=this.c,d=this.e;if(i){for(g=new Uint8Array(this.c.buffer);g.length<=d+h.length+5;)g=new Uint8Array(g.length<<1);g.set(this.c)}if(f=p?1:0,g[d++]=0|f,l=65536+~(c=h.length)&65535,g[d++]=255&c,g[d++]=c>>>8&255,g[d++]=255&l,g[d++]=l>>>8&255,i)g.set(h,d),d+=h.length,g=g.subarray(0,d);else{for(y=0,b=h.length;y<b;++y)g[d++]=h[y];g.length=d}this.e=d,this.c=g}break;case 1:var v=new a(i?new Uint8Array(this.c.buffer):this.c,this.e);v.b(1,1,t),v.b(1,2,t);var A,k,F,B=E(this,s);for(A=0,k=B.length;A<k;A++)if(F=B[A],a.prototype.b.apply(v,w[F]),256<F)v.b(B[++A],B[++A],t),v.b(B[++A],5),v.b(B[++A],B[++A],t);else if(256===F)break;this.c=v.finish(),this.e=this.c.length;break;case m:var S,O,D,T,x,_,R,N,I,j,P,L,z,M,Z,G=new a(i?new Uint8Array(this.c.buffer):this.c,this.e),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=Array(19);for(S=m,G.b(1,1,t),G.b(S,2,t),O=E(this,s),R=U(_=C(this.p,15)),I=U(N=C(this.o,7)),D=286;257<D&&0===_[D-1];D--);for(T=30;1<T&&0===N[T-1];T--);var V,q,J,$,K,W,X=D,Q=T,ee=new(i?Uint32Array:Array)(X+Q),te=new(i?Uint32Array:Array)(316),re=new(i?Uint8Array:Array)(19);for(V=q=0;V<X;V++)ee[q++]=_[V];for(V=0;V<Q;V++)ee[q++]=N[V];if(!i)for(V=0,$=re.length;V<$;++V)re[V]=0;for(V=K=0,$=ee.length;V<$;V+=q){for(q=1;V+q<$&&ee[V+q]===ee[V];++q);if(J=q,0===ee[V])if(3>J)for(;0<J--;)te[K++]=0,re[0]++;else for(;0<J;)(W=138>J?J:138)>J-3&&W<J&&(W=J-3),10>=W?(te[K++]=17,te[K++]=W-3,re[17]++):(te[K++]=18,te[K++]=W-11,re[18]++),J-=W;else if(te[K++]=ee[V],re[ee[V]]++,3>--J)for(;0<J--;)te[K++]=ee[V],re[ee[V]]++;else for(;0<J;)(W=6>J?J:6)>J-3&&W<J&&(W=J-3),te[K++]=16,te[K++]=W-3,re[16]++,J-=W}for(r=i?te.subarray(0,K):te.slice(0,K),j=C(re,7),M=0;19>M;M++)Y[M]=j[H[M]];for(x=19;4<x&&0===Y[x-1];x--);for(P=U(j),G.b(D-257,5,t),G.b(T-1,5,t),G.b(x-4,4,t),M=0;M<x;M++)G.b(Y[M],3,t);for(M=0,Z=r.length;M<Z;M++)if(L=r[M],G.b(P[L],j[L],t),16<=L){switch(M++,L){case 16:z=2;break;case 17:z=3;break;case 18:z=7;break;default:throw"invalid code: "+L}G.b(r[M],z,t)}var ne,ie,ae,oe,ue,se,fe,ce,le=[R,_],he=[I,N];for(ue=le[0],se=le[1],fe=he[0],ce=he[1],ne=0,ie=O.length;ne<ie;++ne)if(ae=O[ne],G.b(ue[ae],se[ae],t),256<ae)G.b(O[++ne],O[++ne],t),oe=O[++ne],G.b(fe[oe],ce[oe],t),G.b(O[++ne],O[++ne],t);else if(256===ae)break;this.c=G.finish(),this.e=this.c.length;break;default:throw"invalid compression type"}return this.c};var k=function(){function e(e){switch(t){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw"invalid length: "+e}}var r,n,i=[];for(r=3;258>=r;r++)n=e(r),i[r]=n[2]<<24|n[1]<<16|n[0];return i}(),F=i?new Uint32Array(k):k;function E(r,n){function a(e,r){var n,i,a,o,u=e.n,s=[],f=0;switch(n=F[e.length],s[f++]=65535&n,s[f++]=n>>16&255,s[f++]=n>>24,t){case 1===u:i=[0,u-1,0];break;case 2===u:i=[1,u-2,0];break;case 3===u:i=[2,u-3,0];break;case 4===u:i=[3,u-4,0];break;case 6>=u:i=[4,u-5,1];break;case 8>=u:i=[5,u-7,1];break;case 12>=u:i=[6,u-9,2];break;case 16>=u:i=[7,u-13,2];break;case 24>=u:i=[8,u-17,3];break;case 32>=u:i=[9,u-25,3];break;case 48>=u:i=[10,u-33,4];break;case 64>=u:i=[11,u-49,4];break;case 96>=u:i=[12,u-65,5];break;case 128>=u:i=[13,u-97,5];break;case 192>=u:i=[14,u-129,6];break;case 256>=u:i=[15,u-193,6];break;case 384>=u:i=[16,u-257,7];break;case 512>=u:i=[17,u-385,7];break;case 768>=u:i=[18,u-513,8];break;case 1024>=u:i=[19,u-769,8];break;case 1536>=u:i=[20,u-1025,9];break;case 2048>=u:i=[21,u-1537,9];break;case 3072>=u:i=[22,u-2049,10];break;case 4096>=u:i=[23,u-3073,10];break;case 6144>=u:i=[24,u-4097,11];break;case 8192>=u:i=[25,u-6145,11];break;case 12288>=u:i=[26,u-8193,12];break;case 16384>=u:i=[27,u-12289,12];break;case 24576>=u:i=[28,u-16385,13];break;case 32768>=u:i=[29,u-24577,13];break;default:throw"invalid distance"}for(n=i,s[f++]=n[0],s[f++]=n[1],s[f++]=n[2],a=0,o=s.length;a<o;++a)g[d++]=s[a];m[s[0]]++,w[s[3]]++,v=e.length+r-1,p=null}var o,u,s,f,c,l,h,p,y,b={},g=i?new Uint16Array(2*n.length):[],d=0,v=0,m=new(i?Uint32Array:Array)(286),w=new(i?Uint32Array:Array)(30),A=r.l;if(!i){for(s=0;285>=s;)m[s++]=0;for(s=0;29>=s;)w[s++]=0}for(m[256]=1,o=0,u=n.length;o<u;++o){for(s=c=0,f=3;s<f&&o+s!==u;++s)c=c<<8|n[o+s];if(b[c]===e&&(b[c]=[]),l=b[c],!(0<v--)){for(;0<l.length&&32768<o-l[0];)l.shift();if(o+3>=u){for(p&&a(p,-1),s=0,f=u-o;s<f;++s)y=n[o+s],g[d++]=y,++m[y];break}0<l.length?(h=B(n,o,l),p?p.length<h.length?(y=n[o-1],g[d++]=y,++m[y],a(h,0)):a(p,-1):h.length<A?p=h:a(h,0)):p?a(p,-1):(y=n[o],g[d++]=y,++m[y])}l.push(o)}return g[d++]=256,m[256]++,r.p=m,r.o=w,i?g.subarray(0,d):g}function B(e,t,r){var n,i,a,o,u,s,f=0,c=e.length;o=0,s=r.length;e:for(;o<s;o++){if(n=r[s-o-1],a=3,3<f){for(u=f;3<u;u--)if(e[n+u-1]!==e[t+u-1])continue e;a=f}for(;258>a&&t+a<c&&e[n+a]===e[t+a];)++a;if(a>f&&(i=n,f=a),258===a)break}return new A(f,t-i)}function C(e,t){var r,n,a,o,u,s=e.length,f=new g(572),c=new(i?Uint8Array:Array)(s);if(!i)for(o=0;o<s;o++)c[o]=0;for(o=0;o<s;++o)0<e[o]&&f.push(o,e[o]);if(r=Array(f.length/2),n=new(i?Uint32Array:Array)(f.length/2),1===r.length)return c[f.pop().index]=1,c;for(o=0,u=f.length/2;o<u;++o)r[o]=f.pop(),n[o]=r[o].value;for(a=function(e,t,r){function n(e){var r=y[e][b[e]];r===t?(n(e+1),n(e+1)):--h[r],++b[e]}var a,o,u,s,f,c=new(i?Uint16Array:Array)(r),l=new(i?Uint8Array:Array)(r),h=new(i?Uint8Array:Array)(t),p=Array(r),y=Array(r),b=Array(r),g=(1<<r)-t,d=1<<r-1;for(c[r-1]=t,o=0;o<r;++o)g<d?l[o]=0:(l[o]=1,g-=d),g<<=1,c[r-2-o]=(c[r-1-o]/2|0)+t;for(c[0]=l[0],p[0]=Array(c[0]),y[0]=Array(c[0]),o=1;o<r;++o)c[o]>2*c[o-1]+l[o]&&(c[o]=2*c[o-1]+l[o]),p[o]=Array(c[o]),y[o]=Array(c[o]);for(a=0;a<t;++a)h[a]=r;for(u=0;u<c[r-1];++u)p[r-1][u]=e[u],y[r-1][u]=u;for(a=0;a<r;++a)b[a]=0;for(1===l[r-1]&&(--h[0],++b[r-1]),o=r-2;0<=o;--o){for(s=a=0,f=b[o+1],u=0;u<c[o];u++)(s=p[o+1][f]+p[o+1][f+1])>e[a]?(p[o][u]=s,y[o][u]=t,f+=2):(p[o][u]=e[a],y[o][u]=a,++a);b[o]=0,1===l[o]&&n(o)}return h}(n,n.length,t),o=0,u=r.length;o<u;++o)c[r[o].index]=a[o];return c}function U(e){var t,r,n,a,o=new(i?Uint16Array:Array)(e.length),u=[],s=[],f=0;for(t=0,r=e.length;t<r;t++)u[e[t]]=1+(0|u[e[t]]);for(t=1,r=16;t<=r;t++)s[t]=f,f+=0|u[t],f<<=1;for(t=0,r=e.length;t<r;t++)for(f=s[e[t]],s[e[t]]+=1,n=o[t]=0,a=e[t];n<a;n++)o[t]=o[t]<<1|1&f,f>>>=1;return o}function S(e){e=e||{},this.files=[],this.d=e.comment}var O=[80,75,1,2],D=[80,75,3,4],T=[80,75,5,6];function x(e,t){var r,n=65535&e[2]|2;return r=n*(1^n)>>8&255,_(e,t),r^t}function _(e,t){e[0]=(b[255&(e[0]^t)]^e[0]>>>8)>>>0,e[1]=1+(6681*(20173*(e[1]+(255&e[0]))>>>0)>>>0)>>>0,e[2]=(b[255&(e[2]^e[1]>>>24)]^e[2]>>>8)>>>0}function R(e,t){var r,i,a,o;if(Object.keys)r=Object.keys(t);else for(i in r=[],a=0,t)r[a++]=i;for(a=0,o=r.length;a<o;++a)n(e+"."+(i=r[a]),t[i])}S.prototype.m=function(e,r){r=r||{};var n,a=e.length,o=0;if(i&&e instanceof Array&&(e=new Uint8Array(e)),"number"!=typeof r.compressionMethod&&(r.compressionMethod=8),r.compress)switch(r.compressionMethod){case 0:break;case 8:o=p(e),e=new d(e,r.deflateOption).g(),n=t;break;default:throw Error("unknown compression method:"+r.compressionMethod)}this.files.push({buffer:e,a:r,j:n,r:!1,size:a,h:o})},S.prototype.q=function(e){this.i=e},S.prototype.g=function(){var r,n,a,o,u,s,f,c,l,h,y,b,g,v,m,w,A,k,F,E,B,C,U,S,R=this.files,N=0,I=0;for(B=0,C=R.length;B<C;++B){if(g=(r=R[B]).a.filename?r.a.filename.length:0,v=r.a.comment?r.a.comment.length:0,!r.j)switch(r.h=p(r.buffer),r.a.compressionMethod){case 0:break;case 8:r.buffer=new d(r.buffer,r.a.deflateOption).g(),r.j=t;break;default:throw Error("unknown compression method:"+r.a.compressionMethod)}if(r.a.password!==e||this.i!==e){var j,P=r.a.password||this.i,L=[305419896,591751049,878082192],z=e;for(i&&(L=new Uint32Array(L)),z=0,j=P.length;z<j;++z)_(L,255&P[z]);for(E=L,k=r.buffer,i?((F=new Uint8Array(k.length+12)).set(k,12),k=F):k.unshift(0,0,0,0,0,0,0,0,0,0,0,0),U=0;12>U;++U)k[U]=x(E,11===B?255&r.h:256*Math.random()|0);for(S=k.length;U<S;++U)k[U]=x(E,k[U]);r.buffer=k}N+=30+g+r.buffer.length,I+=46+g+v}for(n=new(i?Uint8Array:Array)(N+I+(22+(this.d?this.d.length:0))),a=0,u=(o=N)+I,B=0,C=R.length;B<C;++B){if(g=(r=R[B]).a.filename?r.a.filename.length:0,v=r.a.comment?r.a.comment.length:0,s=a,n[a++]=D[0],n[a++]=D[1],n[a++]=D[2],n[a++]=D[3],n[o++]=O[0],n[o++]=O[1],n[o++]=O[2],n[o++]=O[3],n[o++]=20,n[o++]=r.a.os||0,n[a++]=n[o++]=20,f=n[a++]=n[o++]=0,(r.a.password||this.i)&&(f|=1),n[a++]=n[o++]=255&f,n[a++]=n[o++]=f>>8&255,c=r.a.compressionMethod,n[a++]=n[o++]=255&c,n[a++]=n[o++]=c>>8&255,l=r.a.date||new Date,n[a++]=n[o++]=(7&l.getMinutes())<<5|l.getSeconds()/2|0,n[a++]=n[o++]=l.getHours()<<3|l.getMinutes()>>3,n[a++]=n[o++]=(l.getMonth()+1&7)<<5|l.getDate(),n[a++]=n[o++]=(l.getFullYear()-1980&127)<<1|l.getMonth()+1>>3,h=r.h,n[a++]=n[o++]=255&h,n[a++]=n[o++]=h>>8&255,n[a++]=n[o++]=h>>16&255,n[a++]=n[o++]=h>>24&255,y=r.buffer.length,n[a++]=n[o++]=255&y,n[a++]=n[o++]=y>>8&255,n[a++]=n[o++]=y>>16&255,n[a++]=n[o++]=y>>24&255,b=r.size,n[a++]=n[o++]=255&b,n[a++]=n[o++]=b>>8&255,n[a++]=n[o++]=b>>16&255,n[a++]=n[o++]=b>>24&255,n[a++]=n[o++]=255&g,n[a++]=n[o++]=g>>8&255,n[a++]=n[o++]=0,n[a++]=n[o++]=0,n[o++]=255&v,n[o++]=v>>8&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=255&s,n[o++]=s>>8&255,n[o++]=s>>16&255,n[o++]=s>>24&255,m=r.a.filename)if(i)n.set(m,a),n.set(m,o),a+=g,o+=g;else for(U=0;U<g;++U)n[a++]=n[o++]=m[U];if(w=r.a.extraField)if(i)n.set(w,a),n.set(w,o),a+=0,o+=0;else for(U=0;U<v;++U)n[a++]=n[o++]=w[U];if(A=r.a.comment)if(i)n.set(A,o),o+=v;else for(U=0;U<v;++U)n[o++]=A[U];if(i)n.set(r.buffer,a),a+=r.buffer.length;else for(U=0,S=r.buffer.length;U<S;++U)n[a++]=r.buffer[U]}if(n[u++]=T[0],n[u++]=T[1],n[u++]=T[2],n[u++]=T[3],n[u++]=0,n[u++]=0,n[u++]=0,n[u++]=0,n[u++]=255&C,n[u++]=C>>8&255,n[u++]=255&C,n[u++]=C>>8&255,n[u++]=255&I,n[u++]=I>>8&255,n[u++]=I>>16&255,n[u++]=I>>24&255,n[u++]=255&N,n[u++]=N>>8&255,n[u++]=N>>16&255,n[u++]=N>>24&255,v=this.d?this.d.length:0,n[u++]=255&v,n[u++]=v>>8&255,this.d)if(i)n.set(this.d,u);else for(U=0,S=v;U<S;++U)n[u++]=this.d[U];return n},n("Zlib.Zip",S),n("Zlib.Zip.prototype.addFile",S.prototype.m),n("Zlib.Zip.prototype.compress",S.prototype.g),n("Zlib.Zip.prototype.setPassword",S.prototype.q),R("Zlib.Zip.CompressionMethod",{STORE:0,DEFLATE:8}),R("Zlib.Zip.OperatingSystem",{MSDOS:0,UNIX:3,MACINTOSH:7})}).call(this)},9:function(e,t,r){"use strict";var n=r(0),i=r(12),a=r(4),o=r.n(a),u=r(14),s=r.n(u);function f(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){f(a,n,i,o,u,"next",e)}function u(e){f(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
/**
* @author n1474335 [n1474335@gmail.com]
* @author Matt C [matt@artemisbot.uk]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/
var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=[],this.type=e.BYTE_ARRAY,t&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")&&this.set(t.value,t.type)}var t,r,a;return t=e,r=[{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),s.a.debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var a=n.a.truncate(JSON.stringify(this.value),13);throw new i.a("Data is not a valid ".concat(e.enumLookup(r),": ").concat(a))}}},{key:"get",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var n,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],"string"==typeof r&&(r=e.typeEnum(r)),this.type===r){t.next=5;break}return t.next=5,this._translate(r,n);case 5:return t.abrupt("return",this.value);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"_translate",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var a,u,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=f.length>1&&void 0!==f[1]&&f[1],s.a.debug("Translating Dish from ".concat(e.enumLookup(this.type)," to ").concat(e.enumLookup(r))),u=a?n.a.byteArrayToChars:n.a.byteArrayToUtf8,t.prev=3,t.t0=this.type,t.next=t.t0===e.STRING?7:t.t0===e.NUMBER?9:t.t0===e.HTML?11:t.t0===e.ARRAY_BUFFER?13:t.t0===e.BIG_NUMBER?15:t.t0===e.JSON?17:t.t0===e.FILE?19:t.t0===e.LIST_FILE?24:30;break;case 7:return this.value=this.value?n.a.strToByteArray(this.value):[],t.abrupt("break",31);case 9:return this.value="number"==typeof this.value?n.a.strToByteArray(this.value.toString()):[],t.abrupt("break",31);case 11:return this.value=this.value?n.a.strToByteArray(n.a.unescapeHtml(n.a.stripHtmlTags(this.value,!0))):[],t.abrupt("break",31);case 13:return this.value=Array.prototype.slice.call(new Uint8Array(this.value)),t.abrupt("break",31);case 15:return this.value=o.a.isBigNumber(this.value)?n.a.strToByteArray(this.value.toFixed()):[],t.abrupt("break",31);case 17:return this.value=this.value?n.a.strToByteArray(JSON.stringify(this.value,null,4)):[],t.abrupt("break",31);case 19:return t.next=21,n.a.readFile(this.value);case 21:return this.value=t.sent,this.value=Array.prototype.slice.call(this.value),t.abrupt("break",31);case 24:return t.next=26,Promise.all(this.value.map(function(){var e=c(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.a.readFile(t));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()));case 26:return this.value=t.sent,this.value=this.value.map(function(e){return Array.prototype.slice.call(e)}),this.value=[].concat.apply([],this.value),t.abrupt("break",31);case 30:return t.abrupt("break",31);case 31:t.next=36;break;case 33:throw t.prev=33,t.t1=t.catch(3),new i.a("Error translating from ".concat(e.enumLookup(this.type)," to byteArray: ").concat(t.t1));case 36:this.type=e.BYTE_ARRAY,t.prev=37,t.t2=r,t.next=t.t2===e.STRING?41:t.t2===e.HTML?41:t.t2===e.NUMBER?44:t.t2===e.ARRAY_BUFFER?47:t.t2===e.BIG_NUMBER?50:t.t2===e.JSON?53:t.t2===e.FILE?56:t.t2===e.LIST_FILE?58:61;break;case 41:return this.value=this.value?u(this.value):"",this.type=e.STRING,t.abrupt("break",62);case 44:return this.value=this.value?parseFloat(u(this.value)):0,this.type=e.NUMBER,t.abrupt("break",62);case 47:return this.value=new Uint8Array(this.value).buffer,this.type=e.ARRAY_BUFFER,t.abrupt("break",62);case 50:try{this.value=new o.a(u(this.value))}catch(e){this.value=new o.a(NaN)}return this.type=e.BIG_NUMBER,t.abrupt("break",62);case 53:return this.value=JSON.parse(u(this.value)),this.type=e.JSON,t.abrupt("break",62);case 56:return this.value=new File(this.value,"unknown"),t.abrupt("break",62);case 58:return this.value=[new File(this.value,"unknown")],this.type=e.LIST_FILE,t.abrupt("break",62);case 61:return t.abrupt("break",62);case 62:t.next=67;break;case 64:throw t.prev=64,t.t3=t.catch(37),new i.a("Error translating from byteArray to ".concat(e.enumLookup(r),": ").concat(t.t3));case 67:case"end":return t.stop()}},t,this,[[3,33],[37,64]])}));return function(e){return t.apply(this,arguments)}}()},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Array))return!1;for(var t=0;t<this.value.length;t++)if("number"!=typeof this.value[t]||this.value[t]<0||this.value[t]>255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:return o.a.isBigNumber(this.value);case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new i.a("Cannot clone Dish, unknown type")}return t}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}}],a=[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":return e.JSON;case"file":return e.FILE;case"list<file>":return e.LIST_FILE;default:throw new i.a("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List<File>";default:throw new i.a("Invalid data type enum. No matching type.")}}}],r&&l(t.prototype,r),a&&l(t,a),e}();h.BYTE_ARRAY=0,h.STRING=1,h.NUMBER=2,h.HTML=3,h.ARRAY_BUFFER=4,h.BIG_NUMBER=5,h.JSON=6,h.FILE=7,h.LIST_FILE=8,t.a=h}});