<!DOCTYPE html>
<!-- Created with https://packager.turbowarp.org/ -->
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <!-- We only include this to explicitly loosen the CSP of various packager environments. It does not provide any security. -->
  <meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: blob:">
  <title>THISSTICKv0.1</title>
  <style>
    body {
      color: #ffffff;
      font-family: sans-serif;
      overflow: hidden;
      margin: 0;
      padding: 0;
    }
    :root, body.is-fullscreen {
      background-color: #000000;
    }
    [hidden] {
      display: none !important;
    }
    h1 {
      font-weight: normal;
    }
    a {
      color: inherit;
      text-decoration: underline;
      cursor: pointer;
    }

    #app, #loading, #error, #launch {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    .screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      cursor: default;
      user-select: none;
      -webkit-user-select: none;
      background-color: #000000;
    }
    #launch {
      background-color: rgba(0, 0, 0, 0.7);
      cursor: pointer;
    }
    .green-flag {
      width: 80px;
      height: 80px;
      padding: 16px;
      border-radius: 100%;
      background: rgba(255, 255, 255, 0.75);
      border: 3px solid hsla(0, 100%, 100%, 1);
      display: flex;
      justify-content: center;
      align-items: center;
      box-sizing: border-box;
    }
    #loading {
      
    }
    .progress-bar-outer {
      border: 1px solid currentColor;
      height: 10px;
      width: 200px;
      max-width: 200px;
    }
    .progress-bar-inner {
      height: 100%;
      width: 0;
      background-color: currentColor;
    }
    .loading-text, noscript {
      font-weight: normal;
      font-size: 36px;
      margin: 0 0 16px;
    }
    .loading-image {
      margin: 0 0 16px;
    }
    #error-message, #error-stack {
      font-family: monospace;
      max-width: 600px;
      white-space: pre-wrap;
      user-select: text;
      -webkit-user-select: text;
    }
    #error-stack {
      text-align: left;
      max-height: 200px;
      overflow: auto;
    }
    .control-button {
      width: 2rem;
      height: 2rem;
      padding: 0.375rem;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
      user-select: none;
      -webkit-user-select: none;
      cursor: pointer;
      border: 0;
      border-radius: 4px;
    }
    .control-button-highlight:hover {
      background: #ff4c4c26;
    }
    .control-button-highlight.active {
      background: #ff4c4c59;
    }
    .fullscreen-button {
      background: white;
    }
    .standalone-fullscreen-button {
      position: absolute;
      top: 0;
      right: 0;
      background-color: rgba(0, 0, 0, 0.5);
      border-radius: 0 0 0 4px;
      padding: 4px;
      cursor: pointer;
    }
    .sc-canvas {
      cursor: auto;
    }
    .sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color {
      background-color: #ff8c1a;
    }
    .sc-monitor-row-value-outer {
      background-color: #fc662c;
    }
    .sc-monitor-row-value-editing .sc-monitor-row-value-outer {
      background-color: #e25b27;
    }
    
  </style>
  <meta name="theme-color" content="#000000">
  
