/**
 * 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 n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1425)}({0:function(e,t,n){"use strict";(function(e,r){n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return b})),n.d(t,"a",(function(){return A}));var i=n(6),o=n.n(i),a=n(1),u=n.n(a),s=n(2),c=n.n(s),l=n(23),f=n.n(l),h=n(15),p=n(16),d=n(28),m=n(27),g=function(){function t(){u()(this,t)}return c()(t,null,[{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),n=e.charCodeAt(1);if(t>=55296&&t<56320&&n>=56320&&n<57344)return 1024*(t-55296)+n-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new Array(t);return r.fill(n),[...e].forEach((function(e,t){r[t]=e})),r}},{key:"truncate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-n.length)+n),e}},{key:"hex",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(n,"0")}},{key:"bin",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(n,"0")}},{key:"printable",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];y()&&window.app&&!window.app.options.treatAsUtf8&&(e=t.byteArrayToChars(t.strToByteArray(e)));var r=/[\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,i=/[\x09-\x10\x0D\u2028\u2029]/g;return e=e.replace(r,"."),n||(e=e.replace(i,".")),e}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([bfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));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(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}}))}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var n=[],r=0;r<e.length;r++)if(r<e.length-2&&"-"===e[r+1]&&"\\"!==e[r]){for(var i=t.ord(e[r]),o=t.ord(e[r+2]),a=i;a<=o;a++)n.push(t.chr(a));r+=2}else r<e.length-2&&"\\"===e[r]&&"-"===e[r+1]?(n.push("-"),r++):n.push(e[r]);return n}},{key:"convertToByteArray",value:function(e,n){switch(n.toLowerCase()){case"binary":return Object(m.a)(e);case"hex":return Object(p.a)(e);case"decimal":return Object(d.a)(e);case"base64":return Object(h.a)(e,null,"byteArray");case"utf8":return t.strToUtf8ByteArray(e);case"latin1":default:return t.strToByteArray(e)}}},{key:"convertToByteString",value:function(e,n){switch(n.toLowerCase()){case"binary":return t.byteArrayToChars(Object(m.a)(e));case"hex":return t.byteArrayToChars(Object(p.a)(e));case"decimal":return t.byteArrayToChars(Object(d.a)(e));case"base64":return t.byteArrayToChars(Object(h.a)(e,null,"byteArray"));case"utf8":return f.a.encode(e);case"latin1":default:return e}}},{key:"strToArrayBuffer",value:function(e){for(var n,r=new Uint8Array(e.length),i=e.length;i--;)if(n=e.charCodeAt(i),r[i]=n,n>255)return t.strToUtf8ArrayBuffer(e);return r.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){var n=f.a.encode(e);return e.length!==n.length&&(w()?self.setOption("attemptHighlight",!1):y()&&(window.app.options.attemptHighlight=!1)),t.strToArrayBuffer(n)}},{key:"strToByteArray",value:function(e){for(var n,r=new Array(e.length),i=e.length;i--;)if(n=e.charCodeAt(i),r[i]=n,n>255)return t.strToUtf8ByteArray(e);return r}},{key:"strToUtf8ByteArray",value:function(e){var n=f.a.encode(e);return e.length!==n.length&&(w()?self.setOption("attemptHighlight",!1):y()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(n)}},{key:"strToCharcode",value:function(e){for(var n=[],r=0;r<e.length;r++){var i=e.charCodeAt(r);if(r<e.length-1&&i>=55296&&i<56320){var o=e[r+1].charCodeAt(0);o>=56320&&o<57344&&(i=t.ord(e[r]+e[++r]))}n.push(i)}return n}},{key:"byteArrayToUtf8",value:function(e){var n=t.byteArrayToChars(e);try{var r=f.a.decode(n);return n.length!==r.length&&(w()?self.setOption("attemptHighlight",!1):y()&&(window.app.options.attemptHighlight=!1)),r}catch(e){return n}}},{key:"byteArrayToChars",value:function(e){if(!e)return"";for(var t="",n=0;n<e.length;)t+=String.fromCharCode(e[n++]);return t}},{key:"arrayBufferToStr",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new Uint8Array(e);return n?t.byteArrayToUtf8(r):t.byteArrayToChars(r)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,n=[],r=new Array(256).fill(0);for(t=0;t<e.length;t++)r[e[t]]++;for(t=0;t<r.length;t++)r[t]>0&&n.push(r[t]/e.length);var i,o=0;for(t=0;t<n.length;t++)o+=(i=n[t])*Math.log(i)/Math.log(2);return-o}},{key:"parseCSV",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,a=!1,u="",s=[],c=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var l=0;l<e.length;l++)t=e[l],n=e[l+1]||"",o?(u+=t,o=!1):'"'!==t||a?'"'===t&&a?'"'===n?o=!0:a=!1:!a&&r.indexOf(t)>=0?(s.push(u),u=""):!a&&i.indexOf(t)>=0?(s.push(u),u="",c.push(s),s=[],i.indexOf(n)>=0&&n!==t&&l++):u+=t:a=!0;return s.length&&(s.push(u),c.push(s)),c}},{key:"stripHtmlTags",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&(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],n="",r="",i="",o="",a="";return e.forEach((function(e){r=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",a=e.breakpoint?"/breakpoint":"",n+=`${r}(${i}${o}${a})`,t&&(n+="\n")})),n}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,n;e=e.replace(/\n/g,"");for(var r=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=r.exec(e);){n="["+(n=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:t[1].replace(/_/g," "),args:JSON.parse(n)};t[3]&&t[3].indexOf("disabled")>0&&(o.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:function(e){var n,r,i,a,u;return o.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:n=function(e){return`<div class='card' style='white-space: normal;'>\n                    <div class='card-header'>\n                        <h6 class="mb-0">\n                            ${t.escapeHtml(e.name)}\n                        </h6>\n                    </div>\n                </div>`},r=function(e,n){if(n.startsWith("image")){var r="data:";return r+=n+";","<img style='max-width: 100%;' src='"+(r+="base64,"+Object(h.b)(e))+"'>"}return`<pre>${t.escapeHtml(t.arrayBufferToStr(e.buffer))}</pre>`},i=function(e,n){var i,a,u,s;return o.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,o.a.awrap(t.readFile(e));case 2:return i=c.sent,a=new Blob([i],{type:e.type||"octet/stream"}),u=URL.createObjectURL(a),s=`<div class='card' style='white-space: normal;'>\n                    <div class='card-header' id='heading${n}'>\n                        <h6 class='mb-0'>\n                            <a class='collapsed'\n                                data-toggle='collapse'\n                                href='#collapse${n}'\n                                aria-expanded='false'\n                                aria-controls='collapse${n}'\n                                title="Show/hide contents of '${t.escapeHtml(e.name)}'">\n                                ${t.escapeHtml(e.name)}</a>\n                            <span class='float-right' style="margin-top: -3px">\n                                ${e.size.toLocaleString()} bytes\n                                <a title="Download ${t.escapeHtml(e.name)}"\n                                    href="${u}"\n                                    download="${t.escapeHtml(e.name)}"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">save</i>\n                                </a>\n                                <a title="Move to input"\n                                    href="#"\n                                    blob-url="${u}"\n                                    file-name="${t.escapeHtml(e.name)}"\n                                    class="extract-file"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n                                </a>\n                            </span>\n                        </h6>\n                    </div>\n                    <div id='collapse${n}' class='collapse' aria-labelledby='heading${n}' data-parent="#files">\n                        <div class='card-body'>\n                            ${r(i,e.type)}\n                        </div>\n                    </div>\n                </div>`,c.abrupt("return",s);case 7:case"end":return c.stop()}}))},a=`<div style='padding: 5px; white-space: normal;'>\n                ${e.length} file(s) found\n            </div><div id="files" style="padding: 20px">`,u=0;case 5:if(!(u<e.length)){s.next=17;break}if(!e[u].name.endsWith("/")){s.next=10;break}a+=n(e[u]),s.next=14;break;case 10:return s.t0=a,s.next=13,o.a.awrap(i(e[u],u));case 13:a=s.t0+=s.sent;case 14:u++,s.next=5;break;case 17:return s.abrupt("return",a+="</div>");case 18:case"end":return s.stop()}}))}},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),n={},r=0;r<t.length;r++){var i=t[r].split("=");2!==i.length?n[t[r]]=!0:n[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return n}},{key:"readFile",value:function(t){return v()?e.from(t).buffer:new Promise((function(e,n){var r=new FileReader,i=new Uint8Array(t.size),o=0,a=function(){if(o>=t.size)e(i);else{var n=t.slice(o,o+10485760);r.readAsArrayBuffer(n)}};r.onload=function(e){i.set(new Uint8Array(r.result),o),o+=10485760,a()},r.onerror=function(e){n(r.error.message)},a()}))}},{key:"readFileSync",value:function(e){if(!v())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(e,n){return n?t.gcd(n,e%n):e}},{key:"modInv",value:function(e,t){e%=t;for(var n=1;n<t;n++)if(e*n%26==1)return n}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","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,Percent:/%/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]}}]),t}();function v(){return void 0!==r&&null!=r.versions&&null!=r.versions.node}function y(){return"object"==typeof window}function w(){return"function"==typeof importScripts}function b(e){w()?self.sendStatusMessage(e):y()?app.alert(e,1e4):v()&&console.debug(e)}t.b=g,Array.prototype.unique=function(){for(var e={},t=[],n=0,r=this.length;n<r;n++)Object.prototype.hasOwnProperty.call(e,this[n])||(t.push(this[n]),e[this[n]]=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};var x={};function A(e,t,n,r,i){return function(){clearTimeout(x[n]),x[n]=setTimeout((function(){e.apply(r,i)}),t)}}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))})}).call(this,n(11).Buffer,n(25))},1:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},11:function(e,t,n){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var r=n(40),i=n(41),o=n(42);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),i=(e=u(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|p(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=u(e,t<0?0:0|p(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<u;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===s)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){for(var f=!0,h=0;h<s;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return G(Y(t,e.length-n),e,n,r)}function x(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return x(e,t,n,r)}function F(e,t,n,r){return G($(t),e,n,r)}function B(e,t,n,r){return G(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,u,s,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=e[i+1],a=e[i+2],u=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),f=0;f<u;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return F(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function L(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function _(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return o||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return o||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var i=t-e;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=s.isBuffer(e)?e:Y(new s(e,r).toString()),u=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(26))},12:function(e,t,n){var r=n(44),i=n(45),o=n(46);e.exports=function(e,t){return r(e)||i(e,t)||o()}},13:function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(1),a=n.n(o),u=n(2),s=n.n(u),c=n(0),l=n(4),f=n.n(l),h=n(3),p=n.n(h),d=n(22),m=n.n(d),g=n(5),v=n.n(g);
/**
 * 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 y=function(e){function t(){var e;a()(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=f()(this,p()(t).call(this,...r))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(m()(e),t),e}return v()(t,e),t}(function(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}(Error)),w=n(14),b=n.n(w),x=n(18),A=n(24),F=n.n(A),B=function(){function e(){a()(this,e)}return s()(e,null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];throw new Error("fromArrayBuffer has not been implemented")}}]),e}(),E=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}]),t}(B),k=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=b.a.isBigNumber(this.value)?c.b.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value);try{this.value=new b.a(c.b.arrayBufferToStr(this.value,!e))}catch(e){this.value=new b.a(NaN)}}}]),t}(B),C=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){var e=this;if(t.checkForValue(this.value),!Object(c.c)())return new Promise((function(t,n){c.b.readFile(e.value).then((function(t){return e.value=t.buffer})).then(t).catch(n)}));this.value=c.b.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new File(this.value,"unknown")}}]),t}(B),T=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=this.value?c.b.arrayBufferToStr(this.value,!e):""}}]),t}(B),S=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(c.b.unescapeHtml(c.b.stripHtmlTags(this.value,!0))):new ArrayBuffer}}]),t}(T),R=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=JSON.parse(c.b.arrayBufferToStr(this.value,!e))}}]),t}(B),L=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.checkForValue(this.value),!Object(c.c)()){e.next=5;break}this.value=this.value.map((function(e){return Uint8Array.from(e.data)})),e.next=8;break;case 5:return e.next=7,i.a.awrap(t.concatenateTypedArraysWithTypedElements(...this.value));case 7:this.value=e.sent;case 8:case"end":return e.stop()}}),null,this)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:function(){var e,t,n,r,o,a,u,s,l,f,h,p,d,m=arguments;return i.a.async((function(g){for(;;)switch(g.prev=g.next){case 0:for(e=0,t=m.length,n=new Array(t),r=0;r<t;r++)n[r]=m[r];for(o=0,a=n;o<a.length;o++)u=a[o],e+=u.size;s=new Uint8Array(e),l=0,f=0,h=n;case 6:if(!(f<h.length)){g.next=16;break}return p=h[f],g.next=10,i.a.awrap(c.b.readFile(p));case 10:d=g.sent,s.set(d,l),l+=d.length;case 13:f++,g.next=6;break;case 16:return g.abrupt("return",s);case 17:case"end":return g.stop()}}))}},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];e+=a.length}for(var u=new Uint8Array(e),s=0,c=0,l=n;c<l.length;c++){var f=l[c];u.set(f,s),s+=f.length}return u}}]),t}(B),D=function(e){function t(){return a()(this,t),f()(this,p()(t).apply(this,arguments))}return v()(t,e),s()(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value="number"==typeof this.value?c.b.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(e){t.checkForValue(this.value),this.value=this.value?parseFloat(c.b.arrayBufferToStr(this.value,!e)):0}}]),t}(B),I=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a()(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"type"))this.set(t.value,t.type);else if(t&&null!==n)this.set(t,n);else if(t){var r=e.typeEnum(t.constructor.name);this.set(t,r)}}return s()(e,[{key:"get",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?Object(c.c)()?(this._translate(t,r),this.value):new Promise((function(e,i){n._translate(t,r).then((function(){e(n.value)})).catch(i)})):this.value}},{key:"set",value:function(t,n){if("string"==typeof n&&(n=e.typeEnum(n)),F.a.debug("Dish type: "+e.enumLookup(n)),this.value=t,this.type=n,!this.valid()){var r=c.b.truncate(JSON.stringify(this.value),25);throw new y(`Data is not a valid ${e.enumLookup(n)}: ${r}`)}}},{key:"presentAs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.clone();return n.get(e,t)}},{key:"detectDishType",value:function(){var e=new Uint8Array(this.value.slice(0,2048)),t=Object(x.a)(e);return t.length&&t[0].mime&&"text/plain"!==!t[0].mime?t[0].mime:null}},{key:"getTitle",value:function(t){var n,r;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:n="",o.t0=this.type,o.next=o.t0===e.FILE?4:o.t0===e.LIST_FILE?6:o.t0===e.JSON?8:o.t0===e.NUMBER?10:o.t0===e.BIG_NUMBER?10:o.t0===e.ARRAY_BUFFER?12:o.t0===e.BYTE_ARRAY?12:15;break;case 4:return n=this.value.name,o.abrupt("break",26);case 6:return n=`${this.value.length} file(s)`,o.abrupt("break",26);case 8:return n="application/json",o.abrupt("break",26);case 10:return n=this.value.toString(),o.abrupt("break",26);case 12:if(null===(n=this.detectDishType())){o.next=15;break}return o.abrupt("break",26);case 15:return o.prev=15,(r=this.clone()).value=r.value.slice(0,256),o.next=20,i.a.awrap(r.get(e.STRING));case 20:n=o.sent,o.next=26;break;case 23:o.prev=23,o.t1=o.catch(15),F.a.error(`${e.enumLookup(this.type)} cannot be sliced. ${o.t1}`);case 26:return o.abrupt("return",n.slice(0,t));case 27:case"end":return o.stop()}}),null,this,[[15,23]])}},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||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:if(b.a.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var n=new b.a;return n.c=this.value.c,n.e=this.value.e,n.s=this.value.s,this.value=n,!0}return!1;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 y("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(F.a.debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!Object(c.c)())return new Promise((function(r,i){n._toArrayBuffer().then((function(){return n.type=e.ARRAY_BUFFER})).then((function(){n._fromArrayBuffer(t),r()})).catch(i)}));this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t,r)}},{key:"_toArrayBuffer",value:function(){var t=this,n={browser:{[e.STRING]:function(){return Promise.resolve(T.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(D.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(S.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(k.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(R.toArrayBuffer.bind(t)())},[e.FILE]:function(){return C.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve(L.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(E.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return T.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return D.toArrayBuffer.bind(t)()},[e.HTML]:function(){return S.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return k.toArrayBuffer.bind(t)()},[e.JSON]:function(){return R.toArrayBuffer.bind(t)()},[e.FILE]:function(){return C.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return L.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return E.toArrayBuffer.bind(t)()}}};try{return n[Object(c.c)()?"node":"browser"][this.type]()}catch(t){throw new y(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t,n){var r=this,i={[e.STRING]:function(){return T.fromArrayBuffer.bind(r)(n)},[e.NUMBER]:function(){return D.fromArrayBuffer.bind(r)(n)},[e.HTML]:function(){return S.fromArrayBuffer.bind(r)(n)},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return k.fromArrayBuffer.bind(r)(n)},[e.JSON]:function(){return R.fromArrayBuffer.bind(r)(n)},[e.FILE]:function(){return C.fromArrayBuffer.bind(r)()},[e.LIST_FILE]:function(){return L.fromArrayBuffer.bind(r)()},[e.BYTE_ARRAY]:function(){return E.fromArrayBuffer.bind(r)()}};try{i[t](),this.type=t}catch(n){throw new y(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${n}`)}}},{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}}}],[{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":case"object":return e.JSON;case"file":return e.FILE;case"list<file>":return e.LIST_FILE;default:throw new y("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 y("Invalid data type enum. No matching type.")}}}]),e}();I.BYTE_ARRAY=0,I.STRING=1,I.NUMBER=2,I.HTML=3,I.ARRAY_BUFFER=4,I.BIG_NUMBER=5,I.JSON=6,I.FILE=7,I.LIST_FILE=8;t.a=I},14:function(e,t,n){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,s=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function v(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=h-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function w(e,t){var n,r,i=e.c,o=t.c,a=e.s,u=t.s,s=e.e,c=t.e;if(!a||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:a;if(a!=u)return a;if(n=a<0,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,a=0;a<u;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return s==c?0:s>c^n?1:-1}function b(e,t,n,r){if(e<t||e>n||e!==s(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return v(e.e/h)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function F(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var n,r,i,o,B,E,k,C,T,S=$.prototype={constructor:$,toString:null,valueOf:null},R=new $(1),L=20,D=4,I=-7,_=21,O=-1e7,P=1e7,N=!1,U=1,M=0,j={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Y="0123456789abcdefghijklmnopqrstuvwxyz";function $(e,t){var n,o,u,c,f,d,m,g,v=this;if(!(v instanceof $))return new $(e,t);if(null==t){if(e&&!0===e._isBigNumber)return v.s=e.s,void(!e.c||e.e>P?v.c=v.e=null:e.e<O?v.c=[v.e=0]:(v.e=e.e,v.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(v.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>P?v.c=v.e=null:(v.e=c,v.c=[e]))}g=String(e)}else{if(!a.test(g=String(e)))return i(v,g,d);v.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(f=g.search(/e/i))>0?(c<0&&(c=f),c+=+g.slice(f+1),g=g.substring(0,f)):c<0&&(c=g.length)}else{if(b(t,2,Y.length,"Base"),10==t)return W(v=new $(e),L+v.e+1,D);if(g=String(e),d="number"==typeof e){if(0*e!=0)return i(v,g,d,t);if(v.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else v.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=Y.slice(0,t),c=f=0,m=g.length;f<m;f++)if(n.indexOf(o=g.charAt(f))<0){if("."==o){if(f>c){c=m;continue}}else if(!u&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){u=!0,f=-1,c=0;continue}return i(v,String(e),d,t)}d=!1,(c=(g=r(g,t,10,v.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(f=0;48===g.charCodeAt(f);f++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(f,++m)){if(m-=f,d&&$.DEBUG&&m>15&&(e>p||e!==s(e)))throw Error(l+v.s*e);if((c=c-f-1)>P)v.c=v.e=null;else if(c<O)v.c=[v.e=0];else{if(v.e=c,v.c=[],f=(c+1)%h,c<0&&(f+=h),f<m){for(f&&v.c.push(+g.slice(0,f)),m-=h;f<m;)v.c.push(+g.slice(f,f+=h));f=h-(g=g.slice(f)).length}else f-=m;for(;f--;g+="0");v.c.push(+g)}}else v.c=[v.e=0]}function G(e,t,n,r){var i,o,a,u,s;if(null==n?n=D:b(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)s=y(e.c),s=1==r||2==r&&(a<=I||a>=_)?A(s,a):F(s,a,"0");else if(o=(e=W(new $(e),t,n)).e,u=(s=y(e.c)).length,1==r||2==r&&(t<=o||o<=I)){for(;u<t;s+="0",u++);s=A(s,o)}else if(t-=a,s=F(s,o,"0"),o+1>u){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-u)>0)for(o+1==u&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function H(e,t){for(var n,r=1,i=new $(e[0]);r<e.length;r++){if(!(n=new $(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function z(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*h-1)>P?e.c=e.e=null:n<O?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var i,o,a,c,l,p,m,g=e.c,v=d;if(g){e:{for(i=1,c=g[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=h,a=t,m=(l=g[p=0])/v[i-a-1]%10|0;else if((p=u((o+1)/h))>=g.length){if(!r)break e;for(;g.length<=p;g.push(0));l=m=0,i=1,a=(o%=h)-h+1}else{for(l=c=g[p],i=1;c>=10;c/=10,i++);m=(a=(o%=h)-h+i)<0?0:l/v[i-a-1]%10|0}if(r=r||t<0||null!=g[p+1]||(a<0?l:l%v[i-a-1]),r=n<4?(m||r)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||r||6==n&&(o>0?a>0?l/v[i-a]:0:g[p-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=v[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=p,c=1,p--):(g.length=p+1,c=v[h-o],g[p]=a>0?s(l/v[i-a]%v[a])*c:0),r)for(;;){if(0==p){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,g[0]==f&&(g[0]=1));break}if(g[p]+=c,g[p]!=f)break;g[p--]=0,c=1}for(o=g.length;0===g[--o];g.pop());}e.e>P?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function V(e){var t,n=e.e;return null===n?e.toString():(t=y(e.c),t=n<=I||n>=_?A(t,n):F(t,n,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,g,t),L=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),D=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-g,0,t),b(n[1],0,g,t),I=n[0],_=n[1]):(b(n,-g,g,t),I=-(_=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-g,-1,t),b(n[1],1,g,t),O=n[0],P=n[1];else{if(b(n,-g,g,t),!n)throw Error(c+t+" cannot be zero: "+n);O=-(P=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw N=!n,Error(c+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,g,t),M=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);j=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);Y=n}}return{DECIMAL_PLACES:L,ROUNDING_MODE:D,EXPONENTIAL_AT:[I,_],RANGE:[O,P],CRYPTO:N,MODULO_MODE:U,POW_PRECISION:M,FORMAT:j,ALPHABET:Y}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===s(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=f||n!==s(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return H(arguments,S.lt)},$.minimum=$.min=function(){return H(arguments,S.gt)},$.random=(o=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,n,r,i,a,l=0,f=[],p=new $(R);if(null==e?e=L:b(e,0,g),i=u(e/h),N)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));l<i;)(a=131072*t[l]+(t[l+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[l]=n[0],t[l+1]=n[1]):(f.push(a%1e14),l+=2);l=i/2}else{if(!crypto.randomBytes)throw N=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);l<i;)(a=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(f.push(a%1e14),l+=7);l=i/7}if(!N)for(;l<i;)(a=o())<9e15&&(f[l++]=a%1e14);for(i=f[--l],e%=h,i&&e&&(a=d[h-e],f[l]=s(i/a)*a);0===f[l];f.pop(),l--);if(l<0)f=[r=0];else{for(r=-1;0===f[0];f.splice(0,1),r-=h);for(l=1,a=f[0];a>=10;a/=10,l++);l<h&&(r-=h-l)}return p.e=r,p.c=f,p}),$.sum=function(){for(var e=1,t=arguments,n=new $(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){function e(e,t,n,r){for(var i,o,a=[0],u=0,s=e.length;u<s;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(u++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(t,r,i,o,a){var u,s,c,l,f,h,p,d,m=t.indexOf("."),g=L,v=D;for(m>=0&&(l=M,M=0,t=t.replace(".",""),h=(d=new $(r)).pow(t.length-m),M=l,d.c=e(F(y(h.c),h.e,"0"),10,i,"0123456789"),d.e=d.c.length),c=l=(p=e(t,r,i,a?(u=Y,"0123456789"):(u="0123456789",Y))).length;0==p[--l];p.pop());if(!p[0])return u.charAt(0);if(m<0?--c:(h.c=p,h.e=c,h.s=o,p=(h=n(h,d,g,v,i)).c,f=h.r,c=h.e),m=p[s=c+g+1],l=i/2,f=f||s<0||null!=p[s+1],f=v<4?(null!=m||f)&&(0==v||v==(h.s<0?3:2)):m>l||m==l&&(4==v||f||6==v&&1&p[s-1]||v==(h.s<0?8:7)),s<1||!p[0])t=f?F(u.charAt(1),-g,u.charAt(0)):u.charAt(0);else{if(p.length=s,f)for(--i;++p[--s]>i;)p[s]=0,s||(++c,p=[1].concat(p));for(l=p.length;!p[--l];);for(m=0,t="";m<=l;t+=u.charAt(p[m++]));t=F(t,c,u.charAt(0))}return t}}(),n=function(){function e(e,t,n){var r,i,o,a,u=0,s=e.length,c=t%m,l=t/m|0;for(e=e.slice();s--;)u=((i=c*(o=e[s]%m)+(r=l*o+(a=e[s]/m|0)*c)%m*m+u)/n|0)+(r/m|0)+l*a,e[s]=i%n;return u&&(e=[u].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,a,u){var c,l,p,d,m,g,y,w,b,x,A,F,B,E,k,C,T,S=r.s==i.s?1:-1,R=r.c,L=i.c;if(!(R&&R[0]&&L&&L[0]))return new $(r.s&&i.s&&(R?!L||R[0]!=L[0]:L)?R&&0==R[0]||!L?0*S:S/0:NaN);for(b=(w=new $(S)).c=[],S=o+(l=r.e-i.e)+1,u||(u=f,l=v(r.e/h)-v(i.e/h),S=S/h|0),p=0;L[p]==(R[p]||0);p++);if(L[p]>(R[p]||0)&&l--,S<0)b.push(1),d=!0;else{for(E=R.length,C=L.length,p=0,S+=2,(m=s(u/(L[0]+1)))>1&&(L=e(L,m,u),R=e(R,m,u),C=L.length,E=R.length),B=C,A=(x=R.slice(0,C)).length;A<C;x[A++]=0);T=L.slice(),T=[0].concat(T),k=L[0],L[1]>=u/2&&k++;do{if(m=0,(c=t(L,x,C,A))<0){if(F=x[0],C!=A&&(F=F*u+(x[1]||0)),(m=s(F/k))>1)for(m>=u&&(m=u-1),y=(g=e(L,m,u)).length,A=x.length;1==t(g,x,y,A);)m--,n(g,C<y?T:L,y,u),y=g.length,c=1;else 0==m&&(c=m=1),y=(g=L.slice()).length;if(y<A&&(g=[0].concat(g)),n(x,g,A,u),A=x.length,-1==c)for(;t(L,x,C,A)<1;)m++,n(x,C<A?T:L,A,u),A=x.length}else 0===c&&(m++,x=[0]);b[p++]=m,x[0]?x[A++]=R[B]||0:(x=[R[B]],A=1)}while((B++<E||null!=x[0])&&S--);d=null!=x[0],b[0]||b.splice(0,1)}if(u==f){for(p=1,S=b[0];S>=10;S/=10,p++);W(w,o+(w.e=p+l*h-1)+1,a,d)}else w.e=l,w.r=+d;return w}}(),B=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,k=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,o=n?t:t.replace(T,"");if(C.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(B,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,o=o.replace(E,"$1").replace(k,"0.$1")),t!=o))return new $(o,i);if($.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},S.absoluteValue=S.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,t){return w(this,new $(e,t))},S.decimalPlaces=S.dp=function(e,t){var n,r,i,o=this;if(null!=e)return b(e,0,g),null==t?t=D:b(t,0,8),W(new $(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-v(this.e/h))*h,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},S.dividedBy=S.div=function(e,t){return n(this,new $(e,t),L,D)},S.dividedToIntegerBy=S.idiv=function(e,t){return n(this,new $(e,t),0,1)},S.exponentiatedBy=S.pow=function(e,t){var n,r,i,o,a,l,f,p,d=this;if((e=new $(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+V(e));if(null!=t&&(t=new $(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+V(d),a?2-x(e):+V(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(r=!l&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&x(e)?-0:0,d.e>-1&&(o=1/o),new $(l?1/o:o);M&&(o=u(M/h+2))}for(a?(n=new $(.5),l&&(e.s=1),f=x(e)):f=(i=Math.abs(+V(e)))%2,p=new $(R);;){if(f){if(!(p=p.times(d)).c)break;o?p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}if(i){if(0===(i=s(i/2)))break;f=i%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)f=x(e);else{if(0===(i=+V(e)))break;f=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):r&&(d=d.mod(t))}return r?p:(l&&(p=R.div(p)),t?p.mod(t):o?W(p,M,D,void 0):p)},S.integerValue=function(e){var t=new $(this);return null==e?e=D:b(e,0,8),W(t,t.e+1,e)},S.isEqualTo=S.eq=function(e,t){return 0===w(this,new $(e,t))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,t){return w(this,new $(e,t))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,t){return 1===(t=w(this,new $(e,t)))||0===t},S.isInteger=function(){return!!this.c&&v(this.e/h)>this.c.length-2},S.isLessThan=S.lt=function(e,t){return w(this,new $(e,t))<0},S.isLessThanOrEqualTo=S.lte=function(e,t){return-1===(t=w(this,new $(e,t)))||0===t},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(e,t){var n,r,i,o,a=this,u=a.s;if(t=(e=new $(e,t)).s,!u||!t)return new $(NaN);if(u!=t)return e.s=-t,a.plus(e);var s=a.e/h,c=e.e/h,l=a.c,p=e.c;if(!s||!c){if(!l||!p)return l?(e.s=-t,e):new $(p?a:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new $(l[0]?a:3==D?-0:0)}if(s=v(s),c=v(c),l=l.slice(),u=s-c){for((o=u<0)?(u=-u,i=l):(c=s,i=p),i.reverse(),t=u;t--;i.push(0));i.reverse()}else for(r=(o=(u=l.length)<(t=p.length))?u:t,u=t=0;t<r;t++)if(l[t]!=p[t]){o=l[t]<p[t];break}if(o&&(i=l,l=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=f-1;r>u;){if(l[--r]<p[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=f}l[r]-=p[r]}for(;0==l[0];l.splice(0,1),--c);return l[0]?z(e,l,c):(e.s=3==D?-1:1,e.c=[e.e=0],e)},S.modulo=S.mod=function(e,t){var r,i,o=this;return e=new $(e,t),!o.c||!e.s||e.c&&!e.c[0]?new $(NaN):!e.c||o.c&&!o.c[0]?new $(o):(9==U?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,U),(e=o.minus(r.times(e))).c[0]||1!=U||(e.s=o.s),e)},S.multipliedBy=S.times=function(e,t){var n,r,i,o,a,u,s,c,l,p,d,g,y,w,b,x=this,A=x.c,F=(e=new $(e,t)).c;if(!(A&&F&&A[0]&&F[0]))return!x.s||!e.s||A&&!A[0]&&!F||F&&!F[0]&&!A?e.c=e.e=e.s=null:(e.s*=x.s,A&&F?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(x.e/h)+v(e.e/h),e.s*=x.s,(s=A.length)<(p=F.length)&&(y=A,A=F,F=y,i=s,s=p,p=i),i=s+p,y=[];i--;y.push(0));for(w=f,b=m,i=p;--i>=0;){for(n=0,d=F[i]%b,g=F[i]/b|0,o=i+(a=s);o>i;)n=((c=d*(c=A[--a]%b)+(u=g*c+(l=A[a]/b|0)*d)%b*b+y[o]+n)/w|0)+(u/b|0)+g*l,y[o--]=c%w;y[o]=n}return n?++r:y.splice(0,1),z(e,y,r)},S.negated=function(){var e=new $(this);return e.s=-e.s||null,e},S.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/h,a=e.e/h,u=r.c,s=e.c;if(!o||!a){if(!u||!s)return new $(i/0);if(!u[0]||!s[0])return s[0]?e:new $(u[0]?r:0*i)}if(o=v(o),a=v(a),u=u.slice(),i=o-a){for(i>0?(a=o,n=s):(i=-i,n=u),n.reverse();i--;n.push(0));n.reverse()}for((i=u.length)-(t=s.length)<0&&(n=s,s=u,u=n,t=i),i=0;t;)i=(u[--t]=u[t]+s[t]+i)/f|0,u[t]=f===u[t]?0:u[t]%f;return i&&(u=[i].concat(u),++a),z(e,u,a)},S.precision=S.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return b(e,1,g),null==t?t=D:b(t,0,8),W(new $(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*h+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},S.shiftedBy=function(e){return b(e,-p,p),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,t,r,i,o,a=this,u=a.c,s=a.s,c=a.e,l=L+4,f=new $("0.5");if(1!==s||!u||!u[0])return new $(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+V(a)))||s==1/0?(((t=y(u)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=v((c+1)/2)-(c<0||c%2),r=new $(t=s==1/0?"1e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new $(s+""),r.c[0])for((s=(c=r.e)+l)<3&&(s=0);;)if(o=r,r=f.times(o.plus(n(a,o,l,1))),y(o.c).slice(0,s)===(t=y(r.c)).slice(0,s)){if(r.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+L+2,1),e=!r.times(r).eq(a));break}if(!i&&(W(o,o.e+L+2,0),o.times(o).eq(a))){r=o;break}l+=4,s+=4,i=1}return W(r,r.e+L+1,D,e)},S.toExponential=function(e,t){return null!=e&&(b(e,0,g),e++),G(this,e,t,1)},S.toFixed=function(e,t){return null!=e&&(b(e,0,g),e=e+this.e+1),G(this,e,t)},S.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=j;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var o,a=r.split("."),u=+n.groupSize,s=+n.secondaryGroupSize,l=n.groupSeparator||"",f=a[0],h=a[1],p=i.s<0,d=p?f.slice(1):f,m=d.length;if(s&&(o=u,u=s,s=o,m-=o),u>0&&m>0){for(o=m%u||u,f=d.substr(0,o);o<m;o+=u)f+=l+d.substr(o,u);s>0&&(f+=l+d.slice(o)),p&&(f="-"+f)}r=h?f+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):f}return(n.prefix||"")+r+(n.suffix||"")},S.toFraction=function(e){var t,r,i,o,a,u,s,l,f,p,m,g,v=this,w=v.c;if(null!=e&&(!(s=new $(e)).isInteger()&&(s.c||1!==s.s)||s.lt(R)))throw Error(c+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+V(s));if(!w)return new $(v);for(t=new $(R),f=r=new $(R),i=l=new $(R),g=y(w),a=t.e=g.length-v.e-1,t.c[0]=d[(u=a%h)<0?h+u:u],e=!e||s.comparedTo(t)>0?a>0?t:f:s,u=P,P=1/0,s=new $(g),l.c[0]=0;p=n(s,t,0,1),1!=(o=r.plus(p.times(i))).comparedTo(e);)r=i,i=o,f=l.plus(p.times(o=f)),l=o,t=s.minus(p.times(o=t)),s=o;return o=n(e.minus(r),i,0,1),l=l.plus(o.times(f)),r=r.plus(o.times(i)),l.s=f.s=v.s,m=n(f,i,a*=2,D).minus(v).abs().comparedTo(n(l,r,a,D).minus(v).abs())<1?[f,i]:[l,r],P=u,m},S.toNumber=function(){return+V(this)},S.toPrecision=function(e,t){return null!=e&&b(e,1,g),G(this,e,t,2)},S.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=I||o>=_?A(y(n.c),o):F(y(n.c),o,"0"):10===e?t=F(y((n=W(new $(n),L+o+1,D)).c),n.e,"0"):(b(e,2,Y.length,"Base"),t=r(F(y(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},S.valueOf=S.toJSON=function(){return V(this)},S._isBigNumber=!0,null!=t&&$.set(t),$}()).default=o.BigNumber=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},1425:function(e,t,n){"use strict";n.r(t);var r=n(12),i=n.n(r),o=n(1),a=n.n(o),u=n(2),s=n.n(u),c=n(4),l=n.n(c),f=n(3),h=n.n(f),p=n(5),d=n.n(p),m=n(9),g=n(0),v=n(415),y=n.n(v),w=n(8),b=function(e){function t(){var e;return a()(this,t),(e=l()(this,h()(t).call(this))).name="Diff",e.module="Diff",e.description="Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",e.infoURL="https://wikipedia.org/wiki/File_comparison",e.inputType="string",e.outputType="html",e.args=[{name:"Sample delimiter",type:"binaryString",value:"\\n\\n"},{name:"Diff by",type:"option",value:["Character","Word","Line","Sentence","CSS","JSON"]},{name:"Show added",type:"boolean",value:!0},{name:"Show removed",type:"boolean",value:!0},{name:"Show subtraction",type:"boolean",value:!1},{name:"Ignore whitespace",type:"boolean",value:!1,hint:"Relevant for word and line"}],e}return d()(t,e),s()(t,[{key:"run",value:function(e,t){var n,r=i()(t,6),o=r[0],a=r[1],u=r[2],s=r[3],c=r[4],l=r[5],f=e.split(o),h="",p=y.a?y.a:v;if(!f||2!==f.length)throw new w.a("Incorrect number of samples, perhaps you need to modify the sample delimiter or add more samples?");switch(a){case"Character":n=p.diffChars(f[0],f[1]);break;case"Word":n=l?p.diffWords(f[0],f[1]):p.diffWordsWithSpace(f[0],f[1]);break;case"Line":n=l?p.diffTrimmedLines(f[0],f[1]):p.diffLines(f[0],f[1]);break;case"Sentence":n=p.diffSentences(f[0],f[1]);break;case"CSS":n=p.diffCss(f[0],f[1]);break;case"JSON":n=p.diffJson(f[0],f[1]);break;default:throw new w.a("Invalid 'Diff by' option.")}for(var d=0;d<n.length;d++)n[d].added?u&&(h+="<span class='hl5'>"+g.b.escapeHtml(n[d].value)+"</span>"):n[d].removed?s&&(h+="<span class='hl3'>"+g.b.escapeHtml(n[d].value)+"</span>"):c||(h+=g.b.escapeHtml(n[d].value));return h}}]),t}(m.a),x="undefined"==typeof self?{}:self.OpModules||{};x.Diff={Diff:b};t.default=x},15:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(0),i=n(8);
/**
 * Base64 functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2016
 * @license Apache-2.0
 */