</head>
<body>
  <div id="app"></div>

  <div id="launch" class="screen" hidden title="Click to start">
    <div class="green-flag">
      <svg viewBox="0 0 16.63 17.5" width="42" height="44">
        <defs><style>.cls-1,.cls-2{fill:#4cbf56;stroke:#45993d;stroke-linecap:round;stroke-linejoin:round;}.cls-2{stroke-width:1.5px;}</style></defs>
        <path class="cls-1" d="M.75,2A6.44,6.44,0,0,1,8.44,2h0a6.44,6.44,0,0,0,7.69,0V12.4a6.44,6.44,0,0,1-7.69,0h0a6.44,6.44,0,0,0-7.69,0"/>
        <line class="cls-2" x1="0.75" y1="16.75" x2="0.75" y2="0.75"/>
      </svg>
    </div>
  </div>

  <div id="loading" class="screen">
    <noscript>Enable JavaScript</noscript>
    
    
    <div class="progress-bar-outer"><div class="progress-bar-inner" id="loading-inner"></div></div>
  </div>

  <div id="error" class="screen" hidden>
    <h1>Error</h1>
    <details>
      <summary id="error-message"></summary>
      <p id="error-stack"></p>
    </details>
  </div>

  <script>/*!
Parts of this script are from the TurboWarp Packager <https://packager.turbowarp.org/>, licensed as follows:
Copyright (C) 2021-2024 Thomas Weber

The Source Code Form of this program is available under the terms of the
Mozilla Public License, v. 2.0. You can obtain a copy of the license at
https://www.mozilla.org/en-US/MPL/2.0/.

Parts of this script are from Scratch <https://scratch.mit.edu/>, licensed as follows:
Copyright (c) 2016, Massachusetts Institute of Technology
All rights reserved.

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

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

2. 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.

3. Neither the name of the copyright holder 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 HOLDER 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.
*/

/*! For license information please see scaffolding-min.js.LICENSE.txt */
!function(e){function t(t){for(var n,i,s=t[0],o=t[1],a=0,c=[];a<s.length;a++)i=s[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&c.push(r[i][0]),r[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);for(l&&l(t);c.length;)c.shift()()}var n={},r={0:0};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var s=new Promise((function(t,i){n=r[e]=[t,i]}));t.push(n[2]=s);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"scaffolding/"+({1:"vendors~iframe-extension-worker"}[e]||e)+".js"}(e);var l=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(c);var n=r[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+i+": "+s+")",l.name="ChunkLoadError",l.type=i,l.request=s,n[1](l)}r[e]=void 0}};var c=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var s=window.webpackJsonp=window.webpackJsonp||[],o=s.push.bind(s);s.push=t,s=s.slice();for(var a=0;a<s.length;a++)t(s[a]);var l=o;i(i.s=415)}([function(e,t,n){var r=n(36),i=n(93),s=n(37),o=s.TYPE,a=n(91),l=a.isNewline,c=a.isName,u=a.isValidEscape,d=a.isNumberStart,h=a.isIdentifierStart,p=a.charCodeCategory,m=a.isBOM,f=n(27),g=f.cmpStr,y=f.getNewlineLength,b=f.findWhiteSpaceEnd,v=f.consumeEscaped,S=f.consumeName,w=f.consumeNumber,k=f.consumeBadUrlRemnants,T=16777215,x=24;function E(e,t){function n(t){return t<E?e.charCodeAt(t):0}function s(){return M=w(e,M),h(n(M),n(M+1),n(M+2))?(L=o.Dimension,void(M=S(e,M))):37===n(M)?(L=o.Percentage,void M++):void(L=o.Number)}function a(){const t=M;return M=S(e,M),g(e,t,M,"url")&&40===n(M)?34===n(M=b(e,M+1))||39===n(M)?(L=o.Function,void(M=t+4)):void function(){for(L=o.Url,M=b(e,M);M<e.length;M++){var t=e.charCodeAt(M);switch(p(t)){case 41:return void M++;case p.Eof:return;case p.WhiteSpace:return 41===n(M=b(e,M))||M>=e.length?void(M<e.length&&M++):(M=k(e,M),void(L=o.BadUrl));case 34:case 39:case 40:case p.NonPrintable:return M=k(e,M),void(L=o.BadUrl);case 92:if(u(t,n(M+1))){M=v(e,M)-1;break}return M=k(e,M),void(L=o.BadUrl)}}}():40===n(M)?(L=o.Function,void M++):void(L=o.Ident)}function f(t){for(t||(t=n(M++)),L=o.String;M<e.length;M++){var r=e.charCodeAt(M);switch(p(r)){case t:return void M++;case p.Eof:return;case p.WhiteSpace:if(l(r))return M+=y(e,M,r),void(L=o.BadString);break;case 92:if(M===e.length-1)break;var i=n(M+1);l(i)?M+=y(e,M+1,i):u(r,i)&&(M=v(e,M)-1)}}}t||(t=new r);for(var E=(e=String(e||"")).length,A=i(t.offsetAndType,E+1),C=i(t.balance,E+1),I=0,O=m(n(0)),M=O,N=0,R=0,D=0;M<E;){var P=e.charCodeAt(M),L=0;switch(C[I]=E,p(P)){case p.WhiteSpace:L=o.WhiteSpace,M=b(e,M+1);break;case 34:f();break;case 35:c(n(M+1))||u(n(M+1),n(M+2))?(L=o.Hash,M=S(e,M+1)):(L=o.Delim,M++);break;case 39:f();break;case 40:L=o.LeftParenthesis,M++;break;case 41:L=o.RightParenthesis,M++;break;case 43:d(P,n(M+1),n(M+2))?s():(L=o.Delim,M++);break;case 44:L=o.Comma,M++;break;case 45:d(P,n(M+1),n(M+2))?s():45===n(M+1)&&62===n(M+2)?(L=o.CDC,M+=3):h(P,n(M+1),n(M+2))?a():(L=o.Delim,M++);break;case 46:d(P,n(M+1),n(M+2))?s():(L=o.Delim,M++);break;case 47:42===n(M+1)?(L=o.Comment,1===(M=e.indexOf("*/",M+2)+2)&&(M=e.length)):(L=o.Delim,M++);break;case 58:L=o.Colon,M++;break;case 59:L=o.Semicolon,M++;break;case 60:33===n(M+1)&&45===n(M+2)&&45===n(M+3)?(L=o.CDO,M+=4):(L=o.Delim,M++);break;case 64:h(n(M+1),n(M+2),n(M+3))?(L=o.AtKeyword,M=S(e,M+1)):(L=o.Delim,M++);break;case 91:L=o.LeftSquareBracket,M++;break;case 92:u(P,n(M+1))?a():(L=o.Delim,M++);break;case 93:L=o.RightSquareBracket,M++;break;case 123:L=o.LeftCurlyBracket,M++;break;case 125:L=o.RightCurlyBracket,M++;break;case p.Digit:s();break;case p.NameStart:a();break;case p.Eof:break;default:L=o.Delim,M++}switch(L){case N:for(N=(R=C[D=R&T])>>x,C[I]=D,C[D++]=I;D<I;D++)C[D]===E&&(C[D]=I);break;case o.LeftParenthesis:case o.Function:C[I]=R,R=(N=o.RightParenthesis)<<x|I;break;case o.LeftSquareBracket:C[I]=R,R=(N=o.RightSquareBracket)<<x|I;break;case o.LeftCurlyBracket:C[I]=R,R=(N=o.RightCurlyBracket)<<x|I}A[I++]=L<<x|M}for(A[I]=o.EOF<<x|M,C[I]=E,C[E]=E;0!==R;)R=C[D=R&T],C[D]=E;return t.source=e,t.firstCharOffset=O,t.offsetAndType=A,t.tokenCount=I,t.balance=C,t.reset(),t.next(),t}Object.keys(s).forEach((function(e){E[e]=s[e]})),Object.keys(a).forEach((function(e){E[e]=a[e]})),Object.keys(f).forEach((function(e){E[e]=f[e]})),e.exports=E},function(e,t,n){const r=n(31);r.enable(),e.exports=r("vm")},function(e,t,n){const r=n(23),i=e=>{if("string"!=typeof e)return!1;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(48===n||9===n)return!1}return!0};class s{static toNumber(e){if("number"==typeof e)return Number.isNaN(e)?0:e;const t=Number(e);return Number.isNaN(t)?0:t}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e?""!==e&&"0"!==e&&"false"!==e.toLowerCase():Boolean(e)}static toString(e){return String(e)}static toRgbColorList(e){const t=s.toRgbColorObject(e);return[t.r,t.g,t.b]}static toRgbColorObject(e){let t;return"string"==typeof e&&"#"===e.substring(0,1)?(t=r.hexToRgb(e),t||(t={r:0,g:0,b:0,a:255})):t=r.decimalToRgb(s.toNumber(e)),t}static isWhiteSpace(e){return null===e||"string"==typeof e&&0===e.trim().length}static compare(e,t){let n=Number(e),r=Number(t);if(0===n&&i(e)?n=NaN:0===r&&i(t)&&(r=NaN),isNaN(n)||isNaN(r)){const n=String(e).toLowerCase(),r=String(t).toLowerCase();return n<r?-1:n>r?1:0}return n===1/0&&r===1/0||n===-1/0&&r===-1/0?0:n-r}static isInt(e){return"number"==typeof e?!!isNaN(e)||e===Math.floor(e):"boolean"==typeof e||"string"==typeof e&&e.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(e,t,n){if("number"!=typeof e){if("all"===e)return n?s.LIST_ALL:s.LIST_INVALID;if("last"===e)return t>0?t:s.LIST_INVALID;if("random"===e||"any"===e)return t>0?1+Math.floor(Math.random()*t):s.LIST_INVALID}return(e=Math.floor(s.toNumber(e)))<1||e>t?s.LIST_INVALID:e}}e.exports=s},function(e,t){e.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(e,t){e.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(e,t){e.exports=class{static degToRad(e){return e*Math.PI/180}static radToDeg(e){return 180*e/Math.PI}static clamp(e,t,n){return Math.min(Math.max(e,t),n)}static wrapClamp(e,t,n){const r=n-t+1;return e-Math.floor((e-t)/r)*r}static tan(e){switch(e%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*e/180))/1e10}}static reducedSortOrdering(e){const t=e.slice(0).sort(((e,t)=>e-t));return e.map((e=>t.indexOf(e)))}static inclusiveRandIntWithout(e,t,n){const r=t-e,i=e+Math.floor(Math.random()*r);return i>=n?i+1:i}static scale(e,t,n,r,i){return(e-t)/(n-t)*(i-r)+r}}},function(e,t,n){"use strict";var r=n(128),i=n(129),s=n(70),o=n(69),a=n(68);function l(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}e.exports=function e(){var t=l({},a),n="en",c={},u=function(e){return e},d=null,h="warning",p={};function m(e,t,s){var o="string"==typeof e?e:e.default,a=y(o,"object"==typeof e&&e.id||u(o),s||n);return(a.format||(a.format=i(r(a.message),s||n,p)))(t)}m.rich=function(e,t,s){var o="string"==typeof e?e:e.default,a=y(o,"object"==typeof e&&e.id||u(o),s||n);return(a.toParts||(a.toParts=i.toParts(r(a.message,{tagsType:f}),s||n,p)))(t)};var f="<>";function g(e,t){var n=e[2];return function(e,t){var r="object"==typeof n?function(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=e[r](t),n}),{})}(n,t):n;return"function"==typeof e?e(r):e}}function y(e,t,n){var r=o(n,c)||"en",i=c[r]||(c[r]={}),s=i[t];if("string"==typeof s&&(s=i[t]={message:s}),!s){var a='Translation for "'+t+'" in "'+r+'" is missing';if("warning"===h)"undefined"!=typeof console&&console.warn(a);else if("ignore"!==h)throw new Error(a);var l="function"==typeof d?d(e,t,r)||e:d||e;s=i[t]={message:l}}return s}function b(e,t,r,i,a){"object"==typeof r&&"object"!=typeof i&&(a=i,i=r,r=0);var l=o(a||n,s),c=l&&s[l][e]||v;return i["="+ +t]||i[c(t-r)]||i.other}function v(){return"other"}return p[f]=g,m.setup=function(e){return(e=e||{}).locale&&(n=e.locale),"translations"in e&&(c=e.translations||{}),e.generateId&&(u=e.generateId),"missingReplacement"in e&&(d=e.missingReplacement),e.missingTranslation&&(h=e.missingTranslation),e.formats&&(e.formats.number&&l(t.number,e.formats.number),e.formats.date&&l(t.date,e.formats.date),e.formats.time&&l(t.time,e.formats.time)),e.types&&((p=e.types)[f]=g),{locale:n,translations:c,generateId:u,missingReplacement:d,missingTranslation:h,formats:t,types:p}},m.number=function(e,r,i){var s=r&&t.number[r]||t.parseNumberPattern(r)||t.number.default;return new Intl.NumberFormat(i||n,s).format(e)},m.date=function(e,r,i){var s=r&&t.date[r]||t.parseDatePattern(r)||t.date.default;return new Intl.DateTimeFormat(i||n,s).format(e)},m.time=function(e,r,i){var s=r&&t.time[r]||t.parseDatePattern(r)||t.time.default;return new Intl.DateTimeFormat(i||n,s).format(e)},m.select=function(e,t){return t[e]||t.other},m.custom=function(e,t,n,r){return e[1]in p?p[e[1]](e,t)(n,r):n},m.plural=b.bind(null,"cardinal"),m.selectordinal=b.bind(null,"ordinal"),m.namespace=e,m}()},function(e,t,n){const r=n(1);class i{static withoutTrailingDigits(e){let t=e.length-1;for(;t>=0&&"0123456789".indexOf(e.charAt(t))>-1;)t--;return e.slice(0,t+1)}static unusedName(e,t){if(t.indexOf(e)<0)return e;e=i.withoutTrailingDigits(e);let n=2;for(;t.indexOf(e+n)>=0;)n++;return e+n}static caseInsensitiveUnusedName(e,t){const n=e=>t.some((t=>t.toLowerCase()===e.toLowerCase()));if(!n(e))return e;e=i.withoutTrailingDigits(e);let r=2;for(;n("".concat(e).concat(r));)r++;return"".concat(e).concat(r)}static splitFirst(e,t){const n=e.indexOf(t);return n>=0?[e.substring(0,n),e.substring(n+1)]:[e,null]}static stringify(e){return JSON.stringify(e,((e,t)=>"number"!=typeof t||t!==1/0&&t!==-1/0&&!isNaN(t)?t:0))}static replaceUnsafeChars(e){if("string"!=typeof e){if(!Array.isArray(e))return r.error("Unexpected input recieved in replaceUnsafeChars"),e;e=String(e)}return e.replace(/[<>&'"]/g,(e=>{switch(e){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}}))}}e.exports=i},function(e,t){const n="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";e.exports=function(){const e=n.length,t=[];for(let r=0;r<20;r++)t[r]=n.charAt(Math.random()*e);return t.join("")}},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},function(e,t,n){const r=n(8),i=n(33);class s{constructor(e,t,n,i){switch(this.id=e||r(),this.name=t,this.type=n,this.isCloud=i,this.type){case s.SCALAR_TYPE:this.value=0;break;case s.LIST_TYPE:this.value=[];break;case s.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(e){return e=!0===e,'<variable type="'.concat(this.type,'" id="').concat(this.id,'" islocal="').concat(e,'" iscloud="').concat(this.isCloud,'">').concat(i(this.name),"</variable>")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}e.exports=s},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(){return 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}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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=9)}([function(e,t,n){"use strict";t.__esModule=!0,t.copyExistingProperties=function(e,t){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(t[n]=e[n])}))},t.copyNamedProperties=function(e,t,n){e.forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)}))},t.isBuffer=function(e,t){return o||(o=e.createBuffer()),t instanceof o.constructor},t.isRenderbuffer=function(e,t){return a||(a=e.createRenderbuffer()),t instanceof a.constructor},t.isShader=function(e,t){return l||(l=e.createShader(e.VERTEX_SHADER)),t instanceof l.constructor},t.isTexture=function(e,t){return c||(c=e.createTexture()),t instanceof c.constructor},t.isSampler=function(e,t){if(!u){if(!e.createSampler)return!1;u=e.createSampler()}return t instanceof u.constructor},t.warn=t.error=void 0;var r,i=(r=n(2))&&r.__esModule?r:{default:r},s=i.default.console&&i.default.console.error&&"function"==typeof i.default.console.error?i.default.console.error.bind(i.default.console):function(){};t.error=s;var o,a,l,c,u,d=i.default.console&&i.default.console.warn&&"function"==typeof i.default.console.warn?i.default.console.warn.bind(i.default.console):function(){};t.warn=d},function(e,t,n){"use strict";t.__esModule=!0,t.getGLTypeForTypedArray=function(e){if(e instanceof Int8Array)return s;if(e instanceof Uint8Array)return o;if(e instanceof Uint8ClampedArray)return o;if(e instanceof Int16Array)return a;if(e instanceof Uint16Array)return l;if(e instanceof Int32Array)return c;if(e instanceof Uint32Array)return u;if(e instanceof Float32Array)return d;throw"unsupported typed array type"},t.getGLTypeForTypedArrayType=function(e){if(e===Int8Array)return s;if(e===Uint8Array)return o;if(e===Uint8ClampedArray)return o;if(e===Int16Array)return a;if(e===Uint16Array)return l;if(e===Int32Array)return c;if(e===Uint32Array)return u;if(e===Float32Array)return d;throw"unsupported typed array type"},t.getTypedArrayTypeForGLType=function(e){var t=h[e];if(!t)throw"unknown gl type";return t},t.isArrayBuffer=void 0;var r,i=(r=n(2))&&r.__esModule?r:{default:r},s=5120,o=5121,a=5122,l=5123,c=5124,u=5125,d=5126,h={},p=h;p[s]=Int8Array,p[o]=Uint8Array,p[a]=Int16Array,p[l]=Uint16Array,p[c]=Int32Array,p[u]=Uint32Array,p[d]=Float32Array,p[32819]=Uint16Array,p[32820]=Uint16Array,p[33635]=Uint16Array,p[5131]=Uint16Array,p[33640]=Uint32Array,p[35899]=Uint32Array,p[35902]=Uint32Array,p[36269]=Uint32Array,p[34042]=Uint32Array;var m=i.default.SharedArrayBuffer?function(e){return e&&e.buffer&&(e.buffer instanceof ArrayBuffer||e.buffer instanceof i.default.SharedArrayBuffer)}:function(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer};t.isArrayBuffer=m},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};t.default=r},function(e,t,n){"use strict";t.__esModule=!0,t.add=function(e,t,n){return(n=n||new r(3))[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n},t.copy=function(e,t){return(t=t||new r(3))[0]=e[0],t[1]=e[1],t[2]=e[2],t},t.create=function(e,t,n){var i=new r(3);return e&&(i[0]=e),t&&(i[1]=t),n&&(i[2]=n),i},t.cross=function(e,t,n){n=n||new r(3);var i=e[2]*t[0]-e[0]*t[2],s=e[0]*t[1]-e[1]*t[0];return n[0]=e[1]*t[2]-e[2]*t[1],n[1]=i,n[2]=s,n},t.distance=function(e,t){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)},t.distanceSq=function(e,t){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i},t.divide=function(e,t,n){return(n=n||new r(3))[0]=e[0]/t[0],n[1]=e[1]/t[1],n[2]=e[2]/t[2],n},t.divScalar=function(e,t,n){return(n=n||new r(3))[0]=e[0]/t,n[1]=e[1]/t,n[2]=e[2]/t,n},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},t.lerp=function(e,t,n,i){return(i=i||new r(3))[0]=(1-n)*e[0]+n*t[0],i[1]=(1-n)*e[1]+n*t[1],i[2]=(1-n)*e[2]+n*t[2],i},t.length=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])},t.lengthSq=function(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]},t.mulScalar=function(e,t,n){return(n=n||new r(3))[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n},t.multiply=function(e,t,n){return(n=n||new r(3))[0]=e[0]*t[0],n[1]=e[1]*t[1],n[2]=e[2]*t[2],n},t.negate=function(e,t){return(t=t||new r(3))[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},t.normalize=function(e,t){t=t||new r(3);var n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=Math.sqrt(n);return i>1e-5?(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i):(t[0]=0,t[1]=0,t[2]=0),t},t.setDefaultType=function(e){var t=r;return r=e,t},t.subtract=function(e,t,n){return(n=n||new r(3))[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n};var r=Float32Array},function(e,t,n){"use strict";t.__esModule=!0,t.isWebGL1=function(e){return!e.texStorage2D},t.isWebGL2=function(e){return!!e.texStorage2D},t.glEnumToString=void 0;var r,i,s=(r={},i={},function(e,t){return function(e){var t=e.constructor.name;if(!r[t]){for(var n in e)if("number"==typeof e[n]){var s=i[e[n]];i[e[n]]=s?"".concat(s," | ").concat(n):n}r[t]=!0}}(e),i[t]||"0x"+t.toString(16)});t.glEnumToString=s},function(e,t,n){"use strict";t.__esModule=!0,t.createAttributeSetters=H,t.createProgram=L,t.createProgramFromScripts=function(e,t,n,r,i){for(var s=N(n,r,i),o=[],a=0;a<t.length;++a){var l=B(e,t[a],e[R[a]],s.errorCallback);if(!l)return null;o.push(l)}return L(e,o,s)},t.createProgramFromSources=z,t.createProgramInfo=function(e,t,n,r,i){var s=N(n,r,i),o=!0;if(t=t.map((function(e){if(e.indexOf("\n")<0){var t=u(e);t?e=t.text:(s.errorCallback("no element with id: "+e),o=!1)}return e})),!o)return null;var a=z(e,t,s);return a?K(e,a):null},t.createProgramInfoFromProgram=K,t.createUniformSetters=j,t.createUniformBlockSpecFromProgram=V,t.createUniformBlockInfoFromProgram=q,t.createUniformBlockInfo=function(e,t,n){return q(e,t.program,t.uniformBlockSpec,n)},t.createTransformFeedback=function(e,t,n){var r=e.createTransformFeedback();return e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,r),e.useProgram(t.program),W(e,t,n),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),function(e,t,n){for(var r in t.transformFeedbackInfo&&(t=t.transformFeedbackInfo),n.attribs&&(n=n.attribs),n){var i=t[r];i&&e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,i.index,null)}}(e,t,n),r},t.createTransformFeedbackInfo=F,t.bindTransformFeedbackInfo=W,t.setAttributes=_,t.setBuffersAndAttributes=function(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(_(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.indices))},t.setUniforms=function e(t,n){for(var r=t.uniformSetters||t,i=arguments.length,s=1;s<i;++s){var o=arguments[s];if(Array.isArray(o))for(var a=o.length,l=0;l<a;++l)e(r,o[l]);else for(var c in o){var u=r[c];u&&u(o[c])}}},t.setUniformBlock=function(e,t,n){Y(e,t,n)&&e.bufferData(e.UNIFORM_BUFFER,n.array,e.DYNAMIC_DRAW)},t.setBlockUniforms=function(e,t){var n=e.uniforms;for(var r in t){var i=n[r];if(i){var s=t[r];s.length?i.set(s):i[0]=s}}},t.bindUniformBlock=Y;var r,i=a(n(4)),s=a(n(0)),o=(r=n(2))&&r.__esModule?r:{default:r};function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var l=s.error,c=s.warn,u=o.default&&o.default.document&&o.default.document.getElementById?o.default.document.getElementById.bind(o.default.document):function(){return null},d=3553,h=34067,p=32879,m=35866,f={};function g(e,t){return f[t].bindPoint}function y(e,t){return function(n){e.uniform1i(t,n)}}function b(e,t){return function(n){e.uniform1iv(t,n)}}function v(e,t){return function(n){e.uniform2iv(t,n)}}function S(e,t){return function(n){e.uniform3iv(t,n)}}function w(e,t){return function(n){e.uniform4iv(t,n)}}function k(e,t,n,r){var o=g(0,t);return i.isWebGL2(e)?function(t){var i,a;s.isTexture(e,t)?(i=t,a=null):(i=t.texture,a=t.sampler),e.uniform1i(r,n),e.activeTexture(e.TEXTURE0+n),e.bindTexture(o,i),e.bindSampler(n,a)}:function(t){e.uniform1i(r,n),e.activeTexture(e.TEXTURE0+n),e.bindTexture(o,t)}}function T(e,t,n,r,o){for(var a=g(0,t),l=new Int32Array(o),c=0;c<o;++c)l[c]=n+c;return i.isWebGL2(e)?function(t){e.uniform1iv(r,l),t.forEach((function(t,r){var i,o;e.activeTexture(e.TEXTURE0+l[r]),s.isTexture(e,t)?(i=t,o=null):(i=t.texture,o=t.sampler),e.bindSampler(n,o),e.bindTexture(a,i)}))}:function(t){e.uniform1iv(r,l),t.forEach((function(t,n){e.activeTexture(e.TEXTURE0+l[n]),e.bindTexture(a,t)}))}}function x(e,t){return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||e.FLOAT,n.normalize||!1,n.stride||0,n.offset||0),void 0!==n.divisor&&e.vertexAttribDivisor(t,n.divisor)}}function E(e,t){return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||e.INT,n.stride||0,n.offset||0),void 0!==n.divisor&&e.vertexAttribDivisor(t,n.divisor)}}function A(e,t,n){var r=n.size,i=n.count;return function(n){e.bindBuffer(e.ARRAY_BUFFER,n.buffer);for(var s=n.size||n.numComponents||r,o=s/i,a=n.type||e.FLOAT,l=f[a].size*s,c=n.normalize||!1,u=n.offset||0,d=l/i,h=0;h<i;++h)e.enableVertexAttribArray(t+h),e.vertexAttribPointer(t+h,o,a,c,l,u+d*h),void 0!==n.divisor&&e.vertexAttribDivisor(t+h,n.divisor)}}f[5126]={Type:Float32Array,size:4,setter:function(e,t){return function(n){e.uniform1f(t,n)}},arraySetter:function(e,t){return function(n){e.uniform1fv(t,n)}}},f[35664]={Type:Float32Array,size:8,setter:function(e,t){return function(n){e.uniform2fv(t,n)}}},f[35665]={Type:Float32Array,size:12,setter:function(e,t){return function(n){e.uniform3fv(t,n)}}},f[35666]={Type:Float32Array,size:16,setter:function(e,t){return function(n){e.uniform4fv(t,n)}}},f[5124]={Type:Int32Array,size:4,setter:y,arraySetter:b},f[35667]={Type:Int32Array,size:8,setter:v},f[35668]={Type:Int32Array,size:12,setter:S},f[35669]={Type:Int32Array,size:16,setter:w},f[5125]={Type:Uint32Array,size:4,setter:function(e,t){return function(n){e.uniform1ui(t,n)}},arraySetter:function(e,t){return function(n){e.uniform1uiv(t,n)}}},f[36294]={Type:Uint32Array,size:8,setter:function(e,t){return function(n){e.uniform2uiv(t,n)}}},f[36295]={Type:Uint32Array,size:12,setter:function(e,t){return function(n){e.uniform3uiv(t,n)}}},f[36296]={Type:Uint32Array,size:16,setter:function(e,t){return function(n){e.uniform4uiv(t,n)}}},f[35670]={Type:Uint32Array,size:4,setter:y,arraySetter:b},f[35671]={Type:Uint32Array,size:8,setter:v},f[35672]={Type:Uint32Array,size:12,setter:S},f[35673]={Type:Uint32Array,size:16,setter:w},f[35674]={Type:Float32Array,size:16,setter:function(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}},f[35675]={Type:Float32Array,size:36,setter:function(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}},f[35676]={Type:Float32Array,size:64,setter:function(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}},f[35685]={Type:Float32Array,size:24,setter:function(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}},f[35686]={Type:Float32Array,size:32,setter:function(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}},f[35687]={Type:Float32Array,size:24,setter:function(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}},f[35688]={Type:Float32Array,size:48,setter:function(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}},f[35689]={Type:Float32Array,size:32,setter:function(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}},f[35690]={Type:Float32Array,size:48,setter:function(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}},f[35678]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[35680]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[35679]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[35682]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36289]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36292]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36293]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36298]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36299]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[36300]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36303]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m},f[36306]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:d},f[36307]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:p},f[36308]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:h},f[36311]={Type:null,size:0,setter:k,arraySetter:T,bindPoint:m};var C={};C[5126]={size:4,setter:x},C[35664]={size:8,setter:x},C[35665]={size:12,setter:x},C[35666]={size:16,setter:x},C[5124]={size:4,setter:E},C[35667]={size:8,setter:E},C[35668]={size:12,setter:E},C[35669]={size:16,setter:E},C[5125]={size:4,setter:E},C[36294]={size:8,setter:E},C[36295]={size:12,setter:E},C[36296]={size:16,setter:E},C[35670]={size:4,setter:E},C[35671]={size:8,setter:E},C[35672]={size:12,setter:E},C[35673]={size:16,setter:E},C[35674]={size:4,setter:A,count:2},C[35675]={size:9,setter:A,count:3},C[35676]={size:16,setter:A,count:4};var I=void 0,O=/^[ \t]*\n/;function M(e,t,n,r){var i=r||l,s=e.createShader(n),o=0;if(O.test(t)&&(o=1,t=t.replace(O,"")),e.shaderSource(s,t),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS)){var a=e.getShaderInfoLog(s);return i(function(e,t){return t=t||0,++t,e.split("\n").map((function(e,n){return n+t+": "+e})).join("\n")}(t,o)+"\n*** Error compiling shader: "+a),e.deleteShader(s),null}return s}function N(e,t,n){var r;if("function"==typeof t&&(n=t,t=void 0),"function"==typeof e)n=e,e=void 0;else if(e&&!Array.isArray(e)){if(e.errorCallback)return e;var i=e;n=i.errorCallback,e=i.attribLocations,r=i.transformFeedbackVaryings}var s={errorCallback:n||l,transformFeedbackVaryings:r};if(e){var o={};Array.isArray(e)?e.forEach((function(e,n){o[e]=t?t[n]:n})):o=e,s.attribLocations=o}return s}var R=["VERTEX_SHADER","FRAGMENT_SHADER"];function D(e){return e.indexOf("frag")>=0?I.FRAGMENT_SHADER:e.indexOf("vert")>=0?I.VERTEX_SHADER:void 0}function P(e,t){t.forEach((function(t){e.deleteShader(t)}))}function L(e,t,n,r,i){for(var o=N(n,r,i),a=[],l=[],c=0;c<t.length;++c){var d=t[c];if("string"==typeof d){var h=u(d),p=h?h.text:d,m=e[R[c]];h&&h.type&&(m=D(h.type)||m),d=M(e,p,m,o.errorCallback),l.push(d)}s.isShader(e,d)&&a.push(d)}if(a.length!==t.length)return o.errorCallback("not enough shaders for program"),P(e,l),null;var f=e.createProgram();a.forEach((function(t){e.attachShader(f,t)})),o.attribLocations&&Object.keys(o.attribLocations).forEach((function(t){e.bindAttribLocation(f,o.attribLocations[t],t)}));var g=o.transformFeedbackVaryings;if(g&&(g.attribs&&(g=g.attribs),Array.isArray(g)||(g=Object.keys(g)),e.transformFeedbackVaryings(f,g,o.transformFeedbackMode||e.SEPARATE_ATTRIBS)),e.linkProgram(f),!e.getProgramParameter(f,e.LINK_STATUS)){var y=e.getProgramInfoLog(f);return o.errorCallback("Error in program linking:"+y),e.deleteProgram(f),P(e,l),null}return f}function B(e,t,n,r){var i,s=u(t);if(!s)throw"*** Error: unknown script element"+t;i=s.text;var o=n||D(s.type);if(!o)throw"*** Error: unknown shader type";return M(e,i,o,r)}function z(e,t,n,r,i){for(var s=N(n,r,i),o=[],a=0;a<t.length;++a){var l=M(e,t[a],e[R[a]],s.errorCallback);if(!l)return null;o.push(l)}return L(e,o,s)}function U(e){var t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}function j(e,t){var n=0;function r(t,r){var i,s=e.getUniformLocation(t,r.name),o=r.size>1&&"[0]"===r.name.substr(-3),a=r.type,l=f[a];if(!l)throw"unknown type: 0x"+a.toString(16);if(l.bindPoint){var c=n;n+=r.size,i=o?l.arraySetter(e,a,c,s,r.size):l.setter(e,a,c,s,r.size)}else i=l.arraySetter&&o?l.arraySetter(e,s):l.setter(e,s);return i.location=s,i}for(var i={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<s;++o){var a=e.getActiveUniform(t,o);if(!U(a)){var l=a.name;"[0]"===l.substr(-3)&&(l=l.substr(0,l.length-3));var c=r(t,a);i[l]=c}}return i}function F(e,t){for(var n={},r=e.getProgramParameter(t,e.TRANSFORM_FEEDBACK_VARYINGS),i=0;i<r;++i){var s=e.getTransformFeedbackVarying(t,i);n[s.name]={index:i,type:s.type,size:s.size}}return n}function W(e,t,n){for(var r in t.transformFeedbackInfo&&(t=t.transformFeedbackInfo),n.attribs&&(n=n.attribs),n){var i=t[r];if(i){var s=n[r];s.offset?e.bindBufferRange(e.TRANSFORM_FEEDBACK_BUFFER,i.index,s.buffer,s.offset,s.size):e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER,i.index,s.buffer)}}}function V(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),r=[],i=[],s=0;s<n;++s){i.push(s),r.push({});var o=e.getActiveUniform(t,s);if(U(o))break;r[s].name=o.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach((function(n){var s=n[0],o=n[1];e.getActiveUniforms(t,i,e[s]).forEach((function(e,t){r[t][o]=e}))}));for(var a={},l=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS),c=0;c<l;++c){var u=e.getActiveUniformBlockName(t,c),d={index:c,usedByVertexShader:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER),usedByFragmentShader:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER),size:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_DATA_SIZE),uniformIndices:e.getActiveUniformBlockParameter(t,c,e.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES)};d.used=d.usedByVertexSahder||d.usedByFragmentShader,a[u]=d}return{blockSpecs:a,uniformData:r}}var G=/\[\d+\]\.$/;function q(e,t,n,r){var i=n.blockSpecs,s=n.uniformData,o=i[r];if(!o)return c("no uniform block object named:",r),{name:r,uniforms:{}};var a=new ArrayBuffer(o.size),l=e.createBuffer(),u=o.index;e.bindBuffer(e.UNIFORM_BUFFER,l),e.uniformBlockBinding(t,o.index,u);var d=r+".";G.test(d)&&(d=d.replace(G,"."));var h={};return o.uniformIndices.forEach((function(e){var t=s[e],n=f[t.type],r=n.Type,i=t.size*n.size,o=t.name;o.substr(0,d.length)===d&&(o=o.substr(d.length)),h[o]=new r(a,t.offset,i/r.BYTES_PER_ELEMENT)})),{name:r,array:a,asFloat:new Float32Array(a),buffer:l,uniforms:h}}function Y(e,t,n){var r=(t.uniformBlockSpec||t).blockSpecs[n.name];if(r){var i=r.index;return e.bindBufferRange(e.UNIFORM_BUFFER,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function H(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;++i){var s=e.getActiveAttrib(t,i);if(!U(s)){var o=e.getAttribLocation(t,s.name),a=C[s.type],l=a.setter(e,o,a);l.location=o,n[s.name]=l}}return n}function _(e,t){for(var n in t){var r=e[n];r&&r(t[n])}}function K(e,t){var n={program:t,uniformSetters:j(e,t),attribSetters:H(e,t)};return i.isWebGL2(e)&&(n.uniformBlockSpec=V(e,t),n.transformFeedbackInfo=F(e,t)),n}},function(e,t,n){"use strict";t.__esModule=!0,t.axisRotate=function(e,t,n,r){r=r||new i(16);var s=t[0],o=t[1],a=t[2],l=Math.sqrt(s*s+o*o+a*a),c=(s/=l)*s,u=(o/=l)*o,d=(a/=l)*a,h=Math.cos(n),p=Math.sin(n),m=1-h,f=c+(1-c)*h,g=s*o*m+a*p,y=s*a*m-o*p,b=s*o*m-a*p,v=u+(1-u)*h,S=o*a*m+s*p,w=s*a*m+o*p,k=o*a*m-s*p,T=d+(1-d)*h,x=e[0],E=e[1],A=e[2],C=e[3],I=e[4],O=e[5],M=e[6],N=e[7],R=e[8],D=e[9],P=e[10],L=e[11];return r[0]=f*x+g*I+y*R,r[1]=f*E+g*O+y*D,r[2]=f*A+g*M+y*P,r[3]=f*C+g*N+y*L,r[4]=b*x+v*I+S*R,r[5]=b*E+v*O+S*D,r[6]=b*A+v*M+S*P,r[7]=b*C+v*N+S*L,r[8]=w*x+k*I+T*R,r[9]=w*E+k*O+T*D,r[10]=w*A+k*M+T*P,r[11]=w*C+k*N+T*L,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r},t.axisRotation=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=Math.sqrt(r*r+s*s+o*o),l=(r/=a)*r,c=(s/=a)*s,u=(o/=a)*o,d=Math.cos(t),h=Math.sin(t),p=1-d;return n[0]=l+(1-l)*d,n[1]=r*s*p+o*h,n[2]=r*o*p-s*h,n[3]=0,n[4]=r*s*p-o*h,n[5]=c+(1-c)*d,n[6]=s*o*p+r*h,n[7]=0,n[8]=r*o*p+s*h,n[9]=s*o*p-r*h,n[10]=u+(1-u)*d,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},t.copy=l,t.frustum=function(e,t,n,r,s,o,a){a=a||new i(16);var l=t-e,c=r-n,u=s-o;return a[0]=2*s/l,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*s/c,a[6]=0,a[7]=0,a[8]=(e+t)/l,a[9]=(r+n)/c,a[10]=o/u,a[11]=-1,a[12]=0,a[13]=0,a[14]=s*o/u,a[15]=0,a},t.getAxis=function(e,t,n){n=n||r.create();var i=4*t;return n[0]=e[i+0],n[1]=e[i+1],n[2]=e[i+2],n},t.getTranslation=function(e,t){return(t=t||r.create())[0]=e[12],t[1]=e[13],t[2]=e[14],t},t.identity=c,t.inverse=u,t.lookAt=function(e,t,n,l){l=l||new i(16);var c=s,u=o,d=a;return r.normalize(r.subtract(e,t,d),d),r.normalize(r.cross(n,d,c),c),r.normalize(r.cross(d,c,u),u),l[0]=c[0],l[1]=c[1],l[2]=c[2],l[3]=0,l[4]=u[0],l[5]=u[1],l[6]=u[2],l[7]=0,l[8]=d[0],l[9]=d[1],l[10]=d[2],l[11]=0,l[12]=e[0],l[13]=e[1],l[14]=e[2],l[15]=1,l},t.multiply=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=e[8],p=e[9],m=e[10],f=e[11],g=e[12],y=e[13],b=e[14],v=e[15],S=t[0],w=t[1],k=t[2],T=t[3],x=t[4],E=t[5],A=t[6],C=t[7],I=t[8],O=t[9],M=t[10],N=t[11],R=t[12],D=t[13],P=t[14],L=t[15];return n[0]=r*S+l*w+h*k+g*T,n[1]=s*S+c*w+p*k+y*T,n[2]=o*S+u*w+m*k+b*T,n[3]=a*S+d*w+f*k+v*T,n[4]=r*x+l*E+h*A+g*C,n[5]=s*x+c*E+p*A+y*C,n[6]=o*x+u*E+m*A+b*C,n[7]=a*x+d*E+f*A+v*C,n[8]=r*I+l*O+h*M+g*N,n[9]=s*I+c*O+p*M+y*N,n[10]=o*I+u*O+m*M+b*N,n[11]=a*I+d*O+f*M+v*N,n[12]=r*R+l*D+h*P+g*L,n[13]=s*R+c*D+p*P+y*L,n[14]=o*R+u*D+m*P+b*L,n[15]=a*R+d*D+f*P+v*L,n},t.negate=function(e,t){return(t=t||new i(16))[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},t.ortho=function(e,t,n,r,s,o,a){return(a=a||new i(16))[0]=2/(t-e),a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/(r-n),a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2/(s-o),a[11]=0,a[12]=(t+e)/(e-t),a[13]=(r+n)/(n-r),a[14]=(o+s)/(s-o),a[15]=1,a},t.perspective=function(e,t,n,r,s){s=s||new i(16);var o=Math.tan(.5*Math.PI-.5*e),a=1/(n-r);return s[0]=o/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+r)*a,s[11]=-1,s[12]=0,s[13]=0,s[14]=n*r*a*2,s[15]=0,s},t.rotateX=function(e,t,n){n=n||new i(16);var r=e[4],s=e[5],o=e[6],a=e[7],l=e[8],c=e[9],u=e[10],d=e[11],h=Math.cos(t),p=Math.sin(t);return n[4]=h*r+p*l,n[5]=h*s+p*c,n[6]=h*o+p*u,n[7]=h*a+p*d,n[8]=h*l-p*r,n[9]=h*c-p*s,n[10]=h*u-p*o,n[11]=h*d-p*a,e!==n&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotateY=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[8],c=e[9],u=e[10],d=e[11],h=Math.cos(t),p=Math.sin(t);return n[0]=h*r-p*l,n[1]=h*s-p*c,n[2]=h*o-p*u,n[3]=h*a-p*d,n[8]=h*l+p*r,n[9]=h*c+p*s,n[10]=h*u+p*o,n[11]=h*d+p*a,e!==n&&(n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotateZ=function(e,t,n){n=n||new i(16);var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=Math.cos(t),p=Math.sin(t);return n[0]=h*r+p*l,n[1]=h*s+p*c,n[2]=h*o+p*u,n[3]=h*a+p*d,n[4]=h*l-p*r,n[5]=h*c-p*s,n[6]=h*u-p*o,n[7]=h*d-p*a,e!==n&&(n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.rotationX=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotationY=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.rotationZ=function(e,t){t=t||new i(16);var n=Math.cos(e),r=Math.sin(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.scale=function(e,t,n){n=n||new i(16);var r=t[0],s=t[1],o=t[2];return n[0]=r*e[0],n[1]=r*e[1],n[2]=r*e[2],n[3]=r*e[3],n[4]=s*e[4],n[5]=s*e[5],n[6]=s*e[6],n[7]=s*e[7],n[8]=o*e[8],n[9]=o*e[9],n[10]=o*e[10],n[11]=o*e[11],e!==n&&(n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n},t.scaling=function(e,t){return(t=t||new i(16))[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.setAxis=function(e,t,n,r){r!==e&&(r=l(e,r));var i=4*n;return r[i+0]=t[0],r[i+1]=t[1],r[i+2]=t[2],r},t.setDefaultType=function(e){var t=i;return i=e,t},t.setTranslation=function(e,t,n){return n=n||c(),e!==n&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11]),n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n},t.transformDirection=function(e,t,n){n=n||r.create();var i=t[0],s=t[1],o=t[2];return n[0]=i*e[0]+s*e[4]+o*e[8],n[1]=i*e[1]+s*e[5]+o*e[9],n[2]=i*e[2]+s*e[6]+o*e[10],n},t.transformNormal=function(e,t,n){n=n||r.create();var i=u(e),s=t[0],o=t[1],a=t[2];return n[0]=s*i[0]+o*i[1]+a*i[2],n[1]=s*i[4]+o*i[5]+a*i[6],n[2]=s*i[8]+o*i[9]+a*i[10],n},t.transformPoint=function(e,t,n){n=n||r.create();var i=t[0],s=t[1],o=t[2],a=i*e[3]+s*e[7]+o*e[11]+e[15];return n[0]=(i*e[0]+s*e[4]+o*e[8]+e[12])/a,n[1]=(i*e[1]+s*e[5]+o*e[9]+e[13])/a,n[2]=(i*e[2]+s*e[6]+o*e[10]+e[14])/a,n},t.translate=function(e,t,n){n=n||new i(16);var r=t[0],s=t[1],o=t[2],a=e[0],l=e[1],c=e[2],u=e[3],d=e[4],h=e[5],p=e[6],m=e[7],f=e[8],g=e[9],y=e[10],b=e[11],v=e[12],S=e[13],w=e[14],k=e[15];return e!==n&&(n[0]=a,n[1]=l,n[2]=c,n[3]=u,n[4]=d,n[5]=h,n[6]=p,n[7]=m,n[8]=f,n[9]=g,n[10]=y,n[11]=b),n[12]=a*r+d*s+f*o+v,n[13]=l*r+h*s+g*o+S,n[14]=c*r+p*s+y*o+w,n[15]=u*r+m*s+b*o+k,n},t.translation=function(e,t){return(t=t||new i(16))[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},t.transpose=function(e,t){var n;if((t=t||new i(16))===e)return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,t;var r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],c=e[5],u=e[6],d=e[7],h=e[8],p=e[9],m=e[10],f=e[11],g=e[12],y=e[13],b=e[14],v=e[15];return t[0]=r,t[1]=l,t[2]=h,t[3]=g,t[4]=s,t[5]=c,t[6]=p,t[7]=y,t[8]=o,t[9]=u,t[10]=m,t[11]=b,t[12]=a,t[13]=d,t[14]=f,t[15]=v,t};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(3)),i=Float32Array,s=r.create(),o=r.create(),a=r.create();function l(e,t){return(t=t||new i(16))[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(e){return(e=e||new i(16))[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function u(e,t){t=t||new i(16);var n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=e[9],p=e[10],m=e[11],f=e[12],g=e[13],y=e[14],b=e[15],v=p*b,S=y*m,w=c*b,k=y*u,T=c*m,x=p*u,E=s*b,A=y*o,C=s*m,I=p*o,O=s*u,M=c*o,N=d*g,R=f*h,D=a*g,P=f*l,L=a*h,B=d*l,z=n*g,U=f*r,j=n*h,F=d*r,W=n*l,V=a*r,G=v*l+k*h+T*g-(S*l+w*h+x*g),q=S*r+E*h+I*g-(v*r+A*h+C*g),Y=w*r+A*l+O*g-(k*r+E*l+M*g),H=x*r+C*l+M*h-(T*r+I*l+O*h),_=1/(n*G+a*q+d*Y+f*H);return t[0]=_*G,t[1]=_*q,t[2]=_*Y,t[3]=_*H,t[4]=_*(S*a+w*d+x*f-(v*a+k*d+T*f)),t[5]=_*(v*n+A*d+C*f-(S*n+E*d+I*f)),t[6]=_*(k*n+E*a+M*f-(w*n+A*a+O*f)),t[7]=_*(T*n+I*a+O*d-(x*n+C*a+M*d)),t[8]=_*(N*u+P*m+L*b-(R*u+D*m+B*b)),t[9]=_*(R*o+z*m+F*b-(N*o+U*m+j*b)),t[10]=_*(D*o+U*u+W*b-(P*o+z*u+V*b)),t[11]=_*(B*o+j*u+V*m-(L*o+F*u+W*m)),t[12]=_*(D*p+B*y+R*c-(L*y+N*c+P*p)),t[13]=_*(j*y+N*s+U*p-(z*p+F*y+R*s)),t[14]=_*(z*c+V*y+P*s-(W*y+D*s+U*c)),t[15]=_*(W*p+L*s+F*c-(j*c+V*p+B*s)),t}},function(e,t,n){"use strict";t.__esModule=!0,t.createAttribsFromArrays=g,t.createBuffersFromArrays=function(e,t){var n={};return Object.keys(t).forEach((function(r){n[r]=b(e,t[r],r)})),t.indices?(n.numElements=t.indices.length,n.elementType=r.getGLTypeForTypedArray(f(t.indices),"indices")):n.numElements=function(e){for(var t,n=0;n<y.length&&!((t=y[n])in e);++n);ii===y.length&&(t=Object.keys(e)[0]);var r=e[t],i=u(r).length,s=m(r,t),o=i/s;if(i%s>0)throw"numComponents "+s+" not correct for length "+i;return o}(t),n},t.createBufferFromArray=b,t.createBufferFromTypedArray=l,t.createBufferInfoFromArrays=function(e,t){var n={attribs:g(e,t)},i=t.indices;if(i){var s=f(i,"indices");n.indices=l(e,s,e.ELEMENT_ARRAY_BUFFER),n.numElements=s.length,n.elementType=r.getGLTypeForTypedArray(s)}else n.numElements=function(e,t){var n,r;for(r=0;r<y.length&&!((n=y[r])in t)&&!((n=o.attribPrefix+n)in t);++r);r===y.length&&(n=Object.keys(t)[0]);var i=t[n];e.bindBuffer(e.ARRAY_BUFFER,i.buffer);var s=e.getBufferParameter(e.ARRAY_BUFFER,e.BUFFER_SIZE);e.bindBuffer(e.ARRAY_BUFFER,null);var a=function(e,t){return t===e.BYTE||t===e.UNSIGNED_BYTE?1:t===e.SHORT||t===e.UNSIGNED_SHORT?2:t===e.INT||t===e.UNSIGNED_INT||t===e.FLOAT?4:0}(e,i.type),l=s/a,c=i.numComponents||i.size,u=l/c;if(u%1!=0)throw"numComponents "+c+" not correct for length "+length;return u}(e,n.attribs);return n},t.setAttribInfoBufferFromArray=function(e,t,n,r){n=f(n),void 0!==r?(e.bindBuffer(e.ARRAY_BUFFER,t.buffer),e.bufferSubData(e.ARRAY_BUFFER,r,n)):a(e,e.ARRAY_BUFFER,t.buffer,n,t.drawType)},t.setAttributePrefix=function(e){o.attribPrefix=e},t.setAttributeDefaults_=function(e){i.copyExistingProperties(e,o)},t.getNumComponents_=m,t.getArray_=u;var r=s(n(1)),i=s(n(0));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var o={attribPrefix:""};function a(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||e.STATIC_DRAW)}function l(e,t,n,r){if(i.isBuffer(e,t))return t;n=n||e.ARRAY_BUFFER;var s=e.createBuffer();return a(e,n,s,t,r),s}function c(e){return"indices"===e}function u(e){return e.length?e:e.data}var d=/coord|texture/i,h=/color|colour/i;function p(e,t){var n;if(t%(n=d.test(e)?2:h.test(e)?4:3)>0)throw"Can not guess numComponents for attribute '"+e+"'. Tried "+n+" but "+t+" values is not evenly divisible by "+n+". You should specify it.";return n}function m(e,t){return e.numComponents||e.size||p(t,u(e).length)}function f(e,t){if(r.isArrayBuffer(e))return e;if(r.isArrayBuffer(e.data))return e.data;Array.isArray(e)&&(e={data:e});var n=e.type;return n||(n=c(t)?Uint16Array:Float32Array),new n(e.data)}function g(e,t){var n={};return Object.keys(t).forEach((function(i){if(!c(i)){var s,a,u,d,h,g=t[i],y=g.attrib||g.name||g.attribName||o.attribPrefix+i;if("number"==typeof g||"number"==typeof g.data){h=g.data||g;var b=g.type||Float32Array,v=h*b.BYTES_PER_ELEMENT;a=r.getGLTypeForTypedArrayType(b),u=void 0!==g.normalize?g.normalize:(w=b)===Int8Array||w===Uint8Array,d=g.numComponents||g.size||p(i,h),s=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,v,g.drawType||e.STATIC_DRAW)}else{var S=f(g,i);s=l(e,S,void 0,g.drawType),a=r.getGLTypeForTypedArray(S),u=void 0!==g.normalize?g.normalize:function(e){return e instanceof Int8Array||e instanceof Uint8Array}(S),d=m(g,i),h=S.length}n[y]={buffer:s,numComponents:d,type:a,normalize:u,stride:g.stride||0,offset:g.offset||0,divisor:void 0===g.divisor?void 0:g.divisor,drawType:g.drawType}}var w})),e.bindBuffer(e.ARRAY_BUFFER,null),n}var y=["position","positions","a_position"];function b(e,t,n){var r="indices"===n?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER;return l(e,f(t,n),r)}},function(e,t,n){"use strict";t.__esModule=!0,t.setTextureDefaults_=function(e){o.copyExistingProperties(e,c),e.textureColor&&q(e.textureColor)},t.createSampler=$,t.createSamplers=function(e,t){var n={};return Object.keys(t).forEach((function(r){n[r]=$(e,t[r])})),n},t.setSamplerParameters=J,t.createTexture=me,t.setEmptyTexture=pe,t.setTextureFromArray=he,t.loadTextureFromUrl=ce,t.setTextureFromElement=ie,t.setTextureFilteringForSize=ee,t.setTextureParameters=Z,t.setDefaultTextureColor=q,t.createTextures=function(e,t,n){n=n||se;var r=0,i=[],s={},o={};function a(){0===r&&setTimeout((function(){n(i.length?i:void 0,s,o)}),0)}return Object.keys(t).forEach((function(n){var l,c,u=t[n];("string"==typeof(c=u.src)||Array.isArray(c)&&"string"==typeof c[0])&&(l=function(e,t,s){o[n]=s,--r,e&&i.push(e),a()},++r),s[n]=me(e,u,l)})),a(),s},t.resizeTexture=function(e,t,n,r,i){r=r||n.width,i=i||n.height;var s=n.target||e.TEXTURE_2D;e.bindTexture(s,t);var o,a=n.level||0,l=n.internalFormat||n.format||e.RGBA,c=F(l),d=n.format||c.format,h=n.src;if(o=h&&(u(h)||Array.isArray(h)&&"number"==typeof h[0])?n.type||V(e,h,c.type):n.type||c.type,s===e.TEXTURE_CUBE_MAP)for(var p=0;p<6;++p)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+p,a,l,r,i,0,d,o,null);else e.texImage2D(s,a,l,r,i,0,d,o,null)},t.getNumComponentsForFormat=function(e){var t=L[e];if(!t)throw"unknown format: "+e;return t.numColorComponents},t.getBytesPerElementForInternalFormat=j;var r,i=l(n(4)),s=l(n(1)),o=l(n(0)),a=(r=n(2))&&r.__esModule?r:{default:r};function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var c={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},u=s.isArrayBuffer,d=a.default.document&&a.default.document.createElement?a.default.document.createElement("canvas").getContext("2d"):null,h=6406,p=6407,m=6408,f=6409,g=6410,y=6402,b=34041,v=5120,S=5121,w=5122,k=5123,T=5124,x=5125,E=5126,A=5131,C=36193,I=33640,O=33319,M=33320,N=6403,R=36244,D=36248,P=36249,L={},B=L;B[6406]={numColorComponents:1},B[6409]={numColorComponents:1},B[6410]={numColorComponents:2},B[p]={numColorComponents:3},B[m]={numColorComponents:4},B[N]={numColorComponents:1},B[36244]={numColorComponents:1},B[O]={numColorComponents:2},B[33320]={numColorComponents:2},B[p]={numColorComponents:3},B[36248]={numColorComponents:3},B[m]={numColorComponents:4},B[36249]={numColorComponents:4},B[6402]={numColorComponents:1},B[34041]={numColorComponents:2};var z={},U=z;function j(e,t){var n=z[e];if(!n)throw"unknown internal format";var r=n.bytesPerElementMap[t];if(void 0===r)throw"unknown internal format";return r}function F(e){var t=z[e];if(!t)throw"unknown internal format";return{format:t.textureFormat,type:Array.isArray(t.type)?t.type[0]:t.type}}function W(e){return!(e&e-1)}function V(e,t,n){return u(t)?s.getGLTypeForTypedArray(t):n||e.UNSIGNED_BYTE}function G(e,t,n,r,i){if(i%1!=0)throw"can't guess dimensions";if(n||r){if(r){if(!n&&(n=i/r)%1)throw"can't guess dimensions"}else if((r=i/n)%1)throw"can't guess dimensions"}else{var s=Math.sqrt(i/(t===e.TEXTURE_CUBE_MAP?6:1));s%1==0?(n=s,r=s):(n=i,r=1)}return{width:n,height:r}}function q(e){c.textureColor=new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}U[6406]={textureFormat:h,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[S,A,C,E]},U[6409]={textureFormat:f,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[S,A,C,E]},U[6410]={textureFormat:g,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[S,A,C,E]},U[p]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[S,A,C,E,33635]},U[m]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[S,A,C,E,32819,32820]},U[33321]={textureFormat:N,colorRenderable:!0,textureFilterable:!0,bytesPerElement:1,type:S},U[36756]={textureFormat:N,colorRenderable:!1,textureFilterable:!0,bytesPerElement:1,type:v},U[33325]={textureFormat:N,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[E,A]},U[33326]={textureFormat:N,colorRenderable:!1,textureFilterable:!1,bytesPerElement:4,type:E},U[33330]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:S},U[33329]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:v},U[33332]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:k},U[33331]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:w},U[33334]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:x},U[33333]={textureFormat:R,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:T},U[33323]={textureFormat:O,colorRenderable:!0,textureFilterable:!0,bytesPerElement:2,type:S},U[36757]={textureFormat:O,colorRenderable:!1,textureFilterable:!0,bytesPerElement:2,type:v},U[33327]={textureFormat:O,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[E,A]},U[33328]={textureFormat:O,colorRenderable:!1,textureFilterable:!1,bytesPerElement:8,type:E},U[33336]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:S},U[33335]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:v},U[33338]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:k},U[33337]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:w},U[33340]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:x},U[33339]={textureFormat:M,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:T},U[32849]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:3,type:S},U[35905]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:S},U[36194]={textureFormat:p,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[S,33635]},U[36758]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:v},U[35898]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[E,A,35899]},U[35901]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[E,A,35902]},U[34843]={textureFormat:p,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[E,A]},U[34837]={textureFormat:p,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:E},U[36221]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:S},U[36239]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:v},U[36215]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:k},U[36233]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:w},U[36209]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:x},U[36227]={textureFormat:D,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:T},U[32856]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:S},U[35907]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:S},U[36759]={textureFormat:m,colorRenderable:!1,textureFilterable:!0,bytesPerElement:4,type:v},U[32855]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[S,32820,I]},U[32854]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[S,32819]},U[32857]={textureFormat:m,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:I},U[34842]={textureFormat:m,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[E,A]},U[34836]={textureFormat:m,colorRenderable:!1,textureFilterable:!1,bytesPerElement:16,type:E},U[36220]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:S},U[36238]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:v},U[36975]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:I},U[36214]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:k},U[36232]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:w},U[36226]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:T},U[36208]={textureFormat:P,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:x},U[33189]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[k,x]},U[33190]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:x},U[36012]={textureFormat:y,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:E},U[35056]={textureFormat:b,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:34042},U[36013]={textureFormat:b,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:36269},Object.keys(U).forEach((function(e){var t=U[e];if(t.bytesPerElementMap={},Array.isArray(t.bytesPerElement))t.bytesPerElement.forEach((function(e,n){var r=t.type[n];t.bytesPerElementMap[r]=e}));else{var n=t.type;t.bytesPerElementMap[n]=t.bytesPerElement}}));var Y={};function H(e,t){void 0!==t.colorspaceConversion&&(Y.colorspaceConversion=e.getParameter(e.UNPACK_COLORSPACE_CONVERSION_WEBGL),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.colorspaceConversion)),void 0!==t.premultiplyAlpha&&(Y.premultiplyAlpha=e.getParameter(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha)),void 0!==t.flipY&&(Y.flipY=e.getParameter(e.UNPACK_FLIP_Y_WEBGL),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY))}function _(e,t){void 0!==t.colorspaceConversion&&e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,Y.colorspaceConversion),void 0!==t.premultiplyAlpha&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Y.premultiplyAlpha),void 0!==t.flipY&&e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,Y.flipY)}function K(e){Y.unpackAlignment=e.getParameter(e.UNPACK_ALIGNMENT),i.isWebGL2(e)&&(Y.unpackRowLength=e.getParameter(e.UNPACK_ROW_LENGTH),Y.unpackImageHeight=e.getParameter(e.UNPACK_IMAGE_HEIGHT),Y.unpackSkipPixels=e.getParameter(e.UNPACK_SKIP_PIXELS),Y.unpackSkipRows=e.getParameter(e.UNPACK_SKIP_ROWS),Y.unpackSkipImages=e.getParameter(e.UNPACK_SKIP_IMAGES))}function Q(e){e.pixelStorei(e.UNPACK_ALIGNMENT,Y.unpackAlignment),i.isWebGL2(e)&&(e.pixelStorei(e.UNPACK_ROW_LENGTH,Y.unpackRowLength),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,Y.unpackImageHeight),e.pixelStorei(e.UNPACK_SKIP_PIXELS,Y.unpackSkipPixels),e.pixelStorei(e.UNPACK_SKIP_ROWS,Y.unpackSkipRows),e.pixelStorei(e.UNPACK_SKIP_IMAGES,Y.unpackSkipImages))}function X(e,t,n,r){r.minMag&&(n.call(e,t,e.TEXTURE_MIN_FILTER,r.minMag),n.call(e,t,e.TEXTURE_MAG_FILTER,r.minMag)),r.min&&n.call(e,t,e.TEXTURE_MIN_FILTER,r.min),r.mag&&n.call(e,t,e.TEXTURE_MAG_FILTER,r.mag),r.wrap&&(n.call(e,t,e.TEXTURE_WRAP_S,r.wrap),n.call(e,t,e.TEXTURE_WRAP_T,r.wrap),(t===e.TEXTURE_3D||o.isSampler(e,t))&&n.call(e,t,e.TEXTURE_WRAP_R,r.wrap)),r.wrapR&&n.call(e,t,e.TEXTURE_WRAP_R,r.wrapR),r.wrapS&&n.call(e,t,e.TEXTURE_WRAP_S,r.wrapS),r.wrapT&&n.call(e,t,e.TEXTURE_WRAP_T,r.wrapT),r.minLod&&n.call(e,t,e.TEXTURE_MIN_LOD,r.minLod),r.maxLod&&n.call(e,t,e.TEXTURE_MAX_LOD,r.maxLod),r.baseLevel&&n.call(e,t,e.TEXTURE_BASE_LEVEL,r.baseLevel),r.maxLevel&&n.call(e,t,e.TEXTURE_MAX_LEVEL,r.maxLevel)}function Z(e,t,n){var r=n.target||e.TEXTURE_2D;e.bindTexture(r,t),X(e,r,e.texParameteri,n)}function J(e,t,n){X(e,t,e.samplerParameteri,n)}function $(e,t){var n=e.createSampler();return J(e,n,t),n}function ee(e,t,n,r,s,o,a){n=n||c.textureOptions,o=o||e.RGBA,a=a||e.UNSIGNED_BYTE;var l=n.target||e.TEXTURE_2D;if(r=r||n.width,s=s||n.height,e.bindTexture(l,t),function(e,t,n,r){if(!i.isWebGL2(e))return W(t)&&W(n);var s=z[r];if(!s)throw"unknown internal format";return s.colorRenderable&&s.textureFilterable}(e,r,s,o))e.generateMipmap(l);else{var u=function(e){var t=z[e];if(!t)throw"unknown internal format";return t.textureFilterable}(o)?e.LINEAR:e.NEAREST;e.texParameteri(l,e.TEXTURE_MIN_FILTER,u),e.texParameteri(l,e.TEXTURE_MAG_FILTER,u),e.texParameteri(l,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(l,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}function te(e){return!0===e.auto||void 0===e.auto&&void 0===e.level}function ne(e,t){return(t=t||{}).cubeFaceOrder||[e.TEXTURE_CUBE_MAP_POSITIVE_X,e.TEXTURE_CUBE_MAP_NEGATIVE_X,e.TEXTURE_CUBE_MAP_POSITIVE_Y,e.TEXTURE_CUBE_MAP_NEGATIVE_Y,e.TEXTURE_CUBE_MAP_POSITIVE_Z,e.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function re(e,t){var n=ne(e,t).map((function(e,t){return{face:e,ndx:t}}));return n.sort((function(e,t){return e.face-t.face})),n}function ie(e,t,n,r){var i=(r=r||c.textureOptions).target||e.TEXTURE_2D,s=r.level||0,o=n.width,l=n.height,u=r.internalFormat||r.format||e.RGBA,h=F(u),p=r.format||h.format,m=r.type||h.type;if(H(e,r),e.bindTexture(i,t),i===e.TEXTURE_CUBE_MAP){var f,g,y=n.width,b=n.height;if(y/6===b)f=b,g=[0,0,1,0,2,0,3,0,4,0,5,0];else if(b/6===y)f=y,g=[0,0,0,1,0,2,0,3,0,4,0,5];else if(y/3==b/2)f=y/3,g=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(y/2!=b/3)throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);f=y/2,g=[0,0,1,0,0,1,1,1,0,2,1,2]}d?(d.canvas.width=f,d.canvas.height=f,o=f,l=f,re(e,r).forEach((function(t){var r=g[2*t.ndx+0]*f,i=g[2*t.ndx+1]*f;d.drawImage(n,r,i,f,f,0,0,f,f),e.texImage2D(t.face,s,u,p,m,d.canvas)})),d.canvas.width=1,d.canvas.height=1):a.default.createImageBitmap&&(o=f,l=f,re(e,r).forEach((function(c){var d=g[2*c.ndx+0]*f,h=g[2*c.ndx+1]*f;e.texImage2D(c.face,s,u,f,f,0,p,m,null),a.default.createImageBitmap(n,d,h,f,f,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(n){H(e,r),e.bindTexture(i,t),e.texImage2D(c.face,s,u,p,m,n),_(e,r),te(r)&&ee(e,t,r,o,l,u,m)}))})))}else if(i===e.TEXTURE_3D||i===e.TEXTURE_2D_ARRAY){var v=Math.min(n.width,n.height),S=Math.max(n.width,n.height),w=S/v;if(w%1!=0)throw"can not compute 3D dimensions of element";var k=n.width===S?1:0,T=n.height===S?1:0;K(e),e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.pixelStorei(e.UNPACK_ROW_LENGTH,n.width),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,0),e.pixelStorei(e.UNPACK_SKIP_IMAGES,0),e.texImage3D(i,s,u,v,v,v,0,p,m,null);for(var x=0;x<w;++x){var E=x*v*k,A=x*v*T;e.pixelStorei(e.UNPACK_SKIP_PIXELS,E),e.pixelStorei(e.UNPACK_SKIP_ROWS,A),e.texSubImage3D(i,s,0,0,x,v,v,1,p,m,n)}Q(e)}else e.texImage2D(i,s,u,p,m,n);_(e,r),te(r)&&ee(e,t,r,o,l,u,m),Z(e,t,r)}function se(){}function oe(e){return a.default.ImageBitmap&&e instanceof a.default.ImageBitmap||a.default.ImageData&&e instanceof a.default.ImageData||a.default.HTMLElement&&e instanceof a.default.HTMLElement}function ae(e,t,n){return oe(e)?(setTimeout((function(){n(null,e)})),e):function(e,t,n){var r;if(n=n||se,a.default.Image){r=new a.default.Image,void 0!==(t=void 0!==t?t:c.crossOrigin)&&(r.crossOrigin=t);var i=function(){r.removeEventListener("error",s),r.removeEventListener("load",l),r=null},s=function(){var t="couldn't load image: "+e;o.error(t),n(t,r),i()},l=function(){n(null,r),i()};return r.addEventListener("error",s),r.addEventListener("load",l),r.src=e,r}if(a.default.ImageBitmap){var u,d,h=function(){n(u,d)},p={};t&&(p.mode="cors"),fetch(e,p).then((function(e){if(!e.ok)throw e;return e.blob()})).then((function(e){return a.default.createImageBitmap(e,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(e){d=e,setTimeout(h)})).catch((function(e){u=e,setTimeout(h)})),r=null}return r}(e,t,n)}function le(e,t,n){var r=(n=n||c.textureOptions).target||e.TEXTURE_2D;if(e.bindTexture(r,t),!1!==n.color){var i=function(e){return e=e||c.textureColor,u(e)?e:new Uint8Array([255*e[0],255*e[1],255*e[2],255*e[3]])}(n.color);if(r===e.TEXTURE_CUBE_MAP)for(var s=0;s<6;++s)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);else r===e.TEXTURE_3D||r===e.TEXTURE_2D_ARRAY?e.texImage3D(r,0,e.RGBA,1,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i):e.texImage2D(r,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i)}}function ce(e,t,n,r){return r=r||se,n=n||c.textureOptions,le(e,t,n),ae((n=Object.assign({},n)).src,n.crossOrigin,(function(i,s){i?r(i,t,s):(ie(e,t,s,n),r(null,t,s))}))}function ue(e,t,n,r){r=r||se;var i=n.src;if(6!==i.length)throw"there must be 6 urls for a cubemap";var s=n.level||0,o=n.internalFormat||n.format||e.RGBA,a=F(o),l=n.format||a.format,c=n.type||e.UNSIGNED_BYTE,u=n.target||e.TEXTURE_2D;if(u!==e.TEXTURE_CUBE_MAP)throw"target must be TEXTURE_CUBE_MAP";le(e,t,n),n=Object.assign({},n);var d,h=6,p=[],m=ne(e,n);d=i.map((function(i,a){return ae(i,n.crossOrigin,(f=m[a],function(i,a){--h,i?p.push(i):a.width!==a.height?p.push("cubemap face img is not a square: "+a.src):(H(e,n),e.bindTexture(u,t),5===h?ne(e).forEach((function(t){e.texImage2D(t,s,o,l,c,a)})):e.texImage2D(f,s,o,l,c,a),_(e,n),te(n)&&e.generateMipmap(u)),0===h&&r(p.length?p:void 0,t,d)}));var f}))}function de(e,t,n,r){r=r||se;var i=n.src,s=n.internalFormat||n.format||e.RGBA,o=F(s),a=n.format||o.format,l=n.type||e.UNSIGNED_BYTE,c=n.target||e.TEXTURE_2D_ARRAY;if(c!==e.TEXTURE_3D&&c!==e.TEXTURE_2D_ARRAY)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";le(e,t,n),n=Object.assign({},n);var u,h=i.length,p=[],m=n.level||0,f=n.width,g=n.height,y=i.length,b=!0;u=i.map((function(i,o){return ae(i,n.crossOrigin,(v=o,function(i,o){if(--h,i)p.push(i);else{if(H(e,n),e.bindTexture(c,t),b){b=!1,f=n.width||o.width,g=n.height||o.height,e.texImage3D(c,m,s,f,g,y,0,a,l,null);for(var S=0;S<y;++S)e.texSubImage3D(c,m,0,0,S,f,g,1,a,l,o)}else{var w=o;o.width===f&&o.height===g||(w=d.canvas,d.canvas.width=f,d.canvas.height=g,d.drawImage(o,0,0,f,g)),e.texSubImage3D(c,m,0,0,v,f,g,1,a,l,w),w===d.canvas&&(d.canvas.width=0,d.canvas.height=0)}_(e,n),te(n)&&e.generateMipmap(c)}0===h&&r(p.length?p:void 0,t,u)}));var v}))}function he(e,t,n,r){var o=(r=r||c.textureOptions).target||e.TEXTURE_2D;e.bindTexture(o,t);var a=r.width,l=r.height,d=r.depth,h=r.level||0,p=r.internalFormat||r.format||e.RGBA,m=F(p),f=r.format||m.format,g=r.type||V(e,n,m.type);if(u(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{var y=s.getTypedArrayTypeForGLType(g);n=new y(n)}var b,v=j(p,g),S=n.byteLength/v;if(S%1)throw"length wrong size for format: "+i.glEnumToString(e,f);if(o===e.TEXTURE_3D)if(a||l||d)!a||l&&d?!l||a&&d?(b=G(e,o,a,l,S/d),a=b.width,l=b.height):(b=G(e,o,a,d,S/l),a=b.width,d=b.height):(b=G(e,o,l,d,S/a),l=b.width,d=b.height);else{var w=Math.cbrt(S);if(w%1!=0)throw"can't guess cube size of array of numElements: "+S;a=w,l=w,d=w}else b=G(e,o,a,l,S),a=b.width,l=b.height;if(K(e),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment||1),H(e,r),o===e.TEXTURE_CUBE_MAP){var k=S/6*(v/n.BYTES_PER_ELEMENT);re(e,r).forEach((function(t){var r=k*t.ndx,i=n.subarray(r,r+k);e.texImage2D(t.face,h,p,a,l,0,f,g,i)}))}else o===e.TEXTURE_3D?e.texImage3D(o,h,p,a,l,d,0,f,g,n):e.texImage2D(o,h,p,a,l,0,f,g,n);return _(e,r),Q(e),{width:a,height:l,depth:d,type:g}}function pe(e,t,n){var r=n.target||e.TEXTURE_2D;e.bindTexture(r,t);var i=n.level||0,s=n.internalFormat||n.format||e.RGBA,o=F(s),a=n.format||o.format,l=n.type||o.type;if(H(e,n),r===e.TEXTURE_CUBE_MAP)for(var c=0;c<6;++c)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+c,i,s,n.width,n.height,0,a,l,null);else r===e.TEXTURE_3D?e.texImage3D(r,i,s,n.width,n.height,n.depth,0,a,l,null):e.texImage2D(r,i,s,n.width,n.height,0,a,l,null);_(e,n)}function me(e,t,n){n=n||se,t=t||c.textureOptions;var r=e.createTexture(),i=t.target||e.TEXTURE_2D,s=t.width||1,o=t.height||1,a=t.internalFormat||e.RGBA,l=F(a),d=t.type||l.type;e.bindTexture(i,r),i===e.TEXTURE_CUBE_MAP&&(e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));var h=t.src;if(h)if("function"==typeof h&&(h=h(e,t)),"string"==typeof h)ce(e,r,t,n);else if(u(h)||Array.isArray(h)&&("number"==typeof h[0]||Array.isArray(h[0])||u(h[0]))){var p=he(e,r,h,t);s=p.width,o=p.height,d=p.type}else if(Array.isArray(h)&&("string"==typeof h[0]||oe(h[0])))i===e.TEXTURE_CUBE_MAP?ue(e,r,t,n):de(e,r,t,n);else{if(!oe(h))throw"unsupported src type";ie(e,r,h,t),s=h.width,o=h.height}else pe(e,r,t);return te(t)&&ee(e,r,t,s,o,a,d),Z(e,r,t),r}},function(e,t,n){"use strict";t.__esModule=!0;var r={m4:!0,v3:!0,primitives:!0};t.primitives=t.v3=t.m4=void 0;var i=l(n(6));t.m4=i;var s=l(n(3));t.v3=s;var o=l(n(10));t.primitives=o;var a=n(11);function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=a[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.create3DFVertices=C,t.createAugmentedTypedArray=h,t.createCubeVertices=x,t.createPlaneVertices=w,t.createSphereVertices=k,t.createTruncatedConeVertices=E,t.createXYQuadVertices=S,t.createCresentVertices=I,t.createCylinderVertices=O,t.createTorusVertices=M,t.createDiscVertices=N,t.deindexVertices=function(e){var t=e.indices,n={},r=t.length;return Object.keys(e).filter(p).forEach((function(i){for(var s=e[i],o=s.numComponents,a=h(o,r,s.constructor),l=0;l<r;++l)for(var c=t[l]*o,u=0;u<o;++u)a.push(s[c+u]);n[i]=a})),n},t.flattenNormals=function(e){if(e.indices)throw"can't flatten normals of indexed vertices. deindex them first";for(var t=e.normal,n=t.length,r=0;r<n;r+=9){var i=t[r+0],s=t[r+1],o=t[r+2],a=t[r+3],l=t[r+4],c=t[r+5],u=i+a+t[r+6],d=s+l+t[r+7],h=o+c+t[r+8],p=Math.sqrt(u*u+d*d+h*h);u/=p,d/=p,h/=p,t[r+0]=u,t[r+1]=d,t[r+2]=h,t[r+3]=u,t[r+4]=d,t[r+5]=h,t[r+6]=u,t[r+7]=d,t[r+8]=h}return e},t.makeRandomVertexColors=function(e,t){t=t||{};var n=e.position.numElements,r=h(4,n,Uint8Array),i=t.rand||function(e,t){return t<3?(n=256,Math.random()*n|0):255;var n};if(e.color=r,e.indices)for(var s=0;s<n;++s)r.push(i(s,0),i(s,1),i(s,2),i(s,3));else for(var o=t.vertsPerColor||3,a=n/o,l=0;l<a;++l)for(var c=[i(l,0),i(l,1),i(l,2),i(l,3)],u=0;u<o;++u)r.push(c);return e},t.reorientDirections=g,t.reorientNormals=y,t.reorientPositions=b,t.reorientVertices=v,t.concatVertices=function(e){for(var t,n={},r=function(r){var i=e[r];Object.keys(i).forEach((function(e){n[e]||(n[e]=[]),t||"indices"===e||(t=e);var r=i[e],s=u(r,e),o=c(r).length/s;n[e].push(o)}))},i=0;i<e.length;++i)r(i);var s=n[t],o={};return Object.keys(n).forEach((function(t){var n=function(t){for(var n,r=0,i=0;i<e.length;++i){var s=e[i][t];r+=c(s).length,n&&!s.data||(n=s)}return{length:r,spec:n}}(t),r=B(n.spec,n.length);!function(t,n,r){for(var i=0,s=0,o=0;o<e.length;++o){var a=e[o][t],l=c(a);"indices"===t?(L(l,r,s,i),i+=n[o]):L(l,r,s),s+=l.length}}(t,s,c(r)),o[t]=r})),o},t.duplicateVertices=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n],i=c(r),s=B(r,i.length);L(i,c(s),0),t[n]=s})),t},t.createDiscBuffers=t.createDiscBufferInfo=t.createTorusBuffers=t.createTorusBufferInfo=t.createCylinderBuffers=t.createCylinderBufferInfo=t.createCresentBuffers=t.createCresentBufferInfo=t.createXYQuadBuffers=t.createXYQuadBufferInfo=t.createTruncatedConeBuffers=t.createTruncatedConeBufferInfo=t.createSphereBuffers=t.createSphereBufferInfo=t.createPlaneBuffers=t.createPlaneBufferInfo=t.createCubeBuffers=t.createCubeBufferInfo=t.create3DFBuffers=t.create3DFBufferInfo=void 0;var r=l(n(7)),i=l(n(0)),s=l(n(1)),o=l(n(6)),a=l(n(3));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var c=r.getArray_,u=r.getNumComponents_;function d(e,t){var n=0;return e.push=function(){for(var t=0;t<arguments.length;++t){var r=arguments[t];if(r instanceof Array||s.isArrayBuffer(r))for(var i=0;i<r.length;++i)e[n++]=r[i];else e[n++]=r}},e.reset=function(e){n=e||0},e.numComponents=t,Object.defineProperty(e,"numElements",{get:function(){return this.length/this.numComponents|0}}),e}function h(e,t,n){return d(new(n||Float32Array)(e*t),e)}function p(e){return"indices"!==e}function m(e,t,n){for(var r=e.length,i=new Float32Array(3),s=0;s<r;s+=3)n(t,[e[s],e[s+1],e[s+2]],i),e[s]=i[0],e[s+1]=i[1],e[s+2]=i[2]}function f(e,t,n){n=n||a.create();var r=t[0],i=t[1],s=t[2];return n[0]=r*e[0]+i*e[1]+s*e[2],n[1]=r*e[4]+i*e[5]+s*e[6],n[2]=r*e[8]+i*e[9]+s*e[10],n}function g(e,t){return m(e,t,o.transformDirection),e}function y(e,t){return m(e,o.inverse(t),f),e}function b(e,t){return m(e,t,o.transformPoint),e}function v(e,t){return Object.keys(e).forEach((function(n){var r=e[n];n.indexOf("pos")>=0?b(r,t):n.indexOf("tan")>=0||n.indexOf("binorm")>=0?g(r,t):n.indexOf("norm")>=0&&y(r,t)})),e}function S(e,t,n){return e=e||2,{position:{numComponents:2,data:[(t=t||0)+-1*(e*=.5),(n=n||0)+-1*e,t+1*e,n+-1*e,t+-1*e,n+1*e,t+1*e,n+1*e]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function w(e,t,n,r,i){e=e||1,t=t||1,n=n||1,r=r||1,i=i||o.identity();for(var s=(n+1)*(r+1),a=h(3,s),l=h(3,s),c=h(2,s),u=0;u<=r;u++)for(var d=0;d<=n;d++){var p=d/n,m=u/r;a.push(e*p-.5*e,0,t*m-.5*t),l.push(0,1,0),c.push(p,m)}for(var f=n+1,g=h(3,n*r*2,Uint16Array),y=0;y<r;y++)for(var b=0;b<n;b++)g.push((y+0)*f+b,(y+1)*f+b,(y+0)*f+b+1),g.push((y+1)*f+b,(y+1)*f+b+1,(y+0)*f+b+1);return v({position:a,normal:l,texcoord:c,indices:g},i)}function k(e,t,n,r,i,s,o){if(t<=0||n<=0)throw Error("subdivisionAxis and subdivisionHeight must be > 0");r=r||0,s=s||0;for(var a=(i=i||Math.PI)-r,l=(o=o||2*Math.PI)-s,c=(t+1)*(n+1),u=h(3,c),d=h(3,c),p=h(2,c),m=0;m<=n;m++)for(var f=0;f<=t;f++){var g=f/t,y=m/n,b=l*g,v=a*y,S=Math.sin(b),w=Math.cos(b),k=Math.sin(v),T=w*k,x=Math.cos(v),E=S*k;u.push(e*T,e*x,e*E),d.push(T,x,E),p.push(1-g,y)}for(var A=t+1,C=h(3,t*n*2,Uint16Array),I=0;I<t;I++)for(var O=0;O<n;O++)C.push((O+0)*A+I,(O+0)*A+I+1,(O+1)*A+I),C.push((O+1)*A+I,(O+0)*A+I+1,(O+1)*A+I+1);return{position:u,normal:d,texcoord:p,indices:C}}var T=[[3,7,5,1],[6,2,0,4],[6,7,3,2],[0,1,5,4],[7,6,4,5],[2,3,1,0]];function x(e){for(var t=(e=e||1)/2,n=[[-t,-t,-t],[+t,-t,-t],[-t,+t,-t],[+t,+t,-t],[-t,-t,+t],[+t,-t,+t],[-t,+t,+t],[+t,+t,+t]],r=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],i=[[1,0],[0,0],[0,1],[1,1]],s=h(3,24),o=h(3,24),a=h(2,24),l=h(3,12,Uint16Array),c=0;c<6;++c){for(var u=T[c],d=0;d<4;++d){var p=n[u[d]],m=r[c],f=i[d];s.push(p),o.push(m),a.push(f)}var g=4*c;l.push(g+0,g+1,g+2),l.push(g+0,g+2,g+3)}return{position:s,normal:o,texcoord:a,indices:l}}function E(e,t,n,r,i,s,o){if(r<3)throw Error("radialSubdivisions must be 3 or greater");if(i<1)throw Error("verticalSubdivisions must be 1 or greater");for(var a=void 0===s||s,l=void 0===o||o,c=(a?2:0)+(l?2:0),u=(r+1)*(i+1+c),d=h(3,u),p=h(3,u),m=h(2,u),f=h(3,r*(i+c)*2,Uint16Array),g=r+1,y=Math.atan2(e-t,n),b=Math.cos(y),v=Math.sin(y),S=i+(l?2:0),w=a?-2:0;w<=S;++w){var k=w/i,T=n*k,x=void 0;w<0?(T=0,k=1,x=e):w>i?(T=n,k=1,x=t):x=e+w/i*(t-e),-2!==w&&w!==i+2||(x=0,k=0),T-=n/2;for(var E=0;E<g;++E){var A=Math.sin(E*Math.PI*2/r),C=Math.cos(E*Math.PI*2/r);d.push(A*x,T,C*x),p.push(w<0||w>i?0:A*b,w<0?-1:w>i?1:v,w<0||w>i?0:C*b),m.push(E/r,1-k)}}for(var I=0;I<i+c;++I)for(var O=0;O<r;++O)f.push(g*(I+0)+0+O,g*(I+0)+1+O,g*(I+1)+1+O),f.push(g*(I+0)+0+O,g*(I+1)+1+O,g*(I+1)+0+O);return{position:d,normal:p,texcoord:m,indices:f}}function A(e,t){t=t||[];for(var n=[],r=0;r<e.length;r+=4){var i=e[r],s=e.slice(r+1,r+4);s.push.apply(s,t);for(var o=0;o<i;++o)n.push.apply(n,s)}return n}function C(){var e=[0,0,0,0,150,0,30,0,0,0,150,0,30,150,0,30,0,0,30,0,0,30,30,0,100,0,0,30,30,0,100,30,0,100,0,0,30,60,0,30,90,0,67,60,0,30,90,0,67,90,0,67,60,0,0,0,30,30,0,30,0,150,30,0,150,30,30,0,30,30,150,30,30,0,30,100,0,30,30,30,30,30,30,30,100,0,30,100,30,30,30,60,30,67,60,30,30,90,30,30,90,30,67,60,30,67,90,30,0,0,0,100,0,0,100,0,30,0,0,0,100,0,30,0,0,30,100,0,0,100,30,0,100,30,30,100,0,0,100,30,30,100,0,30,30,30,0,30,30,30,100,30,30,30,30,0,100,30,30,100,30,0,30,30,0,30,60,30,30,30,30,30,30,0,30,60,0,30,60,30,30,60,0,67,60,30,30,60,30,30,60,0,67,60,0,67,60,30,67,60,0,67,90,30,67,60,30,67,60,0,67,90,0,67,90,30,30,90,0,30,90,30,67,90,30,30,90,0,67,90,30,67,90,0,30,90,0,30,150,30,30,90,30,30,90,0,30,150,0,30,150,30,0,150,0,0,150,30,30,150,30,0,150,0,30,150,30,30,150,0,0,0,0,0,0,30,0,150,30,0,0,0,0,150,30,0,150,0],t=A([18,0,0,1,18,0,0,-1,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,-1,0,6,-1,0,0]),n=A([18,200,70,120,18,80,70,200,6,70,200,210,6,200,200,70,6,210,100,70,6,210,160,70,6,70,180,210,6,100,70,210,6,76,210,100,6,140,210,80,6,90,130,110,6,160,160,220],[255]),r=e.length/3,i={position:h(3,r),texcoord:h(2,r),normal:h(3,r),color:h(4,r,Uint8Array),indices:h(3,r/3,Uint16Array)};i.position.push(e),i.texcoord.push([.22,.19,.22,.79,.34,.19,.22,.79,.34,.79,.34,.19,.34,.19,.34,.31,.62,.19,.34,.31,.62,.31,.62,.19,.34,.43,.34,.55,.49,.43,.34,.55,.49,.55,.49,.43,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0]),i.normal.push(t),i.color.push(n);for(var s=0;s<r;++s)i.indices.push(s);return i}function I(e,t,n,r,i,s,o){if(i<=0)throw Error("subdivisionDown must be > 0");var l=(o=o||1)-(s=s||0),c=2*(i+1)*4,u=h(3,c),d=h(3,c),p=h(2,c);function m(e,t,n){return e+(t-e)*n}function f(t,n,o,c,h,f){for(var g=0;g<=i;g++){var y=n/1,b=g/i,v=2*(y-.5),S=(s+b*l)*Math.PI,w=Math.sin(S),k=Math.cos(S),T=m(e,t,w),x=v*r,E=k*e,A=w*T;u.push(x,E,A);var C=a.add(a.multiply([0,w,k],o),c);d.push(C),p.push(y*h+f,b)}}for(var g=0;g<2;g++){var y=2*(g/1-.5);f(t,g,[1,1,1],[0,0,0],1,0),f(t,g,[0,0,0],[y,0,0],0,0),f(n,g,[1,1,1],[0,0,0],1,0),f(n,g,[0,0,0],[y,0,0],0,1)}var b=h(3,2*i*4,Uint16Array);function v(e,t){for(var n=0;n<i;++n)b.push(e+n+0,e+n+1,t+n+0),b.push(e+n+1,t+n+1,t+n+0)}var S=i+1;return v(0*S,4*S),v(5*S,7*S),v(6*S,2*S),v(3*S,1*S),{position:u,normal:d,texcoord:p,indices:b}}function O(e,t,n,r,i,s){return E(e,e,t,n,r,i,s)}function M(e,t,n,r,i,s){if(n<3)throw Error("radialSubdivisions must be 3 or greater");if(r<3)throw Error("verticalSubdivisions must be 3 or greater");i=i||0;for(var o=(s=s||2*Math.PI)-i,a=n+1,l=r+1,c=a*l,u=h(3,c),d=h(3,c),p=h(2,c),m=h(3,n*r*2,Uint16Array),f=0;f<l;++f)for(var g=f/r,y=g*Math.PI*2,b=Math.sin(y),v=e+b*t,S=Math.cos(y),w=S*t,k=0;k<a;++k){var T=k/n,x=i+T*o,E=Math.sin(x),A=Math.cos(x),C=E*v,I=A*v,O=E*b,M=A*b;u.push(C,w,I),d.push(O,S,M),p.push(T,1-g)}for(var N=0;N<r;++N)for(var R=0;R<n;++R){var D=1+R,P=1+N;m.push(a*N+R,a*P+R,a*N+D),m.push(a*P+R,a*P+D,a*N+D)}return{position:u,normal:d,texcoord:p,indices:m}}function N(e,t,n,r,i){if(t<3)throw Error("divisions must be at least 3");i=i||1,r=r||0;for(var s=(t+1)*((n=n||1)+1),o=h(3,s),a=h(3,s),l=h(2,s),c=h(3,n*t*2,Uint16Array),u=0,d=e-r,p=t+1,m=0;m<=n;++m){for(var f=r+d*Math.pow(m/n,i),g=0;g<=t;++g){var y=2*Math.PI*g/t,b=f*Math.cos(y),v=f*Math.sin(y);if(o.push(b,0,v),a.push(0,1,0),l.push(1-g/t,m/n),m>0&&g!==t){var S=u+(g+1),w=u+g,k=u+g-p,T=u+(g+1)-p;c.push(S,w,k),c.push(S,k,T)}}u+=t+1}return{position:o,normal:a,texcoord:l,indices:c}}function R(e){return function(t){var n=e.apply(this,Array.prototype.slice.call(arguments,1));return r.createBuffersFromArrays(t,n)}}function D(e){return function(t){var n=e.apply(null,Array.prototype.slice.call(arguments,1));return r.createBufferInfoFromArrays(t,n)}}var P=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function L(e,t,n,r){r=r||0;for(var i=e.length,s=0;s<i;++s)t[n+s]=e[s]+r}function B(e,t){var n=c(e),r=new n.constructor(t),s=r;return n.numComponents&&n.numElements&&d(r,n.numComponents),e.data&&(s={data:r},i.copyNamedProperties(P,e,s)),s}var z=D(C);t.create3DFBufferInfo=z;var U=R(C);t.create3DFBuffers=U;var j=D(x);t.createCubeBufferInfo=j;var F=R(x);t.createCubeBuffers=F;var W=D(w);t.createPlaneBufferInfo=W;var V=R(w);t.createPlaneBuffers=V;var G=D(k);t.createSphereBufferInfo=G;var q=R(k);t.createSphereBuffers=q;var Y=D(E);t.createTruncatedConeBufferInfo=Y;var H=R(E);t.createTruncatedConeBuffers=H;var _=D(S);t.createXYQuadBufferInfo=_;var K=R(S);t.createXYQuadBuffers=K;var Q=D(I);t.createCresentBufferInfo=Q;var X=R(I);t.createCresentBuffers=X;var Z=D(O);t.createCylinderBufferInfo=Z;var J=R(O);t.createCylinderBuffers=J;var $=D(M);t.createTorusBufferInfo=$;var ee=R(M);t.createTorusBuffers=ee;var te=D(N);t.createDiscBufferInfo=te;var ne=R(N);t.createDiscBuffers=ne},function(e,t,n){"use strict";t.__esModule=!0;var r={addExtensionsToContext:!0,getContext:!0,getWebGLContext:!0,resizeCanvasToDisplaySize:!0,setDefaults:!0};t.addExtensionsToContext=b,t.getContext=function(e,t){var n=function(e,t){for(var n=["webgl2","webgl","experimental-webgl"],r=null,i=0;i<n.length;++i)if(r=e.getContext(n[i],t)){m.addExtensionsToContext&&b(r);break}return r}(e,t);return n},t.getWebGLContext=function(e,t){var n=function(e,t){for(var n=["webgl","experimental-webgl"],r=null,i=0;i<n.length;++i)if(r=e.getContext(n[i],t)){m.addExtensionsToContext&&b(r);break}return r}(e,t);return n},t.resizeCanvasToDisplaySize=function(e,t){t=t||1,t=Math.max(0,t);var n=e.clientWidth*t|0,r=e.clientHeight*t|0;return(e.width!==n||e.height!==r)&&(e.width=n,e.height=r,!0)},t.setDefaults=function(e){o.copyExistingProperties(e,m),i.setAttributeDefaults_(e),s.setTextureDefaults_(e)};var i=p(n(7));Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=i[e]))}));var s=p(n(8));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=s[e]))}));var o=p(n(0)),a=p(n(4));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=a[e]))}));var l=n(12);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=l[e]))}));var c=n(13);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=c[e]))}));var u=n(5);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=u[e]))}));var d=n(1);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=d[e]))}));var h=n(14);function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||(t[e]=h[e]))}));var m={addExtensionsToContext:!0},f=/^(.*?)_/;function g(e,t){a.glEnumToString(e,0);var n=e.getExtension(t);if(n){var r={},i=f.exec(t)[1],s="_"+i;for(var l in n){var c=n[l],u="function"==typeof c,d=u?i:s,h=l;l.endsWith(d)&&(h=l.substring(0,l.length-d.length)),void 0!==e[h]?u||e[h]===c||o.warn(h,e[h],c,l):u?e[h]=function(e){return function(){return e.apply(n,arguments)}}(c):(e[h]=c,r[h]=c)}r.constructor={name:n.constructor.name},a.glEnumToString(r,0)}return n}var y=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function b(e){for(var t=0;t<y.length;++t)g(e,y[t])}},function(e,t,n){"use strict";t.__esModule=!0,t.drawBufferInfo=i,t.drawObjectList=function(e,t){var n=null,s=null;t.forEach((function(t){if(!1!==t.active){var o=t.programInfo,a=t.vertexArrayInfo||t.bufferInfo,l=!1,c=void 0===t.type?e.TRIANGLES:t.type;o!==n&&(n=o,e.useProgram(o.program),l=!0),(l||a!==s)&&(s&&s.vertexArrayObject&&!a.vertexArrayObject&&e.bindVertexArray(null),s=a,r.setBuffersAndAttributes(e,o,a)),r.setUniforms(o,t.uniforms),i(e,a,c,t.count,t.offset,t.instanceCount)}})),s.vertexArrayObject&&e.bindVertexArray(null)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(5));function i(e,t,n,r,i,s){n=void 0===n?e.TRIANGLES:n;var o=t.indices,a=t.elementType,l=void 0===r?t.numElements:r;i=void 0===i?0:i,a||o?void 0!==s?e.drawElementsInstanced(n,l,void 0===a?e.UNSIGNED_SHORT:t.elementType,i,s):e.drawElements(n,l,void 0===a?e.UNSIGNED_SHORT:t.elementType,i):void 0!==s?e.drawArraysInstanced(n,i,l,s):e.drawArrays(n,i,l)}},function(e,t,n){"use strict";t.__esModule=!0,t.bindFramebufferInfo=function(e,t,n){n=n||e.FRAMEBUFFER,t?(e.bindFramebuffer(n,t.framebuffer),e.viewport(0,0,t.width,t.height)):(e.bindFramebuffer(n,null),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight))},t.createFramebufferInfo=function(e,t,n,s){var o=e.FRAMEBUFFER,d=e.createFramebuffer();e.bindFramebuffer(o,d),n=n||e.drawingBufferWidth,s=s||e.drawingBufferHeight;var h=0,p={framebuffer:d,attachments:[],width:n,height:s};return(t=t||l).forEach((function(t){var l=t.attachment,d=t.format,m=function(e){return c[e]}(d);if(m||(m=a+h++),!l)if(function(e){return u[e]}(d))l=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,l),e.renderbufferStorage(e.RENDERBUFFER,d,n,s);else{var f=Object.assign({},t);f.width=n,f.height=s,void 0===f.auto&&(f.auto=!1,f.min=f.min||f.minMag||e.LINEAR,f.mag=f.mag||f.minMag||e.LINEAR,f.wrapS=f.wrapS||f.wrap||e.CLAMP_TO_EDGE,f.wrapT=f.wrapT||f.wrap||e.CLAMP_TO_EDGE),l=r.createTexture(e,f)}if(i.isRenderbuffer(e,l))e.framebufferRenderbuffer(o,m,e.RENDERBUFFER,l);else{if(!i.isTexture(e,l))throw"unknown attachment type";e.framebufferTexture2D(o,m,t.texTarget||e.TEXTURE_2D,l,t.level||0)}p.attachments.push(l)})),p},t.resizeFramebufferInfo=function(e,t,n,s,o){s=s||e.drawingBufferWidth,o=o||e.drawingBufferHeight,t.width=s,t.height=o,(n=n||l).forEach((function(n,a){var l=t.attachments[a],c=n.format;if(i.isRenderbuffer(e,l))e.bindRenderbuffer(e.RENDERBUFFER,l),e.renderbufferStorage(e.RENDERBUFFER,c,s,o);else{if(!i.isTexture(e,l))throw"unknown attachment type";r.resizeTexture(e,l,n,s,o)}}))};var r=s(n(8)),i=s(n(0));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}var o=34041,a=36064,l=[{format:6408,type:5121,min:9729,wrap:33071},{format:o}],c={34041:33306,6401:36128,36168:36128,6402:36096,33189:36096},u={32854:!0,32855:!0,36194:!0,34041:!0,33189:!0,6401:!0,36168:!0}},function(e,t,n){"use strict";t.__esModule=!0,t.createVertexArrayInfo=function(e,t,n){var i=e.createVertexArray();return e.bindVertexArray(i),t.length||(t=[t]),t.forEach((function(t){r.setBuffersAndAttributes(e,t,n)})),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:i}},t.createVAOAndSetAttributes=i,t.createVAOFromBufferInfo=function(e,t,n){return i(e,t.attribSetters||t,n.attribs,n.indices)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(5));function i(e,t,n,i){var s=e.createVertexArray();return e.bindVertexArray(s),r.setAttributes(t,n),i&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i),e.bindVertexArray(null),s}}])},e.exports=r()},function(e,t){e.exports=class{static simple(e){return JSON.parse(JSON.stringify(e))}}},function(e,t){class n{static get BACKGROUND_LAYER(){return"background"}static get VIDEO_LAYER(){return"video"}static get PEN_LAYER(){return"pen"}static get SPRITE_LAYER(){return"sprite"}static get LAYER_GROUPS(){return[n.BACKGROUND_LAYER,n.VIDEO_LAYER,n.PEN_LAYER,n.SPRITE_LAYER]}}e.exports=n},function(e,t,n){(function(t){class n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.nowObj;this.startTime=0,this.nowObj=e}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return n.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:n.legacyDateCode}time(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(e,n){return t.setTimeout(e,n)}clearTimeout(e){t.clearTimeout(e)}}e.exports=n}).call(this,n(9))},function(e,t,n){const r=n(134),i=n(136);class s{static base64ToUint8Array(e){const t=r(e),n=t.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=t.charCodeAt(e);return i}static uint8ArrayToBase64(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=String.fromCharCode(e[r]);return i(t)}static arrayBufferToBase64(e){return s.uint8ArrayToBase64(new Uint8Array(e))}}e.exports=s},function(e,t,n){const r=n(204),i=n(74),s=n(33),o=n(46),a=n(12),{Map:l}=n(24),c=n(76),u=n(77),d=n(1),h=n(10),p=n(47);class m{constructor(e,t){this.runtime=e,this._blocks={},this._scripts=[],Object.defineProperty(this,"_cache",{writable:!0,enumerable:!1}),this._cache={inputs:{},procedureParamNames:{},procedureDefinitions:{},_executeCached:{},_monitored:null,scripts:{},compiledScripts:{},compiledProcedures:{},proceduresPopulated:!1},this.forceNoGlow=t||!1}getCachedCompileResult(e){return Object.prototype.hasOwnProperty.call(this._cache.compiledScripts,e)?this._cache.compiledScripts[e]:null}cacheCompileResult(e,t){this._cache.compiledScripts[e]={success:!0,value:t}}cacheCompileError(e,t){this._cache.compiledScripts[e]={success:!1,value:t}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(e){return this._blocks[e]}getScripts(){return this._scripts}getNextBlock(e){const t=this._blocks[e];return void 0===t?null:t.next}getBranch(e,t){const n=this._blocks[e];if(void 0===n)return null;t||(t=1);let r=m.BRANCH_INPUT_PREFIX;t>1&&(r+=t);const i=n.inputs[r];return void 0===i?null:i.block}getOpcode(e){return void 0===e?null:e.opcode}getFields(e){return void 0===e?null:e.fields}getInputs(e){if(void 0===e)return null;let t=this._cache.inputs[e.id];if(void 0!==t)return t;t={};for(const n in e.inputs)n.substring(0,m.BRANCH_INPUT_PREFIX.length)!==m.BRANCH_INPUT_PREFIX&&(t[n]=e.inputs[n]);return this._cache.inputs[e.id]=t,t}getMutation(e){return void 0===e?null:e.mutation}getTopLevelScript(e){let t=this._blocks[e];if(void 0===t)return null;for(;null!==t.parent;)t=this._blocks[t.parent];return t.id}getProcedureDefinition(e){const t=this._cache.procedureDefinitions[e];if(void 0!==t)return t;for(const t in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,t))continue;const n=this._blocks[t];if("procedures_definition"===n.opcode){const r=this._getCustomBlockInternal(n);if(r&&r.mutation.proccode===e)return this._cache.procedureDefinitions[e]=t,t}}return this._cache.procedureDefinitions[e]=null,null}getProcedureParamNamesAndIds(e){return this.getProcedureParamNamesIdsAndDefaults(e).slice(0,2)}getProcedureParamNamesIdsAndDefaults(e){const t=this._cache.procedureParamNames[e];if(void 0!==t)return t;for(const t in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,t))continue;const n=this._blocks[t];if("procedures_prototype"===n.opcode&&n.mutation.proccode===e){const t=JSON.parse(n.mutation.argumentnames),r=JSON.parse(n.mutation.argumentids),i=JSON.parse(n.mutation.argumentdefaults);return this._cache.procedureParamNames[e]=[t,r,i],this._cache.procedureParamNames[e]}}const n=this.runtime.getAddonBlock(e);return n?(this._cache.procedureParamNames[e]=n.namesIdsDefaults,n.namesIdsDefaults):(this._cache.procedureParamNames[e]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const e in this._blocks){if(!Object.prototype.hasOwnProperty.call(this._blocks,e))continue;const t=this._blocks[e];if("procedures_prototype"!==t.opcode){if("procedures_definition"===t.opcode){const n=this._getCustomBlockInternal(t);if(n){const t=n.mutation.proccode;this._cache.procedureDefinitions[t]||(this._cache.procedureDefinitions[t]=e);continue}}}else{const e=t.mutation.proccode;if(!this._cache.procedureParamNames[e]){const n=JSON.parse(t.mutation.argumentnames),r=JSON.parse(t.mutation.argumentids),i=JSON.parse(t.mutation.argumentdefaults);this._cache.procedureParamNames[e]=[n,r,i]}}}this._cache.proceduresPopulated=!0}}duplicate(){const e=new m(this.runtime,this.forceNoGlow);return e._blocks=a.simple(this._blocks),e._scripts=a.simple(this._scripts),e}blocklyListen(e){if("object"!=typeof e)return;if("string"!=typeof e.blockId&&"string"!=typeof e.varId&&"string"!=typeof e.commentId)return;const t=this.runtime.getTargetForStage(),n=this.runtime.getEditingTarget();if("stackclick"!==e.element)switch(e.type){case"create":{const t=r(e);for(let e=0;e<t.length;e++)this.createBlock(t[e]);break}case"change":this.changeBlock({id:e.blockId,element:e.element,name:e.name,value:e.newValue});break;case"move":this.moveBlock({id:e.blockId,oldParent:e.oldParentId,oldInput:e.oldInputName,newParent:e.newParentId,newInput:e.newInputName,newCoordinate:e.newCoordinate});break;case"dragOutside":this.runtime.emitBlockDragUpdate(e.isOutside);break;case"endDrag":if(this.runtime.emitBlockDragUpdate(!1),e.isOutside){const t=r(e);this.runtime.emitBlockEndDrag(t,e.blockId)}break;case"delete":if(!Object.prototype.hasOwnProperty.call(this._blocks,e.blockId)||this._blocks[e.blockId].shadow)return;this._blocks[e.blockId].topLevel&&this.runtime.quietGlow(e.blockId),this.deleteBlock(e.blockId);break;case"var_create":if(this.resetCache(),e.isLocal&&n&&!n.isStage&&!e.isCloud)n.lookupVariableById(e.varId)||(n.createVariable(e.varId,e.varName,e.varType),this.emitProjectChanged());else{if(t.lookupVariableById(e.varId))return;const n=this.runtime.targets.filter((e=>e.isOriginal));for(const t of n)if(t.lookupVariableByNameAndType(e.varName,e.varType,!0))return;t.createVariable(e.varId,e.varName,e.varType,e.isCloud),this.emitProjectChanged()}break;case"var_rename":if(n&&Object.prototype.hasOwnProperty.call(n.variables,e.varId))n.renameVariable(e.varId,e.newName),n.blocks.updateBlocksAfterVarRename(e.varId,e.newName);else{t.renameVariable(e.varId,e.newName);const n=this.runtime.targets;for(let t=0;t<n.length;t++){n[t].blocks.updateBlocksAfterVarRename(e.varId,e.newName)}}this.emitProjectChanged();break;case"var_delete":this.resetCache();(n&&Object.prototype.hasOwnProperty.call(n.variables,e.varId)?n:t).deleteVariable(e.varId),this.emitProjectChanged();break;case"comment_create":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();t.createComment(e.commentId,e.blockId,e.text,e.xy.x,e.xy.y,e.width,e.height,e.minimized),null===t.comments[e.commentId].x&&null===t.comments[e.commentId].y&&(t.comments[e.commentId].x=e.xy.x,t.comments[e.commentId].y=e.xy.y)}this.emitProjectChanged();break;case"comment_change":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return void d.warn("Cannot change comment with id ".concat(e.commentId," because it does not exist."));const n=t.comments[e.commentId],r=e.newContents_;Object.prototype.hasOwnProperty.call(r,"minimized")&&(n.minimized=r.minimized),Object.prototype.hasOwnProperty.call(r,"width")&&Object.prototype.hasOwnProperty.call(r,"height")&&(n.width=r.width,n.height=r.height),Object.prototype.hasOwnProperty.call(r,"text")&&(n.text=r.text),this.emitProjectChanged()}break;case"comment_move":if(this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(t&&!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return void d.warn("Cannot change comment with id ".concat(e.commentId," because it does not exist."));const n=t.comments[e.commentId],r=e.newCoordinate_;n.x=r.x,n.y=r.y,this.emitProjectChanged()}break;case"comment_delete":if(this.resetCache(),this.runtime.getEditingTarget()){const t=this.runtime.getEditingTarget();if(!Object.prototype.hasOwnProperty.call(t.comments,e.commentId))return;if(delete t.comments[e.commentId],e.blockId){const n=t.blocks.getBlock(e.blockId);if(!n)return void d.warn("Could not find block referenced by comment with id: ".concat(e.commentId));delete n.comment}this.emitProjectChanged()}}else this.runtime.toggleScript(e.blockId,{stackClick:!0})}resetCache(){this._cache.inputs={},this._cache.procedureParamNames={},this._cache.procedureDefinitions={},this._cache._executeCached={},this._cache._monitored=null,this._cache.scripts={},this._cache.compiledScripts={},this._cache.compiledProcedures={},this._cache.proceduresPopulated=!1}emitProjectChanged(){this.forceNoGlow||this.runtime.emitProjectChanged()}createBlock(e){Object.prototype.hasOwnProperty.call(this._blocks,e.id)||(this._blocks[e.id]=e,e.topLevel&&this._addScript(e.id),this.resetCache(),this.emitProjectChanged())}changeBlock(e){if(-1===["field","mutation","checkbox"].indexOf(e.element))return;let t=this._blocks[e.id];if(void 0!==t){switch(e.element){case"field":if(!t.fields[e.name])return;if("VARIABLE"===e.name||"LIST"===e.name||"BROADCAST_OPTION"===e.name){const n=this.runtime.getEditingTarget().lookupVariableById(e.value);n&&(t.fields[e.name].value=n.name,t.fields[e.name].id=e.value)}else{t.fields[e.name].value=e.value,"sensing_of_object_menu"===t.opcode&&("_stage_"===t.fields.OBJECT.value?this._blocks[t.parent].fields.PROPERTY.value="backdrop #":this._blocks[t.parent].fields.PROPERTY.value="x position",this.runtime.requestBlocksUpdate());const n=t.shadow&&t.parent?this._blocks[t.parent]:t;n.isMonitored&&this.runtime.requestUpdateMonitor(l({id:n.id,params:this._getBlockParams(n)}))}break;case"mutation":t.mutation=i(e.value);break;case"checkbox":{if(t.fields&&Object.keys(t.fields).length>0&&"data_variable"!==t.opcode&&"data_listcontents"!==t.opcode){const e=p(t.id,t.fields);let n=this.runtime.monitorBlocks.getBlock(e);n||(n=JSON.parse(JSON.stringify(t)),n.id=e,this.runtime.monitorBlocks.createBlock(n)),t=n}const n=t.isMonitored;t.isMonitored=e.value;let r=!1;"data_variable"===t.opcode?r=!this.runtime.getTargetForStage().variables[t.fields.VARIABLE.id]:"data_listcontents"===t.opcode&&(r=!this.runtime.getTargetForStage().variables[t.fields.LIST.id]);const i=r||Object.prototype.hasOwnProperty.call(this.runtime.monitorBlockInfo,t.opcode)&&this.runtime.monitorBlockInfo[t.opcode].isSpriteSpecific;t.targetId=i?t.targetId||this.runtime.getEditingTarget().id:null,n&&!t.isMonitored?this.runtime.requestHideMonitor(t.id):!n&&t.isMonitored&&(this.runtime.requestShowMonitor(t.id)||this.runtime.requestAddMonitor(o({id:t.id,targetId:t.targetId,spriteName:t.targetId?this.runtime.getTargetById(t.targetId).getName():null,opcode:t.opcode,params:this._getBlockParams(t),value:"",mode:"data_listcontents"===t.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(e){if(!Object.prototype.hasOwnProperty.call(this._blocks,e.id))return;const t=this._blocks[e.id];let n=!1;if(e.newCoordinate&&(n=t.x!==e.newCoordinate.x||t.y!==e.newCoordinate.y,t.x=e.newCoordinate.x,t.y=e.newCoordinate.y),void 0!==e.oldParent){const t=this._blocks[e.oldParent];void 0!==e.oldInput&&t.inputs[e.oldInput].block===e.id?t.inputs[e.oldInput].block=null:t.next===e.id&&(t.next=null),this._blocks[e.id].parent=null,n=!0}if(void 0===e.newParent)this._addScript(e.id);else{if(this._deleteScript(e.id),void 0===e.newInput)this._blocks[e.newParent].next=e.id;else{let t=null;Object.prototype.hasOwnProperty.call(this._blocks[e.newParent].inputs,e.newInput)&&(t=this._blocks[e.newParent].inputs[e.newInput].shadow),this._blocks[e.id].shadow&&(t=e.id),this._blocks[e.newParent].inputs[e.newInput]={name:e.newInput,block:e.id,shadow:t}}this._blocks[e.id].parent=e.newParent,n=!0}this.resetCache(),n&&this.emitProjectChanged()}runAllMonitored(e){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter((e=>this.getBlock(e).isMonitored)).map((t=>{const n=this.getBlock(t).targetId;return{blockId:t,target:n?e.getTargetById(n):null}})));const t=this._cache._monitored;for(let n=0;n<t.length;n++){const{blockId:r,target:i}=t[n];e.addMonitorScript(r,i)}}deleteBlock(e){const t=this._blocks[e];if(t){null!==t.next&&this.deleteBlock(t.next);for(const e in t.inputs)null!==t.inputs[e].block&&this.deleteBlock(t.inputs[e].block),null!==t.inputs[e].shadow&&t.inputs[e].shadow!==t.inputs[e].block&&this.deleteBlock(t.inputs[e].shadow);this._deleteScript(e),delete this._blocks[e],this.resetCache(),this.emitProjectChanged()}}deleteAllBlocks(){Object.keys(this._blocks).forEach((e=>this.deleteBlock(e)))}getAllVariableAndListReferences(e,t){const n=e||this._blocks,r=Object.create(null);for(const e in n){let i=null,s=null;if(n[e].fields.VARIABLE?(i=n[e].fields.VARIABLE,s=h.SCALAR_TYPE):n[e].fields.LIST?(i=n[e].fields.LIST,s=h.LIST_TYPE):t&&n[e].fields.BROADCAST_OPTION&&(i=n[e].fields.BROADCAST_OPTION,s=h.BROADCAST_MESSAGE_TYPE),i){const e=i.id;r[e]?r[e].push({referencingField:i,type:s}):r[e]=[{referencingField:i,type:s}]}}return r}updateBlocksAfterVarRename(e,t){const n=this._blocks;for(const r in n){let i=null;if(n[r].fields.VARIABLE?i=n[r].fields.VARIABLE:n[r].fields.LIST&&(i=n[r].fields.LIST),i){e===i.id&&(i.value=t)}}}updateTargetSpecificBlocks(e){const t=this._blocks;for(const n in t)e&&"event_whenthisspriteclicked"===t[n].opcode?t[n].opcode="event_whenstageclicked":e||"event_whenstageclicked"!==t[n].opcode||(t[n].opcode="event_whenthisspriteclicked")}updateAssetName(e,t,n){let r;if("costume"===n)r=this._getCostumeField.bind(this);else if("sound"===n)r=this._getSoundField.bind(this);else if("backdrop"===n)r=this._getBackdropField.bind(this);else{if("sprite"!==n)return;r=this._getSpriteField.bind(this)}const i=this._blocks;for(const n in i){const i=r(n);i&&i.value===e&&(i.value=t)}this.resetCache()}updateSensingOfReference(e,t,n){const r=this._blocks;let i=!1;for(const s in r){const o=r[s];if("sensing_of"===o.opcode&&o.fields.PROPERTY.value===e&&o.inputs.OBJECT.block===o.inputs.OBJECT.shadow){this.getBlock(o.inputs.OBJECT.block).fields.OBJECT.value===n&&(o.fields.PROPERTY.value=t,i=!0)}}return i&&this.resetCache(),i}_getCostumeField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"COSTUME")?t.fields.COSTUME:null}_getSoundField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"SOUND_MENU")?t.fields.SOUND_MENU:null}_getBackdropField(e){const t=this.getBlock(e);return t&&Object.prototype.hasOwnProperty.call(t.fields,"BACKDROP")?t.fields.BACKDROP:null}_getSpriteField(e){const t=this.getBlock(e);if(!t)return null;const n=["TOWARDS","TO","OBJECT","VIDEOONMENU2","DISTANCETOMENU","TOUCHINGOBJECTMENU","CLONE_OPTION"];for(let e=0;e<n.length;e++){const r=n[e];if(Object.prototype.hasOwnProperty.call(t.fields,r))return t.fields[r]}return null}toXML(e){return this._scripts.map((t=>this.blockToXML(t,e))).join()}blockToXML(e,t){const n=this._blocks[e];if(!n)return;const r=n.shadow?"shadow":"block";let i="<".concat(r,'\n                id="').concat(s(n.id),'"\n                type="').concat(s(n.opcode),'"\n                ').concat(n.topLevel?'x="'.concat(n.x,'" y="').concat(n.y,'"'):"","\n            >");const o=n.comment;o&&(t?Object.prototype.hasOwnProperty.call(t,o)?i+=t[o].toXML():d.warn("Could not find comment with id: ".concat(o," in provided comment descriptions.")):d.warn("Cannot serialize comment with id: ".concat(o,"; no comment descriptions provided."))),n.mutation&&(i+=this.mutationToXML(n.mutation));for(const e in n.inputs){if(!Object.prototype.hasOwnProperty.call(n.inputs,e))continue;const r=n.inputs[e];(r.block||r.shadow)&&(i+='<value name="'.concat(s(r.name),'">'),r.block&&(i+=this.blockToXML(r.block,t)),r.shadow&&r.shadow!==r.block&&(i+=this.blockToXML(r.shadow,t)),i+="</value>")}for(const e in n.fields){if(!Object.prototype.hasOwnProperty.call(n.fields,e))continue;const t=n.fields[e];i+='<field name="'.concat(s(t.name),'"');const r=t.id;r&&(i+=' id="'.concat(s(r),'"'));const o=t.variableType;"string"==typeof o&&(i+=' variabletype="'.concat(s(o),'"'));let a=t.value;"string"==typeof a&&(a=s(t.value)),i+=">".concat(a,"</field>")}return n.next&&(i+="<next>".concat(this.blockToXML(n.next,t),"</next>")),i+="</".concat(r,">"),i}mutationToXML(e){let t="<".concat(e.tagName);for(const n in e){if("children"===n||"tagName"===n)continue;let r="string"==typeof e[n]?s(e[n]):e[n];"blockInfo"===n&&(r=s(JSON.stringify(e[n]))),t+=" ".concat(n,'="').concat(r,'"')}t+=">";for(let n=0;n<e.children.length;n++)t+=this.mutationToXML(e.children[n]);return t+="</".concat(e.tagName,">"),t}_getBlockParams(e){const t={};for(const n in e.fields)t[n]=e.fields[n].value;for(const n in e.inputs){const r=this._blocks[e.inputs[n].block];for(const e in r.fields)t[e]=r.fields[e].value}return t}_getCustomBlockInternal(e){if(e.inputs&&e.inputs.custom_block)return this._blocks[e.inputs.custom_block.block]}_addScript(e){this._scripts.indexOf(e)>-1||(this._scripts.push(e),this._blocks[e].topLevel=!0)}_deleteScript(e){const t=this._scripts.indexOf(e);t>-1&&this._scripts.splice(t,1),this._blocks[e]&&(this._blocks[e].topLevel=!1)}}c.getCached=function(e,t,n){let r=e._cache._executeCached[t];if(void 0!==r)return r;const i=e.getBlock(t);return void 0===i?null:(r=void 0===n?{id:t,opcode:e.getOpcode(i),fields:e.getFields(i),inputs:e.getInputs(i),mutation:e.getMutation(i)}:new n(e,{id:t,opcode:e.getOpcode(i),fields:e.getFields(i),inputs:e.getInputs(i),mutation:e.getMutation(i)}),e._cache._executeCached[t]=r,r)};const f=u._RuntimeScriptCache;u.getScripts=function(e,t){let n=e._cache.scripts[t];if(!n){n=e._cache.scripts[t]=[];const r=e._scripts;for(let i=0;i<r.length;i++){const s=r[i];e.getBlock(s).opcode===t&&n.push(new f(e,s))}}return n},e.exports=m},function(e,t,n){var r=n(0).TYPE,i=r.WhiteSpace,s=r.Semicolon,o=r.LeftCurlyBracket,a=r.Delim;function l(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===i?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function c(){return 0}e.exports={name:"Raw",structure:{value:String},parse:function(e,t,n){var r,i=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||c)),r=n&&this.scanner.tokenStart>i?l.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(i,r),value:this.scanner.source.substring(i,r)}},generate:function(e){this.chunk(e.value)},mode:{default:c,leftCurlyBracket:function(e){return e===o?1:0},leftCurlyBracketOrSemicolon:function(e){return e===o||e===s?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===a&&33===t.charCodeAt(n)||e===s?1:0},semicolonIncluded:function(e){return e===s?2:0}}}},function(e,t,n){"use strict";(function(e){var r=n(120),i=n(121),s=n(122);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(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 d(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);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.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(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(t,n);e=a(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||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?a(e,0):h(e,t);if("Buffer"===t.type&&s(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 u(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 d(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.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=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e,t){if(l.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 W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0}}function f(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 M(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(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 y(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=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var s,o=1,a=e.length,l=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;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;s<a;s++)if(c(e,s)===c(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*o}else-1!==u&&(s-=s-u),u=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var d=!0,h=0;h<l;h++)if(c(e,s+h)!==c(t,h)){d=!1;break}if(d)return s}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[n+o]=a}return o}function S(e,t,n,r){return G(W(t,e.length-n),e,n,r)}function w(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 k(e,t,n,r){return w(e,t,n,r)}function T(e,t,n,r){return G(V(t),e,n,r)}function x(e,t,n,r){return G(function(e,t){for(var n,r,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,s.push(i),s.push(r);return s}(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 A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}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=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.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=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.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}},l.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.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},l.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},l.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},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):f.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.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+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.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 s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),a=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<a;++d)if(c[d]!==u[d]){s=c[d],o=u[d];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.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 s=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function I(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 O(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 M(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=F(e[s]);return i}function N(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}function R(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 D(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i<s;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i<s;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,s){return s||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,s){return s||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.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),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},l.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,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},l.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&&!l.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 s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var o=l.isBuffer(e)?e:W(new l(e,r).toString()),a=o.length;for(s=0;s<n-t;++s)this[s+t]=o[s%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){var n;t=t||1/0;for(var r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.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;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).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(9))},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}y(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,s,o,a;if(c(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function m(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){r.once&&e.removeEventListener(t,i),n(s)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var c=l.length,u=g(l,c);for(n=0;n<c;++n)s(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,s,o;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return m(this,e,!0)},a.prototype.rawListeners=function(e){return m(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t){function n(e){return{prev:null,next:null,data:e}}function r(e,t,n){var r;return null!==s?(r=s,s=s.cursor,r.prev=t,r.next=n,r.cursor=e.cursor):r={prev:t,next:n,cursor:e.cursor},e.cursor=r,r}function i(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=s,s=t}var s=null,o=function(){this.cursor=null,this.head=null,this.tail=null};o.createItem=n,o.prototype.createItem=n,o.prototype.updateCursors=function(e,t,n,r){for(var i=this.cursor;null!==i;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor},o.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},o.prototype.fromArray=function(e){var t=null;this.head=null;for(var r=0;r<e.length;r++){var i=n(e[r]);null!==t?t.next=i:this.head=i,i.prev=t,t=i}return this.tail=t,this},o.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},o.prototype.toJSON=o.prototype.toArray,o.prototype.isEmpty=function(){return null===this.head},o.prototype.first=function(){return this.head&&this.head.data},o.prototype.last=function(){return this.tail&&this.tail.data},o.prototype.each=function(e,t){var n;void 0===t&&(t=this);for(var s=r(this,null,this.head);null!==s.next;)n=s.next,s.next=n.next,e.call(t,n.data,n,this);i(this)},o.prototype.forEach=o.prototype.each,o.prototype.eachRight=function(e,t){var n;void 0===t&&(t=this);for(var s=r(this,this.tail,null);null!==s.prev;)n=s.prev,s.prev=n.prev,e.call(t,n.data,n,this);i(this)},o.prototype.forEachRight=o.prototype.eachRight,o.prototype.reduce=function(e,t,n){var s;void 0===n&&(n=this);for(var o=r(this,null,this.head),a=t;null!==o.next;)s=o.next,o.next=s.next,a=e.call(n,a,s.data,s,this);return i(this),a},o.prototype.reduceRight=function(e,t,n){var s;void 0===n&&(n=this);for(var o=r(this,this.tail,null),a=t;null!==o.prev;)s=o.prev,o.prev=s.prev,a=e.call(n,a,s.data,s,this);return i(this),a},o.prototype.nextUntil=function(e,t,n){if(null!==e){var s;void 0===n&&(n=this);for(var o=r(this,null,e);null!==o.next&&(s=o.next,o.next=s.next,!t.call(n,s.data,s,this)););i(this)}},o.prototype.prevUntil=function(e,t,n){if(null!==e){var s;void 0===n&&(n=this);for(var o=r(this,e,null);null!==o.prev&&(s=o.prev,o.prev=s.prev,!t.call(n,s.data,s,this)););i(this)}},o.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return!0;n=n.next}return!1},o.prototype.map=function(e,t){var n=new o,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},o.prototype.filter=function(e,t){var n=new o,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},o.prototype.clear=function(){this.head=null,this.tail=null},o.prototype.copy=function(){for(var e=new o,t=this.head;null!==t;)e.insert(n(t.data)),t=t.next;return e},o.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},o.prototype.prependData=function(e){return this.prepend(n(e))},o.prototype.append=function(e){return this.insert(e)},o.prototype.appendData=function(e){return this.insert(n(e))},o.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},o.prototype.insertData=function(e,t){return this.insert(n(e),t)},o.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e},o.prototype.push=function(e){this.insert(n(e))},o.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},o.prototype.unshift=function(e){this.prepend(n(e))},o.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},o.prototype.prependList=function(e){return this.insertList(e,this.head)},o.prototype.appendList=function(e){return this.insertList(e)},o.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},o.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)},e.exports=o},function(e,t,n){n(65),e.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(e,t,n){(function(t,n,r,i){e.exports=function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var s=!1,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,o,a,l,c,u=[],d=0,h=e.length,p=h,m="string"!==r.getTypeOf(e);d<e.length;)p=h-d,i=m?(t=e[d++],n=d<h?e[d++]:0,d<h?e[d++]:0):(t=e.charCodeAt(d++),n=d<h?e.charCodeAt(d++):0,d<h?e.charCodeAt(d++):0),o=t>>2,a=(3&t)<<4|n>>4,l=1<p?(15&n)<<2|i>>6:64,c=2<p?63&i:64,u.push(s.charAt(o)+s.charAt(a)+s.charAt(l)+s.charAt(c));return u.join("")},n.decode=function(e){var t,n,r,o,a,l,c=0,u=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&p--,e.charAt(e.length-2)===s.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=s.indexOf(e.charAt(c++))<<2|(o=s.indexOf(e.charAt(c++)))>>4,n=(15&o)<<4|(a=s.indexOf(e.charAt(c++)))>>2,r=(3&a)<<6|(l=s.indexOf(e.charAt(c++))),h[u++]=t,64!==a&&(h[u++]=n),64!==l&&(h[u++]=r);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),o=e("./stream/DataLengthProbe");function a(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var s=i,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^s[255&(e^t[a])];return~e}(0|t,e,e.length,0):function(e,t,n,r){var s=i,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^s[255&(e^t.charCodeAt(a))];return~e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),o=e("./stream/GenericWorker"),a=r?"uint8array":"array";function l(e,t){o.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",s.inherits(l,o),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,e.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({chunkSize:65536,raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,o,u){var d,h,p=e.file,m=e.compression,f=u!==a.utf8encode,g=s.transformTo("string",u(p.name)),y=s.transformTo("string",a.utf8encode(p.name)),b=p.comment,v=s.transformTo("string",u(b)),S=s.transformTo("string",a.utf8encode(b)),w=y.length!==p.name.length,k=S.length!==b.length,T="",x="",E="",A=p.dir,C=p.date,I={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),f||!w&&!k||(O|=2048);var M=0,N=0;A&&(M|=16),"UNIX"===o?(N=798,M|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,A)):(N=20,M|=function(e){return 63&(e||0)}(p.dosPermissions)),d=C.getUTCHours(),d<<=6,d|=C.getUTCMinutes(),d<<=5,d|=C.getUTCSeconds()/2,h=C.getUTCFullYear()-1980,h<<=4,h|=C.getUTCMonth()+1,h<<=5,h|=C.getUTCDate(),w&&(x=r(1,1)+r(l(g),4)+y,T+="up"+r(x.length,2)+x),k&&(E=r(1,1)+r(l(v),4)+S,T+="uc"+r(E.length,2)+E);var R="";return R+="\n\0",R+=r(O,2),R+=m.magic,R+=r(d,2),R+=r(h,2),R+=r(I.crc32,4),R+=r(I.compressedSize,4),R+=r(I.uncompressedSize,4),R+=r(g.length,2),R+=r(T.length,2),{fileRecord:c.LOCAL_FILE_HEADER+R+g+T,dirRecord:c.CENTRAL_FILE_HEADER+r(N,2)+R+r(v.length,2)+"\0\0\0\0"+r(M,4)+r(i,4)+g+T+v}}var s=e("../utils"),o=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,r){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var a=s.transformTo("string",o(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var s=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach((function(e,n){o++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),a=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),s=e("./utf8"),o=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new i.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new a);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new o(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var s=0;s<r.length;s++)n.push(c(r[s]));return i.Promise.all(n)})).then((function(e){for(var i=e.shift(),s=i.files,o=0;o<s.length;o++){var a=s[o],l=a.fileNameStr,c=r.resolve(a.fileNameStr);n.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,n,r){"use strict";n.exports={isNode:void 0!==t,newBufferFrom:function(e,n){if(t.from&&t.from!==Uint8Array.from)return t.from(e,n);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new t(e,n)},allocBuffer:function(e){if(t.alloc)return t.alloc(e);var n=new t(e);return n.fill(0),n},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=s.getTypeOf(t),a=s.extend(n||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=f(e)),a.createFolders&&(r=m(e))&&g.call(this,r,!0);var d="string"===i&&!1===a.binary&&!1===a.base64;n&&void 0!==n.binary||(a.binary=!d),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string");var y=null;y=t instanceof c||t instanceof o?t:h.isNode&&h.isStream(t)?new p(e,t):s.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var b=new u(e,y,a);this.files[e]=b}var i=e("./utf8"),s=e("./utils"),o=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),u=e("./zipObject"),d=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:l.createFolders,e=f(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function y(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(y(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(y(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");s.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=d.generateWorker(this,n,r)}catch(e){(t=new o("error")).error(e)}return new a(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&n===s[1]&&r===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader"),i=e("./DataReader");function s(e){i.call(this,e)}e("../utils").inherits(s,r),s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./ArrayReader":17,"./DataReader":18}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),s=e("./ArrayReader"),o=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(r.transformTo("uint8array",e)):new s(r.transformTo("array",e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK  ",n.CENTRAL_FILE_HEADER="PK  ",n.CENTRAL_DIRECTORY_END="PK  ",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK  ",n.ZIP64_CENTRAL_DIRECTORY_END="PK  ",n.DATA_DESCRIPTOR="PK \b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function s(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,r),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function s(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,r),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+65536);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":case"nodebuffer":e=this.data.subarray(this.index,t);break;case"array":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r},{}],29:[function(e,n,r){"use strict";var i=e("../utils"),s=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),l=e("../support"),c=e("../external"),u=null;if(l.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function d(e,n){return new c.Promise((function(r,s){var o=[],l=e._internalType,c=e._outputType,u=e._mimeType;e.on("data",(function(e,t){o.push(e),n&&n(t)})).on("error",(function(e){o=[],s(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(c,function(e,n){var r,i=0,s=null,o=0;for(r=0;r<n.length;r++)o+=n[r].length;switch(e){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(s=new Uint8Array(o),r=0;r<n.length;r++)s.set(n[r],i),i+=n[r].length;return s;case"nodebuffer":return t.concat(n);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,o),u);r(e)}catch(e){s(e)}o=[]})).resume()}))}function h(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,i.checkSupport(r),this._worker=e.pipe(new s(r)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return d(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){i.delay(t,arguments,n)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:"nodebuffer"!==this._outputType},e)}},n.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,n,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer=void 0!==t,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(e){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),r.blob=0===s.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),s=e("./nodejsUtils"),o=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,n.utf8encode=function(e){return i.nodebuffer?s.newBufferFrom(e,"utf-8"):function(e){var t,n,r,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(l):new Array(l),s=o=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,s,o=e.length,l=new Array(2*o);for(t=n=0;t<o;)if((i=e[t++])<128)l[n++]=i;else if(4<(s=a[i]))l[n++]=65533,t+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&t<o;)i=i<<6|63&e[t++],s--;1<s?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,o),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}(t),l=t;o!==t.length&&(i.uint8array?(l=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(l=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var i=e("./support"),s=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function l(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,n){var r=[],i=0,s=e.length;if(s<=n)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,s)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,s)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return u.stringifyByChar(e)}function h(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}r.applyFromCharCode=d;var p={};p.string={string:l,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,o.allocBuffer(e.length))}},p.array={string:d,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},p.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return o.newBufferFrom(e)}},p.nodebuffer={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},nodebuffer:l},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return p[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":i.nodebuffer&&o.isBuffer(e)?"nodebuffer":i.uint8array&&e instanceof Uint8Array?"uint8array":i.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!i[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},r.delay=function(e,t,r){n((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},r.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},r.prepareContent=function(e,t,n,o,l){return a.Promise.resolve(t).then((function(e){var t=i.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)));return t&&"undefined"!=typeof FileReader?new a.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):t&&"function"==typeof e.arrayBuffer?e.arrayBuffer():e})).then((function(t){var u=r.getTypeOf(t);return u?("arraybuffer"===u?t=r.transformTo("uint8array",t):"string"===u&&(l?t=s.decode(t):n&&!0!==o&&(t=function(e){return c(e,i.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),o=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),s=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var s=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return 1!==t.readInt(1)||o(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return 1!==t.readInt(1)||o(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),s=e("./stream/DataWorker"),o=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!s&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var s=0,o=new i(u),a=e.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";var r=e("immediate");function i(){}var s={},o=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(r){return s.reject(e,r)}r===e?s.reject(e,new TypeError("Cannot resolve promise with itself")):s.resolve(e,r)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,s.reject(e,t))}function i(t){n||(n=!0,s.resolve(e,t))}var o=m((function(){t(i,r)}));"error"===o.status&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){s.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},s.resolve=function(e,t){var n=m(h,t);if("error"===n.status)return s.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=a,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},s.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:s.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return s.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){o[i]=e,++a!==n||r||(r=!0,s.resolve(c,o))}),(function(e){r||(r=!0,s.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o,a=-1,l=new this(i);++a<n;)o=e[a],t.resolve(o).then((function(e){r||(r=!0,s.resolve(l,e))}),(function(e){r||(r=!0,s.reject(l,e))}));return l}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=e("./zlib/deflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString,c=0,u=-1,d=0,h=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==c)throw new Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=r.deflateSetDictionary(this.strm,m))!==c)throw new Error(o[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}p.prototype.push=function(e,t){var n,o,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(u),a.next_out=0,a.avail_out=u),1!==(n=r.deflate(a,o))&&n!==c)return this.onEnd(n),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==n);return 4===o?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c):2!==o||(this.onEnd(c),!(a.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=m,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";var r=e("./zlib/inflate"),i=e("./utils/common"),s=e("./utils/strings"),o=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw new Error(a[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[n])}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}d.prototype.push=function(e,t){var n,a,l,c,d,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,f=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?h.input=s.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=r.inflate(h,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&m&&(n=r.inflateSetDictionary(this.strm,m)),n===o.Z_BUF_ERROR&&!0===f&&(n=o.Z_OK,f=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&n!==o.Z_STREAM_END&&(0!==h.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(h.output,h.next_out),c=h.next_out-l,d=s.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((0<h.avail_in||0===h.avail_out)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(h.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},n.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t,n,r=Array.prototype.slice.call(arguments,1);r.length;){var i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)t=i,n=s,Object.prototype.hasOwnProperty.call(t,n)&&(e[s]=i[s])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){var t,n,r,i,s,o;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)s=e[t],o.set(s,i),i+=s.length;return o}},s={arraySet:function(e,t,n,r,i){for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var o=new r.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,s,o,a=e.length,l=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),s=o=0;o<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,s,a=t||e.length,c=new Array(2*a);for(n=r=0;n<a;)if((i=e[n++])<128)c[r++]=i;else if(4<(s=o[i]))c[r++]=65533,n+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&n<a;)i=i<<6|63&e[n++],s--;1<s?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e,s=e>>>16&65535,o=0;0!==n;){for(n-=o=2e3<n?2e3:n;s=s+(i=i+t[r++]|0)|0,--o;);i%=65521,s%=65521}return i|s<<16}},{}],44:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var s=r,o=i+n;e^=-1;for(var a=i;a<o;a++)e=e>>>8^s[255&(e^t[a])];return~e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),s=e("./trees"),o=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=0,u=4,d=0,h=-2,p=-1,m=4,f=2,g=8,y=9,b=286,v=30,S=19,w=2*b+1,k=15,T=3,x=258,E=x+T+1,A=42,C=113,I=1,O=2,M=3,N=4;function R(e,t){return e.msg=l[t],t}function D(e){return(e<<1)-(4<e?9:0)}function P(e){for(var t=e.length;0<=--t;)e[t]=0}function L(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function B(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,L(e.strm)}function z(e,t){e.pending_buf[e.pending++]=t}function U(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function j(e,t){var n,r,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-E?e.strstart-(e.w_size-E):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+x,p=c[s+o-1],m=c[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(n=t)+o]===m&&c[n+o-1]===p&&c[n]===c[s]&&c[++n]===c[s+1]){s+=2,n++;do{}while(c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&s<h);if(r=x-(h-s),s=h-x,o<r){if(e.match_start=t,a<=(o=r))break;p=c[s+o-1],m=c[s+o]}}}while((t=d[t&u])>l&&0!=--i);return o<=e.lookahead?o:e.lookahead}function F(e){var t,n,r,s,l,c,u,d,h,p,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-E)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);s+=m}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,p=void 0,(h=s)<(p=c.avail_in)&&(p=h),n=0===p?0:(c.avail_in-=p,i.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=o(c.adler,u,p,d):2===c.state.wrap&&(c.adler=a(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=T)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+T-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<T)););}while(e.lookahead<E&&0!==e.strm.avail_in)}function W(e,t){for(var n,r;;){if(e.lookahead<E){if(F(e),e.lookahead<E&&t===c)return I;if(0===e.lookahead)break}if(n=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-E&&(e.match_length=j(e,n)),e.match_length>=T)if(r=s._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=e.strstart<T-1?e.strstart:T-1,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}function V(e,t){for(var n,r,i;;){if(e.lookahead<E){if(F(e),e.lookahead<E&&t===c)return I;if(0===e.lookahead)break}if(n=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=T-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-E&&(e.match_length=j(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===T&&4096<e.strstart-e.match_start)&&(e.match_length=T-1)),e.prev_length>=T&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-T,r=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=T-1,e.strstart++,r&&(B(e,!1),0===e.strm.avail_out))return I}else if(e.match_available){if((r=s._tr_tally(e,0,e.window[e.strstart-1]))&&B(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return I}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<T-1?e.strstart:T-1,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}function G(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function q(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*w),this.dyn_dtree=new i.Buf16(2*(2*v+1)),this.bl_tree=new i.Buf16(2*(2*S+1)),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(k+1),this.heap=new i.Buf16(2*b+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*b+1),P(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?A:C,e.adler=2===t.wrap?0:1,t.last_flush=c,s._tr_init(t),d):R(e,h)}function H(e){var t=Y(e);return t===d&&function(e){e.window_size=2*e.w_size,P(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=T-1,e.match_available=0,e.ins_h=0}(e.state),t}function _(e,t,n,r,s,o){if(!e)return h;var a=1;if(t===p&&(t=6),r<0?(a=0,r=-r):15<r&&(a=2,r-=16),s<1||y<s||n!==g||r<8||15<r||t<0||9<t||o<0||m<o)return R(e,h);8===r&&(r=9);var l=new q;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+T-1)/T),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=o,l.method=n,H(e)}r=[new G(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(F(e),0===e.lookahead&&t===c)return I;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,B(e,!1),0===e.strm.avail_out))return I;if(e.strstart-e.block_start>=e.w_size-E&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):(e.strstart>e.block_start&&(B(e,!1),e.strm.avail_out),I)})),new G(4,4,8,4,W),new G(4,5,16,8,W),new G(4,6,32,32,W),new G(4,4,16,16,V),new G(8,16,32,32,V),new G(8,16,128,128,V),new G(8,32,128,256,V),new G(32,128,258,1024,V),new G(32,258,258,4096,V)],n.deflateInit=function(e,t){return _(e,t,g,15,8,0)},n.deflateInit2=_,n.deflateReset=H,n.deflateResetKeep=Y,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?h:(e.state.gzhead=t,d):h},n.deflate=function(e,t){var n,i,o,l;if(!e||!e.state||5<t||t<0)return e?R(e,h):h;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&t!==u)return R(e,0===e.avail_out?-5:h);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===A)if(2===i.wrap)e.adler=0,z(i,31),z(i,139),z(i,8),i.gzhead?(z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),z(i,255&i.gzhead.time),z(i,i.gzhead.time>>8&255),z(i,i.gzhead.time>>16&255),z(i,i.gzhead.time>>24&255),z(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),z(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(z(i,255&i.gzhead.extra.length),z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(z(i,0),z(i,0),z(i,0),z(i,0),z(i,0),z(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),z(i,3),i.status=C);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=C,U(i,p),0!==i.strstart&&(U(i,e.adler>>>16),U(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending!==i.pending_buf_size));)z(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,z(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),L(e),o=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,z(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&L(e),i.pending+2<=i.pending_buf_size&&(z(i,255&e.adler),z(i,e.adler>>8&255),e.adler=0,i.status=C)):i.status=C),0!==i.pending){if(L(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&D(t)<=D(n)&&t!==u)return R(e,-5);if(666===i.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==c&&666!==i.status){var m=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(F(e),0===e.lookahead)){if(t===c)return I;break}if(e.match_length=0,n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}(i,t):3===i.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=x){if(F(e),e.lookahead<=x&&t===c)return I;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=T&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+x;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=x-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=T?(n=s._tr_tally(e,1,e.match_length-T),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(B(e,!1),0===e.strm.avail_out))return I}return e.insert=0,t===u?(B(e,!0),0===e.strm.avail_out?M:N):e.last_lit&&(B(e,!1),0===e.strm.avail_out)?I:O}(i,t):r[i.level].func(i,t);if(m!==M&&m!==N||(i.status=666),m===I||m===M)return 0===e.avail_out&&(i.last_flush=-1),d;if(m===O&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(P(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),L(e),0===e.avail_out))return i.last_flush=-1,d}return t!==u?d:i.wrap<=0?1:(2===i.wrap?(z(i,255&e.adler),z(i,e.adler>>8&255),z(i,e.adler>>16&255),z(i,e.adler>>24&255),z(i,255&e.total_in),z(i,e.total_in>>8&255),z(i,e.total_in>>16&255),z(i,e.total_in>>24&255)):(U(i,e.adler>>>16),U(i,65535&e.adler)),L(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?d:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==A&&69!==t&&73!==t&&91!==t&&103!==t&&t!==C&&666!==t?R(e,h):(e.state=null,t===C?R(e,-3):d):h},n.deflateSetDictionary=function(e,t){var n,r,s,a,l,c,u,p,m=t.length;if(!e||!e.state)return h;if(2===(a=(n=e.state).wrap)||1===a&&n.status!==A||n.lookahead)return h;for(1===a&&(e.adler=o(e.adler,t,m,0)),n.wrap=0,m>=n.w_size&&(0===a&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,F(n);n.lookahead>=T;){for(r=n.strstart,s=n.lookahead-(T-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+T-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--s;);n.strstart=r,n.lookahead=T-1,F(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=T-1,n.match_available=0,e.next_in=c,e.input=u,e.avail_in=l,n.wrap=a,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,s,o,a,l,c,u,d,h,p,m,f,g,y,b,v,S,w,k,T,x,E,A;n=e.state,r=e.next_in,E=e.input,i=r+(e.avail_in-5),s=e.next_out,A=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,f=n.lencode,g=n.distcode,y=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{m<15&&(p+=E[r++]<<m,m+=8,p+=E[r++]<<m,m+=8),v=f[p&y];t:for(;;){if(p>>>=S=v>>>24,m-=S,0==(S=v>>>16&255))A[s++]=65535&v;else{if(!(16&S)){if(!(64&S)){v=f[(65535&v)+(p&(1<<S)-1)];continue t}if(32&S){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&v,(S&=15)&&(m<S&&(p+=E[r++]<<m,m+=8),w+=p&(1<<S)-1,p>>>=S,m-=S),m<15&&(p+=E[r++]<<m,m+=8,p+=E[r++]<<m,m+=8),v=g[p&b];n:for(;;){if(p>>>=S=v>>>24,m-=S,!(16&(S=v>>>16&255))){if(!(64&S)){v=g[(65535&v)+(p&(1<<S)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&v,m<(S&=15)&&(p+=E[r++]<<m,(m+=8)<S&&(p+=E[r++]<<m,m+=8)),l<(k+=p&(1<<S)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=S,m-=S,(S=s-o)<k){if(u<(S=k-S)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=h,(T=0)===d){if(T+=c-S,S<w){for(w-=S;A[s++]=h[T++],--S;);T=s-k,x=A}}else if(d<S){if(T+=c+d-S,(S-=d)<w){for(w-=S;A[s++]=h[T++],--S;);if(T=0,d<w){for(w-=S=d;A[s++]=h[T++],--S;);T=s-k,x=A}}}else if(T+=d-S,S<w){for(w-=S;A[s++]=h[T++],--S;);T=s-k,x=A}for(;2<w;)A[s++]=x[T++],A[s++]=x[T++],A[s++]=x[T++],w-=3;w&&(A[s++]=x[T++],1<w&&(A[s++]=x[T++]))}else{for(T=s-k;A[s++]=A[T++],A[s++]=A[T++],A[s++]=A[T++],2<(w-=3););w&&(A[s++]=A[T++],1<w&&(A[s++]=A[T++]))}break}}break}}while(r<i&&s<a);r-=w=m>>3,p&=(1<<(m-=w<<3))-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=s<a?a-s+257:257-(s-a),n.hold=p,n.bits=m}},{}],49:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),s=e("./crc32"),o=e("./inffast"),a=e("./inftrees"),l=1,c=2,u=0,d=-2,h=1,p=852,m=592;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,y(e)):d}function v(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,b(e))):d}function S(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=v(e,t))!==u&&(e.state=null),n):d}var w,k,T=!0;function x(e){if(T){var t;for(w=new r.Buf32(512),k=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(l,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,k,0,e.work,{bits:5}),T=!1}e.lencode=w,e.lenbits=9,e.distcode=k,e.distbits=5}function E(e,t,n,i){var s,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(s=o.wsize-o.wnext)&&(s=i),r.arraySet(o.window,t,n-i,s,o.wnext),(i-=s)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}n.inflateReset=b,n.inflateReset2=v,n.inflateResetKeep=y,n.inflateInit=function(e){return S(e,15)},n.inflateInit2=S,n.inflate=function(e,t){var n,p,m,g,y,b,v,S,w,k,T,A,C,I,O,M,N,R,D,P,L,B,z,U,j=0,F=new r.Buf8(4),W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return d;12===(n=e.state).mode&&(n.mode=13),y=e.next_out,m=e.output,v=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,S=n.hold,w=n.bits,k=b,T=v,B=u;e:for(;;)switch(n.mode){case h:if(0===n.wrap){n.mode=13;break}for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(2&n.wrap&&35615===S){F[n.check=0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0),w=S=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&S)<<8)+(S>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&S)){e.msg="unknown compression method",n.mode=30;break}if(w-=4,L=8+(15&(S>>>=4)),0===n.wbits)n.wbits=L;else if(L>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<L,e.adler=n.check=1,n.mode=512&S?10:12,w=S=0;break;case 2:for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(n.flags=S,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=S>>8&1),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0,n.mode=3;case 3:for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.head&&(n.head.time=S),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,F[2]=S>>>16&255,F[3]=S>>>24&255,n.check=s(n.check,F,4,0)),w=S=0,n.mode=4;case 4:for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.head&&(n.head.xflags=255&S,n.head.os=S>>8),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0,n.mode=5;case 5:if(1024&n.flags){for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.length=S,n.head&&(n.head.extra_len=S),512&n.flags&&(F[0]=255&S,F[1]=S>>>8&255,n.check=s(n.check,F,2,0)),w=S=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(A=n.length)&&(A=b),A&&(n.head&&(L=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,A,L)),512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,n.length-=A),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break e;for(A=0;L=p[g+A++],n.head&&L&&n.length<65536&&(n.head.name+=String.fromCharCode(L)),L&&A<b;);if(512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,L)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===b)break e;for(A=0;L=p[g+A++],n.head&&L&&n.length<65536&&(n.head.comment+=String.fromCharCode(L)),L&&A<b;);if(512&n.flags&&(n.check=s(n.check,p,A,g)),b-=A,g+=A,L)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;w<16;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}w=S=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}e.adler=n.check=f(S),w=S=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){S>>>=7&w,w-=7&w,n.mode=27;break}for(;w<3;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}switch(n.last=1&S,w-=1,3&(S>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6!==t)break;S>>>=2,w-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}S>>>=2,w-=2;break;case 14:for(S>>>=7&w,w-=7&w;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if((65535&S)!=(S>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&S,w=S=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(A=n.length){if(b<A&&(A=b),v<A&&(A=v),0===A)break e;r.arraySet(m,p,g,A,y),b-=A,g+=A,v-=A,y+=A,n.length-=A;break}n.mode=12;break;case 17:for(;w<14;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(n.nlen=257+(31&S),S>>>=5,w-=5,n.ndist=1+(31&S),S>>>=5,w-=5,n.ncode=4+(15&S),S>>>=4,w-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;w<3;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.lens[W[n.have++]]=7&S,S>>>=3,w-=3}for(;n.have<19;)n.lens[W[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},B=a(0,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,B){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;M=(j=n.lencode[S&(1<<n.lenbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(N<16)S>>>=O,w-=O,n.lens[n.have++]=N;else{if(16===N){for(U=O+2;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S>>>=O,w-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}L=n.lens[n.have-1],A=3+(3&S),S>>>=2,w-=2}else if(17===N){for(U=O+3;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}w-=O,L=0,A=3+(7&(S>>>=O)),S>>>=3,w-=3}else{for(U=O+7;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}w-=O,L=0,A=11+(127&(S>>>=O)),S>>>=7,w-=7}if(n.have+A>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;A--;)n.lens[n.have++]=L}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,z={bits:n.lenbits},B=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,B){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},B=a(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,B){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=b&&258<=v){e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,o(e,T),y=e.next_out,m=e.output,v=e.avail_out,g=e.next_in,p=e.input,b=e.avail_in,S=n.hold,w=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;M=(j=n.lencode[S&(1<<n.lenbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(M&&!(240&M)){for(R=O,D=M,P=N;M=(j=n.lencode[P+((S&(1<<R+D)-1)>>R)])>>>16&255,N=65535&j,!(R+(O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}S>>>=R,w-=R,n.back+=R}if(S>>>=O,w-=O,n.back+=O,n.length=N,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(U=n.extra;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.length+=S&(1<<n.extra)-1,S>>>=n.extra,w-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;M=(j=n.distcode[S&(1<<n.distbits)-1])>>>16&255,N=65535&j,!((O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(!(240&M)){for(R=O,D=M,P=N;M=(j=n.distcode[P+((S&(1<<R+D)-1)>>R)])>>>16&255,N=65535&j,!(R+(O=j>>>24)<=w);){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}S>>>=R,w-=R,n.back+=R}if(S>>>=O,w-=O,n.back+=O,64&M){e.msg="invalid distance code",n.mode=30;break}n.offset=N,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(U=n.extra;w<U;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}n.offset+=S&(1<<n.extra)-1,S>>>=n.extra,w-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===v)break e;if(A=T-v,n.offset>A){if((A=n.offset-A)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}C=A>n.wnext?(A-=n.wnext,n.wsize-A):n.wnext-A,A>n.length&&(A=n.length),I=n.window}else I=m,C=y-n.offset,A=n.length;for(v<A&&(A=v),v-=A,n.length-=A;m[y++]=I[C++],--A;);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;m[y++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;w<32;){if(0===b)break e;b--,S|=p[g++]<<w,w+=8}if(T-=v,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?s(n.check,m,T,y-T):i(n.check,m,T,y-T)),T=v,(n.flags?S:f(S))!==n.check){e.msg="incorrect data check",n.mode=30;break}w=S=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;w<32;){if(0===b)break e;b--,S+=p[g++]<<w,w+=8}if(S!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}w=S=0}n.mode=29;case 29:B=1;break e;case 30:B=-3;break e;case 31:return-4;default:return d}return e.next_out=y,e.avail_out=v,e.next_in=g,e.avail_in=b,n.hold=S,n.bits=w,(n.wsize||T!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&E(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,T-=e.avail_out,e.total_in+=k,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?s(n.check,m,T,e.next_out-T):i(n.check,m,T,e.next_out-T)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==k&&0===T||4===t)&&B===u&&(B=-5),B)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&(t.window=null),e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?d:11===n.mode&&i(1,t,r,0)!==n.check?-3:E(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,d,h){var p,m,f,g,y,b,v,S,w,k=h.bits,T=0,x=0,E=0,A=0,C=0,I=0,O=0,M=0,N=0,R=0,D=null,P=0,L=new r.Buf16(16),B=new r.Buf16(16),z=null,U=0;for(T=0;T<=15;T++)L[T]=0;for(x=0;x<l;x++)L[t[n+x]]++;for(C=k,A=15;1<=A&&0===L[A];A--);if(A<C&&(C=A),0===A)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(E=1;E<A&&0===L[E];E++);for(C<E&&(C=E),T=M=1;T<=15;T++)if(M<<=1,(M-=L[T])<0)return-1;if(0<M&&(0===e||1!==A))return-1;for(B[1]=0,T=1;T<15;T++)B[T+1]=B[T]+L[T];for(x=0;x<l;x++)0!==t[n+x]&&(d[B[t[n+x]]++]=x);if(b=0===e?(D=z=d,19):1===e?(D=i,P-=257,z=s,U-=257,256):(D=o,z=a,-1),T=E,y=u,O=x=R=0,f=-1,g=(N=1<<(I=C))-1,1===e&&852<N||2===e&&592<N)return 1;for(;;){for(v=T-O,w=d[x]<b?(S=0,d[x]):d[x]>b?(S=z[U+d[x]],D[P+d[x]]):(S=96,0),p=1<<T-O,E=m=1<<I;c[y+(R>>O)+(m-=p)]=v<<24|S<<16|w,0!==m;);for(p=1<<T-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,x++,0==--L[T]){if(T===A)break;T=t[n+d[x]]}if(C<T&&(R&g)!==f){for(0===O&&(O=C),y+=E,M=1<<(I=T-O);I+O<A&&!((M-=L[I+O])<=0);)I++,M<<=1;if(N+=1<<I,1===e&&852<N||2===e&&592<N)return 1;c[f=R&g]=C<<24|I<<16|y-u}}return 0!==R&&(c[y+R]=T-O<<24|64<<16),h.bits=C,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){"use strict";var r=e("../utils/common"),i=0,s=1;function o(e){for(var t=e.length;0<=--t;)e[t]=0}var a=0,l=29,c=256,u=c+1+l,d=30,h=19,p=2*u+1,m=15,f=16,g=7,y=256,b=16,v=17,S=18,w=[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],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(u+2));o(E);var A=new Array(2*d);o(A);var C=new Array(512);o(C);var I=new Array(256);o(I);var O=new Array(l);o(O);var M,N,R,D=new Array(d);function P(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B(e){return e<256?C[e]:C[256+(e>>>7)]}function z(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function U(e,t,n){e.bi_valid>f-n?(e.bi_buf|=t<<e.bi_valid&65535,z(e,e.bi_buf),e.bi_buf=t>>f-e.bi_valid,e.bi_valid+=n-f):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function j(e,t,n){U(e,n[2*t],n[2*t+1])}function F(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function W(e,t,n){var r,i,s=new Array(m+1),o=0;for(r=1;r<=m;r++)s[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=F(s[a]++,a))}}function V(e){var t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<h;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*y]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function G(e){8<e.bi_valid?z(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function q(e,t,n,r){var i=2*t,s=2*n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]}function Y(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&q(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!q(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function H(e,t,n){var r,i,s,o,a=0;if(0!==e.last_lit)for(;r=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],i=e.pending_buf[e.l_buf+a],a++,0===r?j(e,i,t):(j(e,(s=I[i])+c+1,t),0!==(o=w[s])&&U(e,i-=O[s],o),j(e,s=B(--r),n),0!==(o=k[s])&&U(e,r-=D[s],o)),a<e.last_lit;);j(e,y,t)}function _(e,t){var n,r,i,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<l;n++)0!==s[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):s[2*n+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=o[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;1<=n;n--)Y(e,s,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,s,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,s[2*i]=s[2*n]+s[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,s[2*n+1]=s[2*r+1]=i,e.heap[1]=i++,Y(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,s,o,a,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,g=t.stat_desc.max_length,y=0;for(s=0;s<=m;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(s=l[2*l[2*(r=e.heap[n])+1]+1]+1)&&(s=g,y++),l[2*r+1]=s,c<r||(e.bl_count[s]++,o=0,f<=r&&(o=h[r-f]),a=l[2*r],e.opt_len+=a*(s+o),d&&(e.static_len+=a*(u[2*r+1]+o)));if(0!==y){do{for(s=g-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[g]--,y-=2}while(0<y);for(s=g;0!==s;s--)for(r=e.bl_count[s];0!==r;)c<(i=e.heap[--n])||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),r--)}}(e,t),W(s,c,e.bl_count)}function K(e,t,n){var r,i,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++a<l&&i===o||(a<c?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):a<=10?e.bl_tree[2*v]++:e.bl_tree[2*S]++,s=i,c=(a=0)===o?(l=138,3):i===o?(l=6,3):(l=7,4))}function Q(e,t,n){var r,i,s=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++a<l&&i===o)){if(a<c)for(;j(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==s&&(j(e,i,e.bl_tree),a--),j(e,b,e.bl_tree),U(e,a-3,2)):a<=10?(j(e,v,e.bl_tree),U(e,a-3,3)):(j(e,S,e.bl_tree),U(e,a-11,7));s=i,c=(a=0)===o?(l=138,3):i===o?(l=6,3):(l=7,4)}}o(D);var X=!1;function Z(e,t,n,i){U(e,(a<<1)+(i?1:0),3),function(e,t,n,i){G(e),i&&(z(e,n),z(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){X||(function(){var e,t,n,r,i,s=new Array(m+1);for(r=n=0;r<l-1;r++)for(O[r]=n,e=0;e<1<<w[r];e++)I[n++]=r;for(I[n-1]=r,r=i=0;r<16;r++)for(D[r]=i,e=0;e<1<<k[r];e++)C[i++]=r;for(i>>=7;r<d;r++)for(D[r]=i<<7,e=0;e<1<<k[r]-7;e++)C[256+i++]=r;for(t=0;t<=m;t++)s[t]=0;for(e=0;e<=143;)E[2*e+1]=8,e++,s[8]++;for(;e<=255;)E[2*e+1]=9,e++,s[9]++;for(;e<=279;)E[2*e+1]=7,e++,s[7]++;for(;e<=287;)E[2*e+1]=8,e++,s[8]++;for(W(E,u+1,s),e=0;e<d;e++)A[2*e+1]=5,A[2*e]=F(e,5);M=new P(E,w,c+1,u,m),N=new P(A,k,0,d,m),R=new P(new Array(0),T,0,h,g)}(),X=!0),e.l_desc=new L(e.dyn_ltree,M),e.d_desc=new L(e.dyn_dtree,N),e.bl_desc=new L(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,V(e)},n._tr_stored_block=Z,n._tr_flush_block=function(e,t,n,r){var o,a,l=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t<c;t++)if(0!==e.dyn_ltree[2*t])return s;return i}(e)),_(e,e.l_desc),_(e,e.d_desc),l=function(e){var t;for(K(e,e.dyn_ltree,e.l_desc.max_code),K(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=h-1;3<=t&&0===e.bl_tree[2*x[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?Z(e,t,n,r):4===e.strategy||a===o?(U(e,2+(r?1:0),3),H(e,E,A)):(U(e,4+(r?1:0),3),function(e,t,n,r){var i;for(U(e,t-257,5),U(e,n-1,5),U(e,r-4,4),i=0;i<r;i++)U(e,e.bl_tree[2*x[i]+1],3);Q(e,e.dyn_ltree,t-1),Q(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),H(e,e.dyn_ltree,e.dyn_dtree)),V(e),r&&G(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(I[n]+c+1)]++,e.dyn_dtree[2*B(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){U(e,2,3),j(e,y,E),function(e){16===e.bi_valid?(z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,s,o,a=1,l={},c=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,n="[object process]"==={}.toString.call(e.process)?function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",m,!1):e.attachEvent("onmessage",m),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){s.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return l[a]=i,n(a),a++},d.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var n=l[e];if(n){c=!0;try{!function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}}(n)}finally{h(e),c=!1}}}}function m(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}).call(this,n(18).Buffer,n(123).setImmediate,n(9),n(41))},function(e,t){class n{static get RGB_BLACK(){return{r:0,g:0,b:0}}static get RGB_WHITE(){return{r:255,g:255,b:255}}static decimalToHex(e){e<0&&(e+=16777216);let t=Number(e).toString(16);return t="#".concat("000000".substr(0,6-t.length)).concat(t),t}static decimalToRgb(e){const t=e>>24&255;return{r:e>>16&255,g:e>>8&255,b:255&e,a:t>0?t:255}}static hexToRgb(e){e.startsWith("#")&&(e=e.substring(1));const t=parseInt(e,16);if(isNaN(t))return null;if(6===e.length)return{r:t>>16&255,g:t>>8&255,b:255&t};if(3===e.length){const e=t>>8&15,n=t>>4&15,r=15&t;return{r:e<<4|e,g:n<<4|n,b:r<<4|r}}return null}static rgbToHex(e){return n.decimalToHex(n.rgbToDecimal(e))}static rgbToDecimal(e){return(e.r<<16)+(e.g<<8)+e.b}static hexToDecimal(e){return n.rgbToDecimal(n.hexToRgb(e))}static hsvToRgb(e){let t=e.h%360;t<0&&(t+=360);const n=Math.max(0,Math.min(e.s,1)),r=Math.max(0,Math.min(e.v,1)),i=Math.floor(t/60),s=t/60-i,o=r*(1-n),a=r*(1-n*s),l=r*(1-n*(1-s));let c,u,d;switch(i){default:case 0:c=r,u=l,d=o;break;case 1:c=a,u=r,d=o;break;case 2:c=o,u=r,d=l;break;case 3:c=o,u=a,d=r;break;case 4:c=l,u=o,d=r;break;case 5:c=r,u=o,d=a}return{r:Math.floor(255*c),g:Math.floor(255*u),b:Math.floor(255*d)}}static rgbToHsv(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(Math.min(t,n),r),s=Math.max(Math.max(t,n),r);let o=0,a=0;if(i!==s){o=60*((t===i?3:n===i?5:1)-(t===i?n-r:n===i?r-t:t-n)/(s-i))%360,a=(s-i)/s}return{h:o,s:a,v:s}}static mixRgb(e,t,n){if(n<=0)return e;if(n>=1)return t;const r=1-n;return{r:r*e.r+n*t.r,g:r*e.g+n*t.g,b:r*e.b+n*t.b}}}e.exports=n},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return o(e)?e:_(e)}function r(e){return a(e)?e:K(e)}function i(e){return l(e)?e:Q(e)}function s(e){return o(e)&&!c(e)?e:X(e)}function o(e){return!(!e||!e[d])}function a(e){return!(!e||!e[h])}function l(e){return!(!e||!e[p])}function c(e){return a(e)||l(e)}function u(e){return!(!e||!e[m])}t(r,n),t(i,n),t(s,n),n.isIterable=o,n.isKeyed=a,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=i,n.Set=s;var d="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",f="delete",g=5,y=1<<g,b=y-1,v={},S={value:!1},w={value:!1};function k(e){return e.value=!1,e}function T(e){e&&(e.value=!0)}function x(){}function E(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(I)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function I(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function M(e,t){return R(e,t,0)}function N(e,t){return R(e,t,t)}function R(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var D=0,P=1,L=2,B="function"==typeof Symbol&&Symbol.iterator,z="@@iterator",U=B||z;function j(e){this.next=e}function F(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function W(){return{value:void 0,done:!0}}function V(e){return!!Y(e)}function G(e){return e&&"function"==typeof e.next}function q(e){var t=Y(e);return t&&t.call(e)}function Y(e){var t=e&&(B&&e[B]||e[z]);if("function"==typeof t)return t}function H(e){return e&&"number"==typeof e.length}function _(e){return null==e?oe():o(e)?e.toSeq():ce(e)}function K(e){return null==e?oe().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():ae(e)}function Q(e){return null==e?oe():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():le(e)}function X(e){return(null==e?oe():o(e)?a(e)?e.entrySeq():e:le(e)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=D,j.VALUES=P,j.ENTRIES=L,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[U]=function(){return this},t(_,n),_.of=function(){return _(arguments)},_.prototype.toSeq=function(){return this},_.prototype.toString=function(){return this.__toString("Seq {","}")},_.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},_.prototype.__iterate=function(e,t){return de(this,e,t,!0)},_.prototype.__iterator=function(e,t){return he(this,e,t,!0)},t(K,_),K.prototype.toKeyedSeq=function(){return this},t(Q,_),Q.of=function(){return Q(arguments)},Q.prototype.toIndexedSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq [","]")},Q.prototype.__iterate=function(e,t){return de(this,e,t,!1)},Q.prototype.__iterator=function(e,t){return he(this,e,t,!1)},t(X,_),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},_.isSeq=se,_.Keyed=K,_.Set=X,_.Indexed=Q;var Z,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function se(e){return!(!e||!e[ee])}function oe(){return Z||(Z=new te([]))}function ae(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():G(e)?new ie(e).fromEntrySeq():V(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return H(e)?new te(e):G(e)?new ie(e):V(e)?new re(e):void 0}function de(e,t,n,r){var i=e._cache;if(i){for(var s=i.length-1,o=0;o<=s;o++){var a=i[n?s-o:o];if(!1===t(a[1],r?a[0]:o,e))return o+1}return o}return e.__iterateUncached(t,n)}function he(e,t,n,r){var i=e._cache;if(i){var s=i.length-1,o=0;return new j((function(){var e=i[n?s-o:o];return o++>s?W():F(t,r?e[0]:o-1,e[1])}))}return e.__iteratorUncached(t,n)}function pe(e,t){return t?me(t,e,"",{"":e}):fe(e)}function me(e,t,n,r){return Array.isArray(t)?e.call(r,n,Q(t).map((function(n,r){return me(e,n,r,t)}))):ge(t)?e.call(r,n,K(t).map((function(n,r){return me(e,n,r,t)}))):t}function fe(e){return Array.isArray(e)?Q(e).map(fe).toList():ge(e)?K(e).map(fe).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ye(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function be(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ye(i[1],e)&&(n||ye(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var d=!0,h=t.__iterate((function(t,r){if(n?!e.has(t):i?!ye(t,e.get(r,v)):!ye(e.get(r,v),t))return d=!1,!1}));return d&&e.size===h}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function Se(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(Se(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function ke(){throw TypeError("Abstract")}function Te(){}function xe(){}function Ee(){}_.prototype[ee]=!0,t(te,Q),te.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new j((function(){return i>r?W():F(e,i,n[t?r-i++:i++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,s=0;s<=i;s++){var o=r[t?i-s:s];if(!1===e(n[o],o,this))return s+1}return s},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,s=0;return new j((function(){var o=r[t?i-s:s];return s++>i?W():F(e,o,n[o])}))},ne.prototype[m]=!0,t(re,Q),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=q(this._iterable),r=0;if(G(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=q(this._iterable);if(!G(n))return new j(W);var r=0;return new j((function(){var t=n.next();return t.done?t:F(e,r++,t.value)}))},t(ie,Q),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,s=0;s<i.length;)if(!1===e(i[s],s++,this))return s;for(;!(n=r.next()).done;){var o=n.value;if(i[s]=o,!1===e(o,s++,this))break}return s},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new j((function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return F(e,i,r[i++])}))},t(ve,Q),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return ye(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:new ve(this._value,N(t,n)-M(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return ye(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return ye(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ve.prototype.__iterator=function(e,t){var n=this,r=0;return new j((function(){return r<n.size?F(e,r++,n._value):W()}))},ve.prototype.equals=function(e){return e instanceof ve?ye(this._value,e._value):be(e)},t(we,Q),we.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},we.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},we.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},we.prototype.slice=function(e,t){return O(e,t,this.size)?this:(e=M(e,this.size),(t=N(t,this.size))<=e?new we(0,0):new we(this.get(e,this._end),this.get(t,this._end),this._step))},we.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},we.prototype.lastIndexOf=function(e){return this.indexOf(e)},we.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,s=0;s<=n;s++){if(!1===e(i,s,this))return s+1;i+=t?-r:r}return s},we.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,s=0;return new j((function(){var o=i;return i+=t?-r:r,s>n?W():F(e,s++,o)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:be(this,e)},t(ke,n),t(Te,ke),t(xe,ke),t(Ee,ke),ke.Keyed=Te,ke.Indexed=xe,ke.Set=Ee;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Ce(e){return e>>>1&1073741824|3221225471&e}function Ie(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Ce(n)}if("string"===t)return e.length>je?Oe(e):Me(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Me(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Oe(e){var t=Ve[e];return void 0===t&&(t=Me(e),We===Fe&&(We=0,Ve={}),We++,Ve[e]=t),t}function Me(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Ce(t)}function Ne(e){var t;if(Be&&void 0!==(t=Le.get(e)))return t;if(void 0!==(t=e[Ue]))return t;if(!De){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ue]))return t;if(void 0!==(t=Pe(e)))return t}if(t=++ze,1073741824&ze&&(ze=0),Be)Le.set(e,t);else{if(void 0!==Re&&!1===Re(e))throw new Error("Non-extensible objects are not allowed as keys.");if(De)Object.defineProperty(e,Ue,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ue]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ue]=t}}return t}var Re=Object.isExtensible,De=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Pe(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Le,Be="function"==typeof WeakMap;Be&&(Le=new WeakMap);var ze=0,Ue="__immutablehash__";"function"==typeof Symbol&&(Ue=Symbol(Ue));var je=16,Fe=255,We=0,Ve={};function Ge(e){Se(e!==1/0,"Cannot perform this action with an infinite size.")}function qe(e){return null==e?it():Ye(e)&&!u(e)?e:it().withMutations((function(t){var n=r(e);Ge(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ye(e){return!(!e||!e[_e])}t(qe,Te),qe.of=function(){var t=e.call(arguments,0);return it().withMutations((function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},qe.prototype.toString=function(){return this.__toString("Map {","}")},qe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},qe.prototype.set=function(e,t){return st(this,e,t)},qe.prototype.setIn=function(e,t){return this.updateIn(e,v,(function(){return t}))},qe.prototype.remove=function(e){return st(this,e,v)},qe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return v}))},qe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},qe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,kn(e),t,n);return r===v?void 0:r},qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},qe.prototype.merge=function(){return ht(this,void 0,arguments)},qe.prototype.mergeWith=function(t){return ht(this,t,e.call(arguments,1))},qe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},qe.prototype.mergeDeep=function(){return ht(this,pt,arguments)},qe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ht(this,mt(t),n)},qe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},qe.prototype.sort=function(e){return Vt(dn(this,e))},qe.prototype.sortBy=function(e,t){return Vt(dn(this,t,e))},qe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},qe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new x)},qe.prototype.asImmutable=function(){return this.__ensureOwner()},qe.prototype.wasAltered=function(){return this.__altered},qe.prototype.__iterator=function(e,t){return new et(this,e,t)},qe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},qe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},qe.isMap=Ye;var He,_e="@@__IMMUTABLE_MAP__@@",Ke=qe.prototype;function Qe(e,t){this.ownerID=e,this.entries=t}function Xe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return F(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ke);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return He||(He=rt(0))}function st(e,t,n){var r,i;if(e._root){var s=k(S),o=k(w);if(r=ot(e._root,e.__ownerID,0,void 0,t,n,s,o),!o.value)return e;i=e.size+(s.value?n===v?-1:1:0)}else{if(n===v)return e;i=1,r=new Qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function ot(e,t,n,r,i,s,o,a){return e?e.update(t,n,r,i,s,o,a):s===v?e:(T(a),T(o),new $e(t,r,[i,s]))}function at(e){return e.constructor===$e||e.constructor===Je}function lt(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var s,o=(0===n?e.keyHash:e.keyHash>>>n)&b,a=(0===n?r:r>>>n)&b;return new Xe(t,1<<o|1<<a,o===a?[lt(e,t,n+g,r,i)]:(s=new $e(t,r,i),o<a?[e,s]:[s,e]))}function ct(e,t,n,r){e||(e=new x);for(var i=new $e(e,Ie(n),[n,r]),s=0;s<t.length;s++){var o=t[s];i=i.update(e,0,void 0,o[0],o[1])}return i}function ut(e,t,n,r){for(var i=0,s=0,o=new Array(n),a=0,l=1,c=t.length;a<c;a++,l<<=1){var u=t[a];void 0!==u&&a!==r&&(i|=l,o[s++]=u)}return new Xe(e,i,o)}function dt(e,t,n,r,i){for(var s=0,o=new Array(y),a=0;0!==n;a++,n>>>=1)o[a]=1&n?t[s++]:void 0;return o[r]=i,new Ze(e,s+1,o)}function ht(e,t,n){for(var i=[],s=0;s<n.length;s++){var a=n[s],l=r(a);o(a)||(l=l.map((function(e){return pe(e)}))),i.push(l)}return ft(e,t,i)}function pt(e,t,n){return e&&e.mergeDeep&&o(t)?e.mergeDeep(t):ye(e,t)?e:t}function mt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&o(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ye(t,i)?t:i}}function ft(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,v,(function(e){return e===v?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)})):e.constructor(n[0])}function gt(e,t,n,r){var i=e===v,s=t.next();if(s.done){var o=i?n:e,a=r(o);return a===o?e:a}Se(i||e&&e.set,"invalid keyPath");var l=s.value,c=i?v:e.get(l,v),u=gt(c,t,n,r);return u===c?e:u===v?e.remove(l):(i?it():e).set(l,u)}function yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function bt(e,t,n,r){var i=r?e:E(e);return i[t]=n,i}function vt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var s=new Array(i),o=0,a=0;a<i;a++)a===t?(s[a]=n,o=-1):s[a]=e[a+o];return s}function St(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),s=0,o=0;o<r;o++)o===t&&(s=1),i[o]=e[o+s];return i}Ke[_e]=!0,Ke[f]=Ke.remove,Ke.removeIn=Ke.deleteIn,Qe.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(ye(n,i[s][0]))return i[s][1];return r},Qe.prototype.update=function(e,t,n,r,i,s,o){for(var a=i===v,l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:a)return this;if(T(o),(a||!d)&&T(s),!a||1!==l.length){if(!d&&!a&&l.length>=wt)return ct(e,l,r,i);var h=e&&e===this.ownerID,p=h?l:E(l);return d?a?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Qe(e,p)}},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=1<<((0===e?t:t>>>e)&b),s=this.bitmap;return s&i?this.nodes[yt(s&i-1)].get(e+g,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=(0===t?n:n>>>t)&b,l=1<<a,c=this.bitmap,u=!!(c&l);if(!u&&i===v)return this;var d=yt(c&l-1),h=this.nodes,p=u?h[d]:void 0,m=ot(p,e,t+g,n,r,i,s,o);if(m===p)return this;if(!u&&m&&h.length>=kt)return dt(e,h,c,a,m);if(u&&!m&&2===h.length&&at(h[1^d]))return h[1^d];if(u&&m&&1===h.length&&at(m))return m;var f=e&&e===this.ownerID,y=u?m?c:c^l:c|l,S=u?m?bt(h,d,m,f):St(h,d,f):vt(h,d,m,f);return f?(this.bitmap=y,this.nodes=S,this):new Xe(e,y,S)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=Ie(n));var i=(0===e?t:t>>>e)&b,s=this.nodes[i];return s?s.get(e+g,t,n,r):r},Ze.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=(0===t?n:n>>>t)&b,l=i===v,c=this.nodes,u=c[a];if(l&&!u)return this;var d=ot(u,e,t+g,n,r,i,s,o);if(d===u)return this;var h=this.count;if(u){if(!d&&--h<Tt)return ut(e,c,h,a)}else h++;var p=e&&e===this.ownerID,m=bt(c,a,d,p);return p?(this.count=h,this.nodes=m,this):new Ze(e,h,m)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,s=0,o=i.length;s<o;s++)if(ye(n,i[s][0]))return i[s][1];return r},Je.prototype.update=function(e,t,n,r,i,s,o){void 0===n&&(n=Ie(r));var a=i===v;if(n!==this.keyHash)return a?this:(T(o),T(s),lt(this,e,t,n,[r,i]));for(var l=this.entries,c=0,u=l.length;c<u&&!ye(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===i:a)return this;if(T(o),(a||!d)&&T(s),a&&2===u)return new $e(e,this.keyHash,l[1^c]);var h=e&&e===this.ownerID,p=h?l:E(l);return d?a?c===u-1?p.pop():p[c]=p.pop():p[c]=[r,i]:p.push([r,i]),h?(this.entries=p,this):new Je(e,this.keyHash,p)},$e.prototype.get=function(e,t,n,r){return ye(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,s,o){var a=i===v,l=ye(r,this.entry[0]);return(l?i===this.entry[1]:a)?this:(T(o),a?void T(s):l?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(T(s),lt(this,e,t,Ie(r),[r,i])))},Qe.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Xe.prototype.iterate=Ze.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var s=n[t?i-r:r];if(s&&!1===s.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,j),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var s=r.nodes[this._reverse?n-i:i];if(s){if(s.entry)return tt(e,s.entry);t=this._stack=nt(s,t)}continue}t=this._stack=this._stack.__prev}return W()};var wt=y/4,kt=y/2,Tt=y/4;function xt(e){var t=Pt();if(null==e)return t;if(Et(e))return e;var n=i(e),r=n.size;return 0===r?t:(Ge(r),r>0&&r<y?Dt(0,r,g,null,new It(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Et(e){return!(!e||!e[At])}t(xt,xe),xt.of=function(){return this(arguments)},xt.prototype.toString=function(){return this.__toString("List [","]")},xt.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=Ut(this,e+=this._origin);return n&&n.array[e&b]}return t},xt.prototype.set=f