function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),"string"==typeof e&&(e=r.b.strToByteArray(e)),64!==(t=r.b.expandAlphRange(t).join("")).length&&65!==t.length)throw new i.a(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var n,o,a,u,s,c,l,f="",h=0;h<e.length;)u=(n=e[h++])>>2,s=(3&n)<<4|(o=e[h++])>>4,c=(15&o)<<2|(a=e[h++])>>6,l=63&a,isNaN(o)?c=l=64:isNaN(a)&&(l=64),f+=t.charAt(u)+t.charAt(s)+t.charAt(c)+t.charAt(l);return f}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"string"===n?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=r.b.expandAlphRange(t).join("")).length&&65!==t.length)throw new i.a(`Invalid Base64 alphabet length (${t.length}): ${t}`);var a,u,s,c,l,f,h=[],p=0;if(o){var d=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(d,"")}for(;p<e.length;)a=t.indexOf(e.charAt(p++))<<2|(c=-1===(c=t.indexOf(e.charAt(p++)||"="))?64:c)>>4,u=(15&c)<<4|(l=-1===(l=t.indexOf(e.charAt(p++)||"="))?64:l)>>2,s=(3&l)<<6|(f=-1===(f=t.indexOf(e.charAt(p++)||"="))?64:f),h.push(a),64!==l&&h.push(u),64!==f&&h.push(s);return"string"===n?r.b.byteArrayToUtf8(h):h}},16:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(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]:" ",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var o="",a="0x"===t||"\\x"===t,u=0;u<e.length;u++){var s=e[u].toString(16).padStart(n,"0");o+=a?t+s:s+t,r&&(o+=r),u!==e.length-1&&(u+1)%i==0&&(o+="\n")}var c=r.length+(a?0:t.length);return c?o.slice(0,-c):o}function o(e){if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("None"!==t){var i="Auto"===t?/[^a-f\d]|(0x)/gi:r.b.regexRep(t);e=e.replace(i,"")}for(var o=[],a=0;a<e.length;a+=n)o.push(parseInt(e.substr(a,n),16));return o}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"])},18:function(e,t,n){"use strict";var r=n(12),i=n.n(r),o=n(7),a={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){var n=new o.a(e.slice(t));for(;n.hasMore();){var r=n.getBytes(2);if(255!==r[0])throw new Error(`Invalid marker while parsing JPEG at pos ${n.position}: ${r}`);var i=0;switch(r[1]){case 216:case 1:break;case 217:return n.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=n.readInt(2,"be"),n.position+=i-2;break;case 223:n.position++;break;case 220:case 221:n.position+=2;break;case 218:i=n.readInt(2,"be"),n.position+=i-2,n.continueUntil(255);break;case 0:case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:default:n.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var n=new o.a(e.slice(t));n.continueUntil([33,255]),n.continueUntil([33,249]),n.moveForwardsBy(2);for(;n.hasMore();){for(n.moveForwardsBy(n.readInt(1)+1),n.moveForwardsBy(11);n.getBytes(2)!==[33,249]&&(n.moveBackwardsBy(2),n.moveForwardsBy(n.readInt(1)),n.readInt(1));)n.moveBackwardsBy(1);if(59===n.readInt(1))break;n.moveForwardsBy(1)}return n.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(8);var r=0,i="";for(;"IEND"!==i;)r=n.readInt(4,"be"),i=n.readString(4),n.moveForwardsBy(r+4);return n.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(2);var r=n.readInt(4,"le");return n.moveForwardsBy(r-6),n.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveTo(4);var r=n.readInt(2,"le");n.moveForwardsBy(8+16*(r-1));var i=n.readInt(4,"le"),a=n.readInt(4,"le");return n.moveTo(a+i),n.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(5);var r=n.readInt(4,"be");n.moveForwardsBy(r-9);var i=-11;for(;n.hasMore();){var a=n.readInt(4,"be"),u=n.readInt(1);if([8,9,18].indexOf(u)<0){n.moveBackwardsBy(1);break}if(a!==i+11){n.moveBackwardsBy(i+11+5);break}i=n.readInt(3,"be"),n.moveForwardsBy(7+i)}return n.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var n=new o.a(e.slice(t));return n.moveTo(4),n.moveTo(n.readInt(4,"le")),n.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:null},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var n=new o.a(e.slice(t));return n.continueUntil([37,37,69,79,70]),n.moveForwardsBy(5),n.consumeIf(13),n.consumeIf(10),n.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var n=new o.a(e.slice(t)),r=0;if(123!==n.readInt(1))throw new Error("Not a valid RTF file");r++;for(;r>0&&n.hasMore();)switch(n.readInt(1)){case 123:r++;break;case 125:r--;break;case 92:n.consumeIf(92),n.position++}return n.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:u},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:u}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveTo(60);var r=n.readInt(4,"le");n.moveTo(r),n.moveForwardsBy(6);var i=n.readInt(2,"le");n.moveForwardsBy(16);var a=523===n.readInt(2,"le")?112:96;n.moveForwardsBy(a-2),n.moveForwardsBy(32);var u=n.readInt(4,"le"),s=n.readInt(4,"le");if(u>0)return n.moveTo(u+s),n.carve();n.moveForwardsBy(88),n.moveForwardsBy(40*(i-1)),n.moveForwardsBy(16);var c=n.readInt(4,"le"),l=n.readInt(4,"le");return n.moveTo(l+c),n.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(4);var r=1===n.readInt(1),i=1===n.readInt(1)?"le":"be";n.moveForwardsBy(r?26:34);var a=r?n.readInt(4,i):n.readInt(8,i);n.moveForwardsBy(10);var u=n.readInt(2,i),s=n.readInt(2,i);return n.moveTo(a),n.moveForwardsBy(u*s),n.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:s},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:s},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:u},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){var n=new o.a(e.slice(t));for(;n.hasMore();){if(n.moveForwardsBy(257),n.getBytes(5).join("")!==[117,115,116,97,114].join("")){n.moveBackwardsBy(262);break}n.moveBackwardsBy(138);var r=0;n.getBytes(11).forEach((function(e,t){r+=(e-48).toString()})),r=512*Math.ceil(parseInt(r,8)/512),n.moveForwardsBy(r+377)}return n.consumeWhile(0),n.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(3);var r=n.readInt(1);if(n.moveForwardsBy(4),n.readInt(1),n.moveForwardsBy(1),4&r){var i=n.readInt(2,"le");n.moveForwardsby(i)}8&r&&(n.continueUntil(0),n.moveForwardsBy(1));16&r&&(n.continueUntil(0),n.moveForwardsBy(1));2&r&&n.moveForwardsBy(2);return d(n),n.moveForwardsBy(8),n.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var n=new o.a(e.slice(t)),r=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<r.length&&(n.continueUntil(r[i]),n.getBytes(5).join("")!==r[i].join(""));i++)n.moveTo(0);return n.moveForwardsBy(4),n.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveForwardsBy(1),32&n.readInt(1)&&n.moveForwardsBy(4);return d(n),n.moveForwardsBy(4),n.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var n=new o.a(e.slice(t));return n.continueUntil([0,0,0,0,4,89,90]),n.moveForwardsBy(7),n.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:null},{name:"Linux deb",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:null},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveTo(16);var r=n.readInt(2);n.moveTo(28);var i=n.readInt(4);return n.moveTo(r*i),n.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveTo(20);var r=n.readInt(4,"le");n.moveTo(r);var i=n.readInt(4,"le");return n.moveForwardsBy(i-4),n.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var n=new o.a(e.slice(t));n.moveTo(40);var r=n.readInt(4,"le")-44;n.moveForwardsBy(r);for(;n.hasMore()&&n.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)n.moveForwardsBy(65529);return n.consumeWhile(0),n.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:null},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:null},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:null},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var n=new o.a(e.slice(t)),r=0;n.continueUntil([60,112,108,105,115,116]),n.moveForwardsBy(6),r++;for(;r>0&&n.hasMore();)60===n.readInt(1)&&(n.getBytes(5).join("")===[112,108,105,115,116].join("")?r++:n.moveBackwardsBy(5),n.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?r--:n.moveBackwardsBy(7));return n.consumeIf(10),n.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:null},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:null},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function u(e,t){var n=new o.a(e.slice(t));n.continueUntil([80,75,5,6]),n.moveForwardsBy(20);var r=n.readInt(2,"le");return n.moveForwardsBy(r),n.carve()}function s(e,t){var n="207250237254",r="254237250207",i="206250237254";var a=new o.a(e.slice(t)),u=a.getBytes(4).join("");return a.moveTo(function(e,t,n){var r=28;t&&(r+=4),e.moveTo(16);var i=e.readInt(4,n);return function(e,t,n,r){for(var i=0,o=0;o<r;o++){e.moveTo(t);var a=e.readInt(4,n);25===a?(e.moveTo(t+48),i+=e.readInt(8,n),e.moveTo(t+4),t+=e.readInt(4,n)):1===a&&(e.moveTo(t+36),i+=e.readInt(4,n),e.moveTo(t+4),t+=e.readInt(4,n))}return i}(e,r,n,i)}(a,function(e){return e===n||e===r}(u),function(e){return e===i||e===n}(u)?"le":"be")),a.carve()}for(var c=new Array(288),l=0;l<c.length;l++)c[l]=l<=143?8:l<=255?9:l<=279?7:8;var f=y(c),h=y(new Array(30).fill(5)),p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function d(e){for(var t=0;!t;){t=e.readBits(1);var n=e.readBits(2);if(0===n){e.moveForwardsBy(1);var r=e.readInt(2,"le");e.moveForwardsBy(2+r)}else if(1===n)v(e,f,h);else{if(2!==n)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5)+257,o=e.readBits(5)+1,a=e.readBits(4)+4,u=new Uint8Array(p.length),s=0;s<a;s++)u[p[s]]=e.readBits(3);for(var c=y(u),l=new Uint8Array(i+o),d=void 0,m=void 0,g=void 0,b=0;b<i+o;)switch(d=w(e,c)){case 16:for(m=3+e.readBits(2);m--;)l[b++]=g;break;case 17:for(m=3+e.readBits(3);m--;)l[b++]=0;g=0;break;case 18:for(m=11+e.readBits(7);m--;)l[b++]=0;g=0;break;default:l[b++]=d,g=d}v(e,y(l.subarray(0,i)),y(l.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var m=[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],g=[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];function v(e,t,n){for(var r,i=0;(r=w(e,t))&&256!==r;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");r<256||(e.readBits(m[r-257]),r=w(e,n),e.readBits(g[r]))}}function y(e){for(var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e),r=1<<t,i=new Uint32Array(r),o=1,a=0,u=2;o<=t;){for(var s=0;s<e.length;s++)if(e[s]===o){var c=void 0,l=void 0,f=void 0;for(c=0,l=a,f=0;f<o;f++)c=c<<1|1&l,l>>=1;for(var h=o<<16|s,p=c;p<r;p+=u)i[p]=h;a++}o++,a<<=1,u<<=1}return[i,t,n]}function w(e,t){var n=i()(t,2),r=n[0],o=n[1],a=r[e.readBits(o)&(1<<o)-1],u=a>>>16;if(u>o)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${u}`);return e.moveBackwardsByBits(o-u),65535&a}n(0);
/**
 * File type functions
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 *
 */
function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var r=0;r<e.length;r++)if(x(e[r],t,n))return!0;return!1}return x(e,t,n)}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var r in e){var i=parseInt(r,10)+n;switch(typeof e[r]){case"number":if(t[i]!==e[r])return!1;break;case"object":if(e[r].indexOf(t[i])<0)return!1;break;case"function":if(!e[r](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${r}`)}}return!0}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(a);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var n=[],r={};for(var i in a)t.includes(i)&&(r[i]=a[i]);for(var o in r){r[o].forEach((function(t){b(t.signature,e)&&n.push(t)}))}return n}function F(e){return function(e,t){var n=A(t);if(!n||!n.length)return!1;if("string"==typeof e)return n.reduce((function(t,n){var r=!!n.mime.startsWith(e)&&n.mime;return t||r}),!1);if(e instanceof RegExp)return n.reduce((function(t,n){var r=!!e.test(n.mime)&&n.mime;return t||r}),!1);throw new Error("Invalid type input.")}("image",e)}n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return F}))},2:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},22:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},23:function(e,t,n){!function(e){var t,n,r,i=String.fromCharCode;function o(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function a(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)?(a(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 c(){if(r>=n)throw Error("Invalid byte index");var e=255&t[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(r>n)throw Error("Invalid byte index");if(r==n)return!1;if(e=255&t[r],r++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),n=t.length,r=-1,i="";++r<n;)i+=s(t[r]);return i},e.decode=function(e){t=o(e),n=t.length,r=0;for(var a,u=[];!1!==(a=l());)u.push(a);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}(t)},24:function(e,t,n){var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=function(){var e=function(){},t="undefined",n=typeof window!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,n){for(var i=0;i<r.length;i++){var o=r[i];this[o]=i<t?e:this.methodFactory(o,t,n)}this.log=this.debug}function u(e,n,r){return function(){typeof console!==t&&(a.call(this,n,r),this[e].apply(this,arguments))}}function s(r,a,s){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?o:void 0!==console[r]?i(console,r):void 0!==console.log?i(console,"log"):e)}(r)||u.apply(this,arguments)}function c(e,n,i){var o,u=this,c="loglevel";function l(){var e;if(typeof window!==t){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(c)+"=");-1!==r&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch(e){}return void 0===u.levels[e]&&(e=void 0),e}}e&&(c+=":"+e),u.name=e,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=i||s,u.getLevel=function(){return o},u.setLevel=function(n,i){if("string"==typeof n&&void 0!==u.levels[n.toUpperCase()]&&(n=u.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=u.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(o=n,!1!==i&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}}(n),a.call(u,n,e),typeof console===t&&n<u.levels.SILENT)return"No console available for logging"},u.setDefaultLevel=function(e){l()||u.setLevel(e,!1)},u.enableAll=function(e){u.setLevel(u.levels.TRACE,e)},u.disableAll=function(e){u.setLevel(u.levels.SILENT,e)};var f=l();null==f&&(f=null==n?"WARN":n),u.setLevel(f,!1)}var l=new c,f={};l.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=f[e];return t||(t=f[e]=new c(e,l.getLevel(),l.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return f},l})?r.call(t,n,t,e):r)||(e.exports=i)}()},25:function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function h(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=u(h);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||u(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},26:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},27:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(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",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,i=r.b.regexRep(t);e=e.replace(i,"");for(var o=[],a=0;a<e.length;a+=n)o.push(parseInt(e.substr(a,n),2));return o}},28:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(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=r.b.charRep(t);var n=[],i=e.split(t);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var o=0;o<i.length;o++)n[o]=parseInt(i[o],10);return n}},3:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},38:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},39:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},4:function(e,t,n){var r=n(38),i=n(22);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},40:function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),s=0,l=a>0?r-4:r,f=0;f<l;f+=4)t=i[e.charCodeAt(f)]<<18|i[e.charCodeAt(f+1)]<<12|i[e.charCodeAt(f+2)]<<6|i[e.charCodeAt(f+3)],u[s++]=t>>16&255,u[s++]=t>>8&255,u[s++]=255&t;2===a&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,u[s++]=255&t);1===a&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,u[s++]=t>>8&255,u[s++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,u=n-i;a<u;a+=16383)o.push(l(e,a,a+16383>u?u:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],u=t;u<n;u+=3)i=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},41:function(e,t){t.read=function(e,t,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,u,s,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(t*s-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;e[n+p]=255&a,p+=d,a/=256,c-=8);e[n+p-d]|=128*m}},415:function(e,t,n){
/*!

 diff v4.0.1

Software License Agreement (BSD License)

Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>

All rights reserved.

Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above
  copyright notice, this list of conditions and the
  following disclaimer.

* Redistributions in binary form must reproduce the above
  copyright notice, this list of conditions and the
  following disclaimer in the documentation and/or other
  materials provided with the distribution.

* Neither the name of Kevin Decker nor the names of its
  contributors may be used to endorse or promote products
  derived from this software without specific prior
  written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@license
*/
!function(e){"use strict";function t(){}function n(e,t,n,r,i){for(var o=0,a=t.length,u=0,s=0;o<a;o++){var c=t[o];if(c.removed){if(c.value=e.join(r.slice(s,s+c.count)),s+=c.count,o&&t[o-1].added){var l=t[o-1];t[o-1]=t[o],t[o]=l}}else{if(!c.added&&i){var f=n.slice(u,u+c.count);f=f.map((function(e,t){var n=r[s+t];return n.length>e.length?n:e})),c.value=e.join(f)}else c.value=e.join(n.slice(u,u+c.count));u+=c.count,c.added||(s+=c.count)}}var h=t[a-1];return a>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[a-2].value+=h.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.prototype={diff:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callback;"function"==typeof i&&(o=i,i={}),this.options=i;var a=this;function u(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,l=1,f=s+c,h=[{newPos:-1,components:[]}],p=this.extractCommon(h[0],t,e,0);if(h[0].newPos+1>=s&&p+1>=c)return u([{value:this.join(t),count:t.length}]);function d(){for(var i=-1*l;i<=l;i+=2){var o=void 0,f=h[i-1],p=h[i+1],d=(p?p.newPos:0)-i;f&&(h[i-1]=void 0);var m=f&&f.newPos+1<s,g=p&&0<=d&&d<c;if(m||g){if(!m||g&&f.newPos<p.newPos?(o=r(p),a.pushComponent(o.components,void 0,!0)):((o=f).newPos++,a.pushComponent(o.components,!0,void 0)),d=a.extractCommon(o,t,e,i),o.newPos+1>=s&&d+1>=c)return u(n(a,o.components,t,e,a.useLongestToken));h[i]=o}else h[i]=void 0}l++}if(o)!function e(){setTimeout((function(){if(l>f)return o();d()||e()}),0)}();else for(;l<=f;){var m=d();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,o=n.length,a=e.newPos,u=a-r,s=0;a+1<i&&u+1<o&&this.equals(t[a+1],n[u+1]);)a++,u++,s++;return s&&e.components.push({count:s}),e.newPos=a,u},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var i=new t;function o(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,s=new t;s.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!u.test(e)&&!u.test(t)},s.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&a.test(t[n])&&a.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var c=new t;function l(e,t,n){return c.diff(e,t,n)}c.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var f=new t;f.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var h=new t;function p(e){return(p="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 d(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}h.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var m=Object.prototype.toString,g=new t;function v(e,t,n,r,i){var o,a;for(t=t||[],n=n||[],r&&(e=r(i,e)),o=0;o<t.length;o+=1)if(t[o]===e)return n[o];if("[object Array]"===m.call(e)){for(t.push(e),a=new Array(e.length),n.push(a),o=0;o<e.length;o+=1)a[o]=v(e[o],t,n,r,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"===p(e)&&null!==e){t.push(e),a={},n.push(a);var u,s=[];for(u in e)e.hasOwnProperty(u)&&s.push(u);for(s.sort(),o=0;o<s.length;o+=1)a[u=s[o]]=v(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}g.useLongestToken=!0,g.tokenize=c.tokenize,g.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(v(e,null,null,i),i,"  ")},g.equals=function(e,n){return t.prototype.equals.call(g,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var y=new t;function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var e={};for(i.push(e);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);a&&(e.index=a[1]),o++}for(u(e),u(e),e.hunks=[];o<n.length;){var c=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))e.hunks.push(s());else{if(c&&t.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(c));o++}}}function u(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(t){var r="---"===t[1]?"old":"new",i=t[2].split("\t",2),a=i[0].replace(/\\\\/g,"\\");/^".*"$/.test(a)&&(a=a.substr(1,a.length-2)),e[r+"FileName"]=a,e[r+"Header"]=(i[1]||"").trim(),o++}}function s(){for(var e=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+i[1],oldLines:+i[2]||1,newStart:+i[3],newLines:+i[4]||1,lines:[],linedelimiters:[]},u=0,s=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var c=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;a.lines.push(n[o]),a.linedelimiters.push(r[o]||"\n"),"+"===c?u++:"-"===c?s++:" "===c&&(u++,s++)}if(u||1!==a.newLines||(a.newLines=0),s||1!==a.oldLines||(a.oldLines=0),t.strict){if(u!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(s!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return a}for(;o<n.length;)a();return i}function b(e,t,n){var r=!0,i=!1,o=!1,a=1;return function u(){if(r&&!o){if(i?a++:r=!1,e+a<=n)return a;o=!0}if(!i)return o||(r=!0),t<=e-a?-a++:(i=!0,u())}}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=w(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r,i,o=e.split(/\r\n|[\n\v\f\r\x85]/),a=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=t.hunks,s=n.compareLine||function(e,t,n,r){return t===r},c=0,l=n.fuzzFactor||0,f=0,h=0;function p(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],i=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!s(t+1,o[t],i,a)&&++c>l)return!1;t++}}return!0}for(var d=0;d<u.length;d++){for(var m=u[d],g=o.length-m.oldLines,v=0,y=h+m.oldStart-1,x=b(y,f,g);void 0!==v;v=x())if(p(m,y+v)){m.offset=h+=v;break}if(void 0===v)return!1;f=m.offset+m.oldStart+m.oldLines}for(var A=0,F=0;F<u.length;F++){var B=u[F],E=B.oldStart+B.offset+A-1;A+=B.newLines-B.oldLines,E<0&&(E=0);for(var k=0;k<B.lines.length;k++){var C=B.lines[k],T=C.length>0?C[0]:" ",S=C.length>0?C.substr(1):C,R=B.linedelimiters[k];if(" "===T)E++;else if("-"===T)o.splice(E,1),a.splice(E,1);else if("+"===T)o.splice(E,0,S),a.splice(E,0,R),E++;else if("\\"===T){var L=B.lines[k-1]?B.lines[k-1][0]:null;"+"===L?r=!0:"-"===L&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var D=0;D<o.length-1;D++)o[D]=o[D]+a[D];return o.join("")}function A(e,t,n,r,i,o,a){a||(a={}),void 0===a.context&&(a.context=4);var u=l(n,r,a);function s(e){return e.map((function(e){return" "+e}))}u.push({value:"",lines:[]});for(var c=[],f=0,h=0,p=[],m=1,g=1,v=function(e){var t=u[e],i=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=i,t.added||t.removed){var o;if(!f){var l=u[e-1];f=m,h=g,l&&(p=a.context>0?s(l.lines.slice(-a.context)):[],f-=p.length,h-=p.length)}(o=p).push.apply(o,d(i.map((function(e){return(t.added?"+":"-")+e})))),t.added?g+=i.length:m+=i.length}else{if(f)if(i.length<=2*a.context&&e<u.length-2){var v;(v=p).push.apply(v,d(s(i)))}else{var y,w=Math.min(i.length,a.context);(y=p).push.apply(y,d(s(i.slice(0,w))));var b={oldStart:f,oldLines:m-f+w,newStart:h,newLines:g-h+w,lines:p};if(e>=u.length-2&&i.length<=a.context){var x=/\n$/.test(n),A=/\n$/.test(r),F=0==i.length&&p.length>b.oldLines;!x&&F&&p.splice(b.oldLines,0,"\\ No newline at end of file"),(x||F)&&A||p.push("\\ No newline at end of file")}c.push(b),f=0,h=0,p=[]}m+=i.length,g+=i.length}},y=0;y<u.length;y++)v(y);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:c}}function F(e,t,n,r,i,o,a){var u=A(e,t,n,r,i,o,a),s=[];e==t&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+u.oldFileName+(void 0===u.oldHeader?"":"\t"+u.oldHeader)),s.push("+++ "+u.newFileName+(void 0===u.newHeader?"":"\t"+u.newHeader));for(var c=0;c<u.hunks.length;c++){var l=u.hunks[c];s.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),s.push.apply(s,l.lines)}return s.join("\n")+"\n"}function B(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function E(e){var t=function e(t){var n=0,r=0;return t.forEach((function(t){if("string"!=typeof t){var i=e(t.mine),o=e(t.theirs);void 0!==n&&(i.oldLines===o.oldLines?n+=i.oldLines:n=void 0),void 0!==r&&(i.newLines===o.newLines?r+=i.newLines:r=void 0)}else void 0===r||"+"!==t[0]&&" "!==t[0]||r++,void 0===n||"-"!==t[0]&&" "!==t[0]||n++})),{oldLines:n,newLines:r}}(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function k(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return w(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return A(void 0,void 0,t,e)}return e}function C(e){return e.newFileName&&e.newFileName!==e.oldFileName}function T(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function S(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function R(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function L(e,t,n,r,i){var o={offset:t,lines:n,index:0},a={offset:r,lines:i,index:0};for(O(e,o,a),O(e,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var u=o.lines[o.index],s=a.lines[a.index];if("-"!==u[0]&&"+"!==u[0]||"-"!==s[0]&&"+"!==s[0])if("+"===u[0]&&" "===s[0]){var c;(c=e.lines).push.apply(c,d(N(o)))}else if("+"===s[0]&&" "===u[0]){var l;(l=e.lines).push.apply(l,d(N(a)))}else"-"===u[0]&&" "===s[0]?I(e,o,a):"-"===s[0]&&" "===u[0]?I(e,a,o,!0):u===s?(e.lines.push(u),o.index++,a.index++):_(e,N(o),N(a));else D(e,o,a)}P(e,o),P(e,a),E(e)}function D(e,t,n){var r,i,o=N(t),a=N(n);if(U(o)&&U(a)){var u,s;if(B(o,a)&&M(n,o,o.length-a.length))return void(u=e.lines).push.apply(u,d(o));if(B(a,o)&&M(t,a,a.length-o.length))return void(s=e.lines).push.apply(s,d(a))}else if(i=a,(r=o).length===i.length&&B(r,i)){var c;return void(c=e.lines).push.apply(c,d(o))}_(e,o,a)}function I(e,t,n,r){var i,o=N(t),a=function(e,t){for(var n=[],r=[],i=0,o=!1,a=!1;i<t.length&&e.index<e.lines.length;){var u=e.lines[e.index],s=t[i];if("+"===s[0])break;if(o=o||" "!==u[0],r.push(s),i++,"+"===u[0])for(a=!0;"+"===u[0];)n.push(u),u=e.lines[++e.index];s.substr(1)===u.substr(1)?(n.push(u),e.index++):a=!0}if("+"===(t[i]||"")[0]&&o&&(a=!0),a)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}(n,o);a.merged?(i=e.lines).push.apply(i,d(a.merged)):_(e,r?a:o,r?o:a)}function _(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function O(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function P(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function N(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function U(e){return e.reduce((function(e,t){return e&&"-"===t[0]}),!0)}function M(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=n,!0}y.tokenize=function(e){return e.slice()},y.join=y.removeEmpty=function(e){return e},e.Diff=t,e.diffChars=function(e,t,n){return i.diff(e,t,n)},e.diffWords=function(e,t,n){return n=o(n,{ignoreWhitespace:!0}),s.diff(e,t,n)},e.diffWordsWithSpace=function(e,t,n){return s.diff(e,t,n)},e.diffLines=l,e.diffTrimmedLines=function(e,t,n){var r=o(n,{ignoreWhitespace:!0});return c.diff(e,t,r)},e.diffSentences=function(e,t,n){return f.diff(e,t,n)},e.diffCss=function(e,t,n){return h.diff(e,t,n)},e.diffJson=function(e,t,n){return g.diff(e,t,n)},e.diffArrays=function(e,t,n){return y.diff(e,t,n)},e.structuredPatch=A,e.createTwoFilesPatch=F,e.createPatch=function(e,t,n,r,i,o){return F(e,e,t,n,r,i,o)},e.applyPatch=x,e.applyPatches=function(e,t){"string"==typeof e&&(e=w(e));var n=0;!function r(){var i=e[n++];if(!i)return t.complete();t.loadFile(i,(function(e,n){if(e)return t.complete(e);var o=x(n,i,t);t.patched(i,o,(function(e){if(e)return t.complete(e);r()}))}))}()},e.parsePatch=w,e.merge=function(e,t,n){e=k(e,n),t=k(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(C(e)?C(t)?(r.oldFileName=T(r,e.oldFileName,t.oldFileName),r.newFileName=T(r,e.newFileName,t.newFileName),r.oldHeader=T(r,e.oldHeader,t.oldHeader),r.newHeader=T(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,u=0;i<e.hunks.length||o<t.hunks.length;){var s=e.hunks[i]||{oldStart:1/0},c=t.hunks[o]||{oldStart:1/0};if(S(s,c))r.hunks.push(R(s,a)),i++,u+=s.newLines-s.oldLines;else if(S(c,s))r.hunks.push(R(c,u)),o++,a+=c.newLines-c.oldLines;else{var l={oldStart:Math.min(s.oldStart,c.oldStart),oldLines:0,newStart:Math.min(s.newStart+a,c.oldStart+u),newLines:0,lines:[]};L(l,s.oldStart,s.lines,c.oldStart,c.lines),o++,i++,r.hunks.push(l)}}return r},e.convertChangesToDMP=function(e){for(var t,n,r=[],i=0;i<e.length;i++)n=(t=e[i]).added?1:t.removed?-1:0,r.push([n,t.value]);return r},e.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push((i=r.value,void 0,i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"))),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}var i;return t.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}(t)},42:function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},43:function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=B(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?p:f,s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function m(){}function g(){}function v(){}var y={};y[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(T([])));b&&b!==n&&r.call(b,o)&&(y=b);var x=v.prototype=m.prototype=Object.create(y);function A(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function F(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,a){var u=c(e[n],e,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(l).then((function(e){s.value=e,o(s)}),(function(e){return t("throw",e,o,a)}))}a(u.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function B(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,B(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:S}}function S(){return{value:t,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[u]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(F.prototype),F.prototype[a]=function(){return this},e.AsyncIterator=F,e.async=function(t,n,r,i){var o=new F(s(t,n,r,i));return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(x),x[u]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},44:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},45:function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}},46:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},5:function(e,t,n){var r=n(39);e.exports=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&&r(e,t)}},6:function(e,t,n){e.exports=n(43)},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n.n(r),o=n(2),a=n.n(o),u=function(){function e(t){i()(this,e),this.bytes=t,this.length=this.bytes.length,this.position=0,this.bitPos=0}return a()(e,[{key:"getBytes",value:function(e){if(!(this.position>this.length)){var t=this.position+e,n=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,n}}},{key:"readString",value:function(e){if(!(this.position>this.length)){for(var t="",n=this.position;n<this.position+e;n++){var r=this.bytes[n];if(0===r)break;t+=String.fromCharCode(r)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var n=0;if("be"===t)for(var r=this.position;r<this.position+e;r++)n<<=8,n|=this.bytes[r];else for(var i=this.position+e-1;i>=this.position;i--)n<<=8,n|=this.bytes[i];return this.position+=e,this.bitPos=0,n}}},{key:"readBits",value:function(e){if(!(this.position>this.length)){var t=0,n=0;for(t=(this.bytes[this.position++]&256-(1<<this.bitPos))>>>this.bitPos,n=8-this.bitPos,this.bitPos=0;n<e;)t|=this.bytes[this.position++]<<n,n+=8;if(n>e){var r=n-e;t&=(1<<e)-1,n-=r,this.position--,this.bitPos=8-r}return t}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,n=e[t-1];this.position=t;for(var r=function(e,t){var n=new Array;return e.forEach((function(e,r){n[e]=t-r})),n}(e,t),i=!0;this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==n;);i=!0;for(var o=t-1;o>=0;o--)if(this.bytes[this.position-t+o]!==e[o]){i=!1,this.position+=r[e[o]];break}if(i){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){return this.bitPos>0&&this.position++,this.bytes.slice(0,this.position)}}]),e}()},8:function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=n(4),a=n.n(o),u=n(3),s=n.n(u),c=n(22),l=n.n(c),f=n(5),h=n.n(f);
/**
 * 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 p=function(e){function t(){var e;i()(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=a()(this,s()(t).call(this,...r))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(l()(e),t),e}return h()(t,e),t}(function(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}(Error));t.a=p},9:function(e,t,n){"use strict";var r=n(1),i=n.n(r),o=n(2),a=n.n(o),u=n(13),s=n(0),c=n(16),l=function(){function e(t){i()(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,this.min=null,this.max=null,this.step=1,t&&this._parseConfig(t)}return a()(e,[{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,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",set:function(t){this._value=e.prepare(t,this.type)},get:function(){return this._value}}],[{key:"prepare",value:function(e,t){var n;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return s.b.parseEscapedChars(e);case"byteArray":return"string"==typeof e?(e=e.replace(/\s+/g,""),Object(c.a)(e)):e;case"number":if(null===e)return e;if(n=parseFloat(e),isNaN(n))throw"Invalid ingredient value. Not a number: "+s.b.truncate(e.toString(),10);return n;default:return e}}}]),e}(),f=function(){function e(){i()(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}return a()(e,[{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=u.a.typeEnum(e)},get:function(){return u.a.enumLookup(this._inputType)}},{key:"outputType",set:function(e){this._outputType=u.a.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)},get:function(){return u.a.enumLookup(this._outputType)}},{key:"presentType",set:function(e){this._presentType=u.a.typeEnum(e)},get:function(){return u.a.enumLookup(this._presentType)}},{key:"args",set:function(e){var t=this;e.forEach((function(e){var n=new l(e);t.addIngredient(n)}))},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),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),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,n){t._ingList[n].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}}]),e}();t.a=f}});