@noir-lang/noir_wasm 1.0.0-beta.7-077bb6d.nightly → 1.0.0-beta.7-441f39a.nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/index_bg.wasm +0 -0
- package/dist/node/main.js +28 -29
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +2 -2
- package/dist/types/build/esm/index.d.ts +16 -16
- package/dist/web/main.mjs +29 -30
- package/dist/web/main.mjs.map +1 -1
- package/package.json +2 -2
package/dist/node/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACRA;AACA,KAA4D;AAC5D,CACmG;AACnG,CAAC,uBAAuB;;AAExB;;AAEA;;AAEA;;AAEA;;AAEA,iBAAiB,SAAS;;AAE1B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,kCAAkC;AAClC,qCAAqC;AACrC,gCAAgC;AAChC,gCAAgC;AAChC,uCAAuC;AACvC,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS,iCAAiC,kCAAkC;AAC5E;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,4CAA4C;;AAE5C;AACA,mDAAmD;AACnD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,2CAA2C;AAC3C,8BAA8B;AAC9B,iCAAiC;AACjC,kGAAkG;AAClG,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2EAA2E;AAC3E;AACA,sCAAsC;AACtC;AACA,gCAAgC;AAChC;AACA,mCAAmC;AACnC,EAAE;AACF;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,gEAAgE,cAAc,YAAY;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C,oBAAoB;AAC/D;AACA;AACA;AACA;AACA,6DAA6D,oBAAoB;AACjF;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;AACxC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,+BAA+B;AAC/B;AACA;AACA,8EAA8E,KAAK;AACnF,6EAA6E,qCAAqC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,QAAQ;AACvC;AACA;;AAEA;AACA;AACA,iCAAiC,gCAAgC,MAAM;AACvE;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA,qCAAqC,cAAc,SAAS,6BAA6B,QAAQ,EAAE;AACnG;AACA;AACA;AACA;AACA,iBAAiB,WAAW,GAAG,aAAa,GAAG,aAAa;AAC5D,OAAO,IAAI,OAAO,aAAa,IAAI,sBAAsB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,IAAI,WAAW;;AAEf,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG,WAAW;AACd;AACA;;AAEA,QAAQ,4BAA4B;AACpC;AACA;AACA,GAAG,WAAW;AACd;;AAEA,QAAQ,wCAAwC;AAChD;AACA;AACA,OAAO,IAAI;AACX,GAAG,WAAW;AACd;AACA,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA,GAAG,WAAW;AACd;AACA;;AAEA;AACA;AACA;AACA,GAAG,WAAW;;;AAGd,uCAAuC;;AAEvC,QAAQ,4BAA4B;AACpC;AACA,GAAG,WAAW;AACd;AACA,GAAG,WAAW;AACd;AACA,MAAM,IAAI;AACV,IAAI,WAAW;AACf;AACA;AACA;;AAEA,QAAQ,yBAAyB;AACjC;AACA,KAAK,IAAI;AACT,GAAG,WAAW;AACd;AACA;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,KAAK,IAAI;AACT,GAAG,WAAW;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;;AAEA,+HAA+H,EAAE,aAAa,EAAE;AAChJ,+HAA+H,EAAE,aAAa,EAAE,IAAI;AACpJ,2HAA2H,EAAE,aAAa,EAAE,IAAI;AAChJ,4HAA4H,EAAE,aAAa,EAAE,IAAI;AACjJ;AACA,2HAA2H;;AAE3H,oGAAoG,EAAE,aAAa,EAAE;AACrH,oGAAoG,EAAE,aAAa,EAAE,KAAK;AAC1H,gGAAgG,EAAE,aAAa,EAAE,KAAK;AACtH,iGAAiG,EAAE,aAAa,EAAE,KAAK;AACvH;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA,QAAQ,wBAAwB;AAChC,QAAQ,sBAAsB;AAC9B;AACA,QAAQ,wBAAwB;AAChC,QAAQ,wBAAwB;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,SAAS,wBAAwB,IAAI,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,IAAI,sBAAsB;AAClE,QAAQ;AACR,UAAU;AACV;;AAEA,sCAAsC,gGAAgG;AACtI,SAAS,cAAc,IAAI,cAAc;AACzC;AACA,UAAU;AACV;;AAEA,QAAQ,0CAA0C;AAClD,QAAQ,0CAA0C;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B;AACA,MAAM;AACN,QAAQ,IAAI;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAiB;AACzB;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA,iCAAiC,OAAO;AACxC,WAAW,SAAS;AACpB,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,mDAAmD;AACnD,QAAQ,gCAAgC,eAAe,UAAU,6BAA6B,QAAQ,EAAE;AACxG;AACA,sDAAsD;AACtD,iCAAiC;AACjC;AACA,uCAAuC,gCAAgC,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC5H,qCAAqC,iCAAiC,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC3H;AACA;AACA;AACA;AACA;AACA,2CAA2C,+CAA+C,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC/I;AACA,qBAAqB;AACrB;AACA,yBAAyB,iCAAiC,MAAM;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe,UAAU,kBAAkB,GAAG,EAAE;AAClF;AACA;AACA,UAAU,sFAAsF;AAChG;AACA,+BAA+B,gCAAgC,eAAe,UAAU,IAAI,EAAE,0BAA0B,QAAQ,KAAK,EAAE,4BAA4B,EAAE;AACrK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gCAAgC,eAAe,UAAU,IAAI,KAAK,QAAQ,KAAK,OAAO,EAAE;AAC5H,mBAAmB,gCAAgC,eAAe,UAAU,kBAAkB,GAAG,EAAE;AACnG;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,QAAQ,4IAA4I;AACpJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA,qCAAqC;AACrC,EAAE;AACF;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,GAAG,KAAK,GAAG,KAAK,GAAG;AACnB;;AAEA;;AAEA,QAAQ,eAAe;;AAEvB,QAAQ,6BAA6B;AACrC;AACA,GAAG;AACH;AACA,GAAG;AACH,SAAS,IAAI;AACb,eAAe,KAAK,GAAG,KAAK;AAC5B;;AAEA,QAAQ,kCAAkC;AAC1C;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA,QAAQ,0BAA0B;AAClC;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,GAAG;AACH;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sBAAsB;;AAE9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kDAAkD;AAClD,8CAA8C;AAC9C;AACA;AACA,4EAA4E,QAAQ;AACpF;AACA;AACA,UAAU,eAAe,gJAAgJ,QAAQ;AACjL;AACA;AACA;AACA,2FAA2F,QAAQ;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,4BAA4B;AAC5B,iCAAiC;AACjC,6CAA6C;AAC7C,mBAAmB;AACnB,wBAAwB;AACxB,2CAA2C;AAC3C,uBAAuB;AACvB,4BAA4B;AAC5B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB,8BAA8B;AAC9B,iDAAiD;AACjD,6BAA6B;AAC7B,kCAAkC;AAClC,iDAAiD;AACjD,6BAA6B;AAC7B,kCAAkC;AAClC,2DAA2D,uDAAuD;AAClH,uCAAuC,yCAAyC;AAChF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,uBAAuB;AACvB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,EAAE;AACF,wCAAwC,4CAA4C;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,iDAAiD;AACjD,6CAA6C;AAC7C;AACA;AACA,yGAAyG,QAAQ;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,4DAA4D;AAC5D,yCAAyC;AACzC,sDAAsD;AACtD,uCAAuC;AACvC,oDAAoD;AACpD;AACA,yCAAyC;AACzC,sDAAsD;AACtD,6CAA6C;AAC7C,0DAA0D;AAC1D,6CAA6C;AAC7C,0DAA0D;AAC1D,uDAAuD,iEAAiE;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6CAA6C;AAC7C,yCAAyC;AACzC;AACA;AACA,gGAAgG,QAAQ;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,wDAAwD;AACxD,qCAAqC;AACrC,kDAAkD;AAClD,mCAAmC;AACnC,gDAAgD;AAChD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6CAA6C;AAC7C,yCAAyC;AACzC;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,kDAAkD;AAClD,yCAAyC;AACzC,sDAAsD;AACtD,yCAAyC;AACzC,sDAAsD;AACtD,mDAAmD,2DAA2D;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA,2DAA2D,EAAE,IAAI,EAAE;AACnE,gFAAgF,EAAE,IAAI,EAAE;;AAExF;AACA,mBAAmB;AACnB;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+BAA+B,IAAI;AACzD;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,cAAc;AACtB,QAAQ,qBAAqB,4BAA4B,UAAU;AACnE,QAAQ,uBAAuB;AAC/B,QAAQ,gBAAgB;AACxB;AACA;;AAEA;;AAEA,6EAA6E;AAC7E,4EAA4E;;AAE5E;AACA,gEAAgE,QAAQ;AACxE;AACA;AACA;AACA,yKAAyK,QAAQ;AACjL;AACA;;AAEA;AACA,gEAAgE,QAAQ;AACxE;AACA,wHAAwH,QAAQ;AAChI;AACA;;AAEA;AACA,6BAA6B;AAC7B,8BAA8B;AAC9B,gEAAgE,QAAQ;AACxE;AACA,+DAA+D;AAC/D;AACA;AACA;AACA,yKAAyK,QAAQ;AACjL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,QAAQ,iBAAiB;AACzB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB,QAAQ,mBAAmB;AAC3B,QAAQ,iBAAiB;;AAEzB;AACA;AACA;AACA,gDAAgD;AAChD,6BAA6B;AAC7B,gDAAgD;AAChD,6BAA6B;AAC7B;AACA;AACA,gDAAgD;AAChD,6BAA6B;AAC7B;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D,wEAAwE,SAAS,wBAAwB,4BAA4B;AACrI,UAAU,oFAAoF;AAC9F,UAAU,8EAA8E;AACxF;AACA;AACA;AACA;AACA,+BAA+B,SAAS,8BAA8B,OAAO;AAC7E;AACA;AACA;;AAEA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,QAAQ;AACrE;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D,6BAA6B,EAAE;AAC/B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA,qCAAqC,mEAAmE,yCAAyC;AACjJ,oCAAoC;AACpC,cAAc,QAAQ,EAAE;AACxB;AACA;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B,QAAQ,iBAAiB;;AAEzB;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAsH,sCAAsC;AAC5J;AACA;AACA;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,UAAU,SAAS,IAAI,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,IAAI,cAAc;AACxC,2BAA2B;AAC3B,iCAAiC;AACjC,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,aAAa;AACb;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,6BAA6B,IAAI,WAAW;AACrD,UAAU;AACV;AACA,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,IAAI,cAAc;AACxC,2BAA2B;AAC3B,iCAAiC;AACjC,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA,gCAAgC;AAChC,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,QAAQ,mBAAmB;AAC3B;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA,aAAa,eAAe;AAC5B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA,aAAa,eAAe;AAC5B;AACA;AACA;;AAEA,QAAQ,6BAA6B;AACrC,QAAQ,2BAA2B;AACnC,QAAQ,8BAA8B;AACtC;AACA,QAAQ,8BAA8B;AACtC;AACA;AACA;AACA;AACA;AACA,OAAO,gDAAgD;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6CAA6C;AACnD;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,QAAQ,qBAAqB;AAC7B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,aAAa;AACrB;;AAEA;AACA,4DAA4D,MAAM;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,oBAAoB;AACpB,2CAA2C;AAC3C,6CAA6C;AAC7C,+CAA+C,gDAAgD;AAC/F;AACA;AACA,UAAU,WAAW;AACrB,UAAU,iDAAiD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,+BAA+B,aAAa;AAC5C;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kCAAkC;AAClC;AACA;AACA;AACA,YAAY,eAAe,2BAA2B,oCAAoC;AAC1F;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA,kCAAkC;AAClC;AACA,aAAa;AACb;AACA,YAAY;AACZ;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,aAAa;AAC9D;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,oEAAoE;AACpE;AACA,SAAS,wBAAwB;AACjC;AACA;AACA,wBAAwB;AACxB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,QAAQ,kBAAkB;;AAE1B;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,UAAU,UAAU;AACpB;AACA,2CAA2C;AAC3C;AACA,oCAAoC,qCAAqC,QAAQ;AACjF;AACA;AACA;AACA;AACA,SAAS,oCAAoC,QAAQ;AACrD;AACA,UAAU,UAAU;AACpB;AACA,mDAAmD;AACnD;AACA;AACA,sCAAsC,QAAQ;AAC9C,oCAAoC,QAAQ;AAC5C;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA,sEAAsE;AACtE,SAAS,oCAAoC;AAC7C;AACA,UAAU,iEAAiE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA,+BAA+B,sCAAsC,OAAO;AAC5E;AACA;AACA;AACA,mCAAmC,qCAAqC,SAAS,QAAQ;AACzF;AACA;AACA,SAAS,oCAAoC,OAAO,gBAAgB,cAAc;AAClF;AACA,UAAU,IAAI;AACd;AACA,8CAA8C;AAC9C,SAAS,oCAAoC,EAAE;AAC/C;AACA,UAAU,IAAI;AACd;AACA,mCAAmC;AACnC,SAAS,oCAAoC,EAAE;AAC/C;AACA,yBAAyB;AACzB;AACA,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS,oCAAoC,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,iBAAiB;AAC/F,6EAA6E,6DAA6D;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,qEAAqE,+BAA+B;AACpG;AACA,0HAA0H;AAC1H,OAAO;AACP,SAAS;AACT;AACA,iGAAiG;;AAEjG,QAAQ,0BAA0B;AAClC;AACA,mDAAmD;AACnD;;AAEA;;AAEA;AACA;AACA;AACA,6BAA6B,yFAAyF,SAAS;AAC/H,qCAAqC;AACrC;AACA;AACA,yCAAyC;AACzC,WAAW,qBAAqB,KAA2B,GAAG,oEAAO,GAAG,CAAW,GAAG;AACtF;AACA,YAAY,UAAU;AACtB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE,YAAY;AACZ;AACA,yCAAyC;AACzC,uEAAuE;AACvE,WAAW;AACX;AACA;AACA,gCAAgC;AAChC,yCAAyC;AACzC,uEAAuE;AACvE,WAAW;AACX;AACA;AACA;AACA,wCAAwC;AACxC,QAAQ;AACR;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA,CAAC;;AAED;;;;;;;;;;;ACp7FA;AACa;;AAEb,QAAQ,qCAAqC,EAAE,mBAAO,CAAC,6DAAe;;AAEtE,QAAQ,uCAAuC,EAAE,mBAAO,CAAC,6DAAe;;AAExE,kBAAkB,mBAAO,CAAC,2EAAsB;;AAEhD,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,mBAAmB;AACnB,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,qBAAqB;AACrB,wBAAwB;;;;;;;;;;;;ACjBX;;;AAGb,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,mEAAgB;;AAE7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,uEAAkB;;AAE9B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,mBAAmB;AACnB,uHAAsD;;;;;;;;;;;;AC3XzC;;;AAGb,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;;AAE9C;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,uEAAkB;;AAE9B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,qBAAqB;AACrB,uHAAsD;;;;;;;;;;;;AClazC;;;AAGb;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,4BAA4B;AAC5B;AACA;;AAEA,qCAAqC,OAAO;AAC5C;AACA;;AAEA;AACA;;AAEA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC/CA;AACa;;;AAGb;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,sDAAsD,aAAa;;;AAGzE;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA,mCAAmC;;;AAGnC;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;;AAGA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,QAAQ;AAC/B;AACA;AACA,oBAAoB,qBAAqB;;AAEzC;AACA;AACA,qBAAqB,0BAA0B,gBAAgB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,0BAA0B;;AAE/C;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA,0BAA0B;;AAE1B;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,mBAAmB;;AAEnB;AACA;;;;;;;;;;;;AC7Ka;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;AClDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACnEa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,oBAAoB,SAAS;AAC7B;AACA;;AAEA,uBAAuB;AACvB;;;AAGA;;;;;;;;;;;;AC1Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,oEAAoE,EAAE,mBAAO,CAAC,0DAAS;AAC/F,gBAAgB,mBAAO,CAAC,8DAAW;AACnC,gBAAgB,mBAAO,CAAC,0DAAS;AACjC,gBAAgB,mBAAO,CAAC,gEAAY;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,kEAAa;;AAEzB;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,sBAAsB;;AAEtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,qBAAqB;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB,mBAAmB;;AAEnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C,yBAAyB;AACzB,mCAAmC;AACnC,qCAAqC;AACrC,6CAA6C;AAC7C,6CAA6C;AAC7C;AACA;;AAEA,yBAAyB;;AAEzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,uCAAuC;AACvC,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,sCAAsC;AACtC;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;;AAExB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA,0DAA0D;AAC1D;;AAEA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B,2BAA2B;;AAE3B;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;;AAEzB;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;;AAE1B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B,gCAAgC;AAChC,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,4BAA4B;AAC5B,0BAA0B;;AAE1B,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;;AAEA,uBAAuB;;AAEvB;;AAEA;;AAEA,8CAA8C;AAC9C,8CAA8C;AAC9C,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;;AAEhC;AACA;AACA;;AAEA,gCAAgC;AAChC,iDAAiD;AACjD;;AAEA,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B,0BAA0B;;AAE1B,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;;;AAG1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB;;AAEvB,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA,gBAAgB;;AAEhB;AACA;AACA,iCAAiC;AACjC,0BAA0B;AAC1B,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,0BAA0B;AAC1B,2BAA2B;AAC3B,2BAA2B;AAC3B,+BAA+B;AAC/B,+BAA+B;AAC/B,sBAAsB;AACtB,yBAAyB;AACzB,mCAAmC;AACnC,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC//Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;;;AAGA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,IAAI;AACf;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,2CAA2C;AAC3C;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB,uCAAuC;AACvC;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,sBAAsB;AACtB,6CAA6C;AAC7C;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAO,CAAC,8DAAW;AACzC,sBAAsB,mBAAO,CAAC,0DAAS;AACvC,sBAAsB,mBAAO,CAAC,8DAAW;AACzC,sBAAsB,mBAAO,CAAC,gEAAY;;AAE1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,kEAAa;;;AAGzB;AACA;;;AAGA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,4BAA4B;AAC5B,4BAA4B;AAC5B,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;;AAE5B;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;;AAE9B;AACA,gCAAgC;AAChC,gCAAgC;AAChC,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,iCAAiC;;AAEjC,oCAAoC;AACpC,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,iCAAiC;AACjC;AACA;AACA,iBAAiB;AACjB,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;;AAEA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,eAAe;AACf,uCAAuC;;AAEvC;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;;;AAGrB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB,wEAAwE,SAAS;;AAEjF;AACA;AACA,uBAAuB;;AAEvB,wEAAwE,SAAS;;AAEjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,uCAAuC;AACvC;AACA;AACA;AACA;;;AAGA;;AAEA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,oCAAoC;AACpC,gCAAgC;AAChC,oCAAoC;AACpC,8BAA8B;AAC9B,8BAA8B;AAC9B,qCAAqC;AACrC;;AAEA,SAAS;;AAET;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,0BAA0B;;;AAGvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,4BAA4B;AAC5B,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,oEAAoE;AACpE;AACA;AACA;;AAEA,uCAAuC;AACvC;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,oEAAoE;AACpE;AACA;AACA;;AAEA,mCAAmC;AACnC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,oEAAoE;AACpE;AACA;AACA;;AAEA,qCAAqC;AACrC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,cAAc;AACd,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,UAAU;AACV,kCAAkC;AAClC;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA,iCAAiC;AACjC;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,2BAA2B;AAC3B,4BAA4B;AAC5B,+BAA+B;AAC/B,0BAA0B;AAC1B,2BAA2B;AAC3B,sBAAsB;AACtB,yBAAyB;AACzB,+BAA+B;AAC/B,mCAAmC;AACnC,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACniDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B,6BAA6B;AAC7B,6BAA6B;AAC7B,iCAAiC;AACjC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,kCAAkC;AAClC,6BAA6B;AAC7B,6BAA6B;AAC7B,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,wBAAwB;AACxB,uBAAuB;AACvB,qBAAqB;AACrB,8BAA8B;AAC9B,8CAA8C,kBAAkB;AAChE,6CAA6C,mBAAmB;AAChE;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;;AAEA;AACA;AACA,sBAAsB,UAAU;AAChC,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,uCAAuC;AACvC,wCAAwC,6BAA6B;AACrE,0CAA0C;AAC1C,2CAA2C;AAC3C;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA,gBAAgB,WAAW;AAC3B,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;;AAEA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA,IAAI,0BAA0B;AAC9B;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,mCAAmC;AACnC,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,6BAA6B;AAC7B,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;;;ACnVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Ba;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;;AAGA,qBAAqB,sBAAsB,qBAAqB;;AAEhE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;;AAEpC;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;;;;AAIA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;;AAEtB,iBAAiB,kBAAkB;AACnC;AACA;;AAEA;AACA;AACA;AACA,gDAAgD;;AAEhD,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,YAAY;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA,qCAAqC;AACrC,6BAA6B;AAC7B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,0BAA0B,YAAY;AACtC;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;;AAEjC,6CAA6C;AAC7C,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,WAAW;AAC5B;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS,gBAAgB;AACzB;AACA,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,SAAS;;AAET;AACA,cAAc,cAAc,OAAO;AACnC,cAAc,cAAc,OAAO;AACnC,cAAc,cAAc,OAAO;;AAEnC;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B;;AAE5B,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,QAAQ;AACR;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,yCAAyC;AACzC;AACA,gBAAgB;AAChB;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;AACA,uCAAuC;AACvC;AACA,QAAQ;;AAER;AACA;;AAEA,MAAM;AACN;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,WAAW;AACzB;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,QAAQ,OAAO;;AAEvD;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;;AAE/B,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;;AAEJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,uBAAuB;;AAEvB,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,yCAAyC;;AAEzC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD,cAAc,eAAe;AAC7B;AACA;;AAEA;AACA;;AAEA,MAAM;AACN;;AAEA,MAAM;;AAEN,gCAAgC;AAChC;;AAEA,MAAM;AACN;;AAEA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,0BAA0B;;AAE1B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,yCAAyC;;AAEzC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B;AACA;;AAEA;AACA;;AAEA,MAAM;AACN,WAAW,mCAAmC;;AAE9C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,iCAAiC;AACjC,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;;AAEA,yCAAyC;AACzC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,IAAI,MAAM,GAAG,MAAM,GAAG;AAChD;AACA;AACA;AACA,SAAS,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,IAAI;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB,4DAA4D;AAC5D,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC;;AAEnC,IAAI;AACJ;AACA,6CAA6C;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI;;AAEJ;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB,+BAA+B;AAC/B,8BAA8B;AAC9B,wBAAwB;AACxB,wBAAwB;;;;;;;;;;;;AC1pCX;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;AC9CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA,+CAA+C,SAAS,YAAY,WAAW,IAAI,eAAe;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO,GAAG,kBAAkB;AACpD,OAAO;AACP,KAAK;AACL;AACA,6CAA6C,SAAS,YAAY,YAAY,UAAU,QAAQ,QAAQ,KAAK,IAAI,eAAe;AAChI;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,4DAA4D,mBAAmB;AAC/E;AACA;AACA,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,yBAAyB,WAAW;AACpC;AACA,2CAA2C;AAC3C,kBAAkB,iBAAiB,iBAAiB,gBAAgB;AACpE;AACA;AACA;AACA,wCAAwC;AACxC,gBAAgB,MAAM,SAAS,eAAe;AAC9C;AACA,gBAAgB,SAAS,QAAQ,gCAAgC,gCAAgC,qBAAqB,eAAe;AACrI;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,uDAAuD;AACvD,uDAAuD;AACvD;AACA,wEAAwE,wBAAwB;AAChG;AACA;AACA;AACA,wEAAwE,wBAAwB;AAChG;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,wBAAwB;AACxB,uBAAuB;AACvB,wBAAwB;AACxB;AACA;AACA,kBAAkB,4BAA4B,kDAAkD;AAChG;AACA;AACA,8CAA8C;AAC9C;AACA,yEAAyE;AACzE;AACA;AACA,mCAAmC,kCAAkC,cAAc;AACnF,+DAA+D;AAC/D,kDAAkD;AAClD;AACA,sBAAsB,4BAA4B,0BAA0B,0BAA0B;AACtG;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kDAAkD;AAClD,gBAAgB,MAAM,SAAS,iBAAiB,qBAAqB,qBAAqB;AAC1F;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA,qCAAqC;AACrC;AACA;AACA,qCAAqC;AACrC;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB,iBAAiB,mBAAmB,eAAe;AACvF,iBAAiB,iBAAiB,mBAAmB;AACrD;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;AACA,6BAA6B,aAAa,aAAa;AACvD,UAAU,YAAY;AACtB;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAc,eAAe,SAAS,2CAA2C;AACjF;;AAEA,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA,EAAE;AACF,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,cAAc,MAAM,QAAQ,mCAAmC;AAC/D;AACA,2BAA2B,8BAA8B,8BAA8B;AACvF;AACA;AACA,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB,sBAAsB;AACpE;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA,CAAC;;AAED;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,gBAAgB,OAAO;AACvB;AACA,EAAE;AACF,2BAA2B;AAC3B;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,qBAAqB;AACnC,SAAS;AACT,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,wCAAwC,aAAa;AACrD;AACA,+CAA+C,IAAI;AACnD;AACA;AACA,sDAAsD,+BAA+B;AACrF;AACA,mCAAmC;AACnC;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS,WAAW;AACnE;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE,mDAAmD,oBAAoB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2DAA2D;AAC3F;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B,uCAAuC;AACvC,0CAA0C;;AAE1C;AACA,oCAAoC;AACpC,mCAAmC;AACnC,kCAAkC;;AAElC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sFAAsF,iEAAiE,EAAE;AACzJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mFAAmF,WAAW;AAC9F;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,sBAAsB,YAAY,cAAc;AAC3G;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA,4EAA4E,uBAAuB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,yBAAyB,KAAK,uBAAuB;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D,uBAAuB;AACrF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,uDAAuD,2BAA2B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,eAAe,KAAK,0BAA0B,IAAI,YAAY;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,2BAA2B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,2BAA2B;AACpC;AACA;AACA;AACA;AACA;AACA,2HAA2H,KAAK;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,6CAA6C,OAAO,YAAY,WAAW,IAAI,eAAe;AAC9F;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA,6CAA6C,YAAY;AACzD;;AAEA;AACA;;AAEA;AACA;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE8F;;;;;;;;;;;;AClqC9F;AACA;AACA;AACA,QAAQ,2BAA2B,EAAE,mBAAO,CAAC,kBAAM;;AAEnD,mDAAmD,8BAA8B;;AAEjF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,WAAW,cAAc;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B,YAAY;AACzC;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,YAAY,IAAI,UAAU;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,kBAAkB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA,QAAQ,kBAAkB;AAC1B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA,QAAQ,kBAAkB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC,iDAAiD;AACjD;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;;AAEA,0CAA0C;AAC1C;AACA;;AAEA,0CAA0C;AAC1C;AACA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;;AAEA,2CAA2C,gBAAgB;AAC3D;AACA;AACA,CAA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","sources":["webpack://@noir-lang/noir_wasm/../../node_modules/@ltd/j-toml/ sync","webpack://@noir-lang/noir_wasm/../../node_modules/@ltd/j-toml/index.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/index.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/deflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/inflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/utils/common.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/utils/strings.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/adler32.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/constants.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/crc32.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/deflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/gzheader.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inffast.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inftrees.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/messages.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/trees.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/zstream.js","webpack://@noir-lang/noir_wasm/../../node_modules/unzipit/dist/unzipit.module.js","webpack://@noir-lang/noir_wasm/./build/cjs/index.js","webpack://@noir-lang/noir_wasm/./src/noir/debug.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/dependency-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/github-dependency-resolver.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/local-dependency-resolver.ts","webpack://@noir-lang/noir_wasm/./src/noir/file-manager/file-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/file-manager/nodejs-file-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/noir-wasm-compiler.ts","webpack://@noir-lang/noir_wasm/./src/noir/package.ts","webpack://@noir-lang/noir_wasm/./src/types/noir_package_config.ts","webpack://@noir-lang/noir_wasm/external node-commonjs \"fs\"","webpack://@noir-lang/noir_wasm/external node-commonjs \"path\"","webpack://@noir-lang/noir_wasm/external node-commonjs \"util\"","webpack://@noir-lang/noir_wasm/webpack/bootstrap","webpack://@noir-lang/noir_wasm/webpack/runtime/define property getters","webpack://@noir-lang/noir_wasm/webpack/runtime/harmony module decorator","webpack://@noir-lang/noir_wasm/webpack/runtime/hasOwnProperty shorthand","webpack://@noir-lang/noir_wasm/webpack/runtime/make namespace object","webpack://@noir-lang/noir_wasm/./src/index.cts"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = \"../../node_modules/@ltd/j-toml sync recursive\";\nmodule.exports = webpackEmptyContext;","(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof define === 'function' && define.amd ? define(factory) :\n(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TOML = factory());\n})(this, (function () { 'use strict';\n\nconst version = '1.38.0';\n\nconst SyntaxError$1 = SyntaxError;\n\nconst RangeError$1 = RangeError;\n\nconst TypeError$1 = TypeError;\n\nconst Error$1 = {if:Error}.if;\n\nconst undefined$1 = void null;\n\nconst BigInt$1 = typeof BigInt==='undefined' ? undefined$1 : BigInt;\n\nconst RegExp$1 = RegExp;\n\nconst WeakMap$1 = WeakMap;\n\nconst get = WeakMap.prototype.get;\n\nconst set = WeakMap.prototype.set;\n\nconst create$1 = Object.create;\n\nconst isSafeInteger = Number.isSafeInteger;\n\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\n\nconst freeze = Object.freeze;\n\nconst isPrototypeOf = Object.prototype.isPrototypeOf;\n\nconst NULL = (\n\t/* j-globals: null.prototype (internal) */\n\tObject.seal\n\t\t? /*#__PURE__*/Object.preventExtensions(Object.create(null))\n\t\t: null\n\t/* j-globals: null.prototype (internal) */\n);\n\nconst bind = Function.prototype.bind;\n\nconst test = RegExp.prototype.test;\n\nconst exec = RegExp.prototype.exec;\n\nconst apply$1 = Reflect.apply;\n\nconst Proxy$1 = Proxy;\n\nconst toStringTag = typeof Symbol==='undefined' ? undefined$1 : Symbol.toStringTag;\n\nconst Object_defineProperty = Object.defineProperty;\n\nconst assign$1 = Object.assign;\n\nconst Object$1 = Object;\n\nconst floor = Math.floor;\n\nconst isArray$1 = Array.isArray;\n\nconst Infinity = 1/0;\n\nconst fromCharCode = String.fromCharCode;\n\nconst Array$1 = Array;\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst propertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nconst apply = Function.prototype.apply;\n\nvar isEnum = /*#__PURE__*/propertyIsEnumerable.call.bind(propertyIsEnumerable);\nvar hasOwn = (\n\t/* j-globals: Object.hasOwn (polyfill) */\n\tObject$1.hasOwn || /*#__PURE__*/function () {\n\t\treturn hasOwnProperty.bind\n\t\t\t? hasOwnProperty.call.bind(hasOwnProperty)\n\t\t\t: function hasOwn (object, key) { return hasOwnProperty.call(object, key); };\n\t}()\n\t/* j-globals: Object.hasOwn (polyfill) */\n);\n\nvar create = Object$1.create;\nfunction Descriptor (source) {\n\tvar target = create(NULL);\n\tif ( hasOwn(source, 'value') ) { target.value = source.value; }\n\tif ( hasOwn(source, 'writable') ) { target.writable = source.writable; }\n\tif ( hasOwn(source, 'get') ) { target.get = source.get; }\n\tif ( hasOwn(source, 'set') ) { target.set = source.set; }\n\tif ( hasOwn(source, 'enumerable') ) { target.enumerable = source.enumerable; }\n\tif ( hasOwn(source, 'configurable') ) { target.configurable = source.configurable; }\n\treturn target;\n}\n\nconst Default = (\n\t/* j-globals: default (internal) */\n\tfunction Default (exports, addOnOrigin) {\n\t\tif ( !addOnOrigin && typeof exports!=='function' ) {\n\t\t\taddOnOrigin = exports;\n\t\t\texports = create$1(NULL);\n\t\t}\n\t\tif ( assign$1 ) { assign$1(exports, addOnOrigin); }\n\t\telse { for ( var key in addOnOrigin ) { if ( hasOwn(addOnOrigin, key) ) { exports[key] = addOnOrigin[key]; } } }\n\t\texports.default = exports;\n\t\tif ( typeof exports==='function' ) { exports.prototype && freeze(exports.prototype); }\n\t\telse if ( toStringTag ) {\n\t\t\tvar descriptor = create$1(NULL);\n\t\t\tdescriptor.value = 'Module';\n\t\t\tObject_defineProperty(exports, toStringTag, descriptor);\n\t\t}\n\t\treturn freeze(exports);\n\t}\n\t/* j-globals: default (internal) */\n);\n\n/*!@preserve@license\n * 模块名称:j-regexp\n * 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。\n More readable way for creating RegExp. Belong to \"Plan J\".\n * 模块版本:8.2.0\n * 许可条款:LGPL-3.0\n * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)\n * 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues\n * 项目主页:https://GitHub.com/LongTengDao/j-regexp/\n */\n\nvar Test = bind\n\t? /*#__PURE__*/bind.bind(test ) \n\t: function (re) {\n\t\treturn function (string) {\n\t\t\treturn test.call(re, string);\n\t\t};\n\t};\n\nvar Exec = bind\n\t? /*#__PURE__*/bind.bind(exec ) \n\t: function (re) {\n\t\treturn function (string) {\n\t\t\treturn exec.call(re, string);\n\t\t};\n\t};\n\nfunction __PURE__ (re ) {\n\tvar test = re.test = Test(re);\n\tvar exec = re.exec = Exec(re);\n\tvar source = test.source = exec.source = re.source;\n\ttest.unicode = exec.unicode = re.unicode;\n\ttest.ignoreCase = exec.ignoreCase = re.ignoreCase;\n\ttest.multiline = exec.multiline = source.indexOf('^')<0 && source.indexOf('$')<0 ? null : re.multiline;\n\ttest.dotAll = exec.dotAll = source.indexOf('.')<0 ? null : re.dotAll;\n\treturn re;\n}\nfunction theRegExp (re ) { return /*#__PURE__*/__PURE__(re); }\n\nvar NT = /[\\n\\t]+/g;\nvar ESCAPE = /\\\\./g;\nfunction graveAccentReplacer ($$ ) { return $$==='\\\\`' ? '`' : $$; }\n\nvar includes = ''.includes \n\t? function (that , searchString ) { return that.includes(searchString); }\n\t: function (that , searchString ) { return that.indexOf(searchString)>-1; };\n\nfunction RE ( template ) {\n\tvar U = this.U;\n\tvar I = this.I;\n\tvar M = this.M;\n\tvar S = this.S;\n\tvar raw = template.raw;\n\tvar source = raw[0] .replace(NT, '');\n\tvar index = 1;\n\tvar length = arguments.length;\n\twhile ( index!==length ) {\n\t\tvar value \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t = arguments[index];\n\t\tif ( typeof value==='string' ) { source += value; }\n\t\telse {\n\t\t\tvar value_source = value.source;\n\t\t\tif ( typeof value_source!=='string' ) { throw TypeError$1('source'); }\n\t\t\tif ( value.unicode===U ) { throw SyntaxError$1('unicode'); }\n\t\t\tif ( value.ignoreCase===I ) { throw SyntaxError$1('ignoreCase'); }\n\t\t\tif ( value.multiline===M && ( includes(value_source, '^') || includes(value_source, '$') ) ) { throw SyntaxError$1('multiline'); }\n\t\t\tif ( value.dotAll===S && includes(value_source, '.') ) { throw SyntaxError$1('dotAll'); }\n\t\t\tsource += value_source;\n\t\t}\n\t\tsource += raw[index++] .replace(NT, '');\n\t}\n\tvar re = RegExp$1(U ? source = source.replace(ESCAPE, graveAccentReplacer) : source, this.flags);\n\tvar test = re.test = Test(re);\n\tvar exec = re.exec = Exec(re);\n\ttest.source = exec.source = source;\n\ttest.unicode = exec.unicode = !U;\n\ttest.ignoreCase = exec.ignoreCase = !I;\n\ttest.multiline = exec.multiline = includes(source, '^') || includes(source, '$') ? !M : null;\n\ttest.dotAll = exec.dotAll = includes(source, '.') ? !S : null;\n\treturn re;\n}\n\nvar RE_bind = bind && /*#__PURE__*/bind.bind(RE );\n\nfunction Context (flags ) {\n\treturn {\n\t\tU: !includes(flags, 'u'),\n\t\tI: !includes(flags, 'i'),\n\t\tM: !includes(flags, 'm'),\n\t\tS: !includes(flags, 's'),\n\t\tflags: flags\n\t};\n}\n\nvar CONTEXT = /*#__PURE__*/Context('');\n\nvar newRegExp = Proxy$1\n\t? /*#__PURE__*/new Proxy$1(RE, {\n\t\tapply: function (RE, thisArg, args ) { return apply$1(RE, CONTEXT, args); }\n\t\t,\n\t\tget: function (RE, flags ) { return RE_bind(Context(flags)); }\n\t\t,\n\t\tdefineProperty: function () { return false; }\n\t\t,\n\t\tpreventExtensions: function () { return false; }\n\t})\n\t: /*#__PURE__*/function () {\n\t\tRE.apply = RE.apply;\n\t\tvar newRegExp = function () { return RE.apply(CONTEXT, arguments ); } ;\n\t\tvar d = 1;\n\t\tvar g = d*2;\n\t\tvar i = g*2;\n\t\tvar m = i*2;\n\t\tvar s = i*2;\n\t\tvar u = s*2;\n\t\tvar y = u*2;\n\t\tvar flags = y*2 - 1;\n\t\twhile ( flags-- ) {\n\t\t\t( function (context) {\n\t\t\t\tnewRegExp[context.flags] = function () { return RE.apply(context, arguments ); };\n\t\t\t} )(Context(\n\t\t\t\t( flags & d ? '' : 'd' )\n\t\t\t\t+\n\t\t\t\t( flags & g ? '' : 'g' )\n\t\t\t\t+\n\t\t\t\t( flags & i ? '' : 'i' )\n\t\t\t\t+\n\t\t\t\t( flags & m ? '' : 'm' )\n\t\t\t\t+\n\t\t\t\t( flags & s ? '' : 's' )\n\t\t\t\t+\n\t\t\t\t( flags & u ? '' : 'u' )\n\t\t\t\t+\n\t\t\t\t( flags & y ? '' : 'y' )\n\t\t\t));\n\t\t}\n\t\treturn freeze ? freeze(newRegExp) : newRegExp;\n\t}();\n\nvar clearRegExp = '$_' in RegExp$1\n\t? /*#__PURE__*/function () {\n\t\tvar REGEXP = /^/;\n\t\tREGEXP.test = REGEXP.test;\n\t\treturn function clearRegExp (value ) {\n\t\t\tREGEXP.test('');\n\t\t\treturn value;\n\t\t};\n\t}()\n\t: function clearRegExp (value ) {\n\t\treturn value;\n\t};\n\nvar clearRegExp$1 = clearRegExp;\n\nvar NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\\-.?[\\\\\\]^{|]/;\nvar SURROGATE_PAIR = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;\nvar GROUP = /*#__PURE__*/create$1(NULL) ;\n\nfunction groupify (branches , uFlag , noEscape ) {\n\tvar group = create$1(NULL) ;\n\tvar appendBranch = uFlag ? appendPointBranch : appendCodeBranch;\n\tfor ( var length = branches.length, index = 0; index<length; ++index ) { appendBranch(group, branches[index] ); }\n\treturn sourcify(group, !noEscape);\n}\nfunction appendPointBranch (group , branch ) {\n\tif ( branch ) {\n\t\tvar character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0);\n\t\tappendPointBranch(group[character] || ( group[character] = create$1(NULL) ), branch.slice(character.length));\n\t}\n\telse { group[''] = GROUP; }\n}\n\nfunction appendCodeBranch (group , branch ) {\n\tif ( branch ) {\n\t\tvar character = branch.charAt(0);\n\t\tappendCodeBranch(group[character] || ( group[character] = create$1(NULL) ), branch.slice(1));\n\t}\n\telse { group[''] = GROUP; }\n}\n\nfunction sourcify (group , needEscape ) {\n\tvar branches = [];\n\tvar singleCharactersBranch = [];\n\tvar noEmptyBranch = true;\n\tfor ( var character in group ) {\n\t\tif ( character ) {\n\t\t\tvar sub_branches = sourcify(group[character] , needEscape);\n\t\t\tif ( needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character) ) { character = '\\\\' + character; }\n\t\t\tsub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character);\n\t\t}\n\t\telse { noEmptyBranch = false; }\n\t}\n\tsingleCharactersBranch.length && branches.unshift(singleCharactersBranch.length===1 ? singleCharactersBranch[0] : '[' + singleCharactersBranch.join('') + ']');\n\treturn branches.length===0\n\t\t? ''\n\t\t: ( branches.length===1 && ( singleCharactersBranch.length || noEmptyBranch )\n\t\t\t? branches[0]\n\t\t\t: '(?:' + branches.join('|') + ')'\n\t\t)\n\t\t+ ( noEmptyBranch ? '' : '?' );\n}\n\n/*¡ j-regexp */\n\nconst WeakSet$1 = WeakSet;\n\nconst has = WeakSet.prototype.has;\n\nconst add = WeakSet.prototype.add;\n\nconst del = WeakSet.prototype['delete'];\n\nconst keys = Object.keys;\n\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nconst Null$1 = (\n\t/* j-globals: null (internal) */\n\t/*#__PURE__*/function () {\n\t\tvar assign = Object.assign || function assign (target, source) {\n\t\t\tvar keys$1, index, key;\n\t\t\tfor ( keys$1 = keys(source), index = 0; index<keys$1.length;++index ) {\n\t\t\t\tkey = keys$1[index];\n\t\t\t\ttarget[key] = source[key];\n\t\t\t}\n\t\t\tif ( getOwnPropertySymbols ) {\n\t\t\t\tfor ( keys$1 = getOwnPropertySymbols(source), index = 0; index<keys$1.length;++index ) {\n\t\t\t\t\tkey = keys$1[index];\n\t\t\t\t\tif ( isEnum(source, key) ) { target[key] = source[key]; }\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t};\n\t\tfunction Nullify (constructor) {\n\t\t\tdelete constructor.prototype.constructor;\n\t\t\tfreeze(constructor.prototype);\n\t\t\treturn constructor;\n\t\t}\n\t\tfunction Null (origin) {\n\t\t\treturn origin===undefined$1\n\t\t\t\t? this\n\t\t\t\t: typeof origin==='function'\n\t\t\t\t\t? /*#__PURE__*/Nullify(origin)\n\t\t\t\t\t: /*#__PURE__*/assign(/*#__PURE__*/create(NULL), origin);\n\t\t}\n\t\tdelete Null.name;\n\t\t//try { delete Null.length; } catch (error) {}\n\t\tNull.prototype = null;\n\t\tfreeze(Null);\n\t\treturn Null;\n\t}()\n\t/* j-globals: null (internal) */\n);\n\nconst is = Object.is;\n\nconst Object_defineProperties = Object.defineProperties;\n\nconst fromEntries = Object.fromEntries;\n\nconst Reflect_construct = Reflect.construct;\n\nconst Reflect_defineProperty = Reflect.defineProperty;\n\nconst Reflect_deleteProperty = Reflect.deleteProperty;\n\nconst ownKeys = Reflect.ownKeys;\n\n/*!@preserve@license\n * 模块名称:j-orderify\n * 模块功能:返回一个能保证给定对象的属性按此后添加顺序排列的 proxy,即使键名是 symbol,或整数 string。从属于“简计划”。\n Return a proxy for given object, which can guarantee own keys are in setting order, even if the key name is symbol or int string. Belong to \"Plan J\".\n * 模块版本:7.0.1\n * 许可条款:LGPL-3.0\n * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)\n * 问题反馈:https://GitHub.com/LongTengDao/j-orderify/issues\n * 项目主页:https://GitHub.com/LongTengDao/j-orderify/\n */\n\nconst Keeper = () => [];\n\nconst newWeakMap = () => {\n\tconst weakMap = new WeakMap$1;\n\tweakMap.has = weakMap.has;\n\tweakMap.get = weakMap.get;\n\tweakMap.set = weakMap.set;\n\treturn weakMap;\n};\nconst target2keeper = /*#__PURE__*/newWeakMap() \n\t \n\t \n ;\nconst proxy2target = /*#__PURE__*/newWeakMap() \n\t \n\t \n\t \n ;\nconst target2proxy = /*#__PURE__*/newWeakMap() \n\t \n\t \n ;\n\nconst handlers = /*#__PURE__*/assign$1(create$1(NULL), {\n\tdefineProperty: (target , key , descriptor ) => {\n\t\tif ( hasOwn(target, key) ) {\n\t\t\treturn Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor));\n\t\t}\n\t\tif ( Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor)) ) {\n\t\t\tconst keeper = target2keeper.get(target) ;\n\t\t\tkeeper[keeper.length] = key;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\tdeleteProperty: (target , key ) => {\n\t\tif ( Reflect_deleteProperty(target, key) ) {\n\t\t\tconst keeper = target2keeper.get(target) ;\n\t\t\tconst index = keeper.indexOf(key);\n\t\t\tindex<0 || --keeper.copyWithin(index, index + 1).length;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\townKeys: (target ) => target2keeper.get(target) ,\n\tconstruct: (target , args , newTarget ) => orderify(Reflect_construct(target, args, newTarget)),\n\tapply: (target , thisArg , args ) => orderify(apply$1(target, thisArg, args)),\n});\n\nconst newProxy = (target , keeper ) => {\n\ttarget2keeper.set(target, keeper);\n\tconst proxy = new Proxy$1 (target, handlers);\n\tproxy2target.set(proxy, target);\n\treturn proxy;\n};\n\nconst orderify = (object ) => {\n\tif ( proxy2target.has(object) ) { return object; }\n\tlet proxy = target2proxy.get(object) ;\n\tif ( proxy ) { return proxy; }\n\tproxy = newProxy(object, assign$1(Keeper (), ownKeys(object)));\n\ttarget2proxy.set(object, proxy);\n\treturn proxy;\n};\n\nconst Null = /*#__PURE__*/function () {\n\tfunction throwConstructing () { throw TypeError$1(`Super constructor Null cannot be invoked with 'new'`); }\n\tfunction throwApplying () { throw TypeError$1(`Super constructor Null cannot be invoked without 'new'`); }\n\tconst Nullify = (constructor ) => {\n\t\tdelete constructor.prototype.constructor;\n\t\tfreeze(constructor.prototype);\n\t\treturn constructor;\n\t};\n\tfunction Null ( constructor ) {\n\t\treturn new.target\n\t\t\t? new.target===Null\n\t\t\t\t? /*#__PURE__*/throwConstructing()\n\t\t\t\t: /*#__PURE__*/newProxy(this, Keeper ())\n\t\t\t: typeof constructor==='function'\n\t\t\t\t? /*#__PURE__*/Nullify(constructor)\n\t\t\t\t: /*#__PURE__*/throwApplying();\n\t}\n\t//@ts-ignore\n\tNull.prototype = null;\n\tObject_defineProperty(Null, 'name', assign$1(create$1(NULL), { value: '', configurable: false }));\n\t//delete Null.length;\n\tfreeze(Null);\n\treturn Null;\n}() ;\n\n/*¡ j-orderify */\n\nconst map_has = WeakMap.prototype.has;\n\nconst map_del = WeakMap.prototype['delete'];\n\nconst INLINES = new WeakMap$1 ();\nconst SECTIONS = new WeakSet$1 ();\n\nconst deInline = /*#__PURE__*/map_del.bind(INLINES) ;\nconst deSection = /*#__PURE__*/del.bind(SECTIONS) ;\n\nconst isInline = /*#__PURE__*/map_has.bind(INLINES) ;\nconst ofInline = /*#__PURE__*/get.bind(INLINES) \n\t \n\t \n\t \n ;\nconst beInline = /*#__PURE__*/set.bind(INLINES) \n\t \n\t \n ;\nconst inline = (value , mode , looping ) => {\n\tif ( isArray$1(value) ) {\n\t\tif ( looping ) { mode = 3; }\n\t\telse {\n\t\t\tif ( mode===undefined$1 ) { mode = 3; }\n\t\t\telse if ( mode!==0 && mode!==1 && mode!==2 && mode!==3 ) {\n\t\t\t\tthrow typeof mode==='number'\n\t\t\t\t\t? RangeError$1(`array inline mode must be 0 | 1 | 2 | 3, not including ${mode}`)\n\t\t\t\t\t: TypeError$1(`array inline mode must be \"number\" type, not including ${mode===null ? '\"null\"' : typeof mode}`);\n\t\t\t}\n\t\t}\n\t\tbeInline(value, mode);\n\t}\n\telse {\n\t\tbeInline(value, true);\n\t\tdeSection(value);\n\t}\n\treturn value;\n};\nconst multilineTable = (value ) => {\n\tbeInline(value, false);\n\tdeSection(value);\n\treturn value;\n};\nconst multilineArray = (value ) => {\n\tdeInline(value);\n\treturn value;\n};\n\nconst isSection = /*#__PURE__*/has.bind(SECTIONS) ;\nconst beSection = /*#__PURE__*/add.bind(SECTIONS) ;\nconst Section = (table ) => {\n\tif ( isArray$1(table) ) { throw TypeError$1(`array can not be section, maybe you want to use it on the tables in it`); }\n\tbeSection(table);\n\tdeInline(table);\n\treturn table;\n};\n\nconst INLINE = true;\n\nconst tables = new WeakSet$1 ();\nconst tables_add = /*#__PURE__*/add.bind(tables);\nconst isTable = /*#__PURE__*/has.bind(tables) ;\n\nconst implicitTables = new WeakSet$1 ();\nconst implicitTables_add = /*#__PURE__*/add.bind(implicitTables);\nconst implicitTables_del = /*#__PURE__*/del.bind(implicitTables) ;\nconst directlyIfNot = (table ) => {\n\tif ( implicitTables_del(table) ) {\n\t\tbeSection(table);\n\t\treturn true;\n\t}\n\treturn false;\n};\nconst DIRECTLY = true;\nconst IMPLICITLY = false;\n\nconst pairs = new WeakSet$1 ();\nconst pairs_add = /*#__PURE__*/add.bind(pairs);\nconst fromPair = /*#__PURE__*/has.bind(pairs) ;\nconst PAIR = true;\n\nconst PlainTable = /*#__PURE__*/Null$1(class Table extends Null$1 {\n\t \n\tconstructor (isDirect , isInline$fromPair ) {\n\t\tsuper();\n\t\ttables_add(this);\n\t\tisDirect\n\t\t\t? isInline$fromPair ? beInline(this, true) : beSection(this)\n\t\t\t: ( isInline$fromPair ? pairs_add : implicitTables_add )(this);\n\t\treturn this;\n\t}\n});\n\nconst OrderedTable = /*#__PURE__*/Null$1(class Table extends Null {\n\t \n\tconstructor (isDirect , isInline$fromPair ) {\n\t\tsuper();\n\t\ttables_add(this);\n\t\tisDirect\n\t\t\t? isInline$fromPair ? beInline(this, true) : beSection(this)\n\t\t\t: ( isInline$fromPair ? pairs_add : implicitTables_add )(this);\n\t\treturn this;\n\t}\n});\n\n//import * as options from './options';\n\nconst NONE = [];\nlet sourcePath = '';\nlet sourceLines = NONE;\nlet lastLineIndex = -1;\nlet lineIndex = -1;\n\nconst throws = (error ) => {\n\t//if ( sourceLines!==NONE ) { done(); options.clear(); }\n\tthrow error;\n};\n\nconst EOL = /\\r?\\n/;\nconst todo = (source , path ) => {\n\tif ( typeof path!=='string' ) { throw TypeError$1(`TOML.parse({ path })`); }\n\tsourcePath = path;\n\tsourceLines = source.split(EOL);\n\tlastLineIndex = sourceLines.length - 1;\n\tlineIndex = -1;\n};\n\nconst next = () => sourceLines[++lineIndex] ;\n\nconst rest = () => lineIndex!==lastLineIndex;\n\nclass mark {\n\t lineIndex = lineIndex;\n\t type ;\n\t restColumn ;\n\tconstructor (type , restColumn ) {\n\t\tthis.type = type;\n\t\tthis.restColumn = restColumn;\n\t\treturn this;\n\t}\n\tmust ( ) {\n\t\tlineIndex===lastLineIndex && throws(SyntaxError$1(`${this.type} is not close until the end of the file` + where(', which started from ', this.lineIndex, sourceLines[this.lineIndex] .length - this.restColumn + 1)));\n\t\treturn sourceLines[++lineIndex] ;\n\t}\n\tnowrap ( argsMode ) {\n\t\tthrow throws(Error$1(`TOML.parse(${argsMode ? `${argsMode}multilineStringJoiner` : `,{ joiner }`}) must be passed, while the source including multi-line string` + where(', which started from ', this.lineIndex, sourceLines[this.lineIndex] .length - this.restColumn + 1)));\n\t}\n}\nconst where = (pre , rowIndex = lineIndex, columnNumber = 0) => sourceLines===NONE ? '' :\n\tsourcePath\n\t\t? `\\n at (${sourcePath}:${rowIndex + 1}:${columnNumber})`\n\t\t: `${pre}line ${rowIndex + 1}: ${sourceLines[rowIndex]}`;\n\nconst done = () => {\n\tsourcePath = '';\n\tsourceLines = NONE;\n};\n\n/* nested (readable) */\n\nconst Whitespace = /[ \\t]/;\n\nconst PRE_WHITESPACE = /*#__PURE__*/newRegExp`\n\t^${Whitespace}+`.valueOf();\n\nconst { exec: VALUE_REST_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(\n\t\t(?:\\d\\d\\d\\d-\\d\\d-\\d\\d \\d)?\n\t\t[\\w\\-+.:]+\n\t)\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: LITERAL_STRING_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t'([^']*)'\n\t${Whitespace}*\n\t(.*)`.valueOf();\n\nconst { exec: MULTI_LINE_LITERAL_STRING_0_1_2 } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(.*?)\n\t'''('{0,2})\n\t${Whitespace}*\n\t(.*)`.valueOf();\nconst { exec: MULTI_LINE_LITERAL_STRING_0 } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(.*?)\n\t'''()\n\t${Whitespace}*\n\t(.*)`.valueOf();\nlet __MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\nconst SYM_WHITESPACE = /*#__PURE__*/newRegExp.s`\n\t^\n\t.\n\t${Whitespace}*`.valueOf();\n\n\nconst Tag = /[^\\x00-\\x1F\"#'()<>[\\\\\\]`{}\\x7F]+/;\n\nconst { exec: KEY_VALUE_PAIR_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t${Whitespace}*\n\t=\n\t${Whitespace}*\n\t(?:\n\t\t<(${Tag})>\n\t\t${Whitespace}*\n\t)?\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: _VALUE_PAIR_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t<(${Tag})>\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: TAG_REST_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t<(${Tag})>\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\n/* optimized (avoid overflow or lost) */\n\nconst MULTI_LINE_BASIC_STRING = theRegExp(/[^\\\\\"]+|\\\\.?|\"(?!\"\")\"?/sy);\nconst MULTI_LINE_BASIC_STRING_exec_0_length = (_ ) => {\n\tlet lastIndex = /*MULTI_LINE_BASIC_STRING.lastIndex = */0;\n\twhile ( MULTI_LINE_BASIC_STRING.test(_) ) { lastIndex = MULTI_LINE_BASIC_STRING.lastIndex; }\n\treturn lastIndex;\n};\n\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______ = /[^\\\\\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER__________ = /[^\\\\\\x00-\\x09\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// Tab\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL______ = /[^\\\\\\x00-\\x09\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// Tab \\<ws>newline\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL_SLASH = /[^\\\\\\x00-\\x09\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\/]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// not \\<ws>newline\nlet __ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______;\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_test = (_ ) => !_.replace(__ESCAPED_EXCLUDE_CONTROL_CHARACTER, '');/// op?\n\nconst BASIC_STRING_TAB______ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);\nconst BASIC_STRING__________ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nconst BASIC_STRING_DEL______ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nconst BASIC_STRING_DEL_SLASH = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\/]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nlet __BASIC_STRING = BASIC_STRING_DEL_SLASH;\nconst BASIC_STRING_exec_1_endIndex = (line ) => {\n\tlet lastIndex = __BASIC_STRING.lastIndex = 1;\n\twhile ( __BASIC_STRING.test(line) ) { lastIndex = __BASIC_STRING.lastIndex; }\n\tlastIndex!==line.length && line[lastIndex]==='\"' || throws(SyntaxError$1(`Bad basic string` + where(' at ')));\n\treturn lastIndex;\n};\n\nconst { test: IS_DOT_KEY } = theRegExp(/^[ \\t]*\\./);\nconst DOT_KEY = /^[ \\t]*\\.[ \\t]*/;\nconst { exec: BARE_KEY_STRICT } = theRegExp(/^[\\w-]+/);\nconst { exec: BARE_KEY_FREE } = theRegExp(/^[^ \\t#=[\\]'\".]+(?:[ \\t]+[^ \\t#=[\\]'\".]+)*/);\nlet __BARE_KEY_exec = BARE_KEY_FREE;\nconst { exec: LITERAL_KEY____ } = theRegExp(/^'[^'\\x00-\\x08\\x0B-\\x1F\\x7F]*'/);\nconst { exec: LITERAL_KEY_DEL } = theRegExp(/^'[^'\\x00-\\x08\\x0B-\\x1F]*'/);\nlet __LITERAL_KEY_exec = LITERAL_KEY_DEL;\nlet supportArrayOfTables = true;\n\nconst TABLE_DEFINITION_exec_groups = (lineRest , parseKeys ) => {\n\tconst asArrayItem = lineRest[1]==='[';\n\tif ( asArrayItem ) {\n\t\tsupportArrayOfTables || throws(SyntaxError$1(`Array of Tables is not allowed before TOML v0.2` + where(', which at ')));\n\t\tlineRest = lineRest.slice(2);\n\t}\n\telse { lineRest = lineRest.slice(1); }\n\tlineRest = lineRest.replace(PRE_WHITESPACE, '');\n\tconst { leadingKeys, finalKey } = { lineRest } = parseKeys(lineRest);\n\tlineRest = lineRest.replace(PRE_WHITESPACE, '');\n\tlineRest && lineRest[0]===']' || throws(SyntaxError$1(`Table header is not closed` + where(', which is found at ')));\n\t( lineRest.length>1 ? lineRest[1]===']'===asArrayItem : !asArrayItem ) || throws(SyntaxError$1(`Square brackets of Table definition statement not match` + where(' at ')));\n\tlineRest = lineRest.slice(asArrayItem ? 2 : 1).replace(PRE_WHITESPACE, '');\n\tlet tag ;\n\tif ( lineRest && lineRest[0]==='<' ) { ( { 1: tag, 2: lineRest } = TAG_REST_exec(lineRest) || throws(SyntaxError$1(`Bad tag` + where(' at '))) ); }\n\telse { tag = ''; }\n\treturn { leadingKeys, finalKey, asArrayItem, tag, lineRest };\n};\n\nconst KEY_VALUE_PAIR_exec_groups = ({ leadingKeys, finalKey, lineRest } ) => {\n\tconst { 1: tag = '' } = { 2: lineRest } = KEY_VALUE_PAIR_exec(lineRest) || throws(SyntaxError$1(`Keys must equal something` + where(', but missing at ')));\n\ttag || lineRest && lineRest[0]!=='#' || throws(SyntaxError$1(`Value can not be missing after euqal sign` + where(', which is found at ')));\n\treturn { leadingKeys, finalKey, tag, lineRest };\n};\n\nconst { test: CONTROL_CHARACTER_EXCLUDE_TAB____ } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F\\x7F]/);\nconst { test: CONTROL_CHARACTER_EXCLUDE_TAB_DEL } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F]/);\nlet __CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\nconst switchRegExp = (specificationVersion ) => {\n\tswitch ( specificationVersion ) {\n\t\tcase 1.0:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0_1_2;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY____;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______;\n\t\t\t__BASIC_STRING = BASIC_STRING_TAB______;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tcase 0.5:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY____;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER__________;\n\t\t\t__BASIC_STRING = BASIC_STRING__________;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tcase 0.4:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY_DEL;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB_DEL;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL______;\n\t\t\t__BASIC_STRING = BASIC_STRING_DEL______;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY_DEL;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB_DEL;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL_SLASH;\n\t\t\t__BASIC_STRING = BASIC_STRING_DEL_SLASH;\n\t\t\t__BARE_KEY_exec = BARE_KEY_FREE;\n\t\t\tsupportArrayOfTables = false;\n\t}\n};\n\nconst NUM = /*#__PURE__*/newRegExp`\n\t(?:\n\t\t0\n\t\t(?:\n\t\t\tb[01][_01]*\n\t\t|\n\t\t\to[0-7][_0-7]*\n\t\t|\n\t\t\tx[\\dA-Fa-f][_\\dA-Fa-f]*\n\t\t|\n\t\t\t(?:\\.\\d[_\\d]*)?(?:[Ee]-?\\d[_\\d]*)?\n\t\t)\n\t|\n\t\t[1-9][_\\d]*\n\t\t(?:\\.\\d[_\\d]*)?(?:[Ee]-?\\d[_\\d]*)?\n\t|\n\t\tinf\n\t|\n\t\tnan\n\t)\n`.valueOf();\nconst { test: IS_AMAZING } = /*#__PURE__*/newRegExp`\n\t^(?:\n\t\t-?${NUM}\n\t\t(?:-${NUM})*\n\t|\n\t\ttrue\n\t|\n\t\tfalse\n\t)$\n`.valueOf();\nconst { test: BAD_DXOB } = /*#__PURE__*/newRegExp`_(?![\\dA-Fa-f])`.valueOf();\nconst isAmazing = (keys ) => IS_AMAZING(keys) && !BAD_DXOB(keys);\n\nlet mustScalar = true;\n\nlet ARGS_MODE = '';\n\n/* options */\n\nlet useWhatToJoinMultilineString = null;\nlet usingBigInt = true;\nlet IntegerMinNumber = 0;\nlet IntegerMaxNumber = 0;\n\n \n\n \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n \nconst ANY = {\n\ttest: () => true,\n};\n \n\t \n \nconst Keys = class KeysRegExp extends RegExp$1 {\n\t \n\tconstructor (keys ) {\n\t\tsuper(`^${groupify(keys)}$`);\n\t\tlet maxLength = -1;\n\t\tfor ( let index = keys.length; index; ) {\n\t\t\tconst { length } = keys[--index] ;\n\t\t\tif ( length>maxLength ) { maxLength = length; }\n\t\t}\n\t\tthis.lastIndex = maxLength+1;\n\t\treturn this;\n\t}\n\t test ( key ) {\n\t\treturn key.length<this.lastIndex && super.test(key);\n\t}\n};\nconst isKeys = /*#__PURE__*/isPrototypeOf.bind(/*#__PURE__*/freeze(Keys.prototype)) ;\nlet KEYS$1 = ANY;\nlet preserveLiteral ;\nlet zeroDatetime ;\nlet inlineTable ;\nlet moreDatetime ;\nlet disallowEmptyKey ;\n//export const xob :boolean = true;\nlet sError ;\nlet sFloat ;\n \nlet Table ;\nlet allowLonger ;\nlet enableNull ;\nlet allowInlineTableMultilineAndTrailingCommaEvenNoComma ;\nlet preserveComment ;\nlet disableDigit ;\nconst arrayTypes = new WeakMap$1 ();\nconst arrayTypes_get = /*#__PURE__*/get.bind(arrayTypes) ;\nconst arrayTypes_set = /*#__PURE__*/set.bind(arrayTypes) ;\n \nconst As = () => {\n\tconst as = (array ) => {\n\t\tconst got = arrayTypes_get(array);\n\t\tgot\n\t\t\t? got===as || throws(TypeError$1(`Types in Array must be same` + where('. Check ')))\n\t\t\t: arrayTypes_set(array, as);\n\t\treturn array;\n\t};\n\treturn as;\n};\nconst AS_TYPED = {\n\tasNulls: As(),\n\tasStrings: As(),\n\tasTables: As(),\n\tasArrays: As(),\n\tasBooleans: As(),\n\tasFloats: As(),\n\tasIntegers: As(),\n\tasOffsetDateTimes: As(),\n\tasLocalDateTimes: As(),\n\tasLocalDates: As(),\n\tasLocalTimes: As(),\n};\nconst asMixed = (array ) => array;\nlet\n\tasNulls ,\n\tasStrings ,\n\tasTables ,\n\tasArrays ,\n\tasBooleans ,\n\tasFloats ,\n\tasIntegers ,\n\tasOffsetDateTimes ,\n\tasLocalDateTimes ,\n\tasLocalDates ,\n\tasLocalTimes ;\n\n \n\n \nlet processor = null;\nlet each = null;\n \n\t \n\t \n\t \n \nconst collect_on = (tag , array , table , key ) => {\n\tconst _each = create$1(NULL) ;\n\t_each._linked = each;\n\t_each.tag = tag;\n\tif ( table ) {\n\t\t_each.table = table;\n\t\t_each.key = key ;\n\t}\n\tif ( array ) {\n\t\t_each.array = array;\n\t\t_each.index = array.length;\n\t}\n\teach = _each;\n};\nconst collect_off = () => { throw throws(SyntaxError$1(`xOptions.tag is not enabled, but found tag syntax` + where(' at '))); };\nlet collect = collect_off;\n \nconst Process = () => {\n\tif ( each ) {\n\t\tconst _processor = processor ;\n\t\tlet _each = each;\n\t\teach = null;\n\t\treturn () => {\n\t\t\tconst processor = _processor;\n\t\t\tlet each = _each ;\n\t\t\t_each = null;\n\t\t\tdo { processor(each); }\n\t\t\twhile ( each = each._linked );\n\t\t};\n\t}\n\treturn null;\n};\n\n/* use & clear */\n\nconst clear = () => {\n\tKEYS$1 = ANY;\n\tuseWhatToJoinMultilineString = processor = each = null;\n\tzeroDatetime = false;\n};\n\nconst use = (specificationVersion , multilineStringJoiner , useBigInt , keys , xOptions , argsMode ) => {\n\t\n\tARGS_MODE = argsMode;\n\t\n\tlet mixed ;\n\tswitch ( specificationVersion ) {\n\t\tcase 1.0:\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = true;\n\t\t\tzeroDatetime = disallowEmptyKey = false;\n\t\t\tbreak;\n\t\tcase 0.5:\n\t\t\tmustScalar = moreDatetime = sFloat = inlineTable = true;\n\t\t\tmixed = zeroDatetime = disallowEmptyKey = false;\n\t\t\tbreak;\n\t\tcase 0.4:\n\t\t\tmustScalar = disallowEmptyKey = inlineTable = true;\n\t\t\tmixed = zeroDatetime = moreDatetime = sFloat = false;\n\t\t\tbreak;\n\t\tcase 0.3:\n\t\t\tmustScalar = disallowEmptyKey = true;\n\t\t\tmixed = zeroDatetime = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tcase 0.2:\n\t\t\tzeroDatetime = disallowEmptyKey = true;\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tcase 0.1:\n\t\t\tzeroDatetime = disallowEmptyKey = true;\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow RangeError$1(`TOML.parse(,specificationVersion)`);\n\t}\n\tswitchRegExp(specificationVersion);\n\t\n\tif ( typeof multilineStringJoiner==='string' ) { useWhatToJoinMultilineString = multilineStringJoiner; }\n\telse if ( multilineStringJoiner===undefined$1 ) { useWhatToJoinMultilineString = null; }\n\telse { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE}multilineStringJoiner` : `,{ joiner }`})`); }\n\t\n\tif ( useBigInt===undefined$1 || useBigInt===true ) { usingBigInt = true; }\n\telse if ( useBigInt===false ) { usingBigInt = false; }\n\telse {\n\t\tif ( typeof useBigInt!=='number' ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`})`); }\n\t\tif ( !isSafeInteger(useBigInt) ) { throw RangeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`})`); }\n\t\tusingBigInt = null;\n\t\tuseBigInt>=0\n\t\t\t? IntegerMinNumber = -( IntegerMaxNumber = useBigInt )\n\t\t\t: IntegerMaxNumber = -( IntegerMinNumber = useBigInt ) - 1;\n\t}\n\tif ( !BigInt$1 && usingBigInt!==false ) { throw Error$1(`Can't work without TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`}) being set to false, because the host doesn't have BigInt support`); }\n\t\n\tif ( keys==null ) { KEYS$1 = ANY; }\n\telse {\n\t\tif ( !isKeys(keys) ) { throw TypeError$1(`TOML.parse(,{ keys })`); }\n\t\tKEYS$1 = keys;\n\t}\n\t\n\tif ( xOptions==null ) {\n\t\tTable = PlainTable;\n\t\tsError = allowLonger = enableNull = allowInlineTableMultilineAndTrailingCommaEvenNoComma = false;\n\t\tcollect = collect_off;\n\t}\n\telse if ( typeof xOptions!=='object' ) {\n\t\tthrow TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,xOptions` : `,{ x }`})`);\n\t}\n\telse {\n\t\tconst { order, longer, exact, null: _null, multi, comment, string, literal, tag, ...unknown } = xOptions;\n\t\tconst unknownNames = getOwnPropertyNames(unknown);\n\t\tif ( unknownNames.length ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,{ ${unknownNames.join(', ')} }` : `,{ x: { ${unknownNames.join(', ')} } }`})`); }\n\t\tTable = order ? OrderedTable : PlainTable;\n\t\tallowLonger = !longer;\n\t\tsError = !!exact;\n\t\tenableNull = !!_null;\n\t\tallowInlineTableMultilineAndTrailingCommaEvenNoComma = !!multi;\n\t\tpreserveComment = !!comment;\n\t\tdisableDigit = !!string;\n\t\tpreserveLiteral = !!literal;\n\t\tif ( tag ) {\n\t\t\tif ( typeof tag!=='function' ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,{ tag }` : `,{ x: { tag } }`})`); }\n\t\t\tif ( !mixed ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,xOptions` : `,{ x }`}) xOptions.tag needs at least TOML 1.0 to support mixed type array`); }\n\t\t\tprocessor = tag;\n\t\t\tcollect = collect_on;\n\t\t}\n\t\telse { collect = collect_off; }\n\t}\n\t\n\tmixed\n\t\t? asNulls = asStrings = asTables = asArrays = asBooleans = asFloats = asIntegers = asOffsetDateTimes = asLocalDateTimes = asLocalDates = asLocalTimes = asMixed\n\t\t: ( { asNulls, asStrings, asTables, asArrays, asBooleans, asFloats, asIntegers, asOffsetDateTimes, asLocalDateTimes, asLocalDates, asLocalTimes } = AS_TYPED );\n\t\n};\n\nconst isView = ArrayBuffer.isView;\n\nconst isArrayBuffer = (\n\t/* j-globals: class.isArrayBuffer (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( typeof ArrayBuffer==='function' ) {\n\t\t\tvar byteLength_apply = apply.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);\n\t\t\treturn function isArrayBuffer (value) {\n\t\t\t\ttry { byteLength_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isArrayBuffer () { return false; };\n\t}()\n\t/* j-globals: class.isArrayBuffer (internal) */\n);\n\nconst TextDecoder$1 = TextDecoder;\n\nconst Symbol$1 = Symbol;\n\nconst previous = Symbol$1('previous') ;\n\n \n\t \n\t\t \n\t\t \n\t \n \n\nconst x = (rootStack ) => {\n\tlet stack = rootStack;\n\tlet result = stack.next();\n\tif ( !result.done ) {\n\t\tresult.value[previous] = stack;\n\t\tresult = ( stack = result.value ).next();\n\t\tfor ( ; ; ) {\n\t\t\tif ( result.done ) {\n\t\t\t\tif ( stack===rootStack ) { break; }\n\t\t\t\tstack = stack[previous] ;\n\t\t\t\tresult = stack.next(result.value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.value[previous] = stack;\n\t\t\t\tresult = ( stack = result.value ).next();\n\t\t\t}\n\t\t}\n\t}\n\treturn result.value;\n};\n\nconst _literal = Symbol$1('_literal') ;\n\nconst LiteralObject = (literal , value ) => {\n\tconst object = Object$1(value) ;\n\tobject[_literal] = literal;\n\treturn object;\n};\n\nconst arrays = new WeakSet$1 ();\nconst arrays_add = /*#__PURE__*/add.bind(arrays);\nconst isArray = /*#__PURE__*/has.bind(arrays) ;\n\nconst OF_TABLES = false;\nconst STATICALLY = true;\nconst staticalArrays = new WeakSet$1 ();\nconst staticalArrays_add = /*#__PURE__*/add.bind(staticalArrays);\nconst isStatic = /*#__PURE__*/has.bind(staticalArrays) ;\n\nconst newArray = (isStatic ) => {\n\tconst array = [];\n\tarrays_add(array);\n\tisStatic && staticalArrays_add(array);\n\treturn array;\n};\n\nconst NativeDate = Date;\n\nconst parse$2 = Date.parse;\n\nconst preventExtensions = Object.preventExtensions;\n\nconst getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;\n\nconst defineProperties = (\n\t/* j-globals: null.defineProperties (internal) */\n\tfunction defineProperties (object, descriptorMap) {\n\t\tvar created = create$1(NULL);\n\t\tvar names = keys(descriptorMap);\n\t\tfor ( var length = names.length, index = 0; index<length; ++index ) {\n\t\t\tvar name = names[index];\n\t\t\tcreated[name] = Descriptor(descriptorMap[name]);\n\t\t}\n\t\tif ( getOwnPropertySymbols ) {\n\t\t\tvar symbols = getOwnPropertySymbols(descriptorMap);\n\t\t\tfor ( length = symbols.length, index = 0; index<length; ++index ) {\n\t\t\t\tvar symbol = symbols[index];\n\t\t\t\tif ( isEnum(descriptorMap, symbol) ) { created[symbol] = Descriptor(descriptorMap[symbol]); }\n\t\t\t}\n\t\t}\n\t\treturn Object_defineProperties(object, created);\n\t}\n\t/* j-globals: null.defineProperties (internal) */\n);\n\nconst fpc = (c ) => {\n\tfreeze(freeze(c).prototype);\n\treturn c;\n};\n\nconst _29_ = /(?:0[1-9]|1\\d|2\\d)/;\nconst _30_ = /(?:0[1-9]|[12]\\d|30)/;\nconst _31_ = /(?:0[1-9]|[12]\\d|3[01])/;\nconst _23_ = /(?:[01]\\d|2[0-3])/;\nconst _59_ = /[0-5]\\d/;\n\nconst YMD = /*#__PURE__*/newRegExp`\n\t\\d\\d\\d\\d-\n\t(?:\n\t\t0\n\t\t(?:\n\t\t\t[13578]-${_31_}\n\t\t\t|\n\t\t\t[469]-${_30_}\n\t\t\t|\n\t\t\t2-${_29_}\n\t\t)\n\t\t|\n\t\t1\n\t\t(?:\n\t\t\t[02]-${_31_}\n\t\t\t|\n\t\t\t1-${_30_}\n\t\t)\n\t)\n`.valueOf();\n\nconst HMS = /*#__PURE__*/newRegExp`\n\t${_23_}:${_59_}:${_59_}\n`.valueOf();\n\nconst OFFSET$ = /(?:[Zz]|[+-]\\d\\d:\\d\\d)$/;\n\nconst { exec: Z_exec } = theRegExp (/(([+-])\\d\\d):(\\d\\d)$/);\n\nconst { exec: OFFSET_DATETIME_exec } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t(?:\\.\\d{1,3}(\\d*?)0*)?\n\t(?:[Zz]|[+-]${_23_}:${_59_})\n\t$`.valueOf();\n\nconst { exec: OFFSET_DATETIME_ZERO_exec } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t()\n\t[Zz]\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_DATETIME } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t(?:\\.\\d+)?\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_DATE } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_TIME } = /*#__PURE__*/newRegExp`\n\t^\n\t${HMS}\n\t(?:\\.\\d+)?\n\t$`.valueOf();\n\nconst T = /[ t]/;\nconst DELIMITER_DOT = /[-T:.]/g;\nconst DOT_ZERO = /\\.?0+$/;\nconst ZERO = /\\.(\\d*?)0+$/;\nconst zeroReplacer = (match , p1 ) => p1;\n\nconst Datetime = /*#__PURE__*/( () => {\n\tconst Datetime = function ( ) {\n\t\treturn this;\n\t} ;//expression? :undefined, literal? :undefined, dotValue? :undefined\n\t// > .setTime()\n\t// > .getTime() : Date.parse('T')\n\t// [Symbol.toPrimitive]('number') > .valueOf()\n\t// > .toISOString()\n\tconst descriptors = Null$1(null) ;\n\t{\n\t\tconst descriptor = Null$1(null);\n\t\tfor ( const key of ownKeys(NativeDate.prototype ) ) {\n\t\t\tkey==='constructor' ||\n\t\t\tkey==='toJSON' ||\n\t\t\t( descriptors[key] = descriptor );\n\t\t}\n\t}\n\tDatetime.prototype = preventExtensions(create$1(NativeDate.prototype, descriptors));\n\treturn freeze(Datetime);\n} )();\n\n \n \n \n \n \n \n \n \n \n \n \n\nconst Value = (ISOString ) => ISOString.replace(ZERO, zeroReplacer).replace(DELIMITER_DOT, '');\n\nconst d = /./gs;\nconst d2u = (d ) => '\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009'[d ] ;\nconst ValueOFFSET = (time , more ) => time<0\n\t? ( '' + ( time + 62167305540000 ) ).replace(d, d2u).padStart(14, '\\u2000') + more.replace(d, d2u) + time\n\t: more\n\t\t? ( time + '.' ).padStart(16, '0') + more\n\t\t: ( '' + time ).padStart(15, '0');\n\nconst validateLeap = (literal ) => {\n\tif ( literal.startsWith('02-29', 5) ) {\n\t\tconst year = +literal.slice(0, 4);\n\t\treturn (\n\t\t\tyear & 0b11 ? false :\n\t\t\t\tyear%100 ? true :\n\t\t\t\t\tyear%400 ? false :\n\t\t\t\t\t\tyear%3200 ? true :\n\t\t\t\t\t\t\tfalse\n\t\t);\n\t}\n\treturn true;\n};\nconst { test: VALIDATE_LEAP } = /*#__PURE__*/newRegExp.s`^.....(?:06.30|12.31).23:59:59`.valueOf();\n\nconst DATE$1 = /*#__PURE__*/defineProperties(new NativeDate(0), /*#__PURE__*/getOwnPropertyDescriptors(NativeDate.prototype));\n\nconst OffsetDateTime_ISOString = Symbol$1('OffsetDateTime_ISOString') ;\nconst OffsetDateTime_value = Symbol$1('OffsetDateTime_value') ;\nconst OffsetDateTime_use = (that , $ = 0) => {\n\tDATE$1.setTime(+that[OffsetDateTime_value] + $);\n\treturn DATE$1;\n};\n/*const OffsetDateTime_get = (that :InstanceType<typeof OffsetDateTime>, start :number, end :number) => +that[OffsetDateTime_ISOString].slice(start, end);\nconst OffsetDateTime_set = (that :InstanceType<typeof OffsetDateTime>, start :number, end :number, value :number, reserveMore :boolean) => {\n\tif ( end ) {\n\t\tconst string = '' + value;\n\t\tconst size = end - start;\n\t\tif ( string.length>size ) { throw RangeError(); }///\n\t\tthat[OffsetDateTime_ISOString] = that[OffsetDateTime_ISOString].slice(0, start) + string.padStart(size, '0') + that[OffsetDateTime_ISOString].slice(end);\n\t}\n\tconst time = parse(that[OffsetDateTime_ISOString]);\n\treturn that[OffsetDateTime_value] = ValueOFFSET(time, that[OffsetDateTime_value].includes('-')\n\t\t? that[OffsetDateTime_value].slice(14, that[OffsetDateTime_value].indexOf('-', 14))\n\t\t: that[OffsetDateTime_value].slice(15)\n\t);///time\n};*///\nconst OffsetDateTime = /*#__PURE__*/fpc(class OffsetDateTime extends Datetime {\n\t\n\t[OffsetDateTime_ISOString] ;\n\t[OffsetDateTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'OffsetDateTime' ; }\n\t\n\t valueOf ( ) { return this[OffsetDateTime_value]; }\n\ttoISOString ( ) { return this[OffsetDateTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tvalidateLeap(literal) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\tconst with60 = literal.startsWith('60', 17);\n\t\tlet without60 = with60 ? literal.slice(0, 17) + '59' + literal.slice(19) : literal;\n\t\tconst { 1: more = '' } = ( zeroDatetime ? OFFSET_DATETIME_ZERO_exec(without60) : OFFSET_DATETIME_exec(without60) ) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\tconst time = parse$2(without60 = without60.replace(T, 'T').replace('z', 'Z'));\n\t\tif ( with60 ) {\n\t\t\tDATE$1.setTime(time);\n\t\t\tVALIDATE_LEAP(DATE$1.toISOString()) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\t}\n\t\tsuper();\n\t\tthis[OffsetDateTime_ISOString] = without60;\n\t\tthis[OffsetDateTime_value] = ValueOFFSET(time, more);\n\t\treturn this;\n\t}\n\t\n\tgetUTCFullYear ( ) { return OffsetDateTime_use(this).getUTCFullYear(); }\n\t///get year () :FullYear { return OffsetDateTime_get(this, 0, 4); }\n\t///set year (value :FullYear) { OffsetDateTime_set(this, 0, 4, value, true); }\n\tgetUTCMonth ( ) { return OffsetDateTime_use(this).getUTCMonth(); }\n\t///get month () { return OffsetDateTime_get(this, 5, 7); }\n\t///set month (value) { OffsetDateTime_set(this, 5, 7, value, true); }\n\tgetUTCDate ( ) { return OffsetDateTime_use(this).getUTCDate(); }\n\t///get day () :Date { return OffsetDateTime_get(this, 8, 10); }\n\t///set day (value :Date) { OffsetDateTime_set(this, 8, 10, value, true); }\n\t\n\tgetUTCHours ( ) { return OffsetDateTime_use(this).getUTCHours(); }\n\t///get hour () :Hours { return OffsetDateTime_get(this, 11, 13); }\n\t///set hour (value :Hours) { OffsetDateTime_set(this, 11, 13, value, true); }\n\tgetUTCMinutes ( ) { return OffsetDateTime_use(this).getUTCMinutes(); }\n\t///get minute () :Minutes { return OffsetDateTime_get(this, 14, 16); }\n\t///set minute (value :Minutes) { OffsetDateTime_set(this, 14, 16, value, true); }\n\tgetUTCSeconds ( ) { return OffsetDateTime_use(this).getUTCSeconds(); }\n\t///get second () :Seconds { return OffsetDateTime_get(this, 17, 19); }\n\t///set second (value :Seconds) { OffsetDateTime_set(this, 17, 19, value, true); }\n\tgetUTCMilliseconds ( ) { return OffsetDateTime_use(this).getUTCMilliseconds(); }///\n\t///get millisecond () :Milliseconds { return this[OffsetDateTime_value]%1000; }///\n\t/*set millisecond (value :Milliseconds) {\n\t\tthis[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' ) + this[OffsetDateTime_ISOString].slice(this[OffsetDateTime_ISOString].search(OFFSET$));\n\t\tOffsetDateTime_set(this, 0, 0, 0, false);\n\t}*///\n\t///get microsecond () :Milliseconds\n\t///set microsecond (value :Milliseconds)\n\t///get nanosecond () :Milliseconds\n\t///set nanosecond (value :Milliseconds)\n\t\n\tgetUTCDay ( ) { return OffsetDateTime_use(this).getUTCDay(); }\n\t///get dayOfWeek () { return OffsetDateTime_use(this, this.getTimezoneOffset()*60000).getUTCDay() || 7; }\n\tgetTimezoneOffset ( ) {\n\t\tconst z = Z_exec(this[OffsetDateTime_ISOString]);\n\t\treturn z ? +z[1]*60 + +( z[2] + z[3] ) : 0;\n\t}\n\t///get offset () { return this[OffsetDateTime_ISOString].endsWith('Z') ? 'Z' : this[OffsetDateTime_ISOString].slice(-6); }\n\t/*set offset (value) {\n\t\tthis[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, this[OffsetDateTime_ISOString].endsWith('Z') ? -1 : -6) + value;\n\t\tOffsetDateTime_set(this, 0, 0, 0, true);\n\t}*///\n\tgetTime ( ) { return floor(+this[OffsetDateTime_value]); }///\n\t/*setTime (this :OffsetDateTime, value :Time) :void {\n\t\tvalue = DATE.setTime(value);\n\t\tconst z = Z_exec(this[OffsetDateTime_ISOString]);\n\t\tDATE.setTime(value + ( z ? +z[1]*60 + +( z[2] + z[3] ) : 0 )*60000);\n\t\tthis[OffsetDateTime_ISOString] = z ? DATE.toISOString().slice(0, -1) + z[0] : DATE.toISOString();\n\t\tthis[OffsetDateTime_value] = ValueOFFSET(value, '');\n\t\t///return value;\n\t}*/\n\t\n});\n\nconst LocalDateTime_ISOString = Symbol$1('LocalDateTime_ISOString') ;\nconst LocalDateTime_value = Symbol$1('LocalDateTime_value') ;\nconst LocalDateTime_get = (that , start , end ) => +that[LocalDateTime_ISOString].slice(start, end);\nconst LocalDateTime_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalDateTime_value] = Value(\n\t\tthat[LocalDateTime_ISOString] = that[LocalDateTime_ISOString].slice(0, start) + string.padStart(size, '0') + that[LocalDateTime_ISOString].slice(end)\n\t);\n};\nconst LocalDateTime = /*#__PURE__*/fpc(class LocalDateTime extends Datetime {\n\t\n\t[LocalDateTime_ISOString] ;\n\t[LocalDateTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalDateTime' ; }\n\t\n\t valueOf ( ) { return this[LocalDateTime_value]; }\n\ttoISOString ( ) { return this[LocalDateTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_DATETIME(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date-Time ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalDateTime_value] = Value(\n\t\t\tthis[LocalDateTime_ISOString] = literal.replace(T, 'T')\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetFullYear ( ) { return LocalDateTime_get(this, 0, 4); }\n\tsetFullYear ( value ) { LocalDateTime_set(this, 0, 4, value); }\n\tgetMonth ( ) { return LocalDateTime_get(this, 5, 7) - 1; }\n\tsetMonth ( value ) { LocalDateTime_set(this, 5, 7, value + 1); }\n\tgetDate ( ) { return LocalDateTime_get(this, 8, 10); }\n\tsetDate ( value ) { LocalDateTime_set(this, 8, 10, value); }\n\t\n\tgetHours ( ) { return LocalDateTime_get(this, 11, 13); }\n\tsetHours ( value ) { LocalDateTime_set(this, 11, 13, value); }\n\tgetMinutes ( ) { return LocalDateTime_get(this, 14, 16); }\n\tsetMinutes ( value ) { LocalDateTime_set(this, 14, 16, value); }\n\tgetSeconds ( ) { return LocalDateTime_get(this, 17, 19); }\n\tsetSeconds ( value ) { LocalDateTime_set(this, 17, 19, value); }\n\tgetMilliseconds ( ) { return +this[LocalDateTime_value].slice(14, 17).padEnd(3, '0'); }///\n\tsetMilliseconds ( value ) {\n\t\tthis[LocalDateTime_value] = Value(\n\t\t\tthis[LocalDateTime_ISOString] = this[LocalDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' )\n\t\t);\n\t}\n\t\n});\n\nconst LocalDate_ISOString = Symbol$1('LocalDate_ISOString') ;\nconst LocalDate_value = Symbol$1('LocalDate_value') ;\nconst LocalDate_get = (that , start , end ) => +that[LocalDate_ISOString].slice(start, end);\nconst LocalDate_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalDate_value] = Value(\n\t\tthat[LocalDate_ISOString] = that[LocalDate_ISOString].slice(0, start) + string.padStart(size, '0') + that[LocalDate_ISOString].slice(end)\n\t);\n};\nconst LocalDate = /*#__PURE__*/fpc(class LocalDate extends Datetime {\n\t\n\t[LocalDate_ISOString] ;\n\t[LocalDate_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalDate' ; }\n\t\n\t valueOf ( ) { return this[LocalDate_value]; }\n\ttoISOString ( ) { return this[LocalDate_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_DATE(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalDate_value] = Value(\n\t\t\tthis[LocalDate_ISOString] = literal\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetFullYear ( ) { return LocalDate_get(this, 0, 4); }\n\tsetFullYear ( value ) { LocalDate_set(this, 0, 4, value); }\n\tgetMonth ( ) { return LocalDate_get(this, 5, 7) - 1; }\n\tsetMonth ( value ) { LocalDate_set(this, 5, 7, value + 1); }\n\tgetDate ( ) { return LocalDate_get(this, 8, 10); }\n\tsetDate ( value ) { LocalDate_set(this, 8, 10, value); }\n\t\n});\n\nconst LocalTime_ISOString = Symbol$1('LocalTime_ISOString') ;\nconst LocalTime_value = Symbol$1('LocalTime_value') ;\nconst LocalTime_get = (that , start , end ) => +that[LocalTime_ISOString].slice(start, end);\nconst LocalTime_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalTime_value] = Value(\n\t\tthat[LocalTime_ISOString] = that[LocalTime_ISOString].slice(0, start) + string.padStart(2, '0') + that[LocalTime_ISOString].slice(end)\n\t);\n};\nconst LocalTime = /*#__PURE__*/fpc(class LocalTime extends Datetime {\n\t\n\t[LocalTime_ISOString] ;\n\t[LocalTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalTime' ; }\n\t\n\t valueOf ( ) { return this[LocalTime_value]; }\n\ttoISOString ( ) { return this[LocalTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_TIME(literal) || throws(SyntaxError$1(`Invalid Local Time ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalTime_value] = Value(\n\t\t\tthis[LocalTime_ISOString] = literal\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetHours ( ) { return LocalTime_get(this, 0, 2); }\n\tsetHours ( value ) { LocalTime_set(this, 0, 2, value); }\n\tgetMinutes ( ) { return LocalTime_get(this, 3, 5); }\n\tsetMinutes ( value ) { LocalTime_set(this, 3, 5, value); }\n\tgetSeconds ( ) { return LocalTime_get(this, 6, 8); }\n\tsetSeconds ( value ) { LocalTime_set(this, 6, 8, value); }\n\tgetMilliseconds ( ) { return +this[LocalTime_value].slice(6, 9).padEnd(3, '0'); }///\n\tsetMilliseconds ( value ) {\n\t\tthis[LocalTime_value] = Value(\n\t\t\tthis[LocalTime_ISOString] = this[LocalTime_ISOString].slice(0, 8) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' )\n\t\t);\n\t}\n\t\n});\n\nconst parseInt$1 = parseInt;\n\nconst fromCodePoint = String.fromCodePoint;\n\nconst ESCAPED_IN_SINGLE_LINE = /[^\\\\]+|\\\\(?:[\\\\\"btnfr/]|u.{4}|U.{8})/gs;\nconst ESCAPED_IN_MULTI_LINE = /[^\\n\\\\]+|\\n|\\\\(?:[\\t ]*\\n[\\t\\n ]*|[\\\\\"btnfr/]|u.{4}|U.{8})/gs;\n\nconst BasicString = (literal ) => {\n\tif ( !literal ) { return ''; }\n\tconst parts = literal.match(ESCAPED_IN_SINGLE_LINE) ;\n\tconst { length } = parts;\n\tlet index = 0;\n\tdo {\n\t\tconst part = parts[index] ;\n\t\tif ( part[0]==='\\\\' ) {\n\t\t\tswitch ( part[1] ) {\n\t\t\t\tcase '\\\\': parts[index] = '\\\\'; break;\n\t\t\t\tcase '\"': parts[index] = '\"'; break;\n\t\t\t\tcase 'b': parts[index] = '\\b'; break;\n\t\t\t\tcase 't': parts[index] = '\\t'; break;\n\t\t\t\tcase 'n': parts[index] = '\\n'; break;\n\t\t\t\tcase 'f': parts[index] = '\\f'; break;\n\t\t\t\tcase 'r': parts[index] = '\\r'; break;\n\t\t\t\tcase 'u':\n\t\t\t\t\tconst charCode = parseInt$1(part.slice(2), 16);\n\t\t\t\t\tmustScalar && 0xD7FF<charCode && charCode<0xE000\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ')));\n\t\t\t\t\tparts[index] = fromCharCode(charCode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tconst codePoint = parseInt$1(part.slice(2), 16);\n\t\t\t\t\t( mustScalar && 0xD7FF<codePoint && codePoint<0xE000 || 0x10FFFF<codePoint )\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ')));\n\t\t\t\t\tparts[index] = fromCodePoint(codePoint);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/': parts[index] = '/'; break;\n\t\t\t}\n\t\t}\n\t}\n\twhile ( ++index!==length );\n\treturn parts.join('');\n};\n\nconst MultilineBasicString = (literal , useWhatToJoinMultilineString , n ) => {\n\tif ( !literal ) { return ''; }\n\tconst parts = literal.match(ESCAPED_IN_MULTI_LINE) ;\n\tconst { length } = parts;\n\tlet index = 0;\n\tdo {\n\t\tconst part = parts[index] ;\n\t\tif ( part==='\\n' ) {\n\t\t\t++n;\n\t\t\tparts[index] = useWhatToJoinMultilineString;\n\t\t}\n\t\telse if ( part[0]==='\\\\' ) {\n\t\t\tswitch ( part[1] ) {\n\t\t\t\tcase '\\n':\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\t':\n\t\t\t\t\tfor ( let i = 0; i = part.indexOf('\\n', i) + 1; ) { ++n; }\n\t\t\t\t\tparts[index] = '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\': parts[index] = '\\\\'; break;\n\t\t\t\tcase '\"': parts[index] = '\"'; break;\n\t\t\t\tcase 'b': parts[index] = '\\b'; break;\n\t\t\t\tcase 't': parts[index] = '\\t'; break;\n\t\t\t\tcase 'n': parts[index] = '\\n'; break;\n\t\t\t\tcase 'f': parts[index] = '\\f'; break;\n\t\t\t\tcase 'r': parts[index] = '\\r'; break;\n\t\t\t\tcase 'u':\n\t\t\t\t\tconst charCode = parseInt$1(part.slice(2), 16);\n\t\t\t\t\tmustScalar && 0xD7FF<charCode && charCode<0xE000\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ', lineIndex + n)));\n\t\t\t\t\tparts[index] = fromCharCode(charCode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tconst codePoint = parseInt$1(part.slice(2), 16);\n\t\t\t\t\t( mustScalar && 0xD7FF<codePoint && codePoint<0xE000 || 0x10FFFF<codePoint )\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ', lineIndex + n)));\n\t\t\t\t\tparts[index] = fromCodePoint(codePoint);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/': parts[index] = '/'; break;\n\t\t\t}\n\t\t}\n\t}\n\twhile ( ++index!==length );\n\treturn parts.join('');\n};\n\nconst INTEGER_D = /[-+]?(?:0|[1-9][_\\d]*)/;\nconst { test: BAD_D } = /*#__PURE__*/newRegExp`_(?!\\d)`.valueOf();\nconst { test: IS_D_INTEGER } = /*#__PURE__*/newRegExp`^${INTEGER_D}$`.valueOf();\nconst { test: IS_XOB_INTEGER } = theRegExp(/^0(?:x[\\dA-Fa-f][_\\dA-Fa-f]*|o[0-7][_0-7]*|b[01][_01]*)$/);\nconst { test: BAD_XOB } = /*#__PURE__*/newRegExp`_(?![\\dA-Fa-f])`.valueOf();\nconst UNDERSCORES$1 = /_/g;\nconst UNDERSCORES_SIGN = /_|^[-+]/g;\n\nconst IS_INTEGER = (literal ) => ( IS_D_INTEGER(literal) || /*options.xob && */IS_XOB_INTEGER(literal) ) && !BAD_XOB(literal);\n\nconst MIN = BigInt$1 && -/*#__PURE__*/BigInt$1('0x8000000000000000');// -(2n**(64n-1n)) || -MAX-1n\nconst MAX = BigInt$1 && /*#__PURE__*/BigInt$1('0x7FFFFFFFFFFFFFFF');// 2n**(64n-1n)-1n || -MIN-1n\n\nconst BigIntInteger = (literal ) => {\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst bigInt = literal[0]==='-'\n\t\t? -BigInt$1(literal.replace(UNDERSCORES_SIGN, ''))\n\t\t: BigInt$1(literal.replace(UNDERSCORES_SIGN, ''));\n\tallowLonger || MIN<=bigInt && bigInt<=MAX || throws(RangeError$1(`Integer expect 64 bit range (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), not includes ${literal}` + where(' meet at ')));\n\treturn bigInt;\n};\n\nconst NumberInteger = (literal ) => {\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst number = parseInt$1(literal.replace(UNDERSCORES$1, ''));\n\tisSafeInteger(number) || throws(RangeError$1(`Integer did not use BitInt must fit Number.isSafeInteger, not includes ${literal}` + where(' meet at ')));\n\treturn number;\n};\n\nconst Integer = (literal ) => {\n\tif ( usingBigInt===true ) { return BigIntInteger(literal); }\n\tif ( usingBigInt===false ) { return NumberInteger(literal); }\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst number = parseInt$1(literal.replace(UNDERSCORES$1, ''));\n\tif ( IntegerMinNumber<=number && number<=IntegerMaxNumber ) { return number; }\n\tconst bigInt = literal[0]==='-'\n\t\t? -BigInt$1(literal.replace(UNDERSCORES_SIGN, ''))\n\t\t: BigInt$1(literal.replace(UNDERSCORES_SIGN, ''));\n\tallowLonger || MIN<=bigInt && bigInt<=MAX || throws(RangeError$1(`Integer expect 64 bit range (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), not includes ${literal}` + where(' meet at ')));\n\treturn bigInt;\n};\n\nconst isFinite$1 = isFinite;\n\nconst NaN$1 = 0/0;\n\nconst _NaN = -NaN$1;\nconst _Infinity$1 = -Infinity;\nconst { test: IS_FLOAT } = /*#__PURE__*/newRegExp`\n\t^\n\t${INTEGER_D}\n\t(?:\n\t\t\\.\\d[_\\d]*\n\t\t(?:[eE][-+]?\\d[_\\d]*)?\n\t|\n\t\t[eE][-+]?\\d[_\\d]*\n\t)\n\t$`.valueOf();\nconst UNDERSCORES = /_/g;\nconst { test: IS_ZERO } = theRegExp(/^[-+]?0(?:\\.0+)?(?:[eE][-+]?0+)?$/);\nconst { exec: NORMALIZED } = theRegExp (/^[-0]?(\\d*)(?:\\.(\\d+))?(?:e\\+?(-?\\d+))?$/);\nconst { exec: ORIGINAL } = theRegExp (/^[-+]?0?(\\d*)(?:\\.(\\d*?)0*)?(?:[eE]\\+?(-?\\d+))?$/);\n\nconst Float = (literal ) => {\n\tif ( !IS_FLOAT(literal) || BAD_D(literal) ) {\n\t\tif ( sFloat ) {\n\t\t\tif ( literal==='inf' || literal==='+inf' ) { return Infinity; }\n\t\t\tif ( literal==='-inf' ) { return _Infinity$1; }\n\t\t\tif ( literal==='nan' || literal==='+nan' ) { return NaN$1; }\n\t\t\tif ( literal==='-nan' ) { return _NaN; }\n\t\t}\n\t\telse if ( !sError ) {\n\t\t\tif ( literal==='inf' || literal==='+inf' ) { return Infinity; }\n\t\t\tif ( literal==='-inf' ) { return _Infinity$1; }\n\t\t}\n\t\tthrow throws(SyntaxError$1(`Invalid Float ${literal}` + where(' at ')));\n\t}\n\tconst withoutUnderscores = literal.replace(UNDERSCORES, '');\n\tconst number = +withoutUnderscores;\n\tif ( sError ) {\n\t\tisFinite$1(number) || throws(RangeError$1(`Float ${literal} has been as big as inf` + where(' at ')));\n\t\tnumber || IS_ZERO(withoutUnderscores) || throws(RangeError$1(`Float ${literal} has been as little as ${literal[0]==='-' ? '-' : ''}0` + where(' at ')));\n\t\tconst { 1: normalized_integer, 2: normalized_fractional = '', 3: normalized_exponent = '' } = NORMALIZED(number ) ;\n\t\tconst { 1: original_integer, 2: original_fractional = '', 3: original_exponent = '' } = ORIGINAL(withoutUnderscores) ;\n\t\toriginal_integer + original_fractional===normalized_integer + normalized_fractional\n\t\t&&\n\t\toriginal_exponent - original_fractional.length===normalized_exponent - normalized_fractional.length\n\t\t||\n\t\tthrows(RangeError$1(`Float ${literal} has lost its exact and been ${number}` + where(' at ')));\n\t}\n\treturn number;\n};\n\nconst prepareTable = (table , keys ) => {\n\tconst { length } = keys;\n\tlet index = 0;\n\twhile ( index<length ) {\n\t\tconst key = keys[index++] ;\n\t\tif ( key in table ) {\n\t\t\ttable = table[key];\n\t\t\tif ( isTable(table) ) {\n\t\t\t\tisInline(table) && throws(Error$1(`Trying to define Table under Inline Table` + where(' at ')));\n\t\t\t}\n\t\t\telse if ( isArray(table) ) {\n\t\t\t\tisStatic(table) && throws(Error$1(`Trying to append value to Static Array` + where(' at ')));\n\t\t\t\ttable = table[( table ).length - 1];\n\t\t\t}\n\t\t\telse { throw throws(Error$1(`Trying to define Table under non-Table value` + where(' at '))); }\n\t\t}\n\t\telse {\n\t\t\ttable = table[key] = new Table(IMPLICITLY);\n\t\t\twhile ( index<length ) { table = table[keys[index++] ] = new Table(IMPLICITLY); }\n\t\t\treturn table;\n\t\t}\n\t}\n\treturn table;\n};\n\nconst appendTable = (table , finalKey , asArrayItem , tag ) => {\n\tlet lastTable ;\n\tif ( asArrayItem ) {\n\t\tlet arrayOfTables ;\n\t\tif ( finalKey in table ) { isArray(arrayOfTables = table[finalKey]) && !isStatic(arrayOfTables) || throws(Error$1(`Trying to push Table to non-ArrayOfTables value` + where(' at '))); }\n\t\telse { arrayOfTables = table[finalKey] = newArray(OF_TABLES); }\n\t\ttag && collect(tag, arrayOfTables, table, finalKey);\n\t\tarrayOfTables[arrayOfTables.length] = lastTable = new Table(DIRECTLY);\n\t}\n\telse {\n\t\tif ( finalKey in table ) {\n\t\t\tlastTable = table[finalKey];\n\t\t\tfromPair(lastTable) && throws(Error$1(`A table defined implicitly via key/value pair can not be accessed to via []` + where(', which at ')));\n\t\t\tdirectlyIfNot(lastTable) || throws(Error$1(`Duplicate Table definition` + where(' at ')));\n\t\t}\n\t\telse { table[finalKey] = lastTable = new Table(DIRECTLY); }\n\t\ttag && collect(tag, null, table, finalKey);\n\t}\n\treturn lastTable;\n};\n\nconst prepareInlineTable = (table , keys ) => {\n\tconst { length } = keys;\n\tlet index = 0;\n\twhile ( index<length ) {\n\t\tconst key = keys[index++] ;\n\t\tif ( key in table ) {\n\t\t\ttable = table[key];\n\t\t\tisTable(table) || throws(Error$1(`Trying to assign property through non-Table value` + where(' at ')));\n\t\t\tisInline(table) && throws(Error$1(`Trying to assign property through static Inline Table` + where(' at ')));\n\t\t\tfromPair(table) || throws(Error$1(`A table defined implicitly via [] can not be accessed to via key/value pair` + where(', which at ')));\n\t\t}\n\t\telse {\n\t\t\ttable = table[key] = new Table(IMPLICITLY, PAIR);\n\t\t\twhile ( index<length ) { table = table[keys[index++] ] = new Table(IMPLICITLY, PAIR); }\n\t\t\treturn table;\n\t\t}\n\t}\n\treturn table;\n};\n\nconst checkLiteralString = (literal ) => {\n\t__CONTROL_CHARACTER_EXCLUDE_test(literal) && throws(SyntaxError$1(`Control characters other than Tab are not permitted in a Literal String` + where(', which was found at ')));\n\treturn literal;\n};\n\nconst assignLiteralString = ( (table , finalKey , literal ) => {\n\tif ( !literal.startsWith(`'''`) ) {\n\t\tconst $ = LITERAL_STRING_exec(literal) || throws(SyntaxError$1(`Bad literal string` + where(' at ')));\n\t\tconst value = checkLiteralString($[1]);\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, value.length + 2), value) : value;\n\t\treturn $[2];\n\t}\n\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(literal.slice(3));\n\tif ( $ ) {\n\t\tconst value = checkLiteralString($[1]) + $[2];\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, value.length + 6), value) : value;\n\t\treturn $[3];\n\t}\n\tconst start = new mark('Multi-line Literal String', literal.length);\n\tconst leadingNewline = !( literal = literal.slice(3) );\n\tif ( leadingNewline ) {\n\t\tliteral = start.must();\n\t\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(literal);\n\t\tif ( $ ) {\n\t\t\tconst value = checkLiteralString($[1]) + $[2];\n\t\t\ttable[finalKey] = preserveLiteral ? LiteralObject([ `'''`, literal.slice(0, value.length + 3) ], value) : value;\n\t\t\treturn $[3];\n\t\t}\n\t}\n\tuseWhatToJoinMultilineString===null && start.nowrap(ARGS_MODE);\n\tfor ( const lines = [ checkLiteralString(literal) ]; ; ) {\n\t\tconst line = start.must();\n\t\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(line);\n\t\tif ( $ ) {\n\t\t\tlines[lines.length] = checkLiteralString($[1]) + $[2];\n\t\t\tconst value = lines.join(useWhatToJoinMultilineString );\n\t\t\tif ( preserveLiteral ) {\n\t\t\t\tlines[lines.length - 1] += `'''`;\n\t\t\t\tleadingNewline ? lines.unshift(`'''`) : lines[0] = `'''${literal}`;\n\t\t\t\ttable[finalKey] = LiteralObject(lines, value);\n\t\t\t}\n\t\t\telse { table[finalKey] = value; }\n\t\t\treturn $[3];\n\t\t}\n\t\tlines[lines.length] = checkLiteralString(line);\n\t}\n} ) \n\t \n\t \n ;\n\nconst assignBasicString = ( (table , finalKey , literal ) => {\n\tif ( !literal.startsWith('\"\"\"') ) {\n\t\tconst index = BASIC_STRING_exec_1_endIndex(literal);\n\t\tconst value = BasicString(literal.slice(1, index));\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, index + 1), value) : value;\n\t\treturn literal.slice(index + 1).replace(PRE_WHITESPACE, '');\n\t}\n\tlet length = 3 + MULTI_LINE_BASIC_STRING_exec_0_length(literal.slice(3));\n\tif ( literal.length!==length ) {\n\t\tconst $ = literal.slice(3, length);\n\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\tconst value = BasicString($) + ( literal.startsWith('\"', length += 3) ? literal.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, length), value) : value;\n\t\treturn literal.slice(length).replace(PRE_WHITESPACE, '');\n\t}\n\tconst start = new mark('Multi-line Basic String', length);\n\tconst skipped = ( literal = literal.slice(3) ) ? 0 : 1;\n\tif ( skipped ) {\n\t\tliteral = start.must();\n\t\tlet length = MULTI_LINE_BASIC_STRING_exec_0_length(literal);\n\t\tif ( literal.length!==length ) {\n\t\t\tconst $ = literal.slice(0, length);\n\t\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\t\tconst value = MultilineBasicString($, useWhatToJoinMultilineString , skipped) + ( literal.startsWith('\"', length += 3) ? literal.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\t\ttable[finalKey] = preserveLiteral ? LiteralObject([ '\"\"\"', literal.slice(0, length) ], value) : value;\n\t\t\treturn literal.slice(length).replace(PRE_WHITESPACE, '');\n\t\t}\n\t}\n\tuseWhatToJoinMultilineString===null && start.nowrap(ARGS_MODE);\n\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test(literal + '\\n') || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\tfor ( const lines = [ literal ]; ; ) {\n\t\tconst line = start.must();\n\t\tlet length = MULTI_LINE_BASIC_STRING_exec_0_length(line);\n\t\tif ( line.length!==length ) {\n\t\t\tconst $ = line.slice(0, length);\n\t\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\t\tconst value = MultilineBasicString(lines.join('\\n') + '\\n' + $, useWhatToJoinMultilineString , skipped) + ( line.startsWith('\"', length += 3) ? line.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\t\tif ( preserveLiteral ) {\n\t\t\t\tskipped ? lines.unshift('\"\"\"') : lines[0] = `\"\"\"${literal}`;\n\t\t\t\tlines[lines.length] = `${$}\"\"\"`;\n\t\t\t\ttable[finalKey] = LiteralObject(lines, value);\n\t\t\t}\n\t\t\telse { table[finalKey] = value; }\n\t\t\treturn line.slice(length).replace(PRE_WHITESPACE, '');\n\t\t}\n\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test(line + '\\n') || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\tlines[lines.length] = line;\n\t}\n} ) \n\t \n\t \n ;\n\nconst KEYS = /*#__PURE__*/Null$1 (null);\nconst commentFor = (key ) => KEYS[key] || ( KEYS[key] = Symbol$1(key) );\nconst commentForThis = Symbol$1('this') ;\n\nconst { test: includesNewline } = theRegExp(/\\r?\\n/g);\nconst getCOMMENT = (table , keyComment ) => {\n\tif ( keyComment in table ) {\n\t\tconst comment = table[keyComment];\n\t\tif ( typeof comment!=='string' ) { throw TypeError$1(`the value of comment must be a string, while \"${comment===null ? 'null' : typeof comment}\" type is found`); }\n\t\tif ( includesNewline(comment) ) { throw SyntaxError$1(`the value of comment must be a string and can not include newline`); }\n\t\treturn ` #${comment}`;///\n\t}\n\treturn '';\n};\nconst getComment = (table , key ) => key in KEYS ? getCOMMENT(table, KEYS[key] ) : '';\n\nconst { test: IS_OFFSET$ } = theRegExp(OFFSET$);\nconst { test: IS_EMPTY } = theRegExp(/^\\[[\\t ]*]/);\n\nconst parseKeys = (rest ) => {\n\tlet lineRest = rest;\n\tconst leadingKeys = [];\n\tlet lastIndex = -1;\n\tfor ( ; ; ) {\n\t\tlineRest || throws(SyntaxError$1(`Empty bare key` + where(' at ')));\n\t\tif ( lineRest[0]==='\"' ) {\n\t\t\tconst index = BASIC_STRING_exec_1_endIndex(lineRest);\n\t\t\tKEYS$1.test(leadingKeys[++lastIndex] = BasicString(lineRest.slice(1, index))) || throws(Error$1(`Key not allowed` + where(' at ')));\n\t\t\tlineRest = lineRest.slice(index + 1);\n\t\t}\n\t\telse {\n\t\t\tconst isQuoted = lineRest[0]==='\\'';\n\t\t\tconst key = ( ( isQuoted ? __LITERAL_KEY_exec : __BARE_KEY_exec )(lineRest) || throws(SyntaxError$1(`Bad ${isQuoted ? 'literal string' : 'bare'} key` + where(' at '))) )[0];\n\t\t\tlineRest = lineRest.slice(key.length);\n\t\t\tKEYS$1.test(leadingKeys[++lastIndex] = isQuoted ? key.slice(1, -1) : key) || throws(Error$1(`Key not allowed` + where(' at ')));\n\t\t}\n\t\tif ( IS_DOT_KEY(lineRest) ) { lineRest = lineRest.replace(DOT_KEY, ''); }\n\t\telse { break; }\n\t}\n\tif ( disableDigit ) {\n\t\tconst keys = rest.slice(0, -lineRest.length);\n\t\t( isAmazing(keys) || enableNull && keys==='null' ) && throws(SyntaxError$1(`Bad bare key disabled by xOptions.string` + where(' at ')));\n\t}\n\tif ( disallowEmptyKey ) {\n\t\tlet index = lastIndex;\n\t\tdo { leadingKeys[index] || throws(SyntaxError$1(`Empty key is not allowed before TOML v0.5` + where(', which at '))); }\n\t\twhile ( index-- );\n\t}\n\tconst finalKey = leadingKeys[lastIndex] ;\n\tleadingKeys.length = lastIndex;\n\treturn { leadingKeys, finalKey, lineRest };\n};\n\nconst push = (lastArray , lineRest ) => {\n\tif ( lineRest[0]==='<' ) {\n\t\tconst { 1: tag } = { 2: lineRest } = _VALUE_PAIR_exec(lineRest) || throws(SyntaxError$1(`Bad tag ` + where(' at ')));\n\t\tcollect(tag, lastArray, null);\n\t\tswitch ( lineRest && lineRest[0] ) {\n\t\t\tcase ',':\n\t\t\tcase ']':\n\t\t\tcase '':\n\t\t\tcase '#':\n\t\t\t\tlastArray[lastArray.length] = undefined$1;\n\t\t\t\treturn lineRest;\n\t\t}\n\t}\n\tswitch ( lineRest[0] ) {\n\t\tcase '\\'':\n\t\t\treturn assignLiteralString(asStrings(lastArray), lastArray.length, lineRest);\n\t\tcase '\"':\n\t\t\treturn assignBasicString(asStrings(lastArray), lastArray.length, lineRest);\n\t\tcase '{':\n\t\t\tinlineTable || throws(SyntaxError$1(`Inline Table is not allowed before TOML v0.4` + where(', which at ')));\n\t\t\treturn equalInlineTable(asTables(lastArray), lastArray.length, lineRest);\n\t\tcase '[':\n\t\t\treturn equalStaticArray(asArrays(lastArray), lastArray.length, lineRest);\n\t}\n\tconst { 1: literal } = { 2: lineRest } = VALUE_REST_exec(lineRest) || throws(SyntaxError$1(`Bad atom value` + where(' at ')));\n\tif ( literal==='true' ) { asBooleans(lastArray)[lastArray.length] = true; }\n\telse if ( literal==='false' ) { asBooleans(lastArray)[lastArray.length] = false; }\n\telse if ( enableNull && literal==='null' ) { asNulls(lastArray)[lastArray.length] = null; }\n\telse if ( literal.includes(':') ) {\n\t\tif ( literal.includes('-') ) {\n\t\t\tif ( IS_OFFSET$(literal) ) {\n\t\t\t\tasOffsetDateTimes(lastArray)[lastArray.length] = new OffsetDateTime(literal);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Date-Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\t\tasLocalDateTimes(lastArray)[lastArray.length] = new LocalDateTime(literal);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\tasLocalTimes(lastArray)[lastArray.length] = new LocalTime(literal);\n\t\t}\n\t}\n\telse if ( literal.indexOf('-')!==literal.lastIndexOf('-') && literal[0]!=='-' ) {\n\t\tmoreDatetime || throws(SyntaxError$1(`Local Date is not allowed before TOML v0.5` + where(', which at ')));\n\t\tasLocalDates(lastArray)[lastArray.length] = new LocalDate(literal);\n\t}\n\telse {\n\t\tliteral.includes('.') || literal.includes('n') || ( literal.includes('e') || literal.includes('E') ) && !literal.startsWith('0x')\n\t\t\t? asFloats(lastArray)[lastArray.length] = preserveLiteral ? LiteralObject(literal, Float(literal)) : Float(literal)\n\t\t\t: asIntegers(lastArray)[lastArray.length] = preserveLiteral ? LiteralObject(literal, Integer(literal)) : Integer(literal)\n\t\t;\n\t}\n\treturn lineRest;\n};\n\nconst equalStaticArray = function * ( table , finalKey , lineRest ) {\n\tconst staticArray = table[finalKey] = newArray(STATICALLY);\n\tif ( IS_EMPTY(lineRest) ) {\n\t\tbeInline(staticArray, lineRest[1]===']' ? 0 : 3);\n\t\treturn lineRest.slice(lineRest.indexOf(']')).replace(SYM_WHITESPACE, '');\n\t}\n\tconst start = new mark('Static Array', lineRest.length);\n\tlet inline = lineRest.startsWith('[ ') || lineRest.startsWith('[\\t') ? 3 : 0;\n\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\tinline = null;\n\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t}\n\tif ( lineRest[0]===']' ) {\n\t\tinline===null || beInline(staticArray, inline);\n\t\treturn lineRest.replace(SYM_WHITESPACE, '');\n\t}\n\tfor ( ; ; ) {\n\t\tconst rest = push(staticArray, lineRest);\n\t\tlineRest = typeof rest==='string' ? rest : yield rest;\n\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\tinline = null;\n\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t}\n\t\tif ( lineRest[0]===',' ) {\n\t\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\t\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\t\tinline = null;\n\t\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t\t}\n\t\t\tif ( lineRest[0]===']' ) { break; }\n\t\t}\n\t\telse {\n\t\t\tif ( lineRest[0]===']' ) { break; }\n\t\t\tthrow throws(SyntaxError$1(`Unexpect character in static array item value` + where(', which is found at ')));\n\t\t}\n\t}\n\tinline===null || beInline(staticArray, inline);\n\treturn lineRest.replace(SYM_WHITESPACE, '');\n} \n\t \n\t \n ;\n\nconst equalInlineTable = function * ( table , finalKey , lineRest ) {\n\tconst inlineTable = table[finalKey] = new Table(DIRECTLY, INLINE);\n\tif ( allowInlineTableMultilineAndTrailingCommaEvenNoComma ) {\n\t\tconst start = new mark('Inline Table', lineRest.length);\n\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\t\tlet inline = true;\n\t\tfor ( ; ; ) {\n\t\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\t\tinline = false;\n\t\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t\t}\n\t\t\tif ( lineRest[0]==='}' ) { break; }\n\t\t\tconst forComment = ForComment(inlineTable, lineRest);\n\t\t\tconst rest = assign(forComment);\n\t\t\tlineRest = typeof rest==='string' ? rest : yield rest;\n\t\t\tif ( lineRest ) {\n\t\t\t\tif ( lineRest[0]==='#' ) {\n\t\t\t\t\tif ( preserveComment ) { forComment.table[commentFor(forComment.finalKey)] = lineRest.slice(1); }\n\t\t\t\t\tinline = false;\n\t\t\t\t\tdo { lineRest = start.must().replace(PRE_WHITESPACE, ''); }\n\t\t\t\t\twhile ( !lineRest || lineRest[0]==='#' );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinline = false;\n\t\t\t\tdo { lineRest = start.must().replace(PRE_WHITESPACE, ''); }\n\t\t\t\twhile ( !lineRest || lineRest[0]==='#' );\n\t\t\t}\n\t\t\tif ( lineRest[0]===',' ) { lineRest = lineRest.replace(SYM_WHITESPACE, ''); }\n\t\t}\n\t\tinline || beInline(inlineTable, false);\n\t}\n\telse {\n\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '') || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\tif ( lineRest[0]!=='}' ) {\n\t\t\tfor ( ; ; ) {\n\t\t\t\tlineRest[0]==='#' && throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\tconst rest = assign(ForComment(inlineTable, lineRest));\n\t\t\t\tlineRest = ( typeof rest==='string' ? rest : yield rest ) || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\tif ( lineRest[0]==='}' ) { break; }\n\t\t\t\tif ( lineRest[0]===',' ) {\n\t\t\t\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '') || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\t\tlineRest[0]==='}' && throws(SyntaxError$1(`The last property of an Inline Table can not have a trailing comma` + where(', which was found at ')));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn lineRest.replace(SYM_WHITESPACE, '');\n} \n\t \n\t \n ;\n\n \nconst ForComment = (lastInlineTable , lineRest ) => {\n\tconst { leadingKeys, finalKey, tag } = { lineRest } = KEY_VALUE_PAIR_exec_groups(parseKeys(lineRest));\n\treturn { table: prepareInlineTable(lastInlineTable, leadingKeys), finalKey, tag, lineRest };\n};\nconst assign = ({ finalKey, tag, lineRest, table } ) => {\n\tfinalKey in table && throws(Error$1(`Duplicate property definition` + where(' at ')));\n\tif ( tag ) {\n\t\tcollect(tag, null, table, finalKey);\n\t\tswitch ( lineRest && lineRest[0] ) {\n\t\t\tcase ',':\n\t\t\tcase '}':\n\t\t\tcase '':\n\t\t\tcase '#':\n\t\t\t\ttable[finalKey] = undefined$1;\n\t\t\t\treturn lineRest;\n\t\t}\n\t}\n\tswitch ( lineRest && lineRest[0] ) {\n\t\tcase '\\'':\n\t\t\treturn assignLiteralString(table, finalKey, lineRest);\n\t\tcase '\"':\n\t\t\treturn assignBasicString(table, finalKey, lineRest);\n\t\tcase '{':\n\t\t\tinlineTable || throws(SyntaxError$1(`Inline Table is not allowed before TOML v0.4` + where(', which at ')));\n\t\t\treturn equalInlineTable(table, finalKey, lineRest);\n\t\tcase '[':\n\t\t\treturn equalStaticArray(table, finalKey, lineRest);\n\t}\n\tconst { 1: literal } = { 2: lineRest } = VALUE_REST_exec(lineRest) || throws(SyntaxError$1(`Bad atom value` + where(' at ')));\n\tif ( literal==='true' ) { table[finalKey] = true; }\n\telse if ( literal==='false' ) { table[finalKey] = false; }\n\telse if ( enableNull && literal==='null' ) { table[finalKey] = null; }\n\telse if ( literal.includes(':') ) {\n\t\tif ( literal.includes('-') ) {\n\t\t\tif ( IS_OFFSET$(literal) ) {\n\t\t\t\ttable[finalKey] = new OffsetDateTime(literal);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Date-Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\t\ttable[finalKey] = new LocalDateTime(literal);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\ttable[finalKey] = new LocalTime(literal);\n\t\t}\n\t}\n\telse if ( literal.indexOf('-')!==literal.lastIndexOf('-') && literal[0]!=='-' ) {\n\t\tmoreDatetime || throws(SyntaxError$1(`Local Date is not allowed before TOML v0.5` + where(', which at ')));\n\t\ttable[finalKey] = new LocalDate(literal);\n\t}\n\telse {\n\t\ttable[finalKey] = literal.includes('.') || literal.includes('n') || ( literal.includes('e') || literal.includes('E') ) && !literal.startsWith('0x')\n\t\t\t? preserveLiteral ? LiteralObject(literal, Float(literal)) : Float(literal)\n\t\t\t: preserveLiteral ? LiteralObject(literal, Integer(literal)) : Integer(literal)\n\t\t;\n\t}\n\treturn lineRest;\n};\n\nconst Root = () => {\n\tconst rootTable = new Table;\n\tlet lastSectionTable = rootTable;\n\twhile ( rest() ) {\n\t\tconst line = next().replace(PRE_WHITESPACE, '');\n\t\tif ( line ) {\n\t\t\tif ( line[0]==='[' ) {\n\t\t\t\tconst { leadingKeys, finalKey, asArrayItem, tag, lineRest } = TABLE_DEFINITION_exec_groups(line, parseKeys);\n\t\t\t\tconst table = prepareTable(rootTable, leadingKeys);\n\t\t\t\tif ( lineRest ) {\n\t\t\t\t\tlineRest[0]==='#' || throws(SyntaxError$1(`Unexpect charachtor after table header` + where(' at ')));\n\t\t\t\t}\n\t\t\t\tlastSectionTable = appendTable(table, finalKey, asArrayItem, tag);\n\t\t\t\tpreserveComment && lineRest && ( lastSectionTable[commentForThis] = asArrayItem ? lineRest.slice(1) : table[commentFor(finalKey)] = lineRest.slice(1) );\n\t\t\t}\n\t\t\telse if ( line[0]==='#' ) {\n\t\t\t\t__CONTROL_CHARACTER_EXCLUDE_test(line) && throws(SyntaxError$1(`Control characters other than Tab are not permitted in comments` + where(', which was found at ')));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst forComment = ForComment(lastSectionTable, line);\n\t\t\t\tlet rest = assign(forComment);\n\t\t\t\ttypeof rest==='string' || ( rest = x (rest) );\n\t\t\t\tif ( rest ) {\n\t\t\t\t\trest[0]==='#' || throws(SyntaxError$1(`Unexpect charachtor after key/value pair` + where(' at ')));\n\t\t\t\t\tif ( preserveComment ) { forComment.table[commentFor(forComment.finalKey)] = rest.slice(1); }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn rootTable;\n};\n\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n\nconst DATE = Date.prototype;\n\nconst valueOf$2 = String.prototype.valueOf;\n\nconst isString = (\n\t/* j-globals: class.isString (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf$2);\n\t\t\treturn function isString (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isString (value) {\n\t\t\ttry { valueOf$2.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isString (internal) */\n);\n\nconst valueOf$1 = Number.prototype.valueOf;\n\nconst isNumber = (\n\t/* j-globals: class.isNumber (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf$1);\n\t\t\treturn function isNumber (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isNumber (value) {\n\t\t\ttry { valueOf$1.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isNumber (internal) */\n);\n\nconst isBigInt = (\n\t/* j-globals: class.isBigInt (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( typeof BigInt==='function' ) {\n\t\t\tvar valueOf_apply = apply.bind(BigInt.prototype.valueOf);\n\t\t\treturn function isBigInt (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isBigInt () { return false; };\n\t}()\n\t/* j-globals: class.isBigInt (internal) */\n);\n\nconst valueOf = BigInt.prototype.valueOf;\n\nconst isBoolean = (\n\t/* j-globals: class.isBoolean (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf);\n\t\t\treturn function isBoolean (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isBoolean (value) {\n\t\t\ttry { valueOf.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isBoolean (internal) */\n);\n\nconst ESCAPED = /*#__PURE__*/Null$1 ({\n\t.../*#__PURE__*/fromEntries(/*#__PURE__*/[ ...Array$1(0x20) ].map((_, charCode) => [ fromCharCode(charCode), '\\\\u' + charCode.toString(16).toUpperCase().padStart(4, '0') ])),\n\t'\\b': '\\\\b',\n\t'\\t': '\\\\t',\n\t'\\n': '\\\\n',\n\t'\\f': '\\\\f',\n\t'\\r': '\\\\r',\n\t'\"': '\\\\\"',\n\t'\"\"\"': '\"\"\\\\\"',\n\t'\\\\': '\\\\\\\\',\n\t'\\x7F': '\\\\u007F',\n});\n\nconst { test: NEED_BASIC } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F'\\x7F]/);\nconst BY_ESCAPE = /[^\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]+|./gs;\nconst { test: NEED_ESCAPE } = theRegExp(/^[\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]/);\nconst singlelineString = (value ) => {\n\tif ( NEED_BASIC(value) ) {\n\t\tconst parts = value.match(BY_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\treturn `\"${parts.join('')}\"`;\n\t}\n\treturn `'${value}'`;\n};\nconst singlelineBasicString = (value ) => {\n\tif ( value ) {\n\t\tconst parts = value.match(BY_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\treturn `\"${parts.join('')}\"`;\n\t}\n\treturn `\"\"`;\n};\n\nconst { test: NEED_MULTILINE_BASIC } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F\\x7F]|'''/);\nconst { test: multilineNeedBasic } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F\\x7F]|'''/);\nconst { test: REAL_MULTILINE_ESCAPE } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F\\\\\\x7F]|\"\"\"/);\nconst BY_MULTILINE_ESCAPE = /[^\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]+|\"\"\"|./gs;\nconst { test: NEED_MULTILINE_ESCAPE } = theRegExp(/^(?:[\\x00-\\x08\\x0A-\\x1F\\\\\\x7F]|\"\"\")/);\nconst escape_multiline = (lines , lineIndex ) => {\n\tconst line = lines[lineIndex] ;\n\tif ( REAL_MULTILINE_ESCAPE(line) ) {\n\t\tconst parts = line.match(BY_MULTILINE_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_MULTILINE_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\tlines[lineIndex] = parts.join('');\n\t}\n};\n\n \nconst Lines = (lines ) => ( lines = [ '', ...lines ] ).length===1 ? [ '', '' ] : lines ;\n\nconst multilineString = (lines ) => {\n\tconst lastIndex = lines.length - 1;\n\tlet index = lastIndex;\n\tdo { if ( NEED_MULTILINE_BASIC(lines[index] ) ) { break; } }\n\twhile ( --index );\n\tif ( index ) {\n\t\tindex = lastIndex;\n\t\tescape_multiline(lines, index);\n\t\tlines[index] += lines[0] = '\"\"\"';\n\t\twhile ( --index ) { escape_multiline(lines, index); }\n\t}\n\telse { lines[lastIndex] += lines[0] = '\\'\\'\\''; }\n\treturn lines ;\n};\n\nconst multilineBasicString = (lines ) => {\n\tlet index = lines.length - 1;\n\tescape_multiline(lines, index);\n\tlines[index] += lines[0] = '\"\"\"';\n\twhile ( --index ) { escape_multiline(lines, index); }\n\treturn lines ;\n};\n\nconst multilineLiteralString = (lines ) => {\n\tlines[lines.length - 1] += lines[0] = '\\'\\'\\'';\n\treturn lines ;\n};\n\nconst Float64Array$1 = Float64Array;\n\nconst Uint8Array$1 = Uint8Array;\n\nconst _Infinity = -Infinity;\n\nconst { test: INTEGER_LIKE } = theRegExp(/^-?\\d+$/);\nconst ensureFloat = (literal ) => INTEGER_LIKE(literal) ? literal + '.0' : literal;\n\nconst float64Array = new Float64Array$1([ NaN$1 ]);\nconst uint8Array = new Uint8Array$1(float64Array.buffer);\nconst NaN_7 = uint8Array[7] ;\n\nconst float = NaN_7===new Uint8Array$1(new Float64Array$1([ -NaN$1 ]).buffer)[7] \n\t? (value ) => value\n\t\t? value===Infinity ? 'inf' : value===_Infinity ? '-inf' : ensureFloat('' + value)\n\t\t: value===value ? is(value, 0) ? '0.0' : '-0.0' : 'nan'\n\t: (value ) => value\n\t\t? value===Infinity ? 'inf' : value===_Infinity ? '-inf' : ensureFloat('' + value)\n\t\t: value===value ? is(value, 0) ? '0.0' : '-0.0' : ( float64Array[0] = value, uint8Array[7] )===NaN_7 ? 'nan' : '-nan';\n\nconst isDate = /*#__PURE__*/isPrototypeOf.bind(DATE) ;\n\nconst { test: BARE } = theRegExp(/^[\\w-]+$/);\nconst $Key$ = (key ) => BARE(key) ? key : singlelineString(key);\n\nconst FIRST = /[^.]+/;\nconst literalString = (value ) => `'${value}'`;\nconst $Keys = (keys ) => isAmazing(keys) ? keys.replace(FIRST, literalString) : keys==='null' ? `'null'` : keys;\n\nclass TOMLSection extends Array$1 {\n\t\n\t document ;\n\t\n\tconstructor (document ) {\n\t\tsuper();\n\t\tthis.document = document;\n\t\treturn this;\n\t}\n\t\n\t[Symbol$1.toPrimitive] () { return this.join(this.document.newline); }\n\t\n\tappendNewline () { this[this.length] = ''; }\n\t set appendLine (source ) { this[this.length] = source; }\n\t set appendInline (source ) { this[this.length - 1] += source; } \n\t set appendInlineIf (source ) { source && ( this[this.length - 1] += source ); }///\n\t\n\t* assignBlock (documentKeys_ , sectionKeys_ , table , tableKeys ) {\n\t\tconst { document } = this;\n\t\tconst { newlineUnderHeader, newlineUnderSectionButPair } = document;\n\t\tconst newlineAfterDotted = sectionKeys_ ? document.newlineUnderPairButDotted : false;\n\t\tconst newlineAfterPair = sectionKeys_ ? document.newlineUnderDotted : document.newlineUnderPair;\n\t\tfor ( const tableKey of tableKeys ) {\n\t\t\tconst value = table[tableKey] ;\n\t\t\tconst $key$ = $Key$(tableKey);\n\t\t\tconst documentKeys = documentKeys_ + $key$;\n\t\t\tif ( isArray$1(value) ) {\n\t\t\t\tconst { length } = value;\n\t\t\t\tif ( length ) {\n\t\t\t\t\tlet firstItem = value[0];\n\t\t\t\t\tif ( isSection(firstItem) ) {\n\t\t\t\t\t\tconst tableHeader = `[[${documentKeys}]]` ;\n\t\t\t\t\t\tconst documentKeys_ = documentKeys + '.' ;\n\t\t\t\t\t\tlet index = 0;\n\t\t\t\t\t\tlet table = firstItem;\n\t\t\t\t\t\tfor ( ; ; ) {\n\t\t\t\t\t\t\tconst section = document.appendSection();\n\t\t\t\t\t\t\tsection[0] = tableHeader + getCOMMENT(table, commentForThis);\n\t\t\t\t\t\t\tif ( newlineUnderHeader ) {\n\t\t\t\t\t\t\t\tsection[1] = '';\n\t\t\t\t\t\t\t\tyield section.assignBlock(documentKeys_, ``, table, getOwnPropertyNames(table));\n\t\t\t\t\t\t\t\tnewlineUnderSectionButPair && section.length!==2 && section.appendNewline();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tyield section.assignBlock(documentKeys_, ``, table, getOwnPropertyNames(table));\n\t\t\t\t\t\t\t\tnewlineUnderSectionButPair && section.appendNewline();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( ++index===length ) { break; }\n\t\t\t\t\t\t\ttable = ( value )[index] ;\n\t\t\t\t\t\t\tif ( !isSection(table) ) { throw TypeError$1(`the first table item marked by Section() means the parent array is an array of tables, which can not include other types or table not marked by Section() any more in the rest items`); }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse { let index = 1; while ( index!==length ) { if ( isSection(value[index++] ) ) { throw TypeError$1(`if an array is not array of tables, it can not include any table that marked by Section()`); } } }\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( isSection(value) ) {\n\t\t\t\t\tconst section = document.appendSection();\n\t\t\t\t\tsection[0] = `[${documentKeys}]${\n\t\t\t\t\t\tdocument.preferCommentForThis\n\t\t\t\t\t\t\t? getCOMMENT(value, commentForThis) || getComment(table, tableKey)\n\t\t\t\t\t\t\t: getComment(table, tableKey) || getCOMMENT(value, commentForThis)\n\t\t\t\t\t}`;\n\t\t\t\t\tif ( newlineUnderHeader ) {\n\t\t\t\t\t\tsection[1] = '';\n\t\t\t\t\t\tyield section.assignBlock(documentKeys + '.' , ``, value, getOwnPropertyNames(value));\n\t\t\t\t\t\tnewlineUnderSectionButPair && section.length!==2 && section.appendNewline();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyield section.assignBlock(documentKeys + '.' , ``, value, getOwnPropertyNames(value));\n\t\t\t\t\t\tnewlineUnderSectionButPair && section.appendNewline();\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst sectionKeys = sectionKeys_ + $key$;\n\t\t\tthis.appendLine = $Keys(sectionKeys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value('', value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\t--this.length;\n\t\t\t\tyield this.assignBlock(documentKeys + '.' , sectionKeys + '.' , value , valueKeysIfValueIsDottedTable);\n\t\t\t\tnewlineAfterDotted && this.appendNewline();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.appendInlineIf = getComment(table, tableKey);\n\t\t\t\tnewlineAfterPair && this.appendNewline();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t value (indent , value , returnValueKeysIfValueIsDottedTable ) {\n\t\tswitch ( typeof value ) {\n\t\t\tcase 'object':\n\t\t\t\tif ( value===null ) {\n\t\t\t\t\tif ( this.document.nullDisabled ) { throw TypeError$1(`toml can not stringify \"null\" type value without truthy options.xNull`); }\n\t\t\t\t\tthis.appendInline = 'null';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst inlineMode = ofInline(value);\n\t\t\t\tif ( isArray$1(value) ) {\n\t\t\t\t\tif ( inlineMode===undefined$1 ) { this.staticArray(indent, value); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst { $singlelineArray = inlineMode } = this.document;\n\t\t\t\t\t\tthis.singlelineArray(indent, value, $singlelineArray);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( inlineMode!==undefined$1 ) {\n\t\t\t\t\tinlineMode || this.document.multilineTableDisabled\n\t\t\t\t\t\t? this.inlineTable(indent, value )\n\t\t\t\t\t\t: this.multilineTable(indent, value , this.document.multilineTableComma);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( isDate(value) ) {\n\t\t\t\t\tthis.appendInline = value.toISOString().replace('T', this.document.T).replace('Z', this.document.Z);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( _literal in value ) {\n\t\t\t\t\tconst literal = ( value )[_literal];\n\t\t\t\t\tif ( typeof literal==='string' ) { this.appendInline = literal; }\n\t\t\t\t\telse if ( isArray$1(literal) ) {\n\t\t\t\t\t\tconst { length } = literal;\n\t\t\t\t\t\tif ( length ) {\n\t\t\t\t\t\t\tthis.appendInline = literal[0];\n\t\t\t\t\t\t\tlet index = 1;\n\t\t\t\t\t\t\twhile ( index!==length ) { this.appendLine = literal[index++] ; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { throw TypeError$1(`literal value is broken`); }\n\t\t\t\t\t}\n\t\t\t\t\telse { throw TypeError$1(`literal value is broken`); }\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( isString(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object String]`); }\n\t\t\t\tif ( isNumber(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object Number]`); }\n\t\t\t\tif ( isBigInt(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object BigInt]`); }\n\t\t\t\tif ( isBoolean(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object Boolean]`); }\n\t\t\t\tif ( returnValueKeysIfValueIsDottedTable ) {\n\t\t\t\t\tconst keys = getOwnPropertyNames(value );\n\t\t\t\t\tif ( keys.length ) { return keys; }\n\t\t\t\t\tthis.appendInline = '{ }';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.inlineTable(indent, value );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'bigint':\n\t\t\t\tthis.appendInline = '' + value;\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\tthis.appendInline = this.document.asInteger(value) ? is(value, -0) ? '-0' : '' + value : float(value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\tthis.appendInline = singlelineString(value);\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tthis.appendInline = value ? 'true' : 'false';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow TypeError$1(`toml can not stringify \"${typeof value}\" type value`);\n\t\t}\n\t\treturn null;\n\t}\n\t\n\t singlelineArray (indent , staticArray , inlineMode ) {\n\t\tconst { length } = staticArray;\n\t\tif ( length ) {\n\t\t\tthis.appendInline = inlineMode&0b10 ? '[ ' : '[';\n\t\t\tthis.value(indent, staticArray[0] , false);\n\t\t\tlet index = 1;\n\t\t\twhile ( index!==length ) {\n\t\t\t\tthis.appendInline = ', ';\n\t\t\t\tthis.value(indent, staticArray[index++] , false);\n\t\t\t}\n\t\t\tthis.appendInline = inlineMode&0b10 ? ' ]' : ']';\n\t\t}\n\t\telse { this.appendInline = inlineMode&0b01 ? '[ ]' : '[]'; }\n\t}\n\t staticArray (indent , staticArray ) {\n\t\tthis.appendInline = '[';\n\t\tconst indent_ = indent + this.document.indent;\n\t\tconst { length } = staticArray;\n\t\tlet index = 0;\n\t\twhile ( index!==length ) {\n\t\t\tthis.appendLine = indent_;\n\t\t\tthis.value(indent_, staticArray[index++] , false);\n\t\t\tthis.appendInline = ',';\n\t\t}\n\t\tthis.appendLine = indent + ']';\n\t}\n\t\n\t inlineTable (indent , inlineTable ) {\n\t\tconst keys = getOwnPropertyNames(inlineTable);\n\t\tif ( keys.length ) {\n\t\t\tthis.appendInline = '{ ';\n\t\t\tthis.assignInline(indent, inlineTable, ``, keys);\n\t\t\tthis[this.length - 1] = this[this.length - 1] .slice(0, -2) + ' }';\n\t\t}\n\t\telse { this.appendInline = '{ }'; }\n\t}\n\t multilineTable (indent , inlineTable , comma ) {\n\t\tthis.appendInline = '{';\n\t\tthis.assignMultiline(indent, inlineTable, ``, getOwnPropertyNames(inlineTable), comma);\n\t\tthis.appendLine = indent + '}';\n\t}\n\t assignInline (indent , inlineTable , keys_ , keys ) {\n\t\tfor ( const key of keys ) {\n\t\t\tconst value = inlineTable[key] ;\n\t\t\tconst keys = keys_ + $Key$(key);\n\t\t\tconst before_value = this.appendInline = $Keys(keys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value(indent, value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\tthis[this.length - 1] = this[this.length - 1] .slice(0, -before_value.length);\n\t\t\t\tthis.assignInline(indent, value , keys + '.' , valueKeysIfValueIsDottedTable);\n\t\t\t}\n\t\t\telse { this.appendInline = ', '; }\n\t\t}\n\t}\n\t assignMultiline (indent , inlineTable , keys_ , keys , comma ) {\n\t\tconst indent_ = indent + this.document.indent;\n\t\tfor ( const key of keys ) {\n\t\t\tconst value = inlineTable[key] ;\n\t\t\tconst keys = keys_ + $Key$(key);\n\t\t\tthis.appendLine = indent_ + $Keys(keys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value(indent_, value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\t--this.length;\n\t\t\t\tthis.assignMultiline(indent, value , keys + '.' , valueKeysIfValueIsDottedTable, comma);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcomma\n\t\t\t\t\t? this.appendInline = ',' + getComment(inlineTable, key)\n\t\t\t\t\t: this.appendInlineIf = getComment(inlineTable, key);\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n\nconst name2code = /*#__PURE__*/Null$1({\n\tdocument: 0,\n\tsection: 1,\n\theader: 2,\n\tpairs: 3,\n\tpair: 4,\n} );\n\nconst { test: IS_INDENT } = theRegExp(/^[\\t ]*$/);\n\nconst return_false = () => false;\n\nclass TOMLDocument extends Array$1 {\n\t\n\t get ['constructor'] () { return Array$1; }\n\t\n\t0 = new TOMLSection(this);\n\t\n\t asInteger = return_false;\n\t newline = '';\n\t newlineUnderSection = true;\n\t newlineUnderSectionButPair = true;\n\t newlineUnderHeader = true;\n\t newlineUnderPair = false;\n\t newlineUnderPairButDotted = false;\n\t newlineUnderDotted = false;\n\t indent = '\\t';\n\t T = 'T';\n\t Z = 'Z';\n\t nullDisabled = true;\n\t multilineTableDisabled = true;\n\t multilineTableComma ;\n\t preferCommentForThis = false;\n\t $singlelineArray ;\n\t\n\tconstructor (options ) {\n\t\t\n\t\tsuper();\n\t\t\n\t\tif ( options==null ) { return this; }\n\t\t\n\t\tconst { integer } = options;\n\t\tif ( integer===undefined ) ;\n\t\telse if ( integer===MAX_SAFE_INTEGER ) { this.asInteger = isSafeInteger; }\n\t\telse if ( typeof integer==='number' ) {\n\t\t\tif ( !isSafeInteger(integer) ) { throw RangeError$1(`TOML.stringify(,{integer}) can only be a safe integer`); }\n\t\t\tconst max = integer>=0 ? integer : -integer - 1;\n\t\t\tconst min = integer>=0 ? -integer : integer;\n\t\t\tthis.asInteger = (number ) => isSafeInteger(number) && min<=number && number<=max;\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{integer}) can only be number`); }\n\t\t\n\t\tconst { newline } = options;\n\t\tif ( newline===undefined ) ;\n\t\telse if ( newline==='\\n' || newline==='\\r\\n' ) { this.newline = newline; }\n\t\telse {\n\t\t\tthrow typeof newline==='string'\n\t\t\t\t? SyntaxError$1(`TOML.stringify(,{newline}) can only be valid TOML newline`)\n\t\t\t\t: TypeError$1(`TOML.stringify(,{newline}) can only be string`);\n\t\t}\n\t\t\n\t\tconst { preferCommentFor } = options;\n\t\tif ( preferCommentFor===undefined ) ;\n\t\telse if ( preferCommentFor==='this' || preferCommentFor==='key' ) { this.preferCommentForThis = preferCommentFor==='this'; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{preferCommentFor) can only be 'key' or 'this'`); }\n\t\t\n\t\tconst { [options.newlineAround || 'header']: around = name2code.header } = name2code;\n\t\tthis.newlineUnderSection = around>0;\n\t\tthis.newlineUnderSectionButPair = around===1 || around===2;\n\t\tthis.newlineUnderHeader = around>1;\n\t\tthis.newlineUnderPair = around>2;\n\t\tthis.newlineUnderPairButDotted = around===3;\n\t\tthis.newlineUnderDotted = around>3;\n\t\t\n\t\tconst { indent } = options;\n\t\tif ( indent===undefined ) ;\n\t\telse if ( typeof indent==='string' ) {\n\t\t\tif ( !IS_INDENT(indent) ) { throw SyntaxError$1(`TOML.stringify(,{indent}) can only include Tab or Space`); }\n\t\t\tthis.indent = indent;\n\t\t}\n\t\telse if ( typeof indent==='number' ) {\n\t\t\tif ( !isSafeInteger(indent) ) { throw RangeError$1(`TOML.stringify(,{indent:${indent}}) is out of range`); }\n\t\t\tthis.indent = ' '.repeat(indent);\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{indent}) can not be \"${typeof indent}\" type`); }\n\t\t\n\t\tconst { T } = options;\n\t\tif ( T===undefined ) ;\n\t\telse if ( T===' ' || T==='t' || T==='T' ) { this.T = T; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{T}) can only be \"T\" or \" \" or \"t\"`); }\n\t\t\n\t\tconst { Z } = options;\n\t\tif ( Z===undefined ) ;\n\t\telse if ( Z==='z' || Z==='Z' ) { this.Z = Z; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{Z}) can only be \"Z\" or \"z\"`); }\n\t\t\n\t\tif ( options.xNull ) { this.nullDisabled = false; }\n\t\t\n\t\tconst { xBeforeNewlineInMultilineTable } = options;\n\t\tif ( xBeforeNewlineInMultilineTable===undefined ) ;\n\t\telse if ( xBeforeNewlineInMultilineTable==='' || xBeforeNewlineInMultilineTable===',' ) {\n\t\t\tthis.multilineTableDisabled = false;\n\t\t\tthis.multilineTableComma = !!xBeforeNewlineInMultilineTable;\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{xBeforeNewlineInMultilineTable}) can only be \"\" or \",\"`); }\n\t\t\n\t\tconst $singlelineArray = options.forceInlineArraySpacing;\n\t\tswitch ( $singlelineArray ) {\n\t\t\tcase undefined:\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\tthis.$singlelineArray = $singlelineArray;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow typeof $singlelineArray==='number'\n\t\t\t\t\t? RangeError$1(`array inline mode must be 0 | 1 | 2 | 3, not including ${$singlelineArray}`)\n\t\t\t\t\t: TypeError$1(`array inline mode must be \"number\" type, not including ${$singlelineArray===null ? '\"null\"' : typeof $singlelineArray}`);\n\t\t}\n\t\t\n\t\treturn this;\n\t\t\n\t}\n\t\n\tappendSection () { return this[this.length] = new TOMLSection(this); }\n\t\n}\n\nconst linesFromStringify = new WeakSet$1 ();\nconst beLinesFromStringify = /*#__PURE__*/add.bind(linesFromStringify);\nconst isLinesFromStringify = /*#__PURE__*/has.bind(linesFromStringify);\nconst stringify = (rootTable , options ) => {\n\tconst document = new TOMLDocument(options);\n\tconst section = document[0];\n\tsection[0] = '';\n\tx (section.assignBlock(``, ``, rootTable, getOwnPropertyNames(rootTable)));\n\tdocument.newlineUnderSectionButPair && section.length!==1 && section.appendNewline();\n\tdocument.newlineUnderSection || document[document.length - 1] .appendNewline();\n\tif ( document.newline ) { return document.join(document.newline); }\n\tconst lines = document.flat();\n\tbeLinesFromStringify(lines);\n\treturn lines;\n};\nconst multiline = /*#__PURE__*/( () => {\n\tconst multiline = (value , string ) =>\n\t\ttypeof value==='string' ? LiteralObject(( multilineNeedBasic(value) ? multilineBasicString : multilineLiteralString )(( '\\n' + value ).split('\\n') ), value) :\n\t\t\tisArray$1(value) ? LiteralObject(multilineString(Lines(value)), typeof string==='string' ? string : Null$1(null)) :\n\t\t\t\tmultilineTable(value);\n\tmultiline.basic = (lines , string ) =>\n\t\ttypeof lines==='string'\n\t\t\t? LiteralObject(multilineBasicString(( '\\n' + lines ).split('\\n') ), lines)\n\t\t\t: LiteralObject(multilineBasicString(Lines(lines)), typeof string==='string' ? string : Null$1(null))\n\t;\n\tmultiline.array = multilineArray;\n\tfreeze(multiline);\n\treturn multiline;\n} )();\nconst basic = (value ) => LiteralObject(singlelineBasicString(value), value);\nconst literal = (literal , ...chars ) => {\n\tif ( typeof literal==='string' ) {\n\t\tif ( chars.length===1 ) {\n\t\t\treturn LiteralObject(literal.includes('\\n') ? literal.split('\\n') : literal, chars[0] );\n\t\t}\n\t}\n\telse {\n\t\tlet index = chars.length;\n\t\tif ( index ) {\n\t\t\tconst { raw } = literal;\n\t\t\tliteral = raw[index] ;\n\t\t\twhile ( index ) { chars[--index] += raw[index] ; }\n\t\t\tliteral = chars.join('') + literal;\n\t\t}\n\t\telse { literal = literal.raw[0] ; }\n\t}\n\treturn LiteralObject(literal.includes('\\n') ? literal.split('\\n') : literal, Null$1(null));\n};\n\nconst textDecoder = /*#__PURE__*/new TextDecoder$1('utf-8', Null$1({ fatal: true, ignoreBOM: false }));\nconst binary2string = (arrayBufferLike ) => {\n\tif ( isView(arrayBufferLike) ? arrayBufferLike.length!==arrayBufferLike.byteLength : !isArrayBuffer(arrayBufferLike) ) { throw TypeError$1(`only Uint8Array or ArrayBuffer is acceptable`); }\n\ttry { return textDecoder.decode(arrayBufferLike); }\n\tcatch { throw Error$1(`A TOML doc must be a (ful-scalar) valid UTF-8 file, without any unknown code point.`); }\n};\nconst isBinaryLike = (value ) => 'byteLength' in value;///\n\nconst { test: includesNonScalar } = theRegExp(/[\\uD800-\\uDFFF]/u);\nconst assertFulScalar = (string ) => {\n\tif ( clearRegExp$1(includesNonScalar(string)) ) { throw Error$1(`A TOML doc must be a (ful-scalar) valid UTF-8 file, without any uncoupled UCS-4 character code.`); }\n};\n\nlet holding = false;\n\nconst parse = (source , specificationVersion , multilineStringJoiner , bigint , x , argsMode ) => {\n\tlet sourcePath = '';\n\tif ( typeof source==='object' && source ) {\n\t\tif ( isArray$1(source) ) { throw TypeError$1(isLinesFromStringify(source) ? `TOML.parse(array from TOML.stringify(,{newline?}))` : `TOML.parse(array)`); }\n\t\telse if ( isBinaryLike(source) ) { source = binary2string(source); }\n\t\telse {\n\t\t\tsourcePath = source.path;\n\t\t\tif ( typeof sourcePath!=='string' ) { throw TypeError$1(`TOML.parse(source.path)`); }\n\t\t\tconst { data, require: req = typeof require==='function' ? require : undefined$1 } = source;\n\t\t\tif ( req ) {\n\t\t\t\tconst { resolve } = req;\n\t\t\t\tif ( resolve!=null ) {\n\t\t\t\t\tconst { paths } = resolve;\n\t\t\t\t\tif ( paths!=null ) {\n\t\t\t\t\t\tconst ret = apply$1(paths, resolve, [ '' ]);\n\t\t\t\t\t\tif ( ret!=null ) {\n\t\t\t\t\t\t\tconst val = ret[0];\n\t\t\t\t\t\t\tif ( val!=null ) {\n\t\t\t\t\t\t\t\tconst dirname_ = val.replace(/node_modules$/, '');\n\t\t\t\t\t\t\t\tif ( dirname_ ) {\n\t\t\t\t\t\t\t\t\tsourcePath = ( req )('path').resolve(dirname_, sourcePath);\n\t\t\t\t\t\t\t\t\tif ( typeof sourcePath!=='string' ) { throw TypeError$1(`TOML.parse(source.require('path').resolve)`); }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( data===undefined$1 ) {\n\t\t\t\t\tconst data = ( req )('fs').readFileSync(sourcePath);\n\t\t\t\t\tif ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\t\telse { throw TypeError$1(`TOML.parse(source.require('fs').readFileSync)`); }\n\t\t\t\t}\n\t\t\t\telse if ( typeof data==='string' ) { assertFulScalar(source = data); }\n\t\t\t\telse if ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\telse { throw TypeError$1(`TOML.parse(source.data)`); }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( data===undefined$1 ) { throw TypeError$1(`TOML.parse(source.data|source.require)`); }\n\t\t\t\telse if ( typeof data==='string' ) { assertFulScalar(source = data); }\n\t\t\t\telse if ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\telse { throw TypeError$1(`TOML.parse(source.data)`); }\n\t\t\t}\n\t\t}\n\t}\n\telse if ( typeof source==='string' ) { assertFulScalar(source); }\n\telse { throw TypeError$1(`TOML.parse(source)`); }\n\tlet joiner ;\n\tlet keys ;\n\tif ( typeof multilineStringJoiner==='object' && multilineStringJoiner ) {\n\t\tif ( bigint!==undefined$1 || x!==undefined$1 ) { throw TypeError$1(`options mode ? args mode`); }\n\t\tjoiner = multilineStringJoiner.joiner;\n\t\tbigint = multilineStringJoiner.bigint;\n\t\tkeys = multilineStringJoiner.keys;\n\t\tx = multilineStringJoiner.x;\n\t\targsMode = '';\n\t}\n\telse { joiner = multilineStringJoiner; }\n\tlet rootTable ;\n\tlet process ;\n\tif ( holding ) { throw Error$1(`parsing during parsing.`); }\n\tholding = true;\n\ttry {\n\t\tuse(specificationVersion, joiner, bigint, keys, x, argsMode);\n\t\ttodo(source, sourcePath);\n\t\tsource && source[0]==='\\uFEFF' && throws(TypeError$1(`TOML content (string) should not start with BOM (U+FEFF)` + where(' at ')));\n\t\trootTable = Root();\n\t\tprocess = Process();\n\t}\n\tfinally {\n\t\tdone();//clearWeakSets();\n\t\tclear();\n\t\tholding = false;\n\t\tclearRegExp$1();\n\t}\n\tprocess && process();\n\treturn rootTable;\n};\n\nconst parse$1 = /*#__PURE__*/assign$1(\n\t(source , specificationVersion , multilineStringJoiner , useBigInt , xOptions ) =>\n\t\ttypeof specificationVersion==='number'\n\t\t\t? parse(source, specificationVersion, multilineStringJoiner, useBigInt, xOptions, ',,')\n\t\t\t: parse(source, 1.0, specificationVersion , multilineStringJoiner , useBigInt , ',')\n\t,\n\t{\n\t\t'1.0': (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.1, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t1.0: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 1.0, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.5: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.5, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.4: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.4, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.3: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.3, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.2: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.2, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.1: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.1, multilineStringJoiner, useBigInt, xOptions, ','),\n\t}\n);\n\nconst _export = /*#__PURE__*/Default({\n\tversion,\n\tparse: parse$1,\n\tstringify,\n\tSection, inline, multiline, basic, literal, commentFor, commentForThis,\n\tOffsetDateTime, LocalDateTime, LocalDate, LocalTime,\n\tisInline, isSection,\n\tKeys,\n});\n\nreturn _export;\n\n}));\n\n//# sourceMappingURL=index.js.map","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nconst { Deflate, deflate, deflateRaw, gzip } = require('./lib/deflate');\n\nconst { Inflate, inflate, inflateRaw, ungzip } = require('./lib/inflate');\n\nconst constants = require('./lib/zlib/constants');\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = ungzip;\nmodule.exports.constants = constants;\n","'use strict';\n\n\nconst zlib_deflate = require('./zlib/deflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = zlib_deflate.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n this.result = utils.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.constants = require('./zlib/constants');\n","'use strict';\n\n\nconst zlib_inflate = require('./zlib/inflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\nconst GZheader = require('./zlib/gzheader');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = utils.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = zlib_inflate.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n zlib_inflate.inflateReset(strm);\n status = zlib_inflate.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || msg[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = inflate;\nmodule.exports.constants = require('./zlib/constants');\n","'use strict';\n\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nmodule.exports.assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nmodule.exports.flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n","// String encode/decode helpers\n'use strict';\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nmodule.exports.string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nmodule.exports.buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nmodule.exports.utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = require('./trees');\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN,\n Z_DEFLATED\n} = require('./constants');\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42; /* zlib header -> BUSY_STATE */\n//#ifdef GZIP\nconst GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */\n//#endif\nconst EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */\nconst NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */\nconst COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */\nconst HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */\nconst BUSY_STATE = 113; /* deflate -> FINISH_STATE */\nconst FINISH_STATE = 666; /* stream complete */\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = msg[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) * 2) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n/* ===========================================================================\n * Slide the hash table when sliding the window down (could be avoided with 32\n * bit values at the expense of memory usage). We slide even when level == 0 to\n * keep the hash table consistent if we switch back to level > 0 later.\n */\nconst slide_hash = (s) => {\n let n, m;\n let p;\n let wsize = s.w_size;\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= wsize ? m - wsize : 0);\n } while (--n);\n n = wsize;\n//#ifndef FASTEST\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= wsize ? m - wsize : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n//#endif\n};\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output, except for\n * some deflate_stored() output, goes through this function so some\n * applications may wish to modify it to avoid allocating a large\n * strm->next_out buffer and copying into it. (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let n, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n slide_hash(s);\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n *\n * In case deflateParams() is used to later switch to a non-zero compression\n * level, s->matches (otherwise unused when storing) keeps track of the number\n * of hash table slides to perform. If s->matches is 1, then one hash table\n * slide will be done when switching. If s->matches is 2, the maximum value\n * allowed here, then the hash table will be cleared, since two or more slides\n * is the same as a clear.\n *\n * deflate_stored() is written to minimize the number of times an input byte is\n * copied. It is most efficient with large input and output buffers, which\n * maximizes the opportunites to have a single copy from next_in to next_out.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Smallest worthy block size when not flushing or finishing. By default\n * this is 32K. This can be as small as 507 bytes for memLevel == 1. For\n * large input and output buffers, the stored block size will be larger.\n */\n let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5;\n\n /* Copy as many min_block or larger stored blocks directly to next_out as\n * possible. If flushing, copy the remaining available input to next_out as\n * stored blocks, if there is enough space.\n */\n let len, left, have, last = 0;\n let used = s.strm.avail_in;\n do {\n /* Set len to the maximum size block that we can copy directly with the\n * available input data and output space. Set left to how much of that\n * would be copied from what's left in the window.\n */\n len = 65535/* MAX_STORED */; /* maximum deflate stored block length */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n if (s.strm.avail_out < have) { /* need room for header */\n break;\n }\n /* maximum stored block length that will fit in avail_out: */\n have = s.strm.avail_out - have;\n left = s.strstart - s.block_start; /* bytes left in window */\n if (len > left + s.strm.avail_in) {\n len = left + s.strm.avail_in; /* limit len to the input */\n }\n if (len > have) {\n len = have; /* limit len to the output */\n }\n\n /* If the stored block would be less than min_block in length, or if\n * unable to copy all of the available input when flushing, then try\n * copying to the window and the pending buffer instead. Also don't\n * write an empty block when flushing -- deflate() does that.\n */\n if (len < min_block && ((len === 0 && flush !== Z_FINISH) ||\n flush === Z_NO_FLUSH ||\n len !== left + s.strm.avail_in)) {\n break;\n }\n\n /* Make a dummy stored block in pending to get the header bytes,\n * including any pending bits. This also updates the debugging counts.\n */\n last = flush === Z_FINISH && len === left + s.strm.avail_in ? 1 : 0;\n _tr_stored_block(s, 0, 0, last);\n\n /* Replace the lengths in the dummy stored block with len. */\n s.pending_buf[s.pending - 4] = len;\n s.pending_buf[s.pending - 3] = len >> 8;\n s.pending_buf[s.pending - 2] = ~len;\n s.pending_buf[s.pending - 1] = ~len >> 8;\n\n /* Write the stored block header bytes. */\n flush_pending(s.strm);\n\n//#ifdef ZLIB_DEBUG\n// /* Update debugging counts for the data about to be copied. */\n// s->compressed_len += len << 3;\n// s->bits_sent += len << 3;\n//#endif\n\n /* Copy uncompressed bytes from the window to next_out. */\n if (left) {\n if (left > len) {\n left = len;\n }\n //zmemcpy(s->strm->next_out, s->window + s->block_start, left);\n s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out);\n s.strm.next_out += left;\n s.strm.avail_out -= left;\n s.strm.total_out += left;\n s.block_start += left;\n len -= left;\n }\n\n /* Copy uncompressed bytes directly from next_in to next_out, updating\n * the check value.\n */\n if (len) {\n read_buf(s.strm, s.strm.output, s.strm.next_out, len);\n s.strm.next_out += len;\n s.strm.avail_out -= len;\n s.strm.total_out += len;\n }\n } while (last === 0);\n\n /* Update the sliding window with the last s->w_size bytes of the copied\n * data, or append all of the copied data to the existing window if less\n * than s->w_size bytes were copied. Also update the number of bytes to\n * insert in the hash tables, in the event that deflateParams() switches to\n * a non-zero compression level.\n */\n used -= s.strm.avail_in; /* number of input bytes directly copied */\n if (used) {\n /* If any input was used, then no unused input remains in the window,\n * therefore s->block_start == s->strstart.\n */\n if (used >= s.w_size) { /* supplant the previous history */\n s.matches = 2; /* clear hash */\n //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);\n s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0);\n s.strstart = s.w_size;\n s.insert = s.strstart;\n }\n else {\n if (s.window_size - s.strstart <= used) {\n /* Slide the window down. */\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);\n s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart);\n s.strstart += used;\n s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;\n }\n s.block_start = s.strstart;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* If the last block was written to next_out, then done. */\n if (last) {\n return BS_FINISH_DONE;\n }\n\n /* If flushing and all input has been consumed, then done. */\n if (flush !== Z_NO_FLUSH && flush !== Z_FINISH &&\n s.strm.avail_in === 0 && s.strstart === s.block_start) {\n return BS_BLOCK_DONE;\n }\n\n /* Fill the window with any remaining input. */\n have = s.window_size - s.strstart;\n if (s.strm.avail_in > have && s.block_start >= s.w_size) {\n /* Slide the window down. */\n s.block_start -= s.w_size;\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n have += s.w_size; /* more space now */\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n if (have > s.strm.avail_in) {\n have = s.strm.avail_in;\n }\n if (have) {\n read_buf(s.strm, s.window, s.strstart, have);\n s.strstart += have;\n s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* There was not enough avail_out to write a complete worthy or flushed\n * stored block to next_out. Write a stored block to pending instead, if we\n * have enough input for a worthy block, or if flushing and there is enough\n * room for the remaining input as a stored block in the pending buffer.\n */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n /* maximum stored block length that will fit in pending: */\n have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have;\n min_block = have > s.w_size ? s.w_size : have;\n left = s.strstart - s.block_start;\n if (left >= min_block ||\n ((left || flush === Z_FINISH) && flush !== Z_NO_FLUSH &&\n s.strm.avail_in === 0 && left <= have)) {\n len = left > have ? have : left;\n last = flush === Z_FINISH && s.strm.avail_in === 0 &&\n len === left ? 1 : 0;\n _tr_stored_block(s, s.block_start, len, last);\n s.block_start += len;\n flush_pending(s.strm);\n }\n\n /* We've done all we can with the available input and output. */\n return last ? BS_FINISH_STARTED : BS_NEED_MORE;\n};\n\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.sym_buf = 0; /* buffer for distances and literals/lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.sym_next = 0; /* running index in sym_buf */\n this.sym_end = 0; /* symbol table full when sym_next reaches this */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\n/* =========================================================================\n * Check for a valid deflate stream state. Return 0 if ok, 1 if not.\n */\nconst deflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const s = strm.state;\n if (!s || s.strm !== strm || (s.status !== INIT_STATE &&\n//#ifdef GZIP\n s.status !== GZIP_STATE &&\n//#endif\n s.status !== EXTRA_STATE &&\n s.status !== NAME_STATE &&\n s.status !== COMMENT_STATE &&\n s.status !== HCRC_STATE &&\n s.status !== BUSY_STATE &&\n s.status !== FINISH_STATE)) {\n return 1;\n }\n return 0;\n};\n\n\nconst deflateResetKeep = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status =\n//#ifdef GZIP\n s.wrap === 2 ? GZIP_STATE :\n//#endif\n s.wrap ? INIT_STATE : BUSY_STATE;\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = -2;\n _tr_init(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (deflateStateCheck(strm) || strm.state.wrap !== 2) {\n return Z_STREAM_ERROR;\n }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n s.status = INIT_STATE; /* to pass state test in deflateReset() */\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n /* We overlay pending_buf and sym_buf. This works since the average size\n * for length/distance pairs over any compressed block is assured to be 31\n * bits or less.\n *\n * Analysis: The longest fixed codes are a length code of 8 bits plus 5\n * extra bits, for lengths 131 to 257. The longest fixed distance codes are\n * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest\n * possible fixed-codes length/distance pair is then 31 bits total.\n *\n * sym_buf starts one-fourth of the way into pending_buf. So there are\n * three bytes in sym_buf for every four bytes in pending_buf. Each symbol\n * in sym_buf is three bytes -- two for the distance and one for the\n * literal/length. As each symbol is consumed, the pointer to the next\n * sym_buf value to read moves forward three bytes. From that symbol, up to\n * 31 bits are written to pending_buf. The closest the written pending_buf\n * bits gets to the next sym_buf symbol to read is just before the last\n * code is written. At that time, 31*(n-2) bits have been written, just\n * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at\n * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1\n * symbols are written.) The closest the writing gets to what is unread is\n * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and\n * can range from 128 to 32768.\n *\n * Therefore, at a minimum, there are 142 bits of space between what is\n * written and what is read in the overlain buffers, so the symbols cannot\n * be overwritten by the compressed data. That space is actually 139 bits,\n * due to the three-bit fixed-code block header.\n *\n * That covers the case where either Z_FIXED is specified, forcing fixed\n * codes, or when the use of fixed codes is chosen, because that choice\n * results in a smaller compressed block than dynamic codes. That latter\n * condition then assures that the above analysis also covers all dynamic\n * blocks. A dynamic-code block will only be chosen to be emitted if it has\n * fewer bits than a fixed-code block would for the same set of symbols.\n * Therefore its average symbol length is assured to be less than 31. So\n * the compressed data for a dynamic block also cannot overwrite the\n * symbols from which it is being constructed.\n */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->sym_buf = s->pending_buf + s->lit_bufsize;\n s.sym_buf = s.lit_bufsize;\n\n //s->sym_end = (s->lit_bufsize - 1) * 3;\n s.sym_end = (s.lit_bufsize - 1) * 3;\n /* We avoid equality with lit_bufsize*3 because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\n/* ========================================================================= */\nconst deflate = (strm, flush) => {\n\n if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (strm.avail_in !== 0 && !strm.input) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Write the header */\n if (s.status === INIT_STATE && s.wrap === 0) {\n s.status = BUSY_STATE;\n }\n if (s.status === INIT_STATE) {\n /* zlib header */\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n//#ifdef GZIP\n if (s.status === GZIP_STATE) {\n /* gzip header */\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let left = (s.gzhead.extra.length & 0xffff) - s.gzindex;\n while (s.pending + left > s.pending_buf_size) {\n let copy = s.pending_buf_size - s.pending;\n // zmemcpy(s.pending_buf + s.pending,\n // s.gzhead.extra + s.gzindex, copy);\n s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending);\n s.pending = s.pending_buf_size;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex += copy;\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n left -= copy;\n }\n // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility\n // TypedArray.slice and TypedArray.from don't exist in IE10-IE11\n let gzhead_extra = new Uint8Array(s.gzhead.extra);\n // zmemcpy(s->pending_buf + s->pending,\n // s->gzhead->extra + s->gzindex, left);\n s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending);\n s.pending += left;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = NAME_STATE;\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = COMMENT_STATE;\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n }\n s.status = HCRC_STATE;\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n }\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n//#endif\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = s.level === 0 ? deflate_stored(s, flush) :\n s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :\n s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush);\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nmodule.exports.deflateInit = deflateInit;\nmodule.exports.deflateInit2 = deflateInit2;\nmodule.exports.deflateReset = deflateReset;\nmodule.exports.deflateResetKeep = deflateResetKeep;\nmodule.exports.deflateSetHeader = deflateSetHeader;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateEnd = deflateEnd;\nmodule.exports.deflateSetDictionary = deflateSetDictionary;\nmodule.exports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateGetDictionary = deflateGetDictionary;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst inflate_fast = require('./inffast');\nconst inflate_table = require('./inftrees');\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH, Z_BLOCK, Z_TREES,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Z_BUF_ERROR,\n Z_DEFLATED\n} = require('./constants');\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 16180; /* i: waiting for magic header */\nconst FLAGS = 16181; /* i: waiting for method and flags (gzip) */\nconst TIME = 16182; /* i: waiting for modification time (gzip) */\nconst OS = 16183; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 16184; /* i: waiting for extra length (gzip) */\nconst EXTRA = 16185; /* i: waiting for extra bytes (gzip) */\nconst NAME = 16186; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 16187; /* i: waiting for end of comment (gzip) */\nconst HCRC = 16188; /* i: waiting for header crc (gzip) */\nconst DICTID = 16189; /* i: waiting for dictionary check value */\nconst DICT = 16190; /* waiting for inflateSetDictionary() call */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 16193; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 16194; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16195; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 16196; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 16197; /* i: waiting for code length code lengths */\nconst CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 16199; /* i: same as LEN below, but only first time in */\nconst LEN = 16200; /* i: waiting for length/lit/eob code */\nconst LENEXT = 16201; /* i: waiting for length extra bits */\nconst DIST = 16202; /* i: waiting for distance code */\nconst DISTEXT = 16203; /* i: waiting for distance extra bits */\nconst MATCH = 16204; /* o: waiting for output space to copy string */\nconst LIT = 16205; /* o: waiting for output space to write literal */\nconst CHECK = 16206; /* i: waiting for 32-bit check value */\nconst LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 16208; /* finished check, done -- remain here until reset */\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst MEM = 16210; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 16211; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,\n bit 2 true to validate check value */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib), or\n -1 if raw or no header yet */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const state = strm.state;\n if (!state || state.strm !== strm ||\n state.mode < HEAD || state.mode > SYNC) {\n return 1;\n }\n return 0;\n};\n\n\nconst inflateResetKeep = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.flags = -1;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 5;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.strm = strm;\n state.window = null/*Z_NULL*/;\n state.mode = HEAD; /* to pass state test in inflateReset2() */\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (inflateStateCheck(strm) || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n if (state.wbits === 0) {\n state.wbits = 15;\n }\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n if (len > 15 || len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n state.flags = 0; /* indicate zlib header */\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check =\n /*UPDATE_CHECK(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (inflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n};\n\n\nmodule.exports.inflateReset = inflateReset;\nmodule.exports.inflateReset2 = inflateReset2;\nmodule.exports.inflateResetKeep = inflateResetKeep;\nmodule.exports.inflateInit = inflateInit;\nmodule.exports.inflateInit2 = inflateInit2;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateEnd = inflateEnd;\nmodule.exports.inflateGetHeader = inflateGetHeader;\nmodule.exports.inflateSetDictionary = inflateSetDictionary;\nmodule.exports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCodesUsed = inflateCodesUsed;\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\nmodule.exports.inflateValidate = inflateValidate;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n// let shoextra; /* extra bits table to use */\n let match; /* use base and extra for symbol >= match */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n match = 20;\n\n } else if (type === LENS) {\n base = lbase;\n extra = lext;\n match = 257;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n match = 0;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] + 1 < match) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] >= match) {\n here_op = extra[work[sym] - match];\n here_val = base[work[sym] - match];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nmodule.exports = inflate_table;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([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]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([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]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Tracev((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Tracev((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) => {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n code = (code + bl_count[bits - 1]) << 1;\n next_code[bits] = code;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.sym_next = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) => {\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let sx = 0; /* running index in sym_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.sym_next !== 0) {\n do {\n dist = s.pending_buf[s.sym_buf + sx++] & 0xff;\n dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8;\n lc = s.pending_buf[s.sym_buf + sx++];\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and sym_buf is ok: */\n //Assert(s->pending < s->lit_bufsize + sx, \"pendingBuf overflow\");\n\n } while (sx < s.sym_next);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) => {\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"block list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"allow list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* block_mask is the bit mask of block-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let block_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"block-listed\") bytes. */\n for (n = 0; n <= 31; n++, block_mask >>>= 1) {\n if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"allow-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"block-listed\" or \"allow-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n bi_windup(s); /* align on byte boundary */\n put_short(s, stored_len);\n put_short(s, ~stored_len);\n if (stored_len) {\n s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending);\n }\n s.pending += stored_len;\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and write out the encoded block.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->sym_next / 3));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) => {\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n\n s.pending_buf[s.sym_buf + s.sym_next++] = dist;\n s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8;\n s.pending_buf[s.sym_buf + s.sym_next++] = lc;\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n return (s.sym_next === s.sym_end);\n};\n\nmodule.exports._tr_init = _tr_init;\nmodule.exports._tr_stored_block = _tr_stored_block;\nmodule.exports._tr_flush_block = _tr_flush_block;\nmodule.exports._tr_tally = _tr_tally;\nmodule.exports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","/* unzipit@1.4.3, license MIT */\n/* global SharedArrayBuffer, process */\n\nfunction readBlobAsArrayBuffer(blob) {\n if (blob.arrayBuffer) {\n return blob.arrayBuffer();\n }\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('loadend', () => {\n resolve(reader.result);\n });\n reader.addEventListener('error', reject);\n reader.readAsArrayBuffer(blob);\n });\n}\n\nasync function readBlobAsUint8Array(blob) {\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n}\n\nfunction isBlob(v) {\n return typeof Blob !== 'undefined' && v instanceof Blob;\n}\n\nfunction isSharedArrayBuffer(b) {\n return typeof SharedArrayBuffer !== 'undefined' && b instanceof SharedArrayBuffer;\n}\n\nconst isNode =\n (typeof process !== 'undefined') &&\n process.versions &&\n (typeof process.versions.node !== 'undefined') &&\n (typeof process.versions.electron === 'undefined');\n\nfunction isTypedArraySameAsArrayBuffer(typedArray) {\n return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;\n}\n\nclass ArrayBufferReader {\n constructor(arrayBufferOrView) {\n this.typedArray = (arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView))\n ? new Uint8Array(arrayBufferOrView)\n : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);\n }\n async getLength() {\n return this.typedArray.byteLength;\n }\n async read(offset, length) {\n return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset, length);\n }\n}\n\nclass BlobReader {\n constructor(blob) {\n this.blob = blob;\n }\n async getLength() {\n return this.blob.size;\n }\n async read(offset, length) {\n const blob = this.blob.slice(offset, offset + length);\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n }\n async sliceAsBlob(offset, length, type = '') {\n return this.blob.slice(offset, offset + length, type);\n }\n}\n\nclass HTTPRangeReader {\n constructor(url) {\n this.url = url;\n }\n async getLength() {\n if (this.length === undefined) {\n const req = await fetch(this.url, { method: 'HEAD' });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);\n }\n this.length = parseInt(req.headers.get('content-length'));\n if (Number.isNaN(this.length)) {\n throw Error('could not get length');\n }\n }\n return this.length;\n }\n async read(offset, size) {\n if (size === 0) {\n return new Uint8Array(0);\n }\n const req = await fetch(this.url, {\n headers: {\n Range: `bytes=${offset}-${offset + size - 1}`,\n },\n });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size}: ${req.statusText}`);\n }\n const buffer = await req.arrayBuffer();\n return new Uint8Array(buffer);\n }\n}\n\nfunction inflate(data, buf) {\n\tvar u8=Uint8Array;\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\n\tvar bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;\n\t\n\tvar noBuf = (buf==null);\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\n\t\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\n\tvar off = 0, pos = 0;\n\tvar lmap, dmap;\n\t\n\twhile(BFINAL==0) {\t\t\n\t\tBFINAL = bitsF(data, pos , 1);\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\n\t\t//console.log(BFINAL, BTYPE);\n\t\t\n\t\tif(BTYPE==0) {\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \n\t\t\tif(noBuf) buf=_check(buf, off+len);\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\n\t\t\t//for(var i=0; i<len; i++) buf[off+i] = data[p8+i];\n\t\t\t//for(var i=0; i<len; i++) if(buf[off+i] != data[p8+i]) throw \"e\";\n\t\t\tpos = ((p8+len)<<3); off+=len; continue;\n\t\t}\n\t\tif(noBuf) buf=_check(buf, off+(1<<17)); // really not enough in many cases (but PNG and ZIP provide buffer in advance)\n\t\tif(BTYPE==1) { lmap = U.flmap; dmap = U.fdmap; ML = (1<<9)-1; MD = (1<<5)-1; }\n\t\tif(BTYPE==2) {\n\t\t\tHLIT = bitsE(data, pos , 5)+257; \n\t\t\tHDIST = bitsE(data, pos+ 5, 5)+ 1; \n\t\t\tHCLEN = bitsE(data, pos+10, 4)+ 4; pos+=14;\n\t\t\tfor(var i=0; i<38; i+=2) { U.itree[i]=0; U.itree[i+1]=0; }\n\t\t\tvar tl = 1;\n\t\t\tfor(var i=0; i<HCLEN; i++) { var l=bitsE(data, pos+i*3, 3); U.itree[(U.ordr[i]<<1)+1] = l; if(l>tl)tl=l; } pos+=3*HCLEN; //console.log(itree);\n\t\t\tmakeCodes(U.itree, tl);\n\t\t\tcodes2map(U.itree, tl, U.imap);\n\t\t\t\n\t\t\tlmap = U.lmap; dmap = U.dmap;\n\t\t\t\n\t\t\tpos = decodeTiny(U.imap, (1<<tl)-1, HLIT+HDIST, data, pos, U.ttree);\n\t\t\tvar mx0 = _copyOut(U.ttree, 0, HLIT , U.ltree); ML = (1<<mx0)-1;\n\t\t\tvar mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree); MD = (1<<mx1)-1;\n\t\t\t\n\t\t\t//var ml = decodeTiny(U.imap, (1<<tl)-1, HLIT , data, pos, U.ltree); ML = (1<<(ml>>>24))-1; pos+=(ml&0xffffff);\n\t\t\tmakeCodes(U.ltree, mx0);\n\t\t\tcodes2map(U.ltree, mx0, lmap);\n\t\t\t\n\t\t\t//var md = decodeTiny(U.imap, (1<<tl)-1, HDIST, data, pos, U.dtree); MD = (1<<(md>>>24))-1; pos+=(md&0xffffff);\n\t\t\tmakeCodes(U.dtree, mx1);\n\t\t\tcodes2map(U.dtree, mx1, dmap);\n\t\t}\n\t\t//var ooff=off, opos=pos;\n\t\twhile(true) {\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\n\t\t\telse if(lit==256) { break; }\n\t\t\telse {\n\t\t\t\tvar end = off+lit-254;\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\n\t\t\t\t//dst[end-off]++;\n\t\t\t\t\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\n\t\t\t\tvar dlit = dcode>>>4;\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\n\t\t\t\t\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\n\t\t\t\t//if(stp>20) while(off<end) { buf.copyWithin(off, o0, o0+stp); off+=stp; } else\n\t\t\t\t//if(end-dst<=off) buf.copyWithin(off, off-dst, end-dst); else\n\t\t\t\t//if(dst==1) buf.fill(buf[off-1], off, end); else\n\t\t\t\tif(noBuf) buf=_check(buf, off+(1<<17));\n\t\t\t\twhile(off<end) { buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; } \n\t\t\t\toff=end;\n\t\t\t\t//while(off!=end) { buf[off]=buf[off++-dst]; }\n\t\t\t}\n\t\t}\n\t\t//console.log(off-ooff, (pos-opos)>>>3);\n\t}\n\t//console.log(dst);\n\t//console.log(tlen, dlen, off-tlen+tcnt);\n\treturn buf.length==off ? buf : buf.slice(0,off);\n}\nfunction _check(buf, len) {\n\tvar bl=buf.length; if(len<=bl) return buf;\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\n\t//for(var i=0; i<bl; i+=4) { nbuf[i]=buf[i]; nbuf[i+1]=buf[i+1]; nbuf[i+2]=buf[i+2]; nbuf[i+3]=buf[i+3]; }\n\treturn nbuf;\n}\n\nfunction _decodeTiny(lmap, LL, len, data, pos, tree) {\n\tvar bitsE = _bitsE, get17 = _get17;\n\tvar i = 0;\n\twhile(i<len) {\n\t\tvar code = lmap[get17(data, pos)&LL]; pos+=code&15;\n\t\tvar lit = code>>>4; \n\t\tif(lit<=15) { tree[i]=lit; i++; }\n\t\telse {\n\t\t\tvar ll = 0, n = 0;\n\t\t\tif(lit==16) {\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\n\t\t\t}\n\t\t\telse if(lit==17) {\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\n\t\t\t}\n\t\t\telse if(lit==18) {\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\n\t\t\t}\n\t\t\tvar ni = i+n;\n\t\t\twhile(i<ni) { tree[i]=ll; i++; }\n\t\t}\n\t}\n\treturn pos;\n}\nfunction _copyOut(src, off, len, tree) {\n\tvar mx=0, i=0, tl=tree.length>>>1;\n\twhile(i<len) { var v=src[i+off]; tree[(i<<1)]=0; tree[(i<<1)+1]=v; if(v>mx)mx=v; i++; }\n\twhile(i<tl ) { tree[(i<<1)]=0; tree[(i<<1)+1]=0; i++; }\n\treturn mx;\n}\n\nfunction makeCodes(tree, MAX_BITS) { // code, length\n\tvar max_code = tree.length;\n\tvar code, bits, n, i, len;\n\t\n\tvar bl_count = U.bl_count; for(var i=0; i<=MAX_BITS; i++) bl_count[i]=0;\n\tfor(i=1; i<max_code; i+=2) bl_count[tree[i]]++;\n\t\n\tvar next_code = U.next_code;\t// smallest code for each length\n\t\n\tcode = 0;\n\tbl_count[0] = 0;\n\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\tcode = (code + bl_count[bits-1]) << 1;\n\t\tnext_code[bits] = code;\n\t}\n\t\n\tfor (n = 0; n < max_code; n+=2) {\n\t\tlen = tree[n+1];\n\t\tif (len != 0) {\n\t\t\ttree[n] = next_code[len];\n\t\t\tnext_code[len]++;\n\t\t}\n\t}\n}\nfunction codes2map(tree, MAX_BITS, map) {\n\tvar max_code = tree.length;\n\tvar r15 = U.rev15;\n\tfor(var i=0; i<max_code; i+=2) if(tree[i+1]!=0) {\n\t\tvar lit = i>>1;\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<<rest, i1 = i0 + (1<<rest);\n\t\t//tree[i]=r15[i0]>>>(15-MAX_BITS);\n\t\twhile(i0!=i1) {\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\n\t\t\tmap[p0]=val; i0++;\n\t\t}\n\t}\n}\nfunction revCodes(tree, MAX_BITS) {\n\tvar r15 = U.rev15, imb = 15-MAX_BITS;\n\tfor(var i=0; i<tree.length; i+=2) { var i0 = (tree[i]<<(MAX_BITS-tree[i+1])); tree[i] = r15[i0]>>>imb; }\n}\n\nfunction _bitsE(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<<length)-1); }\nfunction _bitsF(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<<length)-1); }\n/*\nfunction _get9(dt, pos) {\n\treturn ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\n} */\nfunction _get17(dt, pos) {\t// return at least 17 meaningful bytes\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\n}\nconst U = function(){\n\tvar u16=Uint16Array, u32=Uint32Array;\n\treturn {\n\t\tnext_code : new u16(16),\n\t\tbl_count : new u16(16),\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n\t\tof0 : [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,999,999,999],\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n\t\tldef : new u16(32),\n\t\tdf0 : [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, 65535, 65535],\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n\t\tddef : new u32(32),\n\t\tflmap: new u16( 512), fltree: [],\n\t\tfdmap: new u16( 32), fdtree: [],\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\n\t\tdmap : new u16(32768), dtree : [],\n\t\timap : new u16( 512), itree : [],\n\t\t//rev9 : new u16( 512)\n\t\trev15: new u16(1<<15),\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n\t\tlits : new u32(15000),\n\t\tstrt : new u16(1<<16),\n\t\tprev : new u16(1<<15)\n\t}; \n} ();\n\n(function(){\t\n\tvar len = 1<<15;\n\tfor(var i=0; i<len; i++) {\n\t\tvar x = i;\n\t\tx = (((x & 0xaaaaaaaa) >>> 1) | ((x & 0x55555555) << 1));\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n\t}\n\t\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n\t\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n\t\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n\t/*\n\tvar i = 0;\n\tfor(; i<=143; i++) U.fltree.push(0,8);\n\tfor(; i<=255; i++) U.fltree.push(0,9);\n\tfor(; i<=279; i++) U.fltree.push(0,7);\n\tfor(; i<=287; i++) U.fltree.push(0,8);\n\t*/\n\tmakeCodes(U.fltree, 9);\n\tcodes2map(U.fltree, 9, U.flmap);\n\trevCodes (U.fltree, 9);\n\t\n\tpushV(U.fdtree,32,5);\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\n\tmakeCodes(U.fdtree, 5);\n\tcodes2map(U.fdtree, 5, U.fdmap);\n\trevCodes (U.fdtree, 5);\n\t\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n\t/*\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\n\t*/\n})();\n\nconst crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i<len; i++) c = crc.table[(c ^ buf[off+i]) & 0xff] ^ (c >>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n};\r\n\r\nfunction inflateRaw(file, buf) { return inflate(file, buf); }\n\n/* global module */\n\nconst config = {\n numWorkers: 1,\n workerURL: '',\n useWorkers: false,\n};\n\nlet nextId = 0;\n\n// Requests are put on a queue.\n// We don't send the request to the worker until the worker\n// is finished. This probably adds a small amount of latency\n// but the issue is imagine you have 2 workers. You give worker\n// A x seconds of work to do and worker B y seconds of work to\n// do. You don't know which will finish first. If you give\n// the worker with more work to do the request then you'll\n// waste time.\n\n// note: we can't check `workers.length` for deciding if\n// we've reached `config.numWorkers` because creation the worker\n// is async which means other requests to make workers might\n// come in before a worker gets added to `workers`\nlet numWorkers = 0;\nlet canUseWorkers = true; // gets set to false if we can't start a worker\nconst workers = [];\nconst availableWorkers = [];\nconst waitingForWorkerQueue = [];\nconst currentlyProcessingIdToRequestMap = new Map();\n\nfunction handleResult(e) {\n makeWorkerAvailable(e.target);\n const {id, error, data} = e.data;\n const request = currentlyProcessingIdToRequestMap.get(id);\n currentlyProcessingIdToRequestMap.delete(id);\n if (error) {\n request.reject(error);\n } else {\n request.resolve(data);\n }\n}\n\n// Because Firefox uses non-standard onerror to signal an error.\nfunction startWorker(url) {\n return new Promise((resolve, reject) => {\n const worker = new Worker(url);\n worker.onmessage = (e) => {\n if (e.data === 'start') {\n worker.onerror = undefined;\n worker.onmessage = undefined;\n resolve(worker);\n } else {\n reject(new Error(`unexpected message: ${e.data}`));\n }\n };\n worker.onerror = reject;\n });\n}\n\nfunction dynamicRequire(mod, request) {\n return mod.require ? mod.require(request) : {};\n}\n\nconst workerHelper = (function() {\n if (isNode) {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n const {Worker} = dynamicRequire(module, 'worker_threads');\n return {\n async createWorker(url) {\n return new Worker(url);\n },\n addEventListener(worker, fn) {\n worker.on('message', (data) => {\n fn({target: worker, data});\n });\n },\n async terminate(worker) {\n await worker.terminate();\n },\n };\n } else {\n return {\n async createWorker(url) {\n // I don't understand this security issue\n // Apparently there is some iframe setting or http header\n // that prevents cross domain workers. But, I can manually\n // download the text and do it. I reported this to Chrome\n // and they said it was fine so ¯\\_(ツ)_/¯\n try {\n const worker = await startWorker(url);\n return worker;\n } catch (e) {\n console.warn('could not load worker:', url);\n }\n\n let text;\n try {\n const req = await fetch(url, {mode: 'cors'});\n if (!req.ok) {\n throw new Error(`could not load: ${url}`);\n }\n text = await req.text();\n url = URL.createObjectURL(new Blob([text], {type: 'application/javascript'}));\n const worker = await startWorker(url);\n config.workerURL = url; // this is a hack. What's a better way to structure this code?\n return worker;\n } catch (e) {\n console.warn('could not load worker via fetch:', url);\n }\n\n if (text !== undefined) {\n try {\n url = `data:application/javascript;base64,${btoa(text)}`;\n const worker = await startWorker(url);\n config.workerURL = url;\n return worker;\n } catch (e) {\n console.warn('could not load worker via dataURI');\n }\n }\n\n console.warn('workers will not be used');\n throw new Error('can not start workers');\n },\n addEventListener(worker, fn) {\n worker.addEventListener('message', fn);\n },\n async terminate(worker) {\n worker.terminate();\n },\n };\n }\n}());\n\nfunction makeWorkerAvailable(worker) {\n availableWorkers.push(worker);\n processWaitingForWorkerQueue();\n}\n\nasync function getAvailableWorker() {\n if (availableWorkers.length === 0 && numWorkers < config.numWorkers) {\n ++numWorkers; // see comment at numWorkers declaration\n try {\n const worker = await workerHelper.createWorker(config.workerURL);\n workers.push(worker);\n availableWorkers.push(worker);\n workerHelper.addEventListener(worker, handleResult);\n } catch (e) {\n // set this global out-of-band (needs refactor)\n canUseWorkers = false;\n }\n }\n return availableWorkers.pop();\n}\n\n// @param {Uint8Array} src\n// @param {number} uncompressedSize\n// @param {string} [type] mime-type\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawLocal(src, uncompressedSize, type, resolve) {\n const dst = new Uint8Array(uncompressedSize);\n inflateRaw(src, dst);\n resolve(type\n ? new Blob([dst], {type})\n : dst.buffer);\n}\n\nasync function processWaitingForWorkerQueue() {\n if (waitingForWorkerQueue.length === 0) {\n return;\n }\n\n if (config.useWorkers && canUseWorkers) {\n const worker = await getAvailableWorker();\n // canUseWorkers might have been set out-of-band (need refactor)\n if (canUseWorkers) {\n if (worker) {\n if (waitingForWorkerQueue.length === 0) {\n // the queue might be empty while we awaited for a worker.\n makeWorkerAvailable(worker);\n return;\n }\n const {id, src, uncompressedSize, type, resolve, reject} = waitingForWorkerQueue.shift();\n currentlyProcessingIdToRequestMap.set(id, {id, resolve, reject});\n const transferables = [];\n // NOTE: Originally I thought you could transfer an ArrayBuffer.\n // The code on this side is often using views into the entire file\n // which means if we transferred we'd lose the entire file. That sucks\n // because it means there's an expensive copy to send the uncompressed\n // data to the worker.\n //\n // Also originally I thought we could send a Blob but we'd need to refactor\n // the code in unzipit/readEntryData as currently it reads the uncompressed\n // bytes.\n //\n //if (!isBlob(src) && !isSharedArrayBuffer(src)) {\n // transferables.push(src);\n //}\n worker.postMessage({\n type: 'inflate',\n data: {\n id,\n type,\n src,\n uncompressedSize,\n },\n }, transferables);\n }\n return;\n }\n }\n\n // inflate locally\n // We loop here because what happens if many requests happen at once\n // the first N requests will try to async make a worker. Other requests\n // will then be on the queue. But if we fail to make workers then there\n // are pending requests.\n while (waitingForWorkerQueue.length) {\n const {src, uncompressedSize, type, resolve} = waitingForWorkerQueue.shift();\n let data = src;\n if (isBlob(src)) {\n data = await readBlobAsUint8Array(src);\n }\n inflateRawLocal(data, uncompressedSize, type, resolve);\n }\n}\n\nfunction setOptions(options) {\n config.workerURL = options.workerURL || config.workerURL;\n // there's no reason to set the workerURL if you're not going to use workers\n if (options.workerURL) {\n config.useWorkers = true;\n }\n config.useWorkers = options.useWorkers !== undefined ? options.useWorkers : config.useWorkers;\n config.numWorkers = options.numWorkers || config.numWorkers;\n}\n\n// It has to take non-zero time to put a large typed array in a Blob since the very\n// next instruction you could change the contents of the array. So, if you're reading\n// the zip file for images/video/audio then all you want is a Blob on which to get a URL.\n// so that operation of putting the data in a Blob should happen in the worker.\n//\n// Conversely if you want the data itself then you want an ArrayBuffer immediately\n// since the worker can transfer its ArrayBuffer zero copy.\n//\n// @param {Uint8Array|Blob} src\n// @param {number} uncompressedSize\n// @param {string} [type] falsy or mimeType string (eg: 'image/png')\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawAsync(src, uncompressedSize, type) {\n return new Promise((resolve, reject) => {\n // note: there is potential an expensive copy here. In order for the data\n // to make it into the worker we need to copy the data to the worker unless\n // it's a Blob or a SharedArrayBuffer.\n //\n // Solutions:\n //\n // 1. A minor enhancement, if `uncompressedSize` is small don't call the worker.\n //\n // might be a win period as their is overhead calling the worker\n //\n // 2. Move the entire library to the worker\n //\n // Good, Maybe faster if you pass a URL, Blob, or SharedArrayBuffer? Not sure about that\n // as those are also easy to transfer. Still slow if you pass an ArrayBuffer\n // as the ArrayBuffer has to be copied to the worker.\n //\n // I guess benchmarking is really the only thing to try.\n waitingForWorkerQueue.push({src, uncompressedSize, type, resolve, reject, id: nextId++});\n processWaitingForWorkerQueue();\n });\n}\n\nfunction clearArray(arr) {\n arr.splice(0, arr.length);\n}\n\nasync function cleanup() {\n for (const worker of workers) {\n await workerHelper.terminate(worker);\n }\n clearArray(workers);\n clearArray(availableWorkers);\n clearArray(waitingForWorkerQueue);\n currentlyProcessingIdToRequestMap.clear();\n numWorkers = 0;\n canUseWorkers = true;\n}\n\n/*\nclass Zip {\n constructor(reader) {\n comment, // the comment for this entry\n commentBytes, // the raw comment for this entry\n }\n}\n*/\n\nfunction dosDateTimeToDate(date, time) {\n const day = date & 0x1f; // 1-31\n const month = (date >> 5 & 0xf) - 1; // 1-12, 0-11\n const year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108\n\n const millisecond = 0;\n const second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers)\n const minute = time >> 5 & 0x3f; // 0-59\n const hour = time >> 11 & 0x1f; // 0-23\n\n return new Date(year, month, day, hour, minute, second, millisecond);\n}\n\nclass ZipEntry {\n constructor(reader, rawEntry) {\n this._reader = reader;\n this._rawEntry = rawEntry;\n this.name = rawEntry.name;\n this.nameBytes = rawEntry.nameBytes;\n this.size = rawEntry.uncompressedSize;\n this.compressedSize = rawEntry.compressedSize;\n this.comment = rawEntry.comment;\n this.commentBytes = rawEntry.commentBytes;\n this.compressionMethod = rawEntry.compressionMethod;\n this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);\n this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith('/');\n this.encrypted = !!(rawEntry.generalPurposeBitFlag & 0x1);\n this.externalFileAttributes = rawEntry.externalFileAttributes;\n this.versionMadeBy = rawEntry.versionMadeBy;\n }\n // returns a promise that returns a Blob for this entry\n async blob(type = 'application/octet-stream') {\n return await readEntryDataAsBlob(this._reader, this._rawEntry, type);\n }\n // returns a promise that returns an ArrayBuffer for this entry\n async arrayBuffer() {\n return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);\n }\n // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself\n async text() {\n const buffer = await this.arrayBuffer();\n return decodeBuffer(new Uint8Array(buffer));\n }\n // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself\n async json() {\n const text = await this.text();\n return JSON.parse(text);\n }\n}\n\nconst EOCDR_WITHOUT_COMMENT_SIZE = 22;\nconst MAX_COMMENT_SIZE = 0xffff; // 2-byte size\nconst EOCDR_SIGNATURE = 0x06054b50;\nconst ZIP64_EOCDR_SIGNATURE = 0x06064b50;\n\nasync function readAs(reader, offset, length) {\n return await reader.read(offset, length);\n}\n\n// The point of this function is we want to be able to pass the data\n// to a worker as fast as possible so when decompressing if the data\n// is already a blob and we can get a blob then get a blob.\n//\n// I'm not sure what a better way to refactor this is. We've got examples\n// of multiple readers. Ideally, for every type of reader we could ask\n// it, \"give me a type that is zero copy both locally and when sent to a worker\".\n//\n// The problem is the worker would also have to know the how to handle this\n// opaque type. I suppose the correct solution is to register different\n// reader handlers in the worker so BlobReader would register some\n// `handleZeroCopyType<BlobReader>`. At the moment I don't feel like\n// refactoring. As it is you just pass in an instance of the reader\n// but instead you'd have to register the reader and some how get the\n// source for the `handleZeroCopyType` handler function into the worker.\n// That sounds like a huge PITA, requiring you to put the implementation\n// in a separate file so the worker can load it or some other workaround\n// hack.\n//\n// For now this hack works even if it's not generic.\nasync function readAsBlobOrTypedArray(reader, offset, length, type) {\n if (reader.sliceAsBlob) {\n return await reader.sliceAsBlob(offset, length, type);\n }\n return await reader.read(offset, length);\n}\n\nconst crc$1 = {\n unsigned() {\n return 0;\n },\n};\n\nfunction getUint16LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100;\n}\n\nfunction getUint32LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100 +\n uint8View[offset + 2] * 0x10000 +\n uint8View[offset + 3] * 0x1000000;\n}\n\nfunction getUint64LE(uint8View, offset) {\n return getUint32LE(uint8View, offset) +\n getUint32LE(uint8View, offset + 4) * 0x100000000;\n}\n\n/* eslint-disable no-irregular-whitespace */\n// const decodeCP437 = (function() {\n// const cp437 = '\\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ';\n//\n// return function(uint8view) {\n// return Array.from(uint8view).map(v => cp437[v]).join('');\n// };\n// }());\n/* eslint-enable no-irregular-whitespace */\n\nconst utf8Decoder = new TextDecoder();\nfunction decodeBuffer(uint8View, isUTF8) { /* eslint-disable-line no-unused-vars */ /* lgtm [js/superfluous-trailing-arguments] */\n if (isSharedArrayBuffer(uint8View.buffer)) {\n uint8View = new Uint8Array(uint8View);\n }\n return utf8Decoder.decode(uint8View);\n /*\n AFAICT the UTF8 flat is not set so it's 100% up to the user\n to self decode if their file is not utf8 filenames\n return isUTF8\n ? utf8Decoder.decode(uint8View)\n : decodeCP437(uint8View);\n */\n}\n\nasync function findEndOfCentralDirector(reader, totalLength) {\n const size = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);\n const readStart = totalLength - size;\n const data = await readAs(reader, readStart, size);\n for (let i = size - EOCDR_WITHOUT_COMMENT_SIZE; i >= 0; --i) {\n if (getUint32LE(data, i) !== EOCDR_SIGNATURE) {\n continue;\n }\n\n // 0 - End of central directory signature\n const eocdr = new Uint8Array(data.buffer, data.byteOffset + i, data.byteLength - i);\n // 4 - Number of this disk\n const diskNumber = getUint16LE(eocdr, 4);\n if (diskNumber !== 0) {\n throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);\n }\n\n // 6 - Disk where central directory starts\n // 8 - Number of central directory records on this disk\n // 10 - Total number of central directory records\n const entryCount = getUint16LE(eocdr, 10);\n // 12 - Size of central directory (bytes)\n const centralDirectorySize = getUint32LE(eocdr, 12);\n // 16 - Offset of start of central directory, relative to start of archive\n const centralDirectoryOffset = getUint32LE(eocdr, 16);\n // 20 - Comment length\n const commentLength = getUint16LE(eocdr, 20);\n const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;\n if (commentLength !== expectedCommentLength) {\n throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);\n }\n\n // 22 - Comment\n // the encoding is always cp437.\n const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);\n const comment = decodeBuffer(commentBytes);\n\n if (entryCount === 0xffff || centralDirectoryOffset === 0xffffffff) {\n return await readZip64CentralDirectory(reader, readStart + i, comment, commentBytes);\n } else {\n return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n }\n }\n\n throw new Error('could not find end of central directory. maybe not zip file');\n}\n\nconst END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 0x07064b50;\n\nasync function readZip64CentralDirectory(reader, offset, comment, commentBytes) {\n // ZIP64 Zip64 end of central directory locator\n const zip64EocdlOffset = offset - 20;\n const eocdl = await readAs(reader, zip64EocdlOffset, 20);\n\n // 0 - zip64 end of central dir locator signature\n if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory locator signature');\n }\n\n // 4 - number of the disk with the start of the zip64 end of central directory\n // 8 - relative offset of the zip64 end of central directory record\n const zip64EocdrOffset = getUint64LE(eocdl, 8);\n // 16 - total number of disks\n\n // ZIP64 end of central directory record\n const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);\n\n // 0 - zip64 end of central dir signature 4 bytes (0x06064b50)\n if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory record signature');\n }\n // 4 - size of zip64 end of central directory record 8 bytes\n // 12 - version made by 2 bytes\n // 14 - version needed to extract 2 bytes\n // 16 - number of this disk 4 bytes\n // 20 - number of the disk with the start of the central directory 4 bytes\n // 24 - total number of entries in the central directory on this disk 8 bytes\n // 32 - total number of entries in the central directory 8 bytes\n const entryCount = getUint64LE(zip64Eocdr, 32);\n // 40 - size of the central directory 8 bytes\n const centralDirectorySize = getUint64LE(zip64Eocdr, 40);\n // 48 - offset of start of central directory with respect to the starting disk number 8 bytes\n const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);\n // 56 - zip64 extensible data sector (variable size)\n return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n}\n\nconst CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 0x02014b50;\n\nasync function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {\n let readEntryCursor = 0;\n const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);\n const rawEntries = [];\n\n for (let e = 0; e < rawEntryCount; ++e) {\n const buffer = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);\n // 0 - Central directory file header signature\n const signature = getUint32LE(buffer, 0);\n if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {\n throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);\n }\n const rawEntry = {\n // 4 - Version made by\n versionMadeBy: getUint16LE(buffer, 4),\n // 6 - Version needed to extract (minimum)\n versionNeededToExtract: getUint16LE(buffer, 6),\n // 8 - General purpose bit flag\n generalPurposeBitFlag: getUint16LE(buffer, 8),\n // 10 - Compression method\n compressionMethod: getUint16LE(buffer, 10),\n // 12 - File last modification time\n lastModFileTime: getUint16LE(buffer, 12),\n // 14 - File last modification date\n lastModFileDate: getUint16LE(buffer, 14),\n // 16 - CRC-32\n crc32: getUint32LE(buffer, 16),\n // 20 - Compressed size\n compressedSize: getUint32LE(buffer, 20),\n // 24 - Uncompressed size\n uncompressedSize: getUint32LE(buffer, 24),\n // 28 - File name length (n)\n fileNameLength: getUint16LE(buffer, 28),\n // 30 - Extra field length (m)\n extraFieldLength: getUint16LE(buffer, 30),\n // 32 - File comment length (k)\n fileCommentLength: getUint16LE(buffer, 32),\n // 34 - Disk number where file starts\n // 36 - Internal file attributes\n internalFileAttributes: getUint16LE(buffer, 36),\n // 38 - External file attributes\n externalFileAttributes: getUint32LE(buffer, 38),\n // 42 - Relative offset of local file header\n relativeOffsetOfLocalHeader: getUint32LE(buffer, 42),\n };\n\n if (rawEntry.generalPurposeBitFlag & 0x40) {\n throw new Error('strong encryption is not supported');\n }\n\n readEntryCursor += 46;\n\n const data = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);\n rawEntry.nameBytes = data.slice(0, rawEntry.fileNameLength);\n rawEntry.name = decodeBuffer(rawEntry.nameBytes);\n\n // 46+n - Extra field\n const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;\n const extraFieldBuffer = data.slice(rawEntry.fileNameLength, fileCommentStart);\n rawEntry.extraFields = [];\n let i = 0;\n while (i < extraFieldBuffer.length - 3) {\n const headerId = getUint16LE(extraFieldBuffer, i + 0);\n const dataSize = getUint16LE(extraFieldBuffer, i + 2);\n const dataStart = i + 4;\n const dataEnd = dataStart + dataSize;\n if (dataEnd > extraFieldBuffer.length) {\n throw new Error('extra field length exceeds extra field buffer size');\n }\n rawEntry.extraFields.push({\n id: headerId,\n data: extraFieldBuffer.slice(dataStart, dataEnd),\n });\n i = dataEnd;\n }\n\n // 46+n+m - File comment\n rawEntry.commentBytes = data.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);\n rawEntry.comment = decodeBuffer(rawEntry.commentBytes);\n\n readEntryCursor += data.length;\n\n if (rawEntry.uncompressedSize === 0xffffffff ||\n rawEntry.compressedSize === 0xffffffff ||\n rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n // ZIP64 format\n // find the Zip64 Extended Information Extra Field\n const zip64ExtraField = rawEntry.extraFields.find(e => e.id === 0x0001);\n if (!zip64ExtraField) {\n throw new Error('expected zip64 extended information extra field');\n }\n const zip64EiefBuffer = zip64ExtraField.data;\n let index = 0;\n // 0 - Original Size 8 bytes\n if (rawEntry.uncompressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include uncompressed size');\n }\n rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 8 - Compressed Size 8 bytes\n if (rawEntry.compressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include compressed size');\n }\n rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 16 - Relative Header Offset 8 bytes\n if (rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include relative header offset');\n }\n rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 24 - Disk Start Number 4 bytes\n }\n\n // check for Info-ZIP Unicode Path Extra Field (0x7075)\n // see https://github.com/thejoshwolfe/yauzl/issues/33\n const nameField = rawEntry.extraFields.find(e =>\n e.id === 0x7075 &&\n e.data.length >= 6 && // too short to be meaningful\n e.data[0] === 1 && // Version 1 byte version of this extra field, currently 1\n getUint32LE(e.data, 1), crc$1.unsigned(rawEntry.nameBytes)); // NameCRC32 4 bytes File Name Field CRC32 Checksum\n // > If the CRC check fails, this UTF-8 Path Extra Field should be\n // > ignored and the File Name field in the header should be used instead.\n if (nameField) {\n // UnicodeName Variable UTF-8 version of the entry File Name\n rawEntry.fileName = decodeBuffer(nameField.data.slice(5));\n }\n\n // validate file size\n if (rawEntry.compressionMethod === 0) {\n let expectedCompressedSize = rawEntry.uncompressedSize;\n if ((rawEntry.generalPurposeBitFlag & 0x1) !== 0) {\n // traditional encryption prefixes the file data with a header\n expectedCompressedSize += 12;\n }\n if (rawEntry.compressedSize !== expectedCompressedSize) {\n throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);\n }\n }\n rawEntries.push(rawEntry);\n }\n const zip = {\n comment,\n commentBytes,\n };\n return {\n zip,\n entries: rawEntries.map(e => new ZipEntry(reader, e)),\n };\n}\n\nasync function readEntryDataHeader(reader, rawEntry) {\n if (rawEntry.generalPurposeBitFlag & 0x1) {\n throw new Error('encrypted entries not supported');\n }\n const buffer = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);\n // note: maybe this should be passed in or cached on entry\n // as it's async so there will be at least one tick (not sure about that)\n const totalLength = await reader.getLength();\n\n // 0 - Local file header signature = 0x04034b50\n const signature = getUint32LE(buffer, 0);\n if (signature !== 0x04034b50) {\n throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);\n }\n\n // all this should be redundant\n // 4 - Version needed to extract (minimum)\n // 6 - General purpose bit flag\n // 8 - Compression method\n // 10 - File last modification time\n // 12 - File last modification date\n // 14 - CRC-32\n // 18 - Compressed size\n // 22 - Uncompressed size\n // 26 - File name length (n)\n const fileNameLength = getUint16LE(buffer, 26);\n // 28 - Extra field length (m)\n const extraFieldLength = getUint16LE(buffer, 28);\n // 30 - File name\n // 30+n - Extra field\n const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;\n let decompress;\n if (rawEntry.compressionMethod === 0) {\n // 0 - The file is stored (no compression)\n decompress = false;\n } else if (rawEntry.compressionMethod === 8) {\n // 8 - The file is Deflated\n decompress = true;\n } else {\n throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);\n }\n const fileDataStart = localFileHeaderEnd;\n const fileDataEnd = fileDataStart + rawEntry.compressedSize;\n if (rawEntry.compressedSize !== 0) {\n // bounds check now, because the read streams will probably not complain loud enough.\n // since we're dealing with an unsigned offset plus an unsigned size,\n // we only have 1 thing to check for.\n if (fileDataEnd > totalLength) {\n throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);\n }\n }\n return {\n decompress,\n fileDataStart,\n };\n}\n\nasync function readEntryDataAsArrayBuffer(reader, rawEntry) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);\n // make copy?\n //\n // 1. The source is a Blob/file. In this case we'll get back TypedArray we can just hand to the user\n // 2. The source is a TypedArray. In this case we'll get back TypedArray that is a view into a larger buffer\n // but because ultimately this is used to return an ArrayBuffer to `someEntry.arrayBuffer()`\n // we need to return copy since we need the `ArrayBuffer`, not the TypedArray to exactly match the data.\n // Note: We could add another API function `bytes()` or something that returned a `Uint8Array`\n // instead of an `ArrayBuffer`. This would let us skip a copy here. But this case only happens for uncompressed\n // data. That seems like a rare enough case that adding a new API is not worth it? Or is it? A zip of jpegs or mp3s\n // might not be compressed. For now that's a TBD.\n return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;\n }\n // see comment in readEntryDateAsBlob\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);\n return result;\n}\n\nasync function readEntryDataAsBlob(reader, rawEntry, type) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type);\n if (isBlob(typedArrayOrBlob)) {\n return typedArrayOrBlob;\n }\n return new Blob([isSharedArrayBuffer(typedArrayOrBlob.buffer) ? new Uint8Array(typedArrayOrBlob) : typedArrayOrBlob], {type});\n }\n // Here's the issue with this mess (should refactor?)\n // if the source is a blob then we really want to pass a blob to inflateRawAsync to avoid a large\n // copy if we're going to a worker.\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type);\n return result;\n}\n\nfunction setOptions$1(options) {\n setOptions(options);\n}\n\nasync function unzipRaw(source) {\n let reader;\n if (typeof Blob !== 'undefined' && source instanceof Blob) {\n reader = new BlobReader(source);\n } else if (source instanceof ArrayBuffer || (source && source.buffer && source.buffer instanceof ArrayBuffer)) {\n reader = new ArrayBufferReader(source);\n } else if (isSharedArrayBuffer(source) || isSharedArrayBuffer(source.buffer)) {\n reader = new ArrayBufferReader(source);\n } else if (typeof source === 'string') {\n const req = await fetch(source);\n if (!req.ok) {\n throw new Error(`failed http request ${source}, status: ${req.status}: ${req.statusText}`);\n }\n const blob = await req.blob();\n reader = new BlobReader(blob);\n } else if (typeof source.getLength === 'function' && typeof source.read === 'function') {\n reader = source;\n } else {\n throw new Error('unsupported source type');\n }\n\n const totalLength = await reader.getLength();\n\n if (totalLength > Number.MAX_SAFE_INTEGER) {\n throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);\n }\n\n return await findEndOfCentralDirector(reader, totalLength);\n}\n\n// If the names are not utf8 you should use unzipitRaw\nasync function unzip(source) {\n const {zip, entries} = await unzipRaw(source);\n return {\n zip,\n entries: Object.fromEntries(entries.map(v => [v.name, v])),\n };\n}\n\nfunction cleanup$1() {\n cleanup();\n}\n\nexport { HTTPRangeReader, cleanup$1 as cleanup, setOptions$1 as setOptions, unzip, unzipRaw };\n","\nlet imports = {};\nimports['__wbindgen_placeholder__'] = module.exports;\nlet wasm;\nconst { TextDecoder, TextEncoder } = require(`util`);\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_export_3.set(idx, obj);\n return idx;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedTextEncoder = new TextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_3.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n/**\n * This is a method that exposes the same API as `compile`\n * But uses the Context based APi internally\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ProgramCompileResult}\n */\nmodule.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_program_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * This is a method that exposes the same API as `compile`\n * But uses the Context based APi internally\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ContractCompileResult}\n */\nmodule.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_contract_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * @param {string} level\n */\nmodule.exports.init_log_level = function(level) {\n const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.init_log_level(ptr0, len0);\n};\n\n/**\n * @returns {any}\n */\nmodule.exports.build_info = function() {\n const ret = wasm.build_info();\n return ret;\n};\n\n/**\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ProgramCompileResult}\n */\nmodule.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_program(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ContractCompileResult}\n */\nmodule.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_contract(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\nconst CompilerContextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_compilercontext_free(ptr >>> 0, 1));\n/**\n * This is a wrapper class that is wasm-bindgen compatible\n * We do not use js_name and rename it like CrateId because\n * then the impl block is not picked up in javascript.\n */\nclass CompilerContext {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n CompilerContextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_compilercontext_free(ptr, 0);\n }\n /**\n * @param {PathToFileSourceMap} source_map\n */\n constructor(source_map) {\n _assertClass(source_map, PathToFileSourceMap);\n var ptr0 = source_map.__destroy_into_raw();\n const ret = wasm.compilercontext_new(ptr0);\n this.__wbg_ptr = ret >>> 0;\n CompilerContextFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {string} path_to_crate\n * @returns {CrateId}\n */\n process_root_crate(path_to_crate) {\n const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.compilercontext_process_root_crate(this.__wbg_ptr, ptr0, len0);\n return CrateId.__wrap(ret);\n }\n /**\n * @param {string} path_to_crate\n * @returns {CrateId}\n */\n process_dependency_crate(path_to_crate) {\n const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.compilercontext_process_dependency_crate(this.__wbg_ptr, ptr0, len0);\n return CrateId.__wrap(ret);\n }\n /**\n * @param {string} crate_name\n * @param {CrateId} from\n * @param {CrateId} to\n */\n add_dependency_edge(crate_name, from, to) {\n const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(from, CrateId);\n _assertClass(to, CrateId);\n const ret = wasm.compilercontext_add_dependency_edge(this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);\n if (ret[1]) {\n throw takeFromExternrefTable0(ret[0]);\n }\n }\n /**\n * @param {number} program_width\n * @returns {ProgramCompileResult}\n */\n compile_program(program_width) {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.compilercontext_compile_program(ptr, program_width);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n /**\n * @param {number} program_width\n * @returns {ContractCompileResult}\n */\n compile_contract(program_width) {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.compilercontext_compile_contract(ptr, program_width);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n}\nmodule.exports.CompilerContext = CompilerContext;\n\nconst CrateIdFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_crateid_free(ptr >>> 0, 1));\n\nclass CrateId {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(CrateId.prototype);\n obj.__wbg_ptr = ptr;\n CrateIdFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n CrateIdFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_crateid_free(ptr, 0);\n }\n}\nmodule.exports.CrateId = CrateId;\n\nconst PathToFileSourceMapFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_pathtofilesourcemap_free(ptr >>> 0, 1));\n/**\n * This map contains the paths of all of the files in the entry-point crate and\n * the transitive dependencies of the entry-point crate.\n *\n * This is for all intents and purposes the file system that the compiler will use to resolve/compile\n * files in the crate being compiled and its dependencies.\n *\n * Using a `BTreeMap` to add files to the [FileManager] in a deterministic order,\n * which affects the `FileId` in the `Location`s in the AST on which the `hash` is based.\n * Note that we cannot expect to match the IDs assigned by the `FileManager` used by `nargo`,\n * because there the order is determined by the dependency graph as well as the file name.\n */\nclass PathToFileSourceMap {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PathToFileSourceMapFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_pathtofilesourcemap_free(ptr, 0);\n }\n constructor() {\n const ret = wasm.pathtofilesourcemap_new();\n this.__wbg_ptr = ret >>> 0;\n PathToFileSourceMapFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {string} path\n * @param {string} source_code\n * @returns {boolean}\n */\n add_source_code(path, source_code) {\n const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.pathtofilesourcemap_add_source_code(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n}\nmodule.exports.PathToFileSourceMap = PathToFileSourceMap;\n\nmodule.exports.__wbg_constructor_028de84558e1bc6c = function() {\n const ret = new Object();\n return ret;\n};\n\nmodule.exports.__wbg_constructor_2e707aaa476d830f = function() {\n const ret = new Object();\n return ret;\n};\n\nmodule.exports.__wbg_constructor_8a689602cef0475e = function(arg0) {\n const ret = new Error(arg0);\n return ret;\n};\n\nmodule.exports.__wbg_debug_3cb59063b29f58c1 = function(arg0) {\n console.debug(arg0);\n};\n\nmodule.exports.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {\n console.debug(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_error_524f506f44df1645 = function(arg0) {\n console.error(arg0);\n};\n\nmodule.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n};\n\nmodule.exports.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {\n console.error(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_getTime_46267b1c24877e30 = function(arg0) {\n const ret = arg0.getTime();\n return ret;\n};\n\nmodule.exports.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {\n console.info(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_info_3daf2e093e091b66 = function(arg0) {\n console.info(arg0);\n};\n\nmodule.exports.__wbg_new0_f788a2397c7ca929 = function() {\n const ret = new Date();\n return ret;\n};\n\nmodule.exports.__wbg_new_8a6f238a6ece86ea = function() {\n const ret = new Error();\n return ret;\n};\n\nmodule.exports.__wbg_parse_def2e24ef1252aff = function() { return handleError(function (arg0, arg1) {\n const ret = JSON.parse(getStringFromWasm0(arg0, arg1));\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(arg0, arg1, arg2);\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {\n const ret = arg1.stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(arg0);\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_warn_4ca3906c248c47c4 = function(arg0) {\n console.warn(arg0);\n};\n\nmodule.exports.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {\n console.warn(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_3;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n};\n\nmodule.exports.__wbindgen_is_undefined = function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n};\n\nmodule.exports.__wbindgen_string_get = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n};\n\nmodule.exports.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nconst path = require('path').join(__dirname, 'index_bg.wasm');\nconst bytes = require('fs').readFileSync(path);\n\nconst wasmModule = new WebAssembly.Module(bytes);\nconst wasmInstance = new WebAssembly.Instance(wasmModule, imports);\nwasm = wasmInstance.exports;\nmodule.exports.__wasm = wasm;\n\nwasm.__wbindgen_start();\n\n","import { inflate } from 'pako';\n\n/**\n * Decompresses and decodes the debug symbols\n * @param debugSymbols - The base64 encoded debug symbols\n */\nexport function inflateDebugSymbols(debugSymbols: string) {\n return JSON.parse(inflate(Uint8Array.from(Buffer.from(debugSymbols, 'base64')), { to: 'string', raw: true }));\n}\n","import { join } from 'path';\n\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig } from '../../types/noir_package_config';\nimport { LogData, LogFn } from '../../utils';\n\n/**\n * Noir Dependency Resolver\n */\nexport class DependencyManager {\n #entryPoint: Package;\n #libraries = new Map<string, Dependency>();\n #dependencies = new Map<string, string[]>();\n #log: LogFn;\n #resolvers: readonly DependencyResolver[];\n\n /**\n * Creates a new dependency resolver\n * @param resolvers - A list of dependency resolvers to use\n * @param entryPoint - The entry point of the project\n */\n constructor(resolvers: readonly DependencyResolver[] = [], entryPoint: Package) {\n this.#resolvers = resolvers;\n this.#entryPoint = entryPoint;\n this.#log = (msg: string, _data?: LogData) => {\n console.log(msg);\n };\n }\n\n /**\n * Gets dependencies for the entry point\n */\n public getEntrypointDependencies() {\n return this.#dependencies.get('') ?? [];\n }\n\n /**\n * Get transitive libraries used by the package\n */\n public getLibraries() {\n return Array.from(this.#libraries.entries());\n }\n\n /**\n * A map of library dependencies\n */\n public getLibraryDependencies() {\n const entries = Array.from(this.#dependencies.entries());\n return Object.fromEntries(entries.filter(([name]) => name !== ''));\n }\n\n /**\n * Resolves dependencies for a package.\n */\n public async resolveDependencies(): Promise<void> {\n await this.#breadthFirstResolveDependencies();\n }\n\n /**\n * Gets the version of a dependency in the dependency tree\n * @param name - Dependency name\n * @returns The dependency's version\n */\n public getVersionOf(name: string): string | undefined {\n const dep = this.#libraries.get(name);\n return dep?.version;\n }\n\n async #breadthFirstResolveDependencies(): Promise<void> {\n /** Represents a package to resolve dependencies for */\n type Job = {\n /** Package name */\n packageName: string;\n /** The package location */\n noirPackage: Package;\n };\n\n const queue: Job[] = [\n {\n packageName: '',\n noirPackage: this.#entryPoint,\n },\n ];\n\n while (queue.length > 0) {\n const { packageName, noirPackage } = queue.shift()!;\n for (const [name, config] of Object.entries(noirPackage.getDependencies())) {\n // TODO what happens if more than one package has the same name but different versions?\n if (this.#libraries.has(name)) {\n this.#log(`skipping already resolved dependency ${name}`);\n this.#dependencies.set(packageName, [...(this.#dependencies.get(packageName) ?? []), name]);\n\n continue;\n }\n const dependency = await this.#resolveDependency(noirPackage, config);\n if (dependency.package.getType() !== 'lib') {\n this.#log(`Non-library package ${name}`, config);\n throw new Error(`Dependency ${name} is not a library`);\n }\n\n this.#libraries.set(name, dependency);\n this.#dependencies.set(packageName, [...(this.#dependencies.get(packageName) ?? []), name]);\n\n queue.push({\n noirPackage: dependency.package,\n packageName: name,\n });\n }\n }\n }\n\n async #resolveDependency(pkg: Package, config: DependencyConfig): Promise<Dependency> {\n let dependency: Dependency | null = null;\n for (const resolver of this.#resolvers) {\n dependency = await resolver.resolveDependency(pkg, config);\n if (dependency) {\n break;\n }\n }\n\n if (!dependency) {\n throw new Error('Dependency not resolved');\n }\n\n return dependency;\n }\n\n /**\n * Gets the names of the crates in this dependency list\n */\n public getPackageNames() {\n return [...this.#libraries.keys()];\n }\n\n /**\n * Looks up a dependency\n * @param sourceId - The source being resolved\n * @returns The path to the resolved file\n */\n public findFile(sourceId: string): string | null {\n const [lib, ...path] = sourceId.split('/').filter((x) => x);\n const dep = this.#libraries.get(lib);\n if (dep) {\n return join(dep.package.getSrcPath(), ...path);\n } else {\n return null;\n }\n }\n}\n","import { delimiter, join, sep } from 'path';\nimport { unzip } from 'unzipit';\n\nimport { FileManager } from '../file-manager/file-manager';\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig, GitDependencyConfig } from '../../types/noir_package_config';\nimport { LogData } from '../../utils';\n\n/**\n * Downloads dependencies from github\n */\nexport class GithubDependencyResolver implements DependencyResolver {\n #fm: FileManager;\n #fetch: typeof fetch;\n #log;\n\n constructor(fm: FileManager, fetcher: typeof fetch) {\n this.#fm = fm;\n this.#fetch = fetcher;\n this.#log = (msg: string, _data?: LogData) => {\n console.log(msg);\n };\n }\n\n /**\n * Resolves a dependency from github. Returns null if URL is for a different website.\n * @param _pkg - The package to resolve the dependency for\n * @param dependency - The dependency configuration\n * @returns asd\n */\n async resolveDependency(_pkg: Package, dependency: DependencyConfig): Promise<Dependency | null> {\n // TODO accept ssh urls?\n // TODO github authentication?\n if (!('git' in dependency) || new URL(dependency.git).hostname != 'github.com') {\n return null;\n }\n\n const archivePath = await this.#fetchZipFromGithub(dependency);\n const libPath = await this.#extractZip(dependency, archivePath);\n return {\n version: dependency.tag,\n package: await Package.open(libPath, this.#fm),\n };\n }\n\n async #fetchZipFromGithub(dependency: Pick<GitDependencyConfig, 'git' | 'tag'>): Promise<string> {\n const git_host = new URL(dependency.git);\n if (git_host !== null && git_host.host != 'github.com') {\n throw new Error('Only github dependencies are supported');\n }\n\n const url = resolveGithubCodeArchive(dependency, 'zip');\n const localArchivePath = join('archives', safeFilename(url.pathname));\n\n // TODO should check signature before accepting any file\n if (this.#fm.hasFileSync(localArchivePath)) {\n this.#log('using cached archive', { url: url.href, path: localArchivePath });\n return localArchivePath;\n }\n\n const response = await this.#fetch(url, {\n method: 'GET',\n });\n\n if (!response.ok || !response.body) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n\n const tmpFile = localArchivePath + '.tmp';\n await this.#fm.writeFile(tmpFile, response.body);\n await this.#fm.moveFile(tmpFile, localArchivePath);\n\n return localArchivePath;\n }\n\n async #extractZip(dependency: GitDependencyConfig, archivePath: string): Promise<string> {\n const gitUrl = new URL(dependency.git);\n // extract the archive to this location\n const extractLocation = join('libs', safeFilename(gitUrl.pathname + '@' + (dependency.tag ?? 'HEAD')));\n\n // where we expect to find this package after extraction\n // it might already exist if the archive got unzipped previously\n const packagePath = join(extractLocation, dependency.directory ?? '');\n\n if (this.#fm.hasFileSync(packagePath)) {\n return packagePath;\n }\n\n const { entries } = await unzip(await this.#fm.readFile(archivePath));\n\n // extract to a temporary directory, then move it to the final location\n // TODO empty the temp directory first\n const tmpExtractLocation = extractLocation + '.tmp';\n for (const entry of Object.values(entries)) {\n if (entry.isDirectory) {\n continue;\n }\n\n // remove the first path segment, because it'll be the archive name\n const name = stripSegments(entry.name, 1);\n const path = join(tmpExtractLocation, name);\n await this.#fm.writeFile(path, (await entry.blob()).stream());\n }\n\n await this.#fm.moveFile(tmpExtractLocation, extractLocation);\n\n return packagePath;\n }\n}\n\n/**\n * Strips the first n segments from a path\n */\nfunction stripSegments(path: string, count: number): string {\n const segments = path.split(sep).filter(Boolean);\n return segments.slice(count).join(sep);\n}\n\n/**\n * Returns a safe filename for a value\n * @param val - The value to convert\n */\nexport function safeFilename(val: string): string {\n if (!val) {\n throw new Error('invalid value');\n }\n\n return val.replaceAll(sep, '_').replaceAll(delimiter, '_').replace(/^_+/, '');\n}\n\n/**\n * Resolves a dependency's archive URL.\n * @param dependency - The dependency configuration\n * @returns The URL to the library archive\n */\nexport function resolveGithubCodeArchive(dependency: GitDependencyConfig, format: 'zip' | 'tar'): URL {\n const gitUrl = new URL(dependency.git);\n const [owner, repo] = gitUrl.pathname.slice(1).split('/');\n const ref = dependency.tag ?? 'HEAD';\n const extension = format === 'zip' ? 'zip' : 'tar.gz';\n\n if (!owner || !repo || gitUrl.hostname !== 'github.com') {\n throw new Error('Invalid Github repository URL');\n }\n\n return new URL(`https://github.com/${owner}/${repo}/archive/${ref}.${extension}`);\n}\n","import { isAbsolute, join } from 'path';\n\nimport { FileManager } from '../file-manager/file-manager';\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig } from '../../types/noir_package_config';\n\n/**\n * Resolves dependencies on-disk, relative to current package\n */\nexport class LocalDependencyResolver implements DependencyResolver {\n #fm: FileManager;\n\n constructor(fm: FileManager) {\n this.#fm = fm;\n }\n\n async resolveDependency(parent: Package, config: DependencyConfig): Promise<Dependency | null> {\n if ('path' in config) {\n const parentPath = parent.getPackagePath();\n const dependencyPath = isAbsolute(config.path) ? config.path : join(parentPath, config.path);\n return {\n // unknown version, Nargo.toml doesn't have a version field\n version: undefined,\n package: await Package.open(dependencyPath, this.#fm),\n };\n } else {\n return null;\n }\n }\n}\n","import { dirname, isAbsolute, join } from 'path';\n\n/**\n * A file system interface that matches the node fs module.\n */\nexport interface FileSystem {\n /** Checks if the file exists */\n existsSync: (path: string) => boolean;\n /** Creates a directory structure */\n mkdir: (\n dir: string,\n opts?: {\n /** Create parent directories as needed */\n recursive: boolean;\n },\n ) => Promise<void>;\n /** Writes a file */\n writeFile: (path: string, data: Uint8Array) => Promise<void>;\n /** Reads a file */\n readFile: (path: string, encoding?: 'utf-8') => Promise<Uint8Array | string>;\n /** Renames a file */\n rename: (oldPath: string, newPath: string) => Promise<void>;\n /** Reads a directory */\n readdir: (\n path: string,\n options?: {\n /** Traverse child directories recursively */\n recursive: boolean;\n },\n ) => Promise<string[]>;\n}\n\n/**\n * A file manager that writes file to a specific directory but reads globally.\n */\nexport class FileManager {\n #fs: FileSystem;\n #dataDir: string;\n\n constructor(fs: FileSystem, dataDir: string) {\n this.#fs = fs;\n this.#dataDir = dataDir;\n }\n\n /**\n * Returns the data directory\n */\n getDataDir() {\n return this.#dataDir;\n }\n\n /**\n * Saves a file to the data directory.\n * @param name - File to save\n * @param stream - File contents\n */\n public async writeFile(name: string, stream: ReadableStream<Uint8Array>): Promise<void> {\n if (isAbsolute(name)) {\n throw new Error(\"can't write absolute path\");\n }\n\n const path = this.#getPath(name);\n const chunks: Uint8Array[] = [];\n const reader = stream.getReader();\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n chunks.push(value);\n }\n\n const file = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0));\n let offset = 0;\n for (const chunk of chunks) {\n file.set(chunk, offset);\n offset += chunk.length;\n }\n\n await this.#fs.mkdir(dirname(path), { recursive: true });\n await this.#fs.writeFile(this.#getPath(path), file);\n }\n\n /**\n * Reads a file from the filesystem and returns a buffer\n * Saves a file to the data directory.\n * @param oldName - File to save\n * @param newName - File contents\n */\n async moveFile(oldName: string, newName: string) {\n if (isAbsolute(oldName) || isAbsolute(newName)) {\n throw new Error(\"can't move absolute path\");\n }\n\n const oldPath = this.#getPath(oldName);\n const newPath = this.#getPath(newName);\n\n await this.#fs.mkdir(dirname(newPath), { recursive: true });\n await this.#fs.rename(oldPath, newPath);\n }\n\n /**\n * Reads a file from the disk and returns a buffer\n * @param name - File to read\n */\n public async readFile(name: string): Promise<Uint8Array>;\n /**\n * Reads a file from the filesystem as a string\n * @param name - File to read\n * @param encoding - Encoding to use\n */\n public async readFile(name: string, encoding: 'utf-8'): Promise<string>;\n /**\n * Reads a file from the filesystem\n * @param name - File to read\n * @param encoding - Encoding to use\n */\n public async readFile(name: string, encoding?: 'utf-8'): Promise<string | Uint8Array> {\n const path = this.#getPath(name);\n const data = await this.#fs.readFile(path, encoding);\n\n if (!encoding) {\n return typeof data === 'string'\n ? new TextEncoder().encode(data) // this branch shouldn't be hit, but just in case\n : new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n\n return data;\n }\n\n /**\n * Checks if a file exists and is accessible\n * @param name - File to check\n */\n public hasFileSync(name: string): boolean {\n return this.#fs.existsSync(this.#getPath(name));\n }\n\n #getPath(name: string) {\n return isAbsolute(name) ? name : join(this.#dataDir, name);\n }\n\n /**\n * Reads a file from the filesystem\n * @param dir - File to read\n * @param options - Readdir options\n */\n public async readdir(\n dir: string,\n options?: {\n /**\n * Traverse child directories recursively\n */\n recursive: boolean;\n },\n ) {\n const dirPath = this.#getPath(dir);\n return await this.#fs.readdir(dirPath, options);\n }\n}\n","import { existsSync } from 'fs';\nimport { promises as fs } from 'fs';\n\nimport { FileManager } from './file-manager';\n\n// This is needed because memfs doesn't support the recursive flag yet\nexport async function readdirRecursive(dir: string): Promise<string[]> {\n const contents = await fs.readdir(dir);\n let files: string[] = [];\n for (const handle of contents) {\n if ((await fs.stat(`${dir}/${handle}`)).isFile()) {\n files.push(`${dir}/${handle.toString()}`);\n } else {\n files = files.concat(await readdirRecursive(`${dir}/${handle.toString()}`));\n }\n }\n return files;\n}\n\n/**\n * Creates a new FileManager instance based on fs in node and memfs in the browser (via webpack alias)\n *\n * @param dataDir - root of the file system\n */\nexport function createNodejsFileManager(dataDir: string): FileManager {\n return new FileManager(\n {\n // ExistsSync is not available in the fs/promises module\n existsSync,\n // This is added here because the node types are not compatible with the FileSystem type for mkdir\n // Typescripts tries to use a different variant of the function that is not the one that has the optional options.\n mkdir: async (\n dir: string,\n opts?: {\n /**\n * Traverse child directories\n */\n recursive: boolean;\n },\n ) => {\n await fs.mkdir(dir, opts);\n },\n\n writeFile: fs.writeFile,\n readFile: fs.readFile,\n rename: fs.rename,\n readdir: async (\n dir: string,\n options?: {\n /**\n * Traverse child directories\n */\n recursive: boolean;\n },\n ) => {\n if (options?.recursive) {\n return readdirRecursive(dir);\n }\n return (await fs.readdir(dir)).map((handles) => handles.toString());\n },\n },\n dataDir,\n );\n}\n","import { isAbsolute } from 'path';\n\nimport { DependencyManager } from './dependencies/dependency-manager';\nimport { GithubDependencyResolver as GithubCodeArchiveDependencyResolver } from './dependencies/github-dependency-resolver';\nimport { LocalDependencyResolver } from './dependencies/local-dependency-resolver';\nimport { FileManager } from './file-manager/file-manager';\nimport { Package } from './package';\nimport { LogFn } from '../utils';\nimport { ContractCompilationArtifacts, ProgramCompilationArtifacts } from '../types/noir_artifact';\n\n/** Compilation options */\nexport type NoirWasmCompileOptions = {\n /** Logging function */\n log: LogFn;\n /** Log debugging information through this function */\n debugLog: LogFn;\n};\n\n/**\n * Noir Package Compiler\n */\nexport class NoirWasmCompiler {\n #log: LogFn;\n #debugLog: LogFn;\n #package: Package;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n #wasmCompiler: any;\n #sourceMap: any;\n #fm: FileManager;\n #dependencyManager: DependencyManager;\n\n private constructor(\n entrypoint: Package,\n dependencyManager: DependencyManager,\n fileManager: FileManager,\n wasmCompiler: unknown,\n sourceMap: unknown,\n opts: NoirWasmCompileOptions,\n ) {\n this.#log = opts.log;\n this.#debugLog = opts.debugLog;\n this.#package = entrypoint;\n this.#fm = fileManager;\n this.#wasmCompiler = wasmCompiler;\n this.#sourceMap = sourceMap;\n this.#dependencyManager = dependencyManager;\n }\n\n /**\n * Creates a new compiler instance.\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project\n * @param opts - Compilation options\n */\n public static async new(\n fileManager: FileManager,\n projectPath: string,\n /* eslint-disable @typescript-eslint/no-explicit-any */\n wasmCompiler: any,\n sourceMap: any,\n /* eslint-enable @typescript-eslint/no-explicit-any */\n opts: NoirWasmCompileOptions,\n ) {\n // Assume the filemanager is initialized at the project root\n if (!isAbsolute(projectPath)) {\n throw new Error('projectPath must be an absolute path');\n }\n\n const noirPackage = await Package.open(projectPath, fileManager);\n\n const dependencyManager = new DependencyManager(\n [\n new LocalDependencyResolver(fileManager),\n // use node's global fetch\n new GithubCodeArchiveDependencyResolver(fileManager, fetch),\n // TODO support actual Git repositories\n ],\n noirPackage,\n );\n\n return new NoirWasmCompiler(noirPackage, dependencyManager, fileManager, wasmCompiler, sourceMap, opts);\n }\n\n /**\n * Compile EntryPoint\n */\n public async compile_program(): Promise<ProgramCompilationArtifacts> {\n console.log(`Compiling at ${this.#package.getEntryPointPath()}`);\n\n if (this.#package.getType() !== 'bin') {\n throw new Error(`Expected to find package type \"bin\" but found ${this.#package.getType()}`);\n }\n await this.#dependencyManager.resolveDependencies();\n this.#debugLog(`Dependencies: ${this.#dependencyManager.getPackageNames().join(', ')}`);\n\n try {\n const entrypoint = this.#package.getEntryPointPath();\n const deps = {\n root_dependencies: this.#dependencyManager.getEntrypointDependencies(),\n library_dependencies: this.#dependencyManager.getLibraryDependencies(),\n };\n const packageSources = await this.#package.getSources(this.#fm);\n const librarySources = (\n await Promise.all(\n this.#dependencyManager\n .getLibraries()\n .map(async ([alias, library]) => await library.package.getSources(this.#fm, alias)),\n )\n ).flat();\n [...packageSources, ...librarySources].forEach((sourceFile) => {\n this.#debugLog(`Adding source ${sourceFile.path}`);\n this.#sourceMap.add_source_code(sourceFile.path, sourceFile.source);\n });\n const result = this.#wasmCompiler.compile_program(entrypoint, deps, this.#sourceMap);\n\n return result;\n } catch (err) {\n if (err instanceof Error && err.name === 'CompileError') {\n const logs = await this.#processCompileError(err);\n for (const log of logs) {\n this.#log(log);\n }\n throw new Error(logs.join('\\n'));\n }\n\n throw err;\n }\n }\n\n /**\n * Compile EntryPoint\n */\n public async compile_contract(): Promise<ContractCompilationArtifacts> {\n console.log(`Compiling at ${this.#package.getEntryPointPath()}`);\n\n if (this.#package.getType() !== 'contract') {\n throw new Error(`Expected to find package type \"contract\" but found ${this.#package.getType()}`);\n }\n await this.#dependencyManager.resolveDependencies();\n this.#debugLog(`Dependencies: ${this.#dependencyManager.getPackageNames().join(', ')}`);\n\n try {\n const entrypoint = this.#package.getEntryPointPath();\n const deps = {\n root_dependencies: this.#dependencyManager.getEntrypointDependencies(),\n library_dependencies: this.#dependencyManager.getLibraryDependencies(),\n };\n const packageSources = await this.#package.getSources(this.#fm);\n const librarySources = (\n await Promise.all(\n this.#dependencyManager\n .getLibraries()\n .map(async ([alias, library]) => await library.package.getSources(this.#fm, alias)),\n )\n ).flat();\n [...packageSources, ...librarySources].forEach((sourceFile) => {\n this.#debugLog(`Adding source ${sourceFile.path}`);\n this.#sourceMap.add_source_code(sourceFile.path, sourceFile.source);\n });\n const result = this.#wasmCompiler.compile_contract(entrypoint, deps, this.#sourceMap);\n\n return result;\n } catch (err) {\n if (err instanceof Error && err.name === 'CompileError') {\n const logs = await this.#processCompileError(err);\n for (const log of logs) {\n this.#log(log);\n }\n throw new Error(logs.join('\\n'));\n }\n\n throw err;\n }\n }\n\n async #resolveFile(path: string) {\n try {\n const libFile = this.#dependencyManager.findFile(path);\n return await this.#fm.readFile(libFile ?? path, 'utf-8');\n } catch (_err) {\n return '';\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async #processCompileError(err: any): Promise<string[]> {\n const logs = [];\n for (const diag of err.diagnostics) {\n logs.push(` ${diag.message}`);\n const contents = await this.#resolveFile(diag.file);\n const lines = contents.split('\\n');\n const lineOffsets = lines.reduce<number[]>((accum, _, idx) => {\n if (idx === 0) {\n accum.push(0);\n } else {\n accum.push(accum[idx - 1] + lines[idx - 1].length + 1);\n }\n return accum;\n }, []);\n\n for (const secondary of diag.secondaries) {\n const errorLine = lineOffsets.findIndex((offset) => offset > secondary.start);\n logs.push(` ${diag.file}:${errorLine}: ${contents.slice(secondary.start, secondary.end)}`);\n }\n }\n return logs;\n }\n}\n","import { parse } from '@ltd/j-toml';\nimport { join } from 'path';\n\nimport { FileManager } from './file-manager/file-manager';\nimport { DependencyConfig, PackageConfig, parseNoirPackageConfig } from '../types/noir_package_config';\n\nconst CONFIG_FILE_NAME = 'Nargo.toml';\nconst SOURCE_EXTENSIONS = ['.nr'];\n\n/**\n * An array of sources for a package\n */\ntype SourceList = Array<{\n /**\n * The source path, taking into account modules and aliases. Eg: mylib/mod/mysource.nr\n */\n path: string;\n /**\n * Resolved source plaintext\n */\n source: string;\n}>;\n\n/**\n * A Noir package.\n */\nexport class Package {\n #packagePath: string;\n #srcPath: string;\n #config: PackageConfig;\n\n public constructor(path: string, srcDir: string, config: PackageConfig) {\n this.#packagePath = path;\n this.#srcPath = srcDir;\n this.#config = config;\n }\n\n /**\n * Gets this package's path.\n */\n public getPackagePath() {\n return this.#packagePath;\n }\n\n /**\n * Gets this package's Nargo.toml (NoirPackage)Config.\n */\n public getPackageConfig() {\n return this.#config;\n }\n\n /**\n * The path to the source directory.\n */\n public getSrcPath() {\n return this.#srcPath;\n }\n\n /**\n * Gets the entrypoint path for this package.\n */\n public getEntryPointPath(): string {\n let entrypoint: string;\n\n switch (this.getType()) {\n case 'lib':\n // we shouldn't need to compile `lib` type, since the .nr source is read directly\n // when the lib is used as a dependency elsewhere.\n entrypoint = 'lib.nr';\n break;\n case 'contract':\n case 'bin':\n entrypoint = 'main.nr';\n break;\n default:\n throw new Error(`Unknown package type: ${this.getType()}`);\n }\n // TODO check that `src` exists\n return join(this.#srcPath, entrypoint);\n }\n\n /**\n * Gets the project type\n */\n public getType() {\n return this.#config.package.type;\n }\n\n /**\n * Gets this package's dependencies.\n */\n public getDependencies(): Record<string, DependencyConfig> {\n return this.#config.dependencies ?? {};\n }\n\n /**\n * Gets this package's sources.\n * @param fm - A file manager to use\n * @param alias - An alias for the sources, if this package is a dependency\n */\n public async getSources(fm: FileManager, alias?: string): Promise<SourceList> {\n const handles = await fm.readdir(this.#srcPath, { recursive: true });\n return Promise.all(\n handles\n .filter((handle) => SOURCE_EXTENSIONS.find((ext) => handle.endsWith(ext)))\n .map(async (file) => {\n // Github deps are directly added to the file manager, which causes them to be missing the absolute path to the source file\n // and only include the extraction directory relative to the fm root directory\n // This regexp ensures we remove the \"real\" source path for all dependencies, providing the compiler with what it expects for each source file:\n // <absoluteSourcePath> -> <sourceAsString> for bin/contract packages\n // <depAlias/relativePathToSource> -> <sourceAsString> for libs\n const suffix = file.replace(new RegExp(`.*${this.#srcPath}`), '');\n return {\n path: this.getType() === 'lib' ? `${alias ? alias : this.#config.package.name}${suffix}` : file,\n source: (await fm.readFile(file, 'utf-8')).toString(),\n };\n }),\n );\n }\n\n /**\n * Opens a path on the filesystem.\n * @param path - Path to the package.\n * @param fm - A file manager to use.\n * @returns The Noir package at the given location\n */\n public static async open(path: string, fm: FileManager): Promise<Package> {\n const fileContents = await fm.readFile(join(path, CONFIG_FILE_NAME), 'utf-8');\n const config = parseNoirPackageConfig(parse(fileContents));\n\n return new Package(path, join(path, 'src'), config);\n }\n}\n","type NoirGitDependencySchema = {\n git: string;\n tag: string;\n directory?: string;\n};\n\ntype NoirLocalDependencySchema = {\n path: string;\n};\n\ntype NoirPackageType = 'lib' | 'contract' | 'bin';\ntype NoirPackageConfigSchema = {\n package: {\n name: string;\n type: NoirPackageType;\n entry?: string;\n description?: string;\n authors?: string[];\n compiler_version?: string;\n backend?: string;\n license?: string;\n };\n dependencies?: Record<string, GitDependencyConfig | LocalDependencyConfig>;\n};\n\n/**\n * Noir package configuration.\n */\nexport type PackageConfig = NoirPackageConfigSchema;\n\n/**\n * A remote package dependency.\n */\nexport type GitDependencyConfig = NoirGitDependencySchema;\n\n/**\n * A local package dependency.\n */\nexport type LocalDependencyConfig = NoirLocalDependencySchema;\n\n/**\n * A package dependency.\n */\nexport type DependencyConfig = GitDependencyConfig | LocalDependencyConfig;\n\n/**\n * Checks that an object is a package configuration.\n * @param config - Config to check\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function parseNoirPackageConfig(config: any): PackageConfig {\n return config;\n}\n","module.exports = require(\"fs\");","module.exports = require(\"path\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { FileManager } from './noir/file-manager/file-manager';\nimport { createNodejsFileManager } from './noir/file-manager/nodejs-file-manager';\nimport { NoirWasmCompiler } from './noir/noir-wasm-compiler';\nimport { LogData, LogFn } from './utils';\nimport { ContractCompilationArtifacts, ProgramCompilationArtifacts } from './types/noir_artifact';\nimport { inflateDebugSymbols } from './noir/debug';\n\n/**\n * Compiles a Noir project\n *\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager\n * @param logFn - A logging function. If not provided, console.log will be used\n * @param debugLogFn - A debug logging function. If not provided, logFn will be used\n *\n * @example\n * ```typescript\n * // Node.js\n *\n * import { compile_program, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager(myProjectPath);\n * const myCompiledCode = await compile_program(fm);\n * ```\n *\n * ```typescript\n * // Browser\n *\n * import { compile_program, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager('/');\n * for (const path of files) {\n * await fm.writeFile(path, await getFileAsStream(path));\n * }\n * const myCompiledCode = await compile_program(fm);\n * ```\n */\nasync function compile_program(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<ProgramCompilationArtifacts> {\n const compiler = await setup_compiler(fileManager, projectPath, logFn, debugLogFn);\n return await compiler.compile_program();\n}\n\n/**\n * Compiles a Noir project\n *\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager\n * @param logFn - A logging function. If not provided, console.log will be used\n * @param debugLogFn - A debug logging function. If not provided, logFn will be used\n *\n * @example\n * ```typescript\n * // Node.js\n *\n * import { compile_contract, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager(myProjectPath);\n * const myCompiledCode = await compile_contract(fm);\n * ```\n *\n * ```typescript\n * // Browser\n *\n * import { compile_contract, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager('/');\n * for (const path of files) {\n * await fm.writeFile(path, await getFileAsStream(path));\n * }\n * const myCompiledCode = await compile_contract(fm);\n * ```\n */\nasync function compile_contract(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<ContractCompilationArtifacts> {\n const compiler = await setup_compiler(fileManager, projectPath, logFn, debugLogFn);\n return await compiler.compile_contract();\n}\n\nasync function setup_compiler(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<NoirWasmCompiler> {\n if (logFn && !debugLogFn) {\n debugLogFn = logFn;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const cjs = await require('../build/cjs');\n return await NoirWasmCompiler.new(\n fileManager,\n projectPath ?? fileManager.getDataDir(),\n cjs,\n new cjs.PathToFileSourceMap(),\n {\n log:\n logFn ??\n function (msg: string, data?: LogData) {\n if (data) {\n console.log(msg, data);\n } else {\n console.log(msg);\n }\n },\n debugLog:\n debugLogFn ??\n function (msg: string, data?: LogData) {\n if (data) {\n console.debug(msg, data);\n } else {\n console.debug(msg);\n }\n },\n },\n );\n}\n\nconst createFileManager = createNodejsFileManager;\n\nexport {\n compile_program as compile,\n compile_program,\n compile_contract,\n createFileManager,\n inflateDebugSymbols,\n ProgramCompilationArtifacts,\n ContractCompilationArtifacts,\n};\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"main.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACRA;AACA,KAA4D;AAC5D,CACmG;AACnG,CAAC,uBAAuB;;AAExB;;AAEA;;AAEA;;AAEA;;AAEA,iBAAiB,SAAS;;AAE1B;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,kCAAkC;AAClC,qCAAqC;AACrC,gCAAgC;AAChC,gCAAgC;AAChC,uCAAuC;AACvC,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS,iCAAiC,kCAAkC;AAC5E;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,4CAA4C;;AAE5C;AACA,mDAAmD;AACnD,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,2CAA2C;AAC3C,8BAA8B;AAC9B,iCAAiC;AACjC,kGAAkG;AAClG,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2EAA2E;AAC3E;AACA,sCAAsC;AACtC;AACA,gCAAgC;AAChC;AACA,mCAAmC;AACnC,EAAE;AACF;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;AACA,gEAAgE,cAAc,YAAY;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C,oBAAoB;AAC/D;AACA;AACA;AACA;AACA,6DAA6D,oBAAoB;AACjF;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA,wCAAwC;AACxC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,+BAA+B;AAC/B;AACA;AACA,8EAA8E,KAAK;AACnF,6EAA6E,qCAAqC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,QAAQ;AACvC;AACA;;AAEA;AACA;AACA,iCAAiC,gCAAgC,MAAM;AACvE;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA,qCAAqC,cAAc,SAAS,6BAA6B,QAAQ,EAAE;AACnG;AACA;AACA;AACA;AACA,iBAAiB,WAAW,GAAG,aAAa,GAAG,aAAa;AAC5D,OAAO,IAAI,OAAO,aAAa,IAAI,sBAAsB;;AAEzD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,IAAI,WAAW;;AAEf,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG,WAAW;AACd;AACA;;AAEA,QAAQ,4BAA4B;AACpC;AACA;AACA,GAAG,WAAW;AACd;;AAEA,QAAQ,wCAAwC;AAChD;AACA;AACA,OAAO,IAAI;AACX,GAAG,WAAW;AACd;AACA,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA,GAAG,WAAW;AACd;AACA;;AAEA;AACA;AACA;AACA,GAAG,WAAW;;;AAGd,uCAAuC;;AAEvC,QAAQ,4BAA4B;AACpC;AACA,GAAG,WAAW;AACd;AACA,GAAG,WAAW;AACd;AACA,MAAM,IAAI;AACV,IAAI,WAAW;AACf;AACA;AACA;;AAEA,QAAQ,yBAAyB;AACjC;AACA,KAAK,IAAI;AACT,GAAG,WAAW;AACd;AACA;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,KAAK,IAAI;AACT,GAAG,WAAW;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;;AAEA,+HAA+H,EAAE,aAAa,EAAE;AAChJ,+HAA+H,EAAE,aAAa,EAAE,IAAI;AACpJ,2HAA2H,EAAE,aAAa,EAAE,IAAI;AAChJ,4HAA4H,EAAE,aAAa,EAAE,IAAI;AACjJ;AACA,2HAA2H;;AAE3H,oGAAoG,EAAE,aAAa,EAAE;AACrH,oGAAoG,EAAE,aAAa,EAAE,KAAK;AAC1H,gGAAgG,EAAE,aAAa,EAAE,KAAK;AACtH,iGAAiG,EAAE,aAAa,EAAE,KAAK;AACvH;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA,QAAQ,wBAAwB;AAChC,QAAQ,sBAAsB;AAC9B;AACA,QAAQ,wBAAwB;AAChC,QAAQ,wBAAwB;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,SAAS,wBAAwB,IAAI,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA,wCAAwC,IAAI,sBAAsB;AAClE,QAAQ;AACR,UAAU;AACV;;AAEA,sCAAsC,gGAAgG;AACtI,SAAS,cAAc,IAAI,cAAc;AACzC;AACA,UAAU;AACV;;AAEA,QAAQ,0CAA0C;AAClD,QAAQ,0CAA0C;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B;AACA,MAAM;AACN,QAAQ,IAAI;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAiB;AACzB;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA,iCAAiC,OAAO;AACxC,WAAW,SAAS;AACpB,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,mDAAmD;AACnD,QAAQ,gCAAgC,eAAe,UAAU,6BAA6B,QAAQ,EAAE;AACxG;AACA,sDAAsD;AACtD,iCAAiC;AACjC;AACA,uCAAuC,gCAAgC,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC5H,qCAAqC,iCAAiC,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC3H;AACA;AACA;AACA;AACA;AACA,2CAA2C,+CAA+C,eAAe,UAAU,kBAAkB,QAAQ,EAAE;AAC/I;AACA,qBAAqB;AACrB;AACA,yBAAyB,iCAAiC,MAAM;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe,UAAU,kBAAkB,GAAG,EAAE;AAClF;AACA;AACA,UAAU,sFAAsF;AAChG;AACA,+BAA+B,gCAAgC,eAAe,UAAU,IAAI,EAAE,0BAA0B,QAAQ,KAAK,EAAE,4BAA4B,EAAE;AACrK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gCAAgC,eAAe,UAAU,IAAI,KAAK,QAAQ,KAAK,OAAO,EAAE;AAC5H,mBAAmB,gCAAgC,eAAe,UAAU,kBAAkB,GAAG,EAAE;AACnG;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,QAAQ,4IAA4I;AACpJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA,qCAAqC;AACrC,EAAE;AACF;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,6CAA6C,cAAc;AAC3D;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA,GAAG,KAAK,GAAG,KAAK,GAAG;AACnB;;AAEA;;AAEA,QAAQ,eAAe;;AAEvB,QAAQ,6BAA6B;AACrC;AACA,GAAG;AACH;AACA,GAAG;AACH,SAAS,IAAI;AACb,eAAe,KAAK,GAAG,KAAK;AAC5B;;AAEA,QAAQ,kCAAkC;AAC1C;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA,QAAQ,0BAA0B;AAClC;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,GAAG;AACH;;AAEA,QAAQ,sBAAsB;AAC9B;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sBAAsB;;AAE9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kDAAkD;AAClD,8CAA8C;AAC9C;AACA;AACA,4EAA4E,QAAQ;AACpF;AACA;AACA,UAAU,eAAe,gJAAgJ,QAAQ;AACjL;AACA;AACA;AACA,2FAA2F,QAAQ;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,4BAA4B;AAC5B,iCAAiC;AACjC,6CAA6C;AAC7C,mBAAmB;AACnB,wBAAwB;AACxB,2CAA2C;AAC3C,uBAAuB;AACvB,4BAA4B;AAC5B;AACA,6CAA6C;AAC7C,yBAAyB;AACzB,8BAA8B;AAC9B,iDAAiD;AACjD,6BAA6B;AAC7B,kCAAkC;AAClC,iDAAiD;AACjD,6BAA6B;AAC7B,kCAAkC;AAClC,2DAA2D,uDAAuD;AAClH,uCAAuC,yCAAyC;AAChF;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,uBAAuB;AACvB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,EAAE;AACF,wCAAwC,4CAA4C;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,iDAAiD;AACjD,6CAA6C;AAC7C;AACA;AACA,yGAAyG,QAAQ;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,4DAA4D;AAC5D,yCAAyC;AACzC,sDAAsD;AACtD,uCAAuC;AACvC,oDAAoD;AACpD;AACA,yCAAyC;AACzC,sDAAsD;AACtD,6CAA6C;AAC7C,0DAA0D;AAC1D,6CAA6C;AAC7C,0DAA0D;AAC1D,uDAAuD,iEAAiE;AACxH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6CAA6C;AAC7C,yCAAyC;AACzC;AACA;AACA,gGAAgG,QAAQ;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,wDAAwD;AACxD,qCAAqC;AACrC,kDAAkD;AAClD,mCAAmC;AACnC,gDAAgD;AAChD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6CAA6C;AAC7C,yCAAyC;AACzC;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,kDAAkD;AAClD,yCAAyC;AACzC,sDAAsD;AACtD,yCAAyC;AACzC,sDAAsD;AACtD,mDAAmD,2DAA2D;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA,2DAA2D,EAAE,IAAI,EAAE;AACnE,gFAAgF,EAAE,IAAI,EAAE;;AAExF;AACA,mBAAmB;AACnB;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+BAA+B,IAAI;AACzD;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA,sDAAsD,KAAK;AAC3D;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,cAAc;AACtB,QAAQ,qBAAqB,4BAA4B,UAAU;AACnE,QAAQ,uBAAuB;AAC/B,QAAQ,gBAAgB;AACxB;AACA;;AAEA;;AAEA,6EAA6E;AAC7E,4EAA4E;;AAE5E;AACA,gEAAgE,QAAQ;AACxE;AACA;AACA;AACA,yKAAyK,QAAQ;AACjL;AACA;;AAEA;AACA,gEAAgE,QAAQ;AACxE;AACA,wHAAwH,QAAQ;AAChI;AACA;;AAEA;AACA,6BAA6B;AAC7B,8BAA8B;AAC9B,gEAAgE,QAAQ;AACxE;AACA,+DAA+D;AAC/D;AACA;AACA;AACA,yKAAyK,QAAQ;AACjL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,QAAQ,iBAAiB;AACzB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB,QAAQ,mBAAmB;AAC3B,QAAQ,iBAAiB;;AAEzB;AACA;AACA;AACA,gDAAgD;AAChD,6BAA6B;AAC7B,gDAAgD;AAChD,6BAA6B;AAC7B;AACA;AACA,gDAAgD;AAChD,6BAA6B;AAC7B;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D,wEAAwE,SAAS,wBAAwB,4BAA4B;AACrI,UAAU,oFAAoF;AAC9F,UAAU,8EAA8E;AACxF;AACA;AACA;AACA;AACA,+BAA+B,SAAS,8BAA8B,OAAO;AAC7E;AACA;AACA;;AAEA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,QAAQ;AACrE;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D,6BAA6B,EAAE;AAC/B;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA,qCAAqC,mEAAmE,yCAAyC;AACjJ,oCAAoC;AACpC,cAAc,QAAQ,EAAE;AACxB;AACA;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B,QAAQ,iBAAiB;;AAEzB;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAsH,sCAAsC;AAC5J;AACA;AACA;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,UAAU,SAAS,IAAI,cAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,IAAI,cAAc;AACxC,2BAA2B;AAC3B,iCAAiC;AACjC,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,aAAa;AACb;AACA;AACA;AACA,yBAAyB,MAAM;AAC/B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,6BAA6B,IAAI,WAAW;AACrD,UAAU;AACV;AACA,kBAAkB,4CAA4C;AAC9D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,IAAI,cAAc;AACxC,2BAA2B;AAC3B,iCAAiC;AACjC,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA,gCAAgC;AAChC,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;AACA,SAAS;AACT,mBAAmB;AACnB;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,QAAQ,mBAAmB;AAC3B;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA,aAAa,eAAe;AAC5B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,OAAO,sCAAsC;AAC7C;AACA,aAAa,eAAe;AAC5B;AACA;AACA;;AAEA,QAAQ,6BAA6B;AACrC,QAAQ,2BAA2B;AACnC,QAAQ,8BAA8B;AACtC;AACA,QAAQ,8BAA8B;AACtC;AACA;AACA;AACA;AACA;AACA,OAAO,gDAAgD;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6CAA6C;AACnD;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,QAAQ,qBAAqB;AAC7B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,aAAa;AACrB;;AAEA;AACA,4DAA4D,MAAM;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,oBAAoB;AACpB,2CAA2C;AAC3C,6CAA6C;AAC7C,+CAA+C,gDAAgD;AAC/F;AACA;AACA,UAAU,WAAW;AACrB,UAAU,iDAAiD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,+BAA+B,aAAa;AAC5C;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kCAAkC;AAClC;AACA;AACA;AACA,YAAY,eAAe,2BAA2B,oCAAoC;AAC1F;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA,kCAAkC;AAClC;AACA,aAAa;AACb;AACA,YAAY;AACZ;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA,0BAA0B;AAC1B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,aAAa;AAC9D;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,oEAAoE;AACpE;AACA,SAAS,wBAAwB;AACjC;AACA;AACA,wBAAwB;AACxB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV,QAAQ,kBAAkB;;AAE1B;;AAEA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,UAAU,UAAU;AACpB;AACA,2CAA2C;AAC3C;AACA,oCAAoC,qCAAqC,QAAQ;AACjF;AACA;AACA;AACA;AACA,SAAS,oCAAoC,QAAQ;AACrD;AACA,UAAU,UAAU;AACpB;AACA,mDAAmD;AACnD;AACA;AACA,sCAAsC,QAAQ;AAC9C,oCAAoC,QAAQ;AAC5C;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA,sEAAsE;AACtE,SAAS,oCAAoC;AAC7C;AACA,UAAU,iEAAiE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS;AACnB;AACA;AACA,+BAA+B,sCAAsC,OAAO;AAC5E;AACA;AACA;AACA,mCAAmC,qCAAqC,SAAS,QAAQ;AACzF;AACA;AACA,SAAS,oCAAoC,OAAO,gBAAgB,cAAc;AAClF;AACA,UAAU,IAAI;AACd;AACA,8CAA8C;AAC9C,SAAS,oCAAoC,EAAE;AAC/C;AACA,UAAU,IAAI;AACd;AACA,mCAAmC;AACnC,SAAS,oCAAoC,EAAE;AAC/C;AACA,yBAAyB;AACzB;AACA,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS,oCAAoC,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,iBAAiB;AAC/F,6EAA6E,6DAA6D;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,qBAAqB;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,qEAAqE,+BAA+B;AACpG;AACA,0HAA0H;AAC1H,OAAO;AACP,SAAS;AACT;AACA,iGAAiG;;AAEjG,QAAQ,0BAA0B;AAClC;AACA,mDAAmD;AACnD;;AAEA;;AAEA;AACA;AACA;AACA,6BAA6B,yFAAyF,SAAS;AAC/H,qCAAqC;AACrC;AACA;AACA,yCAAyC;AACzC,WAAW,qBAAqB,KAA2B,GAAG,oEAAO,GAAG,CAAW,GAAG;AACtF;AACA,YAAY,UAAU;AACtB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE,YAAY;AACZ;AACA,yCAAyC;AACzC,uEAAuE;AACvE,WAAW;AACX;AACA;AACA,gCAAgC;AAChC,yCAAyC;AACzC,uEAAuE;AACvE,WAAW;AACX;AACA;AACA;AACA,wCAAwC;AACxC,QAAQ;AACR;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA,CAAC;;AAED;;;;;;;;;;;ACp7FA;AACa;;AAEb,QAAQ,qCAAqC,EAAE,mBAAO,CAAC,6DAAe;;AAEtE,QAAQ,uCAAuC,EAAE,mBAAO,CAAC,6DAAe;;AAExE,kBAAkB,mBAAO,CAAC,2EAAsB;;AAEhD,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,mBAAmB;AACnB,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,qBAAqB;AACrB,wBAAwB;;;;;;;;;;;;ACjBX;;;AAGb,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,mEAAgB;;AAE7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,uEAAkB;;AAE9B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,mBAAmB;AACnB,uHAAsD;;;;;;;;;;;;AC3XzC;;;AAGb,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,qEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,mEAAgB;AAC7C,qBAAqB,mBAAO,CAAC,qEAAiB;;AAE9C;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,uEAAkB;;AAE9B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,gCAAgC;AAChC;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,eAAe;;AAElB;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,qBAAqB;AACrB,uHAAsD;;;;;;;;;;;;AClazC;;;AAGb;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,4BAA4B;AAC5B;AACA;;AAEA,qCAAqC,OAAO;AAC5C;AACA;;AAEA;AACA;;AAEA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AC/CA;AACa;;;AAGb;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,sDAAsD,aAAa;;;AAGzE;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA,mCAAmC;;;AAGnC;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;;AAEA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;;;AAGA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,QAAQ;AAC/B;AACA;AACA,oBAAoB,qBAAqB;;AAEzC;AACA;AACA,qBAAqB,0BAA0B,gBAAgB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,0BAA0B;;AAE/C;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA,0BAA0B;;AAE1B;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA,mBAAmB;;AAEnB;AACA;;;;;;;;;;;;AC7Ka;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;;AAEA;AACA;;;AAGA;;;;;;;;;;;;AClDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACnEa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,oBAAoB,SAAS;AAC7B;AACA;;AAEA,uBAAuB;AACvB;;;AAGA;;;;;;;;;;;;AC1Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,oEAAoE,EAAE,mBAAO,CAAC,0DAAS;AAC/F,gBAAgB,mBAAO,CAAC,8DAAW;AACnC,gBAAgB,mBAAO,CAAC,0DAAS;AACjC,gBAAgB,mBAAO,CAAC,gEAAY;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,kEAAa;;AAEzB;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,sBAAsB;;AAEtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,qBAAqB;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB,mBAAmB;;AAEnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C,yBAAyB;AACzB,mCAAmC;AACnC,qCAAqC;AACrC,6CAA6C;AAC7C,6CAA6C;AAC7C;AACA;;AAEA,yBAAyB;;AAEzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,uCAAuC;AACvC,2CAA2C;AAC3C;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,sCAAsC;AACtC;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB,wBAAwB;;AAExB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA,0DAA0D;AAC1D;;AAEA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B,2BAA2B;;AAE3B;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;;AAEzB;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;;AAE1B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B,gCAAgC;AAChC,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,4BAA4B;AAC5B,0BAA0B;;AAE1B,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;;AAEA,uBAAuB;;AAEvB;;AAEA;;AAEA,8CAA8C;AAC9C,8CAA8C;AAC9C,8CAA8C;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;;AAEhC;AACA;AACA;;AAEA,gCAAgC;AAChC,iDAAiD;AACjD;;AAEA,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B,0BAA0B;;AAE1B,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;;;AAG1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB;;AAEvB,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA,gBAAgB;;AAEhB;AACA;AACA,iCAAiC;AACjC,0BAA0B;AAC1B,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,0BAA0B;AAC1B,2BAA2B;AAC3B,2BAA2B;AAC3B,+BAA+B;AAC/B,+BAA+B;AAC/B,sBAAsB;AACtB,yBAAyB;AACzB,mCAAmC;AACnC,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC//Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB,yBAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;;;AAGA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,IAAI;AACf;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,2CAA2C;AAC3C;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB,uCAAuC;AACvC;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,sBAAsB;AACtB,6CAA6C;AAC7C;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,wCAAwC;AACxC;AACA;AACA;AACA,oBAAoB;AACpB,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAO,CAAC,8DAAW;AACzC,sBAAsB,mBAAO,CAAC,0DAAS;AACvC,sBAAsB,mBAAO,CAAC,8DAAW;AACzC,sBAAsB,mBAAO,CAAC,gEAAY;;AAE1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,kEAAa;;;AAGzB;AACA;;;AAGA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,4BAA4B;AAC5B,4BAA4B;AAC5B,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;AAC5B,4BAA4B;;AAE5B;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;;AAE9B;AACA,gCAAgC;AAChC,gCAAgC;AAChC,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,iCAAiC;;AAEjC,oCAAoC;AACpC,oCAAoC;;AAEpC;AACA;AACA;AACA;AACA,+CAA+C;AAC/C,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,iCAAiC;AACjC;AACA;AACA,iBAAiB;AACjB,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;;AAEA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,eAAe;AACf,uCAAuC;;AAEvC;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;;;AAGrB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;;AAExB,wEAAwE,SAAS;;AAEjF;AACA;AACA,uBAAuB;;AAEvB,wEAAwE,SAAS;;AAEjF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,uCAAuC;AACvC;AACA;AACA;AACA;;;AAGA;;AAEA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B,oCAAoC;AACpC,gCAAgC;AAChC,oCAAoC;AACpC,8BAA8B;AAC9B,8BAA8B;AAC9B,qCAAqC;AACrC;;AAEA,SAAS;;AAET;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,0BAA0B;;;AAGvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,4BAA4B;AAC5B,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,oEAAoE;AACpE;AACA;AACA;;AAEA,uCAAuC;AACvC;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,oEAAoE;AACpE;AACA;AACA;;AAEA,mCAAmC;AACnC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,oEAAoE;AACpE;AACA;AACA;;AAEA,qCAAqC;AACrC;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,cAAc;AACd,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,UAAU;AACV,kCAAkC;AAClC;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA,iCAAiC;AACjC;AACA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,2BAA2B;AAC3B,4BAA4B;AAC5B,+BAA+B;AAC/B,0BAA0B;AAC1B,2BAA2B;AAC3B,sBAAsB;AACtB,yBAAyB;AACzB,+BAA+B;AAC/B,mCAAmC;AACnC,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACniDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;;AAE1B,6BAA6B;AAC7B,6BAA6B;AAC7B,iCAAiC;AACjC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,kCAAkC;AAClC,6BAA6B;AAC7B,6BAA6B;AAC7B,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,yBAAyB;AACzB,wBAAwB;AACxB,uBAAuB;AACvB,qBAAqB;AACrB,8BAA8B;AAC9B,8CAA8C,kBAAkB;AAChE,6CAA6C,mBAAmB;AAChE;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;;AAEA;AACA;AACA,sBAAsB,UAAU;AAChC,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,uCAAuC;AACvC,wCAAwC,6BAA6B;AACrE,0CAA0C;AAC1C,2CAA2C;AAC3C;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA,gBAAgB,WAAW;AAC3B,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;;AAEA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA,IAAI,0BAA0B;AAC9B;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,mCAAmC;AACnC,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,6BAA6B;AAC7B,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;;;ACnVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Ba;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;;AAGA,qBAAqB,sBAAsB,qBAAqB;;AAEhE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;;AAEpC;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;;;;AAIA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;;AAEtB,iBAAiB,kBAAkB;AACnC;AACA;;AAEA;AACA;AACA;AACA,gDAAgD;;AAEhD,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,YAAY;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;;AAEA;AACA;AACA;AACA,qCAAqC;AACrC,6BAA6B;AAC7B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,0BAA0B,YAAY;AACtC;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;;AAEjC,6CAA6C;AAC7C,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,eAAe;AAC9B;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,WAAW;AAC5B;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,cAAc;AACd,SAAS,gBAAgB;AACzB;AACA,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,SAAS;;AAET;AACA,cAAc,cAAc,OAAO;AACnC,cAAc,cAAc,OAAO;AACnC,cAAc,cAAc,OAAO;;AAEnC;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,4BAA4B;;AAE5B,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,QAAQ;AACR;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,yCAAyC;AACzC;AACA,gBAAgB;AAChB;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;AACA,uCAAuC;AACvC;AACA,QAAQ;;AAER;AACA;;AAEA,MAAM;AACN;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,WAAW;AACzB;AACA;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,QAAQ,OAAO;;AAEvD;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA,+BAA+B;;AAE/B,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI;;AAEJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,uBAAuB;;AAEvB,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,yCAAyC;;AAEzC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD,cAAc,eAAe;AAC7B;AACA;;AAEA;AACA;;AAEA,MAAM;AACN;;AAEA,MAAM;;AAEN,gCAAgC;AAChC;;AAEA,MAAM;AACN;;AAEA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,0BAA0B;;AAE1B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,yCAAyC;;AAEzC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;;AAE7B,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B;AACA;;AAEA;AACA;;AAEA,MAAM;AACN,WAAW,mCAAmC;;AAE9C,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN;AACA;;AAEA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;;AAEnC,+BAA+B;;AAE/B;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,iCAAiC;AACjC,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;;AAEA,yCAAyC;AACzC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,IAAI,MAAM,GAAG,MAAM,GAAG;AAChD;AACA;AACA;AACA,SAAS,IAAI,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,IAAI;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB,4DAA4D;AAC5D,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;;AAEpB,8BAA8B;AAC9B,8BAA8B;;AAE9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC;;AAEnC,IAAI;AACJ;AACA,6CAA6C;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI;;AAEJ;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB;AACvB,+BAA+B;AAC/B,8BAA8B;AAC9B,wBAAwB;AACxB,wBAAwB;;;;;;;;;;;;AC1pCX;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;AC9CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA,+CAA+C,SAAS,YAAY,WAAW,IAAI,eAAe;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,OAAO,GAAG,kBAAkB;AACpD,OAAO;AACP,KAAK;AACL;AACA,6CAA6C,SAAS,YAAY,YAAY,UAAU,QAAQ,QAAQ,KAAK,IAAI,eAAe;AAChI;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,4DAA4D,mBAAmB;AAC/E;AACA;AACA,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,yBAAyB,WAAW;AACpC;AACA,2CAA2C;AAC3C,kBAAkB,iBAAiB,iBAAiB,gBAAgB;AACpE;AACA;AACA;AACA,wCAAwC;AACxC,gBAAgB,MAAM,SAAS,eAAe;AAC9C;AACA,gBAAgB,SAAS,QAAQ,gCAAgC,gCAAgC,qBAAqB,eAAe;AACrI;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,uDAAuD;AACvD,uDAAuD;AACvD;AACA,wEAAwE,wBAAwB;AAChG;AACA;AACA;AACA,wEAAwE,wBAAwB;AAChG;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,wBAAwB;AACxB,uBAAuB;AACvB,wBAAwB;AACxB;AACA;AACA,kBAAkB,4BAA4B,kDAAkD;AAChG;AACA;AACA,8CAA8C;AAC9C;AACA,yEAAyE;AACzE;AACA;AACA,mCAAmC,kCAAkC,cAAc;AACnF,+DAA+D;AAC/D,kDAAkD;AAClD;AACA,sBAAsB,4BAA4B,0BAA0B,0BAA0B;AACtG;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kDAAkD;AAClD,gBAAgB,MAAM,SAAS,iBAAiB,qBAAqB,qBAAqB;AAC1F;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA,qCAAqC;AACrC;AACA;AACA,qCAAqC;AACrC;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB,iBAAiB,mBAAmB,eAAe;AACvF,iBAAiB,iBAAiB,mBAAmB;AACrD;AACA;;AAEA,sCAAsC;AACtC;AACA;AACA;AACA,6BAA6B,aAAa,aAAa;AACvD,UAAU,YAAY;AACtB;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,cAAc,eAAe,SAAS,2CAA2C;AACjF;;AAEA,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA,EAAE;AACF,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,cAAc,MAAM,QAAQ,mCAAmC;AAC/D;AACA,2BAA2B,8BAA8B,8BAA8B;AACvF;AACA;AACA,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB,sBAAsB;AACpE;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA,CAAC;;AAED;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,gBAAgB,OAAO;AACvB;AACA,EAAE;AACF,2BAA2B;AAC3B;AACA;AACA,kCAAkC;;AAElC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,gDAAgD,OAAO;AACvD;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,cAAc,qBAAqB;AACnC,SAAS;AACT,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,wCAAwC,aAAa;AACrD;AACA,+CAA+C,IAAI;AACnD;AACA;AACA,sDAAsD,+BAA+B;AACrF;AACA,mCAAmC;AACnC;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS,WAAW;AACnE;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAW,YAAY;AACvB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,wBAAwB,KAAK;AAC7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE,mDAAmD,oBAAoB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2DAA2D;AAC3F;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B,uCAAuC;AACvC,0CAA0C;;AAE1C;AACA,oCAAoC;AACpC,mCAAmC;AACnC,kCAAkC;;AAElC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sFAAsF,iEAAiE,EAAE;AACzJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mFAAmF,WAAW;AAC9F;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,sBAAsB,YAAY,cAAc;AAC3G;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;AACA;AACA,4EAA4E,uBAAuB;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,yBAAyB,KAAK,uBAAuB;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8DAA8D,uBAAuB;AACrF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ,uDAAuD,2BAA2B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,eAAe,KAAK,0BAA0B,IAAI,YAAY;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,2BAA2B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,2BAA2B;AACpC;AACA;AACA;AACA;AACA;AACA,2HAA2H,KAAK;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,6CAA6C,OAAO,YAAY,WAAW,IAAI,eAAe;AAC9F;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA,6CAA6C,YAAY;AACzD;;AAEA;AACA;;AAEA;AACA;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE8F;;;;;;;;;;;;AClqC9F;AACA;AACA;AACA,QAAQ,2BAA2B,EAAE,mBAAO,CAAC,kBAAM;;AAEnD,mDAAmD,8BAA8B;;AAEjF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,WAAW,cAAc;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B,YAAY;AACzC;AACA;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,YAAY,IAAI,UAAU;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oCAAoC;AAC/C,WAAW,qBAAqB;AAChC,aAAa;AACb;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,kBAAkB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;AAE9B;AACA,QAAQ,kBAAkB;AAC1B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA,QAAQ,kBAAkB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC,iDAAiD;AACjD;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;;AAEA,0CAA0C;AAC1C;AACA;;AAEA,0CAA0C;AAC1C;AACA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;;AAEA,2CAA2C,gBAAgB;AAC3D;AACA;AACA,CAAC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","sources":["webpack://@noir-lang/noir_wasm/../../node_modules/@ltd/j-toml/ sync","webpack://@noir-lang/noir_wasm/../../node_modules/@ltd/j-toml/index.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/index.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/deflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/inflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/utils/common.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/utils/strings.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/adler32.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/constants.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/crc32.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/deflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/gzheader.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inffast.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inflate.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/inftrees.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/messages.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/trees.js","webpack://@noir-lang/noir_wasm/../../node_modules/pako/lib/zlib/zstream.js","webpack://@noir-lang/noir_wasm/../../node_modules/unzipit/dist/unzipit.module.js","webpack://@noir-lang/noir_wasm/./build/cjs/index.js","webpack://@noir-lang/noir_wasm/./src/noir/debug.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/dependency-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/github-dependency-resolver.ts","webpack://@noir-lang/noir_wasm/./src/noir/dependencies/local-dependency-resolver.ts","webpack://@noir-lang/noir_wasm/./src/noir/file-manager/file-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/file-manager/nodejs-file-manager.ts","webpack://@noir-lang/noir_wasm/./src/noir/noir-wasm-compiler.ts","webpack://@noir-lang/noir_wasm/./src/noir/package.ts","webpack://@noir-lang/noir_wasm/./src/types/noir_package_config.ts","webpack://@noir-lang/noir_wasm/external node-commonjs \"fs\"","webpack://@noir-lang/noir_wasm/external node-commonjs \"path\"","webpack://@noir-lang/noir_wasm/external node-commonjs \"util\"","webpack://@noir-lang/noir_wasm/webpack/bootstrap","webpack://@noir-lang/noir_wasm/webpack/runtime/define property getters","webpack://@noir-lang/noir_wasm/webpack/runtime/harmony module decorator","webpack://@noir-lang/noir_wasm/webpack/runtime/hasOwnProperty shorthand","webpack://@noir-lang/noir_wasm/webpack/runtime/make namespace object","webpack://@noir-lang/noir_wasm/./src/index.cts"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = \"../../node_modules/@ltd/j-toml sync recursive\";\nmodule.exports = webpackEmptyContext;","(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof define === 'function' && define.amd ? define(factory) :\n(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TOML = factory());\n})(this, (function () { 'use strict';\n\nconst version = '1.38.0';\n\nconst SyntaxError$1 = SyntaxError;\n\nconst RangeError$1 = RangeError;\n\nconst TypeError$1 = TypeError;\n\nconst Error$1 = {if:Error}.if;\n\nconst undefined$1 = void null;\n\nconst BigInt$1 = typeof BigInt==='undefined' ? undefined$1 : BigInt;\n\nconst RegExp$1 = RegExp;\n\nconst WeakMap$1 = WeakMap;\n\nconst get = WeakMap.prototype.get;\n\nconst set = WeakMap.prototype.set;\n\nconst create$1 = Object.create;\n\nconst isSafeInteger = Number.isSafeInteger;\n\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\n\nconst freeze = Object.freeze;\n\nconst isPrototypeOf = Object.prototype.isPrototypeOf;\n\nconst NULL = (\n\t/* j-globals: null.prototype (internal) */\n\tObject.seal\n\t\t? /*#__PURE__*/Object.preventExtensions(Object.create(null))\n\t\t: null\n\t/* j-globals: null.prototype (internal) */\n);\n\nconst bind = Function.prototype.bind;\n\nconst test = RegExp.prototype.test;\n\nconst exec = RegExp.prototype.exec;\n\nconst apply$1 = Reflect.apply;\n\nconst Proxy$1 = Proxy;\n\nconst toStringTag = typeof Symbol==='undefined' ? undefined$1 : Symbol.toStringTag;\n\nconst Object_defineProperty = Object.defineProperty;\n\nconst assign$1 = Object.assign;\n\nconst Object$1 = Object;\n\nconst floor = Math.floor;\n\nconst isArray$1 = Array.isArray;\n\nconst Infinity = 1/0;\n\nconst fromCharCode = String.fromCharCode;\n\nconst Array$1 = Array;\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst propertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nconst apply = Function.prototype.apply;\n\nvar isEnum = /*#__PURE__*/propertyIsEnumerable.call.bind(propertyIsEnumerable);\nvar hasOwn = (\n\t/* j-globals: Object.hasOwn (polyfill) */\n\tObject$1.hasOwn || /*#__PURE__*/function () {\n\t\treturn hasOwnProperty.bind\n\t\t\t? hasOwnProperty.call.bind(hasOwnProperty)\n\t\t\t: function hasOwn (object, key) { return hasOwnProperty.call(object, key); };\n\t}()\n\t/* j-globals: Object.hasOwn (polyfill) */\n);\n\nvar create = Object$1.create;\nfunction Descriptor (source) {\n\tvar target = create(NULL);\n\tif ( hasOwn(source, 'value') ) { target.value = source.value; }\n\tif ( hasOwn(source, 'writable') ) { target.writable = source.writable; }\n\tif ( hasOwn(source, 'get') ) { target.get = source.get; }\n\tif ( hasOwn(source, 'set') ) { target.set = source.set; }\n\tif ( hasOwn(source, 'enumerable') ) { target.enumerable = source.enumerable; }\n\tif ( hasOwn(source, 'configurable') ) { target.configurable = source.configurable; }\n\treturn target;\n}\n\nconst Default = (\n\t/* j-globals: default (internal) */\n\tfunction Default (exports, addOnOrigin) {\n\t\tif ( !addOnOrigin && typeof exports!=='function' ) {\n\t\t\taddOnOrigin = exports;\n\t\t\texports = create$1(NULL);\n\t\t}\n\t\tif ( assign$1 ) { assign$1(exports, addOnOrigin); }\n\t\telse { for ( var key in addOnOrigin ) { if ( hasOwn(addOnOrigin, key) ) { exports[key] = addOnOrigin[key]; } } }\n\t\texports.default = exports;\n\t\tif ( typeof exports==='function' ) { exports.prototype && freeze(exports.prototype); }\n\t\telse if ( toStringTag ) {\n\t\t\tvar descriptor = create$1(NULL);\n\t\t\tdescriptor.value = 'Module';\n\t\t\tObject_defineProperty(exports, toStringTag, descriptor);\n\t\t}\n\t\treturn freeze(exports);\n\t}\n\t/* j-globals: default (internal) */\n);\n\n/*!@preserve@license\n * 模块名称:j-regexp\n * 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。\n More readable way for creating RegExp. Belong to \"Plan J\".\n * 模块版本:8.2.0\n * 许可条款:LGPL-3.0\n * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)\n * 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues\n * 项目主页:https://GitHub.com/LongTengDao/j-regexp/\n */\n\nvar Test = bind\n\t? /*#__PURE__*/bind.bind(test ) \n\t: function (re) {\n\t\treturn function (string) {\n\t\t\treturn test.call(re, string);\n\t\t};\n\t};\n\nvar Exec = bind\n\t? /*#__PURE__*/bind.bind(exec ) \n\t: function (re) {\n\t\treturn function (string) {\n\t\t\treturn exec.call(re, string);\n\t\t};\n\t};\n\nfunction __PURE__ (re ) {\n\tvar test = re.test = Test(re);\n\tvar exec = re.exec = Exec(re);\n\tvar source = test.source = exec.source = re.source;\n\ttest.unicode = exec.unicode = re.unicode;\n\ttest.ignoreCase = exec.ignoreCase = re.ignoreCase;\n\ttest.multiline = exec.multiline = source.indexOf('^')<0 && source.indexOf('$')<0 ? null : re.multiline;\n\ttest.dotAll = exec.dotAll = source.indexOf('.')<0 ? null : re.dotAll;\n\treturn re;\n}\nfunction theRegExp (re ) { return /*#__PURE__*/__PURE__(re); }\n\nvar NT = /[\\n\\t]+/g;\nvar ESCAPE = /\\\\./g;\nfunction graveAccentReplacer ($$ ) { return $$==='\\\\`' ? '`' : $$; }\n\nvar includes = ''.includes \n\t? function (that , searchString ) { return that.includes(searchString); }\n\t: function (that , searchString ) { return that.indexOf(searchString)>-1; };\n\nfunction RE ( template ) {\n\tvar U = this.U;\n\tvar I = this.I;\n\tvar M = this.M;\n\tvar S = this.S;\n\tvar raw = template.raw;\n\tvar source = raw[0] .replace(NT, '');\n\tvar index = 1;\n\tvar length = arguments.length;\n\twhile ( index!==length ) {\n\t\tvar value \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t = arguments[index];\n\t\tif ( typeof value==='string' ) { source += value; }\n\t\telse {\n\t\t\tvar value_source = value.source;\n\t\t\tif ( typeof value_source!=='string' ) { throw TypeError$1('source'); }\n\t\t\tif ( value.unicode===U ) { throw SyntaxError$1('unicode'); }\n\t\t\tif ( value.ignoreCase===I ) { throw SyntaxError$1('ignoreCase'); }\n\t\t\tif ( value.multiline===M && ( includes(value_source, '^') || includes(value_source, '$') ) ) { throw SyntaxError$1('multiline'); }\n\t\t\tif ( value.dotAll===S && includes(value_source, '.') ) { throw SyntaxError$1('dotAll'); }\n\t\t\tsource += value_source;\n\t\t}\n\t\tsource += raw[index++] .replace(NT, '');\n\t}\n\tvar re = RegExp$1(U ? source = source.replace(ESCAPE, graveAccentReplacer) : source, this.flags);\n\tvar test = re.test = Test(re);\n\tvar exec = re.exec = Exec(re);\n\ttest.source = exec.source = source;\n\ttest.unicode = exec.unicode = !U;\n\ttest.ignoreCase = exec.ignoreCase = !I;\n\ttest.multiline = exec.multiline = includes(source, '^') || includes(source, '$') ? !M : null;\n\ttest.dotAll = exec.dotAll = includes(source, '.') ? !S : null;\n\treturn re;\n}\n\nvar RE_bind = bind && /*#__PURE__*/bind.bind(RE );\n\nfunction Context (flags ) {\n\treturn {\n\t\tU: !includes(flags, 'u'),\n\t\tI: !includes(flags, 'i'),\n\t\tM: !includes(flags, 'm'),\n\t\tS: !includes(flags, 's'),\n\t\tflags: flags\n\t};\n}\n\nvar CONTEXT = /*#__PURE__*/Context('');\n\nvar newRegExp = Proxy$1\n\t? /*#__PURE__*/new Proxy$1(RE, {\n\t\tapply: function (RE, thisArg, args ) { return apply$1(RE, CONTEXT, args); }\n\t\t,\n\t\tget: function (RE, flags ) { return RE_bind(Context(flags)); }\n\t\t,\n\t\tdefineProperty: function () { return false; }\n\t\t,\n\t\tpreventExtensions: function () { return false; }\n\t})\n\t: /*#__PURE__*/function () {\n\t\tRE.apply = RE.apply;\n\t\tvar newRegExp = function () { return RE.apply(CONTEXT, arguments ); } ;\n\t\tvar d = 1;\n\t\tvar g = d*2;\n\t\tvar i = g*2;\n\t\tvar m = i*2;\n\t\tvar s = i*2;\n\t\tvar u = s*2;\n\t\tvar y = u*2;\n\t\tvar flags = y*2 - 1;\n\t\twhile ( flags-- ) {\n\t\t\t( function (context) {\n\t\t\t\tnewRegExp[context.flags] = function () { return RE.apply(context, arguments ); };\n\t\t\t} )(Context(\n\t\t\t\t( flags & d ? '' : 'd' )\n\t\t\t\t+\n\t\t\t\t( flags & g ? '' : 'g' )\n\t\t\t\t+\n\t\t\t\t( flags & i ? '' : 'i' )\n\t\t\t\t+\n\t\t\t\t( flags & m ? '' : 'm' )\n\t\t\t\t+\n\t\t\t\t( flags & s ? '' : 's' )\n\t\t\t\t+\n\t\t\t\t( flags & u ? '' : 'u' )\n\t\t\t\t+\n\t\t\t\t( flags & y ? '' : 'y' )\n\t\t\t));\n\t\t}\n\t\treturn freeze ? freeze(newRegExp) : newRegExp;\n\t}();\n\nvar clearRegExp = '$_' in RegExp$1\n\t? /*#__PURE__*/function () {\n\t\tvar REGEXP = /^/;\n\t\tREGEXP.test = REGEXP.test;\n\t\treturn function clearRegExp (value ) {\n\t\t\tREGEXP.test('');\n\t\t\treturn value;\n\t\t};\n\t}()\n\t: function clearRegExp (value ) {\n\t\treturn value;\n\t};\n\nvar clearRegExp$1 = clearRegExp;\n\nvar NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\\-.?[\\\\\\]^{|]/;\nvar SURROGATE_PAIR = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;\nvar GROUP = /*#__PURE__*/create$1(NULL) ;\n\nfunction groupify (branches , uFlag , noEscape ) {\n\tvar group = create$1(NULL) ;\n\tvar appendBranch = uFlag ? appendPointBranch : appendCodeBranch;\n\tfor ( var length = branches.length, index = 0; index<length; ++index ) { appendBranch(group, branches[index] ); }\n\treturn sourcify(group, !noEscape);\n}\nfunction appendPointBranch (group , branch ) {\n\tif ( branch ) {\n\t\tvar character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0);\n\t\tappendPointBranch(group[character] || ( group[character] = create$1(NULL) ), branch.slice(character.length));\n\t}\n\telse { group[''] = GROUP; }\n}\n\nfunction appendCodeBranch (group , branch ) {\n\tif ( branch ) {\n\t\tvar character = branch.charAt(0);\n\t\tappendCodeBranch(group[character] || ( group[character] = create$1(NULL) ), branch.slice(1));\n\t}\n\telse { group[''] = GROUP; }\n}\n\nfunction sourcify (group , needEscape ) {\n\tvar branches = [];\n\tvar singleCharactersBranch = [];\n\tvar noEmptyBranch = true;\n\tfor ( var character in group ) {\n\t\tif ( character ) {\n\t\t\tvar sub_branches = sourcify(group[character] , needEscape);\n\t\t\tif ( needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character) ) { character = '\\\\' + character; }\n\t\t\tsub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character);\n\t\t}\n\t\telse { noEmptyBranch = false; }\n\t}\n\tsingleCharactersBranch.length && branches.unshift(singleCharactersBranch.length===1 ? singleCharactersBranch[0] : '[' + singleCharactersBranch.join('') + ']');\n\treturn branches.length===0\n\t\t? ''\n\t\t: ( branches.length===1 && ( singleCharactersBranch.length || noEmptyBranch )\n\t\t\t? branches[0]\n\t\t\t: '(?:' + branches.join('|') + ')'\n\t\t)\n\t\t+ ( noEmptyBranch ? '' : '?' );\n}\n\n/*¡ j-regexp */\n\nconst WeakSet$1 = WeakSet;\n\nconst has = WeakSet.prototype.has;\n\nconst add = WeakSet.prototype.add;\n\nconst del = WeakSet.prototype['delete'];\n\nconst keys = Object.keys;\n\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nconst Null$1 = (\n\t/* j-globals: null (internal) */\n\t/*#__PURE__*/function () {\n\t\tvar assign = Object.assign || function assign (target, source) {\n\t\t\tvar keys$1, index, key;\n\t\t\tfor ( keys$1 = keys(source), index = 0; index<keys$1.length;++index ) {\n\t\t\t\tkey = keys$1[index];\n\t\t\t\ttarget[key] = source[key];\n\t\t\t}\n\t\t\tif ( getOwnPropertySymbols ) {\n\t\t\t\tfor ( keys$1 = getOwnPropertySymbols(source), index = 0; index<keys$1.length;++index ) {\n\t\t\t\t\tkey = keys$1[index];\n\t\t\t\t\tif ( isEnum(source, key) ) { target[key] = source[key]; }\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn target;\n\t\t};\n\t\tfunction Nullify (constructor) {\n\t\t\tdelete constructor.prototype.constructor;\n\t\t\tfreeze(constructor.prototype);\n\t\t\treturn constructor;\n\t\t}\n\t\tfunction Null (origin) {\n\t\t\treturn origin===undefined$1\n\t\t\t\t? this\n\t\t\t\t: typeof origin==='function'\n\t\t\t\t\t? /*#__PURE__*/Nullify(origin)\n\t\t\t\t\t: /*#__PURE__*/assign(/*#__PURE__*/create(NULL), origin);\n\t\t}\n\t\tdelete Null.name;\n\t\t//try { delete Null.length; } catch (error) {}\n\t\tNull.prototype = null;\n\t\tfreeze(Null);\n\t\treturn Null;\n\t}()\n\t/* j-globals: null (internal) */\n);\n\nconst is = Object.is;\n\nconst Object_defineProperties = Object.defineProperties;\n\nconst fromEntries = Object.fromEntries;\n\nconst Reflect_construct = Reflect.construct;\n\nconst Reflect_defineProperty = Reflect.defineProperty;\n\nconst Reflect_deleteProperty = Reflect.deleteProperty;\n\nconst ownKeys = Reflect.ownKeys;\n\n/*!@preserve@license\n * 模块名称:j-orderify\n * 模块功能:返回一个能保证给定对象的属性按此后添加顺序排列的 proxy,即使键名是 symbol,或整数 string。从属于“简计划”。\n Return a proxy for given object, which can guarantee own keys are in setting order, even if the key name is symbol or int string. Belong to \"Plan J\".\n * 模块版本:7.0.1\n * 许可条款:LGPL-3.0\n * 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)\n * 问题反馈:https://GitHub.com/LongTengDao/j-orderify/issues\n * 项目主页:https://GitHub.com/LongTengDao/j-orderify/\n */\n\nconst Keeper = () => [];\n\nconst newWeakMap = () => {\n\tconst weakMap = new WeakMap$1;\n\tweakMap.has = weakMap.has;\n\tweakMap.get = weakMap.get;\n\tweakMap.set = weakMap.set;\n\treturn weakMap;\n};\nconst target2keeper = /*#__PURE__*/newWeakMap() \n\t \n\t \n ;\nconst proxy2target = /*#__PURE__*/newWeakMap() \n\t \n\t \n\t \n ;\nconst target2proxy = /*#__PURE__*/newWeakMap() \n\t \n\t \n ;\n\nconst handlers = /*#__PURE__*/assign$1(create$1(NULL), {\n\tdefineProperty: (target , key , descriptor ) => {\n\t\tif ( hasOwn(target, key) ) {\n\t\t\treturn Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor));\n\t\t}\n\t\tif ( Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor)) ) {\n\t\t\tconst keeper = target2keeper.get(target) ;\n\t\t\tkeeper[keeper.length] = key;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\tdeleteProperty: (target , key ) => {\n\t\tif ( Reflect_deleteProperty(target, key) ) {\n\t\t\tconst keeper = target2keeper.get(target) ;\n\t\t\tconst index = keeper.indexOf(key);\n\t\t\tindex<0 || --keeper.copyWithin(index, index + 1).length;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\townKeys: (target ) => target2keeper.get(target) ,\n\tconstruct: (target , args , newTarget ) => orderify(Reflect_construct(target, args, newTarget)),\n\tapply: (target , thisArg , args ) => orderify(apply$1(target, thisArg, args)),\n});\n\nconst newProxy = (target , keeper ) => {\n\ttarget2keeper.set(target, keeper);\n\tconst proxy = new Proxy$1 (target, handlers);\n\tproxy2target.set(proxy, target);\n\treturn proxy;\n};\n\nconst orderify = (object ) => {\n\tif ( proxy2target.has(object) ) { return object; }\n\tlet proxy = target2proxy.get(object) ;\n\tif ( proxy ) { return proxy; }\n\tproxy = newProxy(object, assign$1(Keeper (), ownKeys(object)));\n\ttarget2proxy.set(object, proxy);\n\treturn proxy;\n};\n\nconst Null = /*#__PURE__*/function () {\n\tfunction throwConstructing () { throw TypeError$1(`Super constructor Null cannot be invoked with 'new'`); }\n\tfunction throwApplying () { throw TypeError$1(`Super constructor Null cannot be invoked without 'new'`); }\n\tconst Nullify = (constructor ) => {\n\t\tdelete constructor.prototype.constructor;\n\t\tfreeze(constructor.prototype);\n\t\treturn constructor;\n\t};\n\tfunction Null ( constructor ) {\n\t\treturn new.target\n\t\t\t? new.target===Null\n\t\t\t\t? /*#__PURE__*/throwConstructing()\n\t\t\t\t: /*#__PURE__*/newProxy(this, Keeper ())\n\t\t\t: typeof constructor==='function'\n\t\t\t\t? /*#__PURE__*/Nullify(constructor)\n\t\t\t\t: /*#__PURE__*/throwApplying();\n\t}\n\t//@ts-ignore\n\tNull.prototype = null;\n\tObject_defineProperty(Null, 'name', assign$1(create$1(NULL), { value: '', configurable: false }));\n\t//delete Null.length;\n\tfreeze(Null);\n\treturn Null;\n}() ;\n\n/*¡ j-orderify */\n\nconst map_has = WeakMap.prototype.has;\n\nconst map_del = WeakMap.prototype['delete'];\n\nconst INLINES = new WeakMap$1 ();\nconst SECTIONS = new WeakSet$1 ();\n\nconst deInline = /*#__PURE__*/map_del.bind(INLINES) ;\nconst deSection = /*#__PURE__*/del.bind(SECTIONS) ;\n\nconst isInline = /*#__PURE__*/map_has.bind(INLINES) ;\nconst ofInline = /*#__PURE__*/get.bind(INLINES) \n\t \n\t \n\t \n ;\nconst beInline = /*#__PURE__*/set.bind(INLINES) \n\t \n\t \n ;\nconst inline = (value , mode , looping ) => {\n\tif ( isArray$1(value) ) {\n\t\tif ( looping ) { mode = 3; }\n\t\telse {\n\t\t\tif ( mode===undefined$1 ) { mode = 3; }\n\t\t\telse if ( mode!==0 && mode!==1 && mode!==2 && mode!==3 ) {\n\t\t\t\tthrow typeof mode==='number'\n\t\t\t\t\t? RangeError$1(`array inline mode must be 0 | 1 | 2 | 3, not including ${mode}`)\n\t\t\t\t\t: TypeError$1(`array inline mode must be \"number\" type, not including ${mode===null ? '\"null\"' : typeof mode}`);\n\t\t\t}\n\t\t}\n\t\tbeInline(value, mode);\n\t}\n\telse {\n\t\tbeInline(value, true);\n\t\tdeSection(value);\n\t}\n\treturn value;\n};\nconst multilineTable = (value ) => {\n\tbeInline(value, false);\n\tdeSection(value);\n\treturn value;\n};\nconst multilineArray = (value ) => {\n\tdeInline(value);\n\treturn value;\n};\n\nconst isSection = /*#__PURE__*/has.bind(SECTIONS) ;\nconst beSection = /*#__PURE__*/add.bind(SECTIONS) ;\nconst Section = (table ) => {\n\tif ( isArray$1(table) ) { throw TypeError$1(`array can not be section, maybe you want to use it on the tables in it`); }\n\tbeSection(table);\n\tdeInline(table);\n\treturn table;\n};\n\nconst INLINE = true;\n\nconst tables = new WeakSet$1 ();\nconst tables_add = /*#__PURE__*/add.bind(tables);\nconst isTable = /*#__PURE__*/has.bind(tables) ;\n\nconst implicitTables = new WeakSet$1 ();\nconst implicitTables_add = /*#__PURE__*/add.bind(implicitTables);\nconst implicitTables_del = /*#__PURE__*/del.bind(implicitTables) ;\nconst directlyIfNot = (table ) => {\n\tif ( implicitTables_del(table) ) {\n\t\tbeSection(table);\n\t\treturn true;\n\t}\n\treturn false;\n};\nconst DIRECTLY = true;\nconst IMPLICITLY = false;\n\nconst pairs = new WeakSet$1 ();\nconst pairs_add = /*#__PURE__*/add.bind(pairs);\nconst fromPair = /*#__PURE__*/has.bind(pairs) ;\nconst PAIR = true;\n\nconst PlainTable = /*#__PURE__*/Null$1(class Table extends Null$1 {\n\t \n\tconstructor (isDirect , isInline$fromPair ) {\n\t\tsuper();\n\t\ttables_add(this);\n\t\tisDirect\n\t\t\t? isInline$fromPair ? beInline(this, true) : beSection(this)\n\t\t\t: ( isInline$fromPair ? pairs_add : implicitTables_add )(this);\n\t\treturn this;\n\t}\n});\n\nconst OrderedTable = /*#__PURE__*/Null$1(class Table extends Null {\n\t \n\tconstructor (isDirect , isInline$fromPair ) {\n\t\tsuper();\n\t\ttables_add(this);\n\t\tisDirect\n\t\t\t? isInline$fromPair ? beInline(this, true) : beSection(this)\n\t\t\t: ( isInline$fromPair ? pairs_add : implicitTables_add )(this);\n\t\treturn this;\n\t}\n});\n\n//import * as options from './options';\n\nconst NONE = [];\nlet sourcePath = '';\nlet sourceLines = NONE;\nlet lastLineIndex = -1;\nlet lineIndex = -1;\n\nconst throws = (error ) => {\n\t//if ( sourceLines!==NONE ) { done(); options.clear(); }\n\tthrow error;\n};\n\nconst EOL = /\\r?\\n/;\nconst todo = (source , path ) => {\n\tif ( typeof path!=='string' ) { throw TypeError$1(`TOML.parse({ path })`); }\n\tsourcePath = path;\n\tsourceLines = source.split(EOL);\n\tlastLineIndex = sourceLines.length - 1;\n\tlineIndex = -1;\n};\n\nconst next = () => sourceLines[++lineIndex] ;\n\nconst rest = () => lineIndex!==lastLineIndex;\n\nclass mark {\n\t lineIndex = lineIndex;\n\t type ;\n\t restColumn ;\n\tconstructor (type , restColumn ) {\n\t\tthis.type = type;\n\t\tthis.restColumn = restColumn;\n\t\treturn this;\n\t}\n\tmust ( ) {\n\t\tlineIndex===lastLineIndex && throws(SyntaxError$1(`${this.type} is not close until the end of the file` + where(', which started from ', this.lineIndex, sourceLines[this.lineIndex] .length - this.restColumn + 1)));\n\t\treturn sourceLines[++lineIndex] ;\n\t}\n\tnowrap ( argsMode ) {\n\t\tthrow throws(Error$1(`TOML.parse(${argsMode ? `${argsMode}multilineStringJoiner` : `,{ joiner }`}) must be passed, while the source including multi-line string` + where(', which started from ', this.lineIndex, sourceLines[this.lineIndex] .length - this.restColumn + 1)));\n\t}\n}\nconst where = (pre , rowIndex = lineIndex, columnNumber = 0) => sourceLines===NONE ? '' :\n\tsourcePath\n\t\t? `\\n at (${sourcePath}:${rowIndex + 1}:${columnNumber})`\n\t\t: `${pre}line ${rowIndex + 1}: ${sourceLines[rowIndex]}`;\n\nconst done = () => {\n\tsourcePath = '';\n\tsourceLines = NONE;\n};\n\n/* nested (readable) */\n\nconst Whitespace = /[ \\t]/;\n\nconst PRE_WHITESPACE = /*#__PURE__*/newRegExp`\n\t^${Whitespace}+`.valueOf();\n\nconst { exec: VALUE_REST_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(\n\t\t(?:\\d\\d\\d\\d-\\d\\d-\\d\\d \\d)?\n\t\t[\\w\\-+.:]+\n\t)\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: LITERAL_STRING_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t'([^']*)'\n\t${Whitespace}*\n\t(.*)`.valueOf();\n\nconst { exec: MULTI_LINE_LITERAL_STRING_0_1_2 } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(.*?)\n\t'''('{0,2})\n\t${Whitespace}*\n\t(.*)`.valueOf();\nconst { exec: MULTI_LINE_LITERAL_STRING_0 } = /*#__PURE__*/newRegExp.s `\n\t^\n\t(.*?)\n\t'''()\n\t${Whitespace}*\n\t(.*)`.valueOf();\nlet __MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\nconst SYM_WHITESPACE = /*#__PURE__*/newRegExp.s`\n\t^\n\t.\n\t${Whitespace}*`.valueOf();\n\n\nconst Tag = /[^\\x00-\\x1F\"#'()<>[\\\\\\]`{}\\x7F]+/;\n\nconst { exec: KEY_VALUE_PAIR_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t${Whitespace}*\n\t=\n\t${Whitespace}*\n\t(?:\n\t\t<(${Tag})>\n\t\t${Whitespace}*\n\t)?\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: _VALUE_PAIR_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t<(${Tag})>\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\nconst { exec: TAG_REST_exec } = /*#__PURE__*/newRegExp.s `\n\t^\n\t<(${Tag})>\n\t${Whitespace}*\n\t(.*)\n\t$`.valueOf();\n\n/* optimized (avoid overflow or lost) */\n\nconst MULTI_LINE_BASIC_STRING = theRegExp(/[^\\\\\"]+|\\\\.?|\"(?!\"\")\"?/sy);\nconst MULTI_LINE_BASIC_STRING_exec_0_length = (_ ) => {\n\tlet lastIndex = /*MULTI_LINE_BASIC_STRING.lastIndex = */0;\n\twhile ( MULTI_LINE_BASIC_STRING.test(_) ) { lastIndex = MULTI_LINE_BASIC_STRING.lastIndex; }\n\treturn lastIndex;\n};\n\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______ = /[^\\\\\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER__________ = /[^\\\\\\x00-\\x09\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// Tab\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL______ = /[^\\\\\\x00-\\x09\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// Tab \\<ws>newline\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL_SLASH = /[^\\\\\\x00-\\x09\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\/]|[\\t ]*\\n[\\t\\n ]*|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/g;/// not \\<ws>newline\nlet __ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______;\nconst ESCAPED_EXCLUDE_CONTROL_CHARACTER_test = (_ ) => !_.replace(__ESCAPED_EXCLUDE_CONTROL_CHARACTER, '');/// op?\n\nconst BASIC_STRING_TAB______ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);\nconst BASIC_STRING__________ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F\\x7F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nconst BASIC_STRING_DEL______ = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nconst BASIC_STRING_DEL_SLASH = theRegExp(/[^\\\\\"\\x00-\\x08\\x0B-\\x1F]+|\\\\(?:[btnfr\"\\\\/]|u[\\dA-Fa-f]{4}|U[\\dA-Fa-f]{8})/y);/// Tab\nlet __BASIC_STRING = BASIC_STRING_DEL_SLASH;\nconst BASIC_STRING_exec_1_endIndex = (line ) => {\n\tlet lastIndex = __BASIC_STRING.lastIndex = 1;\n\twhile ( __BASIC_STRING.test(line) ) { lastIndex = __BASIC_STRING.lastIndex; }\n\tlastIndex!==line.length && line[lastIndex]==='\"' || throws(SyntaxError$1(`Bad basic string` + where(' at ')));\n\treturn lastIndex;\n};\n\nconst { test: IS_DOT_KEY } = theRegExp(/^[ \\t]*\\./);\nconst DOT_KEY = /^[ \\t]*\\.[ \\t]*/;\nconst { exec: BARE_KEY_STRICT } = theRegExp(/^[\\w-]+/);\nconst { exec: BARE_KEY_FREE } = theRegExp(/^[^ \\t#=[\\]'\".]+(?:[ \\t]+[^ \\t#=[\\]'\".]+)*/);\nlet __BARE_KEY_exec = BARE_KEY_FREE;\nconst { exec: LITERAL_KEY____ } = theRegExp(/^'[^'\\x00-\\x08\\x0B-\\x1F\\x7F]*'/);\nconst { exec: LITERAL_KEY_DEL } = theRegExp(/^'[^'\\x00-\\x08\\x0B-\\x1F]*'/);\nlet __LITERAL_KEY_exec = LITERAL_KEY_DEL;\nlet supportArrayOfTables = true;\n\nconst TABLE_DEFINITION_exec_groups = (lineRest , parseKeys ) => {\n\tconst asArrayItem = lineRest[1]==='[';\n\tif ( asArrayItem ) {\n\t\tsupportArrayOfTables || throws(SyntaxError$1(`Array of Tables is not allowed before TOML v0.2` + where(', which at ')));\n\t\tlineRest = lineRest.slice(2);\n\t}\n\telse { lineRest = lineRest.slice(1); }\n\tlineRest = lineRest.replace(PRE_WHITESPACE, '');\n\tconst { leadingKeys, finalKey } = { lineRest } = parseKeys(lineRest);\n\tlineRest = lineRest.replace(PRE_WHITESPACE, '');\n\tlineRest && lineRest[0]===']' || throws(SyntaxError$1(`Table header is not closed` + where(', which is found at ')));\n\t( lineRest.length>1 ? lineRest[1]===']'===asArrayItem : !asArrayItem ) || throws(SyntaxError$1(`Square brackets of Table definition statement not match` + where(' at ')));\n\tlineRest = lineRest.slice(asArrayItem ? 2 : 1).replace(PRE_WHITESPACE, '');\n\tlet tag ;\n\tif ( lineRest && lineRest[0]==='<' ) { ( { 1: tag, 2: lineRest } = TAG_REST_exec(lineRest) || throws(SyntaxError$1(`Bad tag` + where(' at '))) ); }\n\telse { tag = ''; }\n\treturn { leadingKeys, finalKey, asArrayItem, tag, lineRest };\n};\n\nconst KEY_VALUE_PAIR_exec_groups = ({ leadingKeys, finalKey, lineRest } ) => {\n\tconst { 1: tag = '' } = { 2: lineRest } = KEY_VALUE_PAIR_exec(lineRest) || throws(SyntaxError$1(`Keys must equal something` + where(', but missing at ')));\n\ttag || lineRest && lineRest[0]!=='#' || throws(SyntaxError$1(`Value can not be missing after euqal sign` + where(', which is found at ')));\n\treturn { leadingKeys, finalKey, tag, lineRest };\n};\n\nconst { test: CONTROL_CHARACTER_EXCLUDE_TAB____ } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F\\x7F]/);\nconst { test: CONTROL_CHARACTER_EXCLUDE_TAB_DEL } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F]/);\nlet __CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\nconst switchRegExp = (specificationVersion ) => {\n\tswitch ( specificationVersion ) {\n\t\tcase 1.0:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0_1_2;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY____;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_TAB______;\n\t\t\t__BASIC_STRING = BASIC_STRING_TAB______;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tcase 0.5:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY____;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB____;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER__________;\n\t\t\t__BASIC_STRING = BASIC_STRING__________;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tcase 0.4:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY_DEL;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB_DEL;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL______;\n\t\t\t__BASIC_STRING = BASIC_STRING_DEL______;\n\t\t\t__BARE_KEY_exec = BARE_KEY_STRICT;\n\t\t\tsupportArrayOfTables = true;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t__MULTI_LINE_LITERAL_STRING_exec = MULTI_LINE_LITERAL_STRING_0;\n\t\t\t__LITERAL_KEY_exec = LITERAL_KEY_DEL;\n\t\t\t__CONTROL_CHARACTER_EXCLUDE_test = CONTROL_CHARACTER_EXCLUDE_TAB_DEL;\n\t\t\t__ESCAPED_EXCLUDE_CONTROL_CHARACTER = ESCAPED_EXCLUDE_CONTROL_CHARACTER_DEL_SLASH;\n\t\t\t__BASIC_STRING = BASIC_STRING_DEL_SLASH;\n\t\t\t__BARE_KEY_exec = BARE_KEY_FREE;\n\t\t\tsupportArrayOfTables = false;\n\t}\n};\n\nconst NUM = /*#__PURE__*/newRegExp`\n\t(?:\n\t\t0\n\t\t(?:\n\t\t\tb[01][_01]*\n\t\t|\n\t\t\to[0-7][_0-7]*\n\t\t|\n\t\t\tx[\\dA-Fa-f][_\\dA-Fa-f]*\n\t\t|\n\t\t\t(?:\\.\\d[_\\d]*)?(?:[Ee]-?\\d[_\\d]*)?\n\t\t)\n\t|\n\t\t[1-9][_\\d]*\n\t\t(?:\\.\\d[_\\d]*)?(?:[Ee]-?\\d[_\\d]*)?\n\t|\n\t\tinf\n\t|\n\t\tnan\n\t)\n`.valueOf();\nconst { test: IS_AMAZING } = /*#__PURE__*/newRegExp`\n\t^(?:\n\t\t-?${NUM}\n\t\t(?:-${NUM})*\n\t|\n\t\ttrue\n\t|\n\t\tfalse\n\t)$\n`.valueOf();\nconst { test: BAD_DXOB } = /*#__PURE__*/newRegExp`_(?![\\dA-Fa-f])`.valueOf();\nconst isAmazing = (keys ) => IS_AMAZING(keys) && !BAD_DXOB(keys);\n\nlet mustScalar = true;\n\nlet ARGS_MODE = '';\n\n/* options */\n\nlet useWhatToJoinMultilineString = null;\nlet usingBigInt = true;\nlet IntegerMinNumber = 0;\nlet IntegerMaxNumber = 0;\n\n \n\n \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n \nconst ANY = {\n\ttest: () => true,\n};\n \n\t \n \nconst Keys = class KeysRegExp extends RegExp$1 {\n\t \n\tconstructor (keys ) {\n\t\tsuper(`^${groupify(keys)}$`);\n\t\tlet maxLength = -1;\n\t\tfor ( let index = keys.length; index; ) {\n\t\t\tconst { length } = keys[--index] ;\n\t\t\tif ( length>maxLength ) { maxLength = length; }\n\t\t}\n\t\tthis.lastIndex = maxLength+1;\n\t\treturn this;\n\t}\n\t test ( key ) {\n\t\treturn key.length<this.lastIndex && super.test(key);\n\t}\n};\nconst isKeys = /*#__PURE__*/isPrototypeOf.bind(/*#__PURE__*/freeze(Keys.prototype)) ;\nlet KEYS$1 = ANY;\nlet preserveLiteral ;\nlet zeroDatetime ;\nlet inlineTable ;\nlet moreDatetime ;\nlet disallowEmptyKey ;\n//export const xob :boolean = true;\nlet sError ;\nlet sFloat ;\n \nlet Table ;\nlet allowLonger ;\nlet enableNull ;\nlet allowInlineTableMultilineAndTrailingCommaEvenNoComma ;\nlet preserveComment ;\nlet disableDigit ;\nconst arrayTypes = new WeakMap$1 ();\nconst arrayTypes_get = /*#__PURE__*/get.bind(arrayTypes) ;\nconst arrayTypes_set = /*#__PURE__*/set.bind(arrayTypes) ;\n \nconst As = () => {\n\tconst as = (array ) => {\n\t\tconst got = arrayTypes_get(array);\n\t\tgot\n\t\t\t? got===as || throws(TypeError$1(`Types in Array must be same` + where('. Check ')))\n\t\t\t: arrayTypes_set(array, as);\n\t\treturn array;\n\t};\n\treturn as;\n};\nconst AS_TYPED = {\n\tasNulls: As(),\n\tasStrings: As(),\n\tasTables: As(),\n\tasArrays: As(),\n\tasBooleans: As(),\n\tasFloats: As(),\n\tasIntegers: As(),\n\tasOffsetDateTimes: As(),\n\tasLocalDateTimes: As(),\n\tasLocalDates: As(),\n\tasLocalTimes: As(),\n};\nconst asMixed = (array ) => array;\nlet\n\tasNulls ,\n\tasStrings ,\n\tasTables ,\n\tasArrays ,\n\tasBooleans ,\n\tasFloats ,\n\tasIntegers ,\n\tasOffsetDateTimes ,\n\tasLocalDateTimes ,\n\tasLocalDates ,\n\tasLocalTimes ;\n\n \n\n \nlet processor = null;\nlet each = null;\n \n\t \n\t \n\t \n \nconst collect_on = (tag , array , table , key ) => {\n\tconst _each = create$1(NULL) ;\n\t_each._linked = each;\n\t_each.tag = tag;\n\tif ( table ) {\n\t\t_each.table = table;\n\t\t_each.key = key ;\n\t}\n\tif ( array ) {\n\t\t_each.array = array;\n\t\t_each.index = array.length;\n\t}\n\teach = _each;\n};\nconst collect_off = () => { throw throws(SyntaxError$1(`xOptions.tag is not enabled, but found tag syntax` + where(' at '))); };\nlet collect = collect_off;\n \nconst Process = () => {\n\tif ( each ) {\n\t\tconst _processor = processor ;\n\t\tlet _each = each;\n\t\teach = null;\n\t\treturn () => {\n\t\t\tconst processor = _processor;\n\t\t\tlet each = _each ;\n\t\t\t_each = null;\n\t\t\tdo { processor(each); }\n\t\t\twhile ( each = each._linked );\n\t\t};\n\t}\n\treturn null;\n};\n\n/* use & clear */\n\nconst clear = () => {\n\tKEYS$1 = ANY;\n\tuseWhatToJoinMultilineString = processor = each = null;\n\tzeroDatetime = false;\n};\n\nconst use = (specificationVersion , multilineStringJoiner , useBigInt , keys , xOptions , argsMode ) => {\n\t\n\tARGS_MODE = argsMode;\n\t\n\tlet mixed ;\n\tswitch ( specificationVersion ) {\n\t\tcase 1.0:\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = true;\n\t\t\tzeroDatetime = disallowEmptyKey = false;\n\t\t\tbreak;\n\t\tcase 0.5:\n\t\t\tmustScalar = moreDatetime = sFloat = inlineTable = true;\n\t\t\tmixed = zeroDatetime = disallowEmptyKey = false;\n\t\t\tbreak;\n\t\tcase 0.4:\n\t\t\tmustScalar = disallowEmptyKey = inlineTable = true;\n\t\t\tmixed = zeroDatetime = moreDatetime = sFloat = false;\n\t\t\tbreak;\n\t\tcase 0.3:\n\t\t\tmustScalar = disallowEmptyKey = true;\n\t\t\tmixed = zeroDatetime = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tcase 0.2:\n\t\t\tzeroDatetime = disallowEmptyKey = true;\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tcase 0.1:\n\t\t\tzeroDatetime = disallowEmptyKey = true;\n\t\t\tmustScalar = mixed = moreDatetime = sFloat = inlineTable = false;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow RangeError$1(`TOML.parse(,specificationVersion)`);\n\t}\n\tswitchRegExp(specificationVersion);\n\t\n\tif ( typeof multilineStringJoiner==='string' ) { useWhatToJoinMultilineString = multilineStringJoiner; }\n\telse if ( multilineStringJoiner===undefined$1 ) { useWhatToJoinMultilineString = null; }\n\telse { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE}multilineStringJoiner` : `,{ joiner }`})`); }\n\t\n\tif ( useBigInt===undefined$1 || useBigInt===true ) { usingBigInt = true; }\n\telse if ( useBigInt===false ) { usingBigInt = false; }\n\telse {\n\t\tif ( typeof useBigInt!=='number' ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`})`); }\n\t\tif ( !isSafeInteger(useBigInt) ) { throw RangeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`})`); }\n\t\tusingBigInt = null;\n\t\tuseBigInt>=0\n\t\t\t? IntegerMinNumber = -( IntegerMaxNumber = useBigInt )\n\t\t\t: IntegerMaxNumber = -( IntegerMinNumber = useBigInt ) - 1;\n\t}\n\tif ( !BigInt$1 && usingBigInt!==false ) { throw Error$1(`Can't work without TOML.parse(${ARGS_MODE ? `${ARGS_MODE},useBigInt` : `,{ bigint }`}) being set to false, because the host doesn't have BigInt support`); }\n\t\n\tif ( keys==null ) { KEYS$1 = ANY; }\n\telse {\n\t\tif ( !isKeys(keys) ) { throw TypeError$1(`TOML.parse(,{ keys })`); }\n\t\tKEYS$1 = keys;\n\t}\n\t\n\tif ( xOptions==null ) {\n\t\tTable = PlainTable;\n\t\tsError = allowLonger = enableNull = allowInlineTableMultilineAndTrailingCommaEvenNoComma = false;\n\t\tcollect = collect_off;\n\t}\n\telse if ( typeof xOptions!=='object' ) {\n\t\tthrow TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,xOptions` : `,{ x }`})`);\n\t}\n\telse {\n\t\tconst { order, longer, exact, null: _null, multi, comment, string, literal, tag, ...unknown } = xOptions;\n\t\tconst unknownNames = getOwnPropertyNames(unknown);\n\t\tif ( unknownNames.length ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,{ ${unknownNames.join(', ')} }` : `,{ x: { ${unknownNames.join(', ')} } }`})`); }\n\t\tTable = order ? OrderedTable : PlainTable;\n\t\tallowLonger = !longer;\n\t\tsError = !!exact;\n\t\tenableNull = !!_null;\n\t\tallowInlineTableMultilineAndTrailingCommaEvenNoComma = !!multi;\n\t\tpreserveComment = !!comment;\n\t\tdisableDigit = !!string;\n\t\tpreserveLiteral = !!literal;\n\t\tif ( tag ) {\n\t\t\tif ( typeof tag!=='function' ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,{ tag }` : `,{ x: { tag } }`})`); }\n\t\t\tif ( !mixed ) { throw TypeError$1(`TOML.parse(${ARGS_MODE ? `${ARGS_MODE},,xOptions` : `,{ x }`}) xOptions.tag needs at least TOML 1.0 to support mixed type array`); }\n\t\t\tprocessor = tag;\n\t\t\tcollect = collect_on;\n\t\t}\n\t\telse { collect = collect_off; }\n\t}\n\t\n\tmixed\n\t\t? asNulls = asStrings = asTables = asArrays = asBooleans = asFloats = asIntegers = asOffsetDateTimes = asLocalDateTimes = asLocalDates = asLocalTimes = asMixed\n\t\t: ( { asNulls, asStrings, asTables, asArrays, asBooleans, asFloats, asIntegers, asOffsetDateTimes, asLocalDateTimes, asLocalDates, asLocalTimes } = AS_TYPED );\n\t\n};\n\nconst isView = ArrayBuffer.isView;\n\nconst isArrayBuffer = (\n\t/* j-globals: class.isArrayBuffer (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( typeof ArrayBuffer==='function' ) {\n\t\t\tvar byteLength_apply = apply.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);\n\t\t\treturn function isArrayBuffer (value) {\n\t\t\t\ttry { byteLength_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isArrayBuffer () { return false; };\n\t}()\n\t/* j-globals: class.isArrayBuffer (internal) */\n);\n\nconst TextDecoder$1 = TextDecoder;\n\nconst Symbol$1 = Symbol;\n\nconst previous = Symbol$1('previous') ;\n\n \n\t \n\t\t \n\t\t \n\t \n \n\nconst x = (rootStack ) => {\n\tlet stack = rootStack;\n\tlet result = stack.next();\n\tif ( !result.done ) {\n\t\tresult.value[previous] = stack;\n\t\tresult = ( stack = result.value ).next();\n\t\tfor ( ; ; ) {\n\t\t\tif ( result.done ) {\n\t\t\t\tif ( stack===rootStack ) { break; }\n\t\t\t\tstack = stack[previous] ;\n\t\t\t\tresult = stack.next(result.value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.value[previous] = stack;\n\t\t\t\tresult = ( stack = result.value ).next();\n\t\t\t}\n\t\t}\n\t}\n\treturn result.value;\n};\n\nconst _literal = Symbol$1('_literal') ;\n\nconst LiteralObject = (literal , value ) => {\n\tconst object = Object$1(value) ;\n\tobject[_literal] = literal;\n\treturn object;\n};\n\nconst arrays = new WeakSet$1 ();\nconst arrays_add = /*#__PURE__*/add.bind(arrays);\nconst isArray = /*#__PURE__*/has.bind(arrays) ;\n\nconst OF_TABLES = false;\nconst STATICALLY = true;\nconst staticalArrays = new WeakSet$1 ();\nconst staticalArrays_add = /*#__PURE__*/add.bind(staticalArrays);\nconst isStatic = /*#__PURE__*/has.bind(staticalArrays) ;\n\nconst newArray = (isStatic ) => {\n\tconst array = [];\n\tarrays_add(array);\n\tisStatic && staticalArrays_add(array);\n\treturn array;\n};\n\nconst NativeDate = Date;\n\nconst parse$2 = Date.parse;\n\nconst preventExtensions = Object.preventExtensions;\n\nconst getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;\n\nconst defineProperties = (\n\t/* j-globals: null.defineProperties (internal) */\n\tfunction defineProperties (object, descriptorMap) {\n\t\tvar created = create$1(NULL);\n\t\tvar names = keys(descriptorMap);\n\t\tfor ( var length = names.length, index = 0; index<length; ++index ) {\n\t\t\tvar name = names[index];\n\t\t\tcreated[name] = Descriptor(descriptorMap[name]);\n\t\t}\n\t\tif ( getOwnPropertySymbols ) {\n\t\t\tvar symbols = getOwnPropertySymbols(descriptorMap);\n\t\t\tfor ( length = symbols.length, index = 0; index<length; ++index ) {\n\t\t\t\tvar symbol = symbols[index];\n\t\t\t\tif ( isEnum(descriptorMap, symbol) ) { created[symbol] = Descriptor(descriptorMap[symbol]); }\n\t\t\t}\n\t\t}\n\t\treturn Object_defineProperties(object, created);\n\t}\n\t/* j-globals: null.defineProperties (internal) */\n);\n\nconst fpc = (c ) => {\n\tfreeze(freeze(c).prototype);\n\treturn c;\n};\n\nconst _29_ = /(?:0[1-9]|1\\d|2\\d)/;\nconst _30_ = /(?:0[1-9]|[12]\\d|30)/;\nconst _31_ = /(?:0[1-9]|[12]\\d|3[01])/;\nconst _23_ = /(?:[01]\\d|2[0-3])/;\nconst _59_ = /[0-5]\\d/;\n\nconst YMD = /*#__PURE__*/newRegExp`\n\t\\d\\d\\d\\d-\n\t(?:\n\t\t0\n\t\t(?:\n\t\t\t[13578]-${_31_}\n\t\t\t|\n\t\t\t[469]-${_30_}\n\t\t\t|\n\t\t\t2-${_29_}\n\t\t)\n\t\t|\n\t\t1\n\t\t(?:\n\t\t\t[02]-${_31_}\n\t\t\t|\n\t\t\t1-${_30_}\n\t\t)\n\t)\n`.valueOf();\n\nconst HMS = /*#__PURE__*/newRegExp`\n\t${_23_}:${_59_}:${_59_}\n`.valueOf();\n\nconst OFFSET$ = /(?:[Zz]|[+-]\\d\\d:\\d\\d)$/;\n\nconst { exec: Z_exec } = theRegExp (/(([+-])\\d\\d):(\\d\\d)$/);\n\nconst { exec: OFFSET_DATETIME_exec } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t(?:\\.\\d{1,3}(\\d*?)0*)?\n\t(?:[Zz]|[+-]${_23_}:${_59_})\n\t$`.valueOf();\n\nconst { exec: OFFSET_DATETIME_ZERO_exec } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t()\n\t[Zz]\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_DATETIME } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t[Tt ]\n\t${HMS}\n\t(?:\\.\\d+)?\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_DATE } = /*#__PURE__*/newRegExp`\n\t^\n\t${YMD}\n\t$`.valueOf();\n\nconst { test: IS_LOCAL_TIME } = /*#__PURE__*/newRegExp`\n\t^\n\t${HMS}\n\t(?:\\.\\d+)?\n\t$`.valueOf();\n\nconst T = /[ t]/;\nconst DELIMITER_DOT = /[-T:.]/g;\nconst DOT_ZERO = /\\.?0+$/;\nconst ZERO = /\\.(\\d*?)0+$/;\nconst zeroReplacer = (match , p1 ) => p1;\n\nconst Datetime = /*#__PURE__*/( () => {\n\tconst Datetime = function ( ) {\n\t\treturn this;\n\t} ;//expression? :undefined, literal? :undefined, dotValue? :undefined\n\t// > .setTime()\n\t// > .getTime() : Date.parse('T')\n\t// [Symbol.toPrimitive]('number') > .valueOf()\n\t// > .toISOString()\n\tconst descriptors = Null$1(null) ;\n\t{\n\t\tconst descriptor = Null$1(null);\n\t\tfor ( const key of ownKeys(NativeDate.prototype ) ) {\n\t\t\tkey==='constructor' ||\n\t\t\tkey==='toJSON' ||\n\t\t\t( descriptors[key] = descriptor );\n\t\t}\n\t}\n\tDatetime.prototype = preventExtensions(create$1(NativeDate.prototype, descriptors));\n\treturn freeze(Datetime);\n} )();\n\n \n \n \n \n \n \n \n \n \n \n \n\nconst Value = (ISOString ) => ISOString.replace(ZERO, zeroReplacer).replace(DELIMITER_DOT, '');\n\nconst d = /./gs;\nconst d2u = (d ) => '\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009'[d ] ;\nconst ValueOFFSET = (time , more ) => time<0\n\t? ( '' + ( time + 62167305540000 ) ).replace(d, d2u).padStart(14, '\\u2000') + more.replace(d, d2u) + time\n\t: more\n\t\t? ( time + '.' ).padStart(16, '0') + more\n\t\t: ( '' + time ).padStart(15, '0');\n\nconst validateLeap = (literal ) => {\n\tif ( literal.startsWith('02-29', 5) ) {\n\t\tconst year = +literal.slice(0, 4);\n\t\treturn (\n\t\t\tyear & 0b11 ? false :\n\t\t\t\tyear%100 ? true :\n\t\t\t\t\tyear%400 ? false :\n\t\t\t\t\t\tyear%3200 ? true :\n\t\t\t\t\t\t\tfalse\n\t\t);\n\t}\n\treturn true;\n};\nconst { test: VALIDATE_LEAP } = /*#__PURE__*/newRegExp.s`^.....(?:06.30|12.31).23:59:59`.valueOf();\n\nconst DATE$1 = /*#__PURE__*/defineProperties(new NativeDate(0), /*#__PURE__*/getOwnPropertyDescriptors(NativeDate.prototype));\n\nconst OffsetDateTime_ISOString = Symbol$1('OffsetDateTime_ISOString') ;\nconst OffsetDateTime_value = Symbol$1('OffsetDateTime_value') ;\nconst OffsetDateTime_use = (that , $ = 0) => {\n\tDATE$1.setTime(+that[OffsetDateTime_value] + $);\n\treturn DATE$1;\n};\n/*const OffsetDateTime_get = (that :InstanceType<typeof OffsetDateTime>, start :number, end :number) => +that[OffsetDateTime_ISOString].slice(start, end);\nconst OffsetDateTime_set = (that :InstanceType<typeof OffsetDateTime>, start :number, end :number, value :number, reserveMore :boolean) => {\n\tif ( end ) {\n\t\tconst string = '' + value;\n\t\tconst size = end - start;\n\t\tif ( string.length>size ) { throw RangeError(); }///\n\t\tthat[OffsetDateTime_ISOString] = that[OffsetDateTime_ISOString].slice(0, start) + string.padStart(size, '0') + that[OffsetDateTime_ISOString].slice(end);\n\t}\n\tconst time = parse(that[OffsetDateTime_ISOString]);\n\treturn that[OffsetDateTime_value] = ValueOFFSET(time, that[OffsetDateTime_value].includes('-')\n\t\t? that[OffsetDateTime_value].slice(14, that[OffsetDateTime_value].indexOf('-', 14))\n\t\t: that[OffsetDateTime_value].slice(15)\n\t);///time\n};*///\nconst OffsetDateTime = /*#__PURE__*/fpc(class OffsetDateTime extends Datetime {\n\t\n\t[OffsetDateTime_ISOString] ;\n\t[OffsetDateTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'OffsetDateTime' ; }\n\t\n\t valueOf ( ) { return this[OffsetDateTime_value]; }\n\ttoISOString ( ) { return this[OffsetDateTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tvalidateLeap(literal) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\tconst with60 = literal.startsWith('60', 17);\n\t\tlet without60 = with60 ? literal.slice(0, 17) + '59' + literal.slice(19) : literal;\n\t\tconst { 1: more = '' } = ( zeroDatetime ? OFFSET_DATETIME_ZERO_exec(without60) : OFFSET_DATETIME_exec(without60) ) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\tconst time = parse$2(without60 = without60.replace(T, 'T').replace('z', 'Z'));\n\t\tif ( with60 ) {\n\t\t\tDATE$1.setTime(time);\n\t\t\tVALIDATE_LEAP(DATE$1.toISOString()) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(' at ')));\n\t\t}\n\t\tsuper();\n\t\tthis[OffsetDateTime_ISOString] = without60;\n\t\tthis[OffsetDateTime_value] = ValueOFFSET(time, more);\n\t\treturn this;\n\t}\n\t\n\tgetUTCFullYear ( ) { return OffsetDateTime_use(this).getUTCFullYear(); }\n\t///get year () :FullYear { return OffsetDateTime_get(this, 0, 4); }\n\t///set year (value :FullYear) { OffsetDateTime_set(this, 0, 4, value, true); }\n\tgetUTCMonth ( ) { return OffsetDateTime_use(this).getUTCMonth(); }\n\t///get month () { return OffsetDateTime_get(this, 5, 7); }\n\t///set month (value) { OffsetDateTime_set(this, 5, 7, value, true); }\n\tgetUTCDate ( ) { return OffsetDateTime_use(this).getUTCDate(); }\n\t///get day () :Date { return OffsetDateTime_get(this, 8, 10); }\n\t///set day (value :Date) { OffsetDateTime_set(this, 8, 10, value, true); }\n\t\n\tgetUTCHours ( ) { return OffsetDateTime_use(this).getUTCHours(); }\n\t///get hour () :Hours { return OffsetDateTime_get(this, 11, 13); }\n\t///set hour (value :Hours) { OffsetDateTime_set(this, 11, 13, value, true); }\n\tgetUTCMinutes ( ) { return OffsetDateTime_use(this).getUTCMinutes(); }\n\t///get minute () :Minutes { return OffsetDateTime_get(this, 14, 16); }\n\t///set minute (value :Minutes) { OffsetDateTime_set(this, 14, 16, value, true); }\n\tgetUTCSeconds ( ) { return OffsetDateTime_use(this).getUTCSeconds(); }\n\t///get second () :Seconds { return OffsetDateTime_get(this, 17, 19); }\n\t///set second (value :Seconds) { OffsetDateTime_set(this, 17, 19, value, true); }\n\tgetUTCMilliseconds ( ) { return OffsetDateTime_use(this).getUTCMilliseconds(); }///\n\t///get millisecond () :Milliseconds { return this[OffsetDateTime_value]%1000; }///\n\t/*set millisecond (value :Milliseconds) {\n\t\tthis[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' ) + this[OffsetDateTime_ISOString].slice(this[OffsetDateTime_ISOString].search(OFFSET$));\n\t\tOffsetDateTime_set(this, 0, 0, 0, false);\n\t}*///\n\t///get microsecond () :Milliseconds\n\t///set microsecond (value :Milliseconds)\n\t///get nanosecond () :Milliseconds\n\t///set nanosecond (value :Milliseconds)\n\t\n\tgetUTCDay ( ) { return OffsetDateTime_use(this).getUTCDay(); }\n\t///get dayOfWeek () { return OffsetDateTime_use(this, this.getTimezoneOffset()*60000).getUTCDay() || 7; }\n\tgetTimezoneOffset ( ) {\n\t\tconst z = Z_exec(this[OffsetDateTime_ISOString]);\n\t\treturn z ? +z[1]*60 + +( z[2] + z[3] ) : 0;\n\t}\n\t///get offset () { return this[OffsetDateTime_ISOString].endsWith('Z') ? 'Z' : this[OffsetDateTime_ISOString].slice(-6); }\n\t/*set offset (value) {\n\t\tthis[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, this[OffsetDateTime_ISOString].endsWith('Z') ? -1 : -6) + value;\n\t\tOffsetDateTime_set(this, 0, 0, 0, true);\n\t}*///\n\tgetTime ( ) { return floor(+this[OffsetDateTime_value]); }///\n\t/*setTime (this :OffsetDateTime, value :Time) :void {\n\t\tvalue = DATE.setTime(value);\n\t\tconst z = Z_exec(this[OffsetDateTime_ISOString]);\n\t\tDATE.setTime(value + ( z ? +z[1]*60 + +( z[2] + z[3] ) : 0 )*60000);\n\t\tthis[OffsetDateTime_ISOString] = z ? DATE.toISOString().slice(0, -1) + z[0] : DATE.toISOString();\n\t\tthis[OffsetDateTime_value] = ValueOFFSET(value, '');\n\t\t///return value;\n\t}*/\n\t\n});\n\nconst LocalDateTime_ISOString = Symbol$1('LocalDateTime_ISOString') ;\nconst LocalDateTime_value = Symbol$1('LocalDateTime_value') ;\nconst LocalDateTime_get = (that , start , end ) => +that[LocalDateTime_ISOString].slice(start, end);\nconst LocalDateTime_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalDateTime_value] = Value(\n\t\tthat[LocalDateTime_ISOString] = that[LocalDateTime_ISOString].slice(0, start) + string.padStart(size, '0') + that[LocalDateTime_ISOString].slice(end)\n\t);\n};\nconst LocalDateTime = /*#__PURE__*/fpc(class LocalDateTime extends Datetime {\n\t\n\t[LocalDateTime_ISOString] ;\n\t[LocalDateTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalDateTime' ; }\n\t\n\t valueOf ( ) { return this[LocalDateTime_value]; }\n\ttoISOString ( ) { return this[LocalDateTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_DATETIME(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date-Time ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalDateTime_value] = Value(\n\t\t\tthis[LocalDateTime_ISOString] = literal.replace(T, 'T')\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetFullYear ( ) { return LocalDateTime_get(this, 0, 4); }\n\tsetFullYear ( value ) { LocalDateTime_set(this, 0, 4, value); }\n\tgetMonth ( ) { return LocalDateTime_get(this, 5, 7) - 1; }\n\tsetMonth ( value ) { LocalDateTime_set(this, 5, 7, value + 1); }\n\tgetDate ( ) { return LocalDateTime_get(this, 8, 10); }\n\tsetDate ( value ) { LocalDateTime_set(this, 8, 10, value); }\n\t\n\tgetHours ( ) { return LocalDateTime_get(this, 11, 13); }\n\tsetHours ( value ) { LocalDateTime_set(this, 11, 13, value); }\n\tgetMinutes ( ) { return LocalDateTime_get(this, 14, 16); }\n\tsetMinutes ( value ) { LocalDateTime_set(this, 14, 16, value); }\n\tgetSeconds ( ) { return LocalDateTime_get(this, 17, 19); }\n\tsetSeconds ( value ) { LocalDateTime_set(this, 17, 19, value); }\n\tgetMilliseconds ( ) { return +this[LocalDateTime_value].slice(14, 17).padEnd(3, '0'); }///\n\tsetMilliseconds ( value ) {\n\t\tthis[LocalDateTime_value] = Value(\n\t\t\tthis[LocalDateTime_ISOString] = this[LocalDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' )\n\t\t);\n\t}\n\t\n});\n\nconst LocalDate_ISOString = Symbol$1('LocalDate_ISOString') ;\nconst LocalDate_value = Symbol$1('LocalDate_value') ;\nconst LocalDate_get = (that , start , end ) => +that[LocalDate_ISOString].slice(start, end);\nconst LocalDate_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalDate_value] = Value(\n\t\tthat[LocalDate_ISOString] = that[LocalDate_ISOString].slice(0, start) + string.padStart(size, '0') + that[LocalDate_ISOString].slice(end)\n\t);\n};\nconst LocalDate = /*#__PURE__*/fpc(class LocalDate extends Datetime {\n\t\n\t[LocalDate_ISOString] ;\n\t[LocalDate_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalDate' ; }\n\t\n\t valueOf ( ) { return this[LocalDate_value]; }\n\ttoISOString ( ) { return this[LocalDate_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_DATE(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalDate_value] = Value(\n\t\t\tthis[LocalDate_ISOString] = literal\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetFullYear ( ) { return LocalDate_get(this, 0, 4); }\n\tsetFullYear ( value ) { LocalDate_set(this, 0, 4, value); }\n\tgetMonth ( ) { return LocalDate_get(this, 5, 7) - 1; }\n\tsetMonth ( value ) { LocalDate_set(this, 5, 7, value + 1); }\n\tgetDate ( ) { return LocalDate_get(this, 8, 10); }\n\tsetDate ( value ) { LocalDate_set(this, 8, 10, value); }\n\t\n});\n\nconst LocalTime_ISOString = Symbol$1('LocalTime_ISOString') ;\nconst LocalTime_value = Symbol$1('LocalTime_value') ;\nconst LocalTime_get = (that , start , end ) => +that[LocalTime_ISOString].slice(start, end);\nconst LocalTime_set = (that , start , end , value ) => {\n\tconst string = '' + value;\n\tconst size = end - start;\n\tif ( string.length>size ) { throw RangeError$1(); }///\n\tthat[LocalTime_value] = Value(\n\t\tthat[LocalTime_ISOString] = that[LocalTime_ISOString].slice(0, start) + string.padStart(2, '0') + that[LocalTime_ISOString].slice(end)\n\t);\n};\nconst LocalTime = /*#__PURE__*/fpc(class LocalTime extends Datetime {\n\t\n\t[LocalTime_ISOString] ;\n\t[LocalTime_value] ;\n\t\n\tget [Symbol$1.toStringTag] () { return 'LocalTime' ; }\n\t\n\t valueOf ( ) { return this[LocalTime_value]; }\n\ttoISOString ( ) { return this[LocalTime_ISOString]; }\n\t\n\tconstructor (literal ) {\n\t\tIS_LOCAL_TIME(literal) || throws(SyntaxError$1(`Invalid Local Time ${literal}` + where(' at ')));\n\t\tsuper();\n\t\tthis[LocalTime_value] = Value(\n\t\t\tthis[LocalTime_ISOString] = literal\n\t\t);\n\t\treturn this;\n\t}\n\t\n\tgetHours ( ) { return LocalTime_get(this, 0, 2); }\n\tsetHours ( value ) { LocalTime_set(this, 0, 2, value); }\n\tgetMinutes ( ) { return LocalTime_get(this, 3, 5); }\n\tsetMinutes ( value ) { LocalTime_set(this, 3, 5, value); }\n\tgetSeconds ( ) { return LocalTime_get(this, 6, 8); }\n\tsetSeconds ( value ) { LocalTime_set(this, 6, 8, value); }\n\tgetMilliseconds ( ) { return +this[LocalTime_value].slice(6, 9).padEnd(3, '0'); }///\n\tsetMilliseconds ( value ) {\n\t\tthis[LocalTime_value] = Value(\n\t\t\tthis[LocalTime_ISOString] = this[LocalTime_ISOString].slice(0, 8) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' )\n\t\t);\n\t}\n\t\n});\n\nconst parseInt$1 = parseInt;\n\nconst fromCodePoint = String.fromCodePoint;\n\nconst ESCAPED_IN_SINGLE_LINE = /[^\\\\]+|\\\\(?:[\\\\\"btnfr/]|u.{4}|U.{8})/gs;\nconst ESCAPED_IN_MULTI_LINE = /[^\\n\\\\]+|\\n|\\\\(?:[\\t ]*\\n[\\t\\n ]*|[\\\\\"btnfr/]|u.{4}|U.{8})/gs;\n\nconst BasicString = (literal ) => {\n\tif ( !literal ) { return ''; }\n\tconst parts = literal.match(ESCAPED_IN_SINGLE_LINE) ;\n\tconst { length } = parts;\n\tlet index = 0;\n\tdo {\n\t\tconst part = parts[index] ;\n\t\tif ( part[0]==='\\\\' ) {\n\t\t\tswitch ( part[1] ) {\n\t\t\t\tcase '\\\\': parts[index] = '\\\\'; break;\n\t\t\t\tcase '\"': parts[index] = '\"'; break;\n\t\t\t\tcase 'b': parts[index] = '\\b'; break;\n\t\t\t\tcase 't': parts[index] = '\\t'; break;\n\t\t\t\tcase 'n': parts[index] = '\\n'; break;\n\t\t\t\tcase 'f': parts[index] = '\\f'; break;\n\t\t\t\tcase 'r': parts[index] = '\\r'; break;\n\t\t\t\tcase 'u':\n\t\t\t\t\tconst charCode = parseInt$1(part.slice(2), 16);\n\t\t\t\t\tmustScalar && 0xD7FF<charCode && charCode<0xE000\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ')));\n\t\t\t\t\tparts[index] = fromCharCode(charCode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tconst codePoint = parseInt$1(part.slice(2), 16);\n\t\t\t\t\t( mustScalar && 0xD7FF<codePoint && codePoint<0xE000 || 0x10FFFF<codePoint )\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ')));\n\t\t\t\t\tparts[index] = fromCodePoint(codePoint);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/': parts[index] = '/'; break;\n\t\t\t}\n\t\t}\n\t}\n\twhile ( ++index!==length );\n\treturn parts.join('');\n};\n\nconst MultilineBasicString = (literal , useWhatToJoinMultilineString , n ) => {\n\tif ( !literal ) { return ''; }\n\tconst parts = literal.match(ESCAPED_IN_MULTI_LINE) ;\n\tconst { length } = parts;\n\tlet index = 0;\n\tdo {\n\t\tconst part = parts[index] ;\n\t\tif ( part==='\\n' ) {\n\t\t\t++n;\n\t\t\tparts[index] = useWhatToJoinMultilineString;\n\t\t}\n\t\telse if ( part[0]==='\\\\' ) {\n\t\t\tswitch ( part[1] ) {\n\t\t\t\tcase '\\n':\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\t':\n\t\t\t\t\tfor ( let i = 0; i = part.indexOf('\\n', i) + 1; ) { ++n; }\n\t\t\t\t\tparts[index] = '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\': parts[index] = '\\\\'; break;\n\t\t\t\tcase '\"': parts[index] = '\"'; break;\n\t\t\t\tcase 'b': parts[index] = '\\b'; break;\n\t\t\t\tcase 't': parts[index] = '\\t'; break;\n\t\t\t\tcase 'n': parts[index] = '\\n'; break;\n\t\t\t\tcase 'f': parts[index] = '\\f'; break;\n\t\t\t\tcase 'r': parts[index] = '\\r'; break;\n\t\t\t\tcase 'u':\n\t\t\t\t\tconst charCode = parseInt$1(part.slice(2), 16);\n\t\t\t\t\tmustScalar && 0xD7FF<charCode && charCode<0xE000\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ', lineIndex + n)));\n\t\t\t\t\tparts[index] = fromCharCode(charCode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tconst codePoint = parseInt$1(part.slice(2), 16);\n\t\t\t\t\t( mustScalar && 0xD7FF<codePoint && codePoint<0xE000 || 0x10FFFF<codePoint )\n\t\t\t\t\t&& throws(RangeError$1(`Invalid Unicode Scalar ${part}` + where(' at ', lineIndex + n)));\n\t\t\t\t\tparts[index] = fromCodePoint(codePoint);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/': parts[index] = '/'; break;\n\t\t\t}\n\t\t}\n\t}\n\twhile ( ++index!==length );\n\treturn parts.join('');\n};\n\nconst INTEGER_D = /[-+]?(?:0|[1-9][_\\d]*)/;\nconst { test: BAD_D } = /*#__PURE__*/newRegExp`_(?!\\d)`.valueOf();\nconst { test: IS_D_INTEGER } = /*#__PURE__*/newRegExp`^${INTEGER_D}$`.valueOf();\nconst { test: IS_XOB_INTEGER } = theRegExp(/^0(?:x[\\dA-Fa-f][_\\dA-Fa-f]*|o[0-7][_0-7]*|b[01][_01]*)$/);\nconst { test: BAD_XOB } = /*#__PURE__*/newRegExp`_(?![\\dA-Fa-f])`.valueOf();\nconst UNDERSCORES$1 = /_/g;\nconst UNDERSCORES_SIGN = /_|^[-+]/g;\n\nconst IS_INTEGER = (literal ) => ( IS_D_INTEGER(literal) || /*options.xob && */IS_XOB_INTEGER(literal) ) && !BAD_XOB(literal);\n\nconst MIN = BigInt$1 && -/*#__PURE__*/BigInt$1('0x8000000000000000');// -(2n**(64n-1n)) || -MAX-1n\nconst MAX = BigInt$1 && /*#__PURE__*/BigInt$1('0x7FFFFFFFFFFFFFFF');// 2n**(64n-1n)-1n || -MIN-1n\n\nconst BigIntInteger = (literal ) => {\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst bigInt = literal[0]==='-'\n\t\t? -BigInt$1(literal.replace(UNDERSCORES_SIGN, ''))\n\t\t: BigInt$1(literal.replace(UNDERSCORES_SIGN, ''));\n\tallowLonger || MIN<=bigInt && bigInt<=MAX || throws(RangeError$1(`Integer expect 64 bit range (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), not includes ${literal}` + where(' meet at ')));\n\treturn bigInt;\n};\n\nconst NumberInteger = (literal ) => {\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst number = parseInt$1(literal.replace(UNDERSCORES$1, ''));\n\tisSafeInteger(number) || throws(RangeError$1(`Integer did not use BitInt must fit Number.isSafeInteger, not includes ${literal}` + where(' meet at ')));\n\treturn number;\n};\n\nconst Integer = (literal ) => {\n\tif ( usingBigInt===true ) { return BigIntInteger(literal); }\n\tif ( usingBigInt===false ) { return NumberInteger(literal); }\n\tIS_INTEGER(literal) || throws(SyntaxError$1(`Invalid Integer ${literal}` + where(' at ')));\n\tconst number = parseInt$1(literal.replace(UNDERSCORES$1, ''));\n\tif ( IntegerMinNumber<=number && number<=IntegerMaxNumber ) { return number; }\n\tconst bigInt = literal[0]==='-'\n\t\t? -BigInt$1(literal.replace(UNDERSCORES_SIGN, ''))\n\t\t: BigInt$1(literal.replace(UNDERSCORES_SIGN, ''));\n\tallowLonger || MIN<=bigInt && bigInt<=MAX || throws(RangeError$1(`Integer expect 64 bit range (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), not includes ${literal}` + where(' meet at ')));\n\treturn bigInt;\n};\n\nconst isFinite$1 = isFinite;\n\nconst NaN$1 = 0/0;\n\nconst _NaN = -NaN$1;\nconst _Infinity$1 = -Infinity;\nconst { test: IS_FLOAT } = /*#__PURE__*/newRegExp`\n\t^\n\t${INTEGER_D}\n\t(?:\n\t\t\\.\\d[_\\d]*\n\t\t(?:[eE][-+]?\\d[_\\d]*)?\n\t|\n\t\t[eE][-+]?\\d[_\\d]*\n\t)\n\t$`.valueOf();\nconst UNDERSCORES = /_/g;\nconst { test: IS_ZERO } = theRegExp(/^[-+]?0(?:\\.0+)?(?:[eE][-+]?0+)?$/);\nconst { exec: NORMALIZED } = theRegExp (/^[-0]?(\\d*)(?:\\.(\\d+))?(?:e\\+?(-?\\d+))?$/);\nconst { exec: ORIGINAL } = theRegExp (/^[-+]?0?(\\d*)(?:\\.(\\d*?)0*)?(?:[eE]\\+?(-?\\d+))?$/);\n\nconst Float = (literal ) => {\n\tif ( !IS_FLOAT(literal) || BAD_D(literal) ) {\n\t\tif ( sFloat ) {\n\t\t\tif ( literal==='inf' || literal==='+inf' ) { return Infinity; }\n\t\t\tif ( literal==='-inf' ) { return _Infinity$1; }\n\t\t\tif ( literal==='nan' || literal==='+nan' ) { return NaN$1; }\n\t\t\tif ( literal==='-nan' ) { return _NaN; }\n\t\t}\n\t\telse if ( !sError ) {\n\t\t\tif ( literal==='inf' || literal==='+inf' ) { return Infinity; }\n\t\t\tif ( literal==='-inf' ) { return _Infinity$1; }\n\t\t}\n\t\tthrow throws(SyntaxError$1(`Invalid Float ${literal}` + where(' at ')));\n\t}\n\tconst withoutUnderscores = literal.replace(UNDERSCORES, '');\n\tconst number = +withoutUnderscores;\n\tif ( sError ) {\n\t\tisFinite$1(number) || throws(RangeError$1(`Float ${literal} has been as big as inf` + where(' at ')));\n\t\tnumber || IS_ZERO(withoutUnderscores) || throws(RangeError$1(`Float ${literal} has been as little as ${literal[0]==='-' ? '-' : ''}0` + where(' at ')));\n\t\tconst { 1: normalized_integer, 2: normalized_fractional = '', 3: normalized_exponent = '' } = NORMALIZED(number ) ;\n\t\tconst { 1: original_integer, 2: original_fractional = '', 3: original_exponent = '' } = ORIGINAL(withoutUnderscores) ;\n\t\toriginal_integer + original_fractional===normalized_integer + normalized_fractional\n\t\t&&\n\t\toriginal_exponent - original_fractional.length===normalized_exponent - normalized_fractional.length\n\t\t||\n\t\tthrows(RangeError$1(`Float ${literal} has lost its exact and been ${number}` + where(' at ')));\n\t}\n\treturn number;\n};\n\nconst prepareTable = (table , keys ) => {\n\tconst { length } = keys;\n\tlet index = 0;\n\twhile ( index<length ) {\n\t\tconst key = keys[index++] ;\n\t\tif ( key in table ) {\n\t\t\ttable = table[key];\n\t\t\tif ( isTable(table) ) {\n\t\t\t\tisInline(table) && throws(Error$1(`Trying to define Table under Inline Table` + where(' at ')));\n\t\t\t}\n\t\t\telse if ( isArray(table) ) {\n\t\t\t\tisStatic(table) && throws(Error$1(`Trying to append value to Static Array` + where(' at ')));\n\t\t\t\ttable = table[( table ).length - 1];\n\t\t\t}\n\t\t\telse { throw throws(Error$1(`Trying to define Table under non-Table value` + where(' at '))); }\n\t\t}\n\t\telse {\n\t\t\ttable = table[key] = new Table(IMPLICITLY);\n\t\t\twhile ( index<length ) { table = table[keys[index++] ] = new Table(IMPLICITLY); }\n\t\t\treturn table;\n\t\t}\n\t}\n\treturn table;\n};\n\nconst appendTable = (table , finalKey , asArrayItem , tag ) => {\n\tlet lastTable ;\n\tif ( asArrayItem ) {\n\t\tlet arrayOfTables ;\n\t\tif ( finalKey in table ) { isArray(arrayOfTables = table[finalKey]) && !isStatic(arrayOfTables) || throws(Error$1(`Trying to push Table to non-ArrayOfTables value` + where(' at '))); }\n\t\telse { arrayOfTables = table[finalKey] = newArray(OF_TABLES); }\n\t\ttag && collect(tag, arrayOfTables, table, finalKey);\n\t\tarrayOfTables[arrayOfTables.length] = lastTable = new Table(DIRECTLY);\n\t}\n\telse {\n\t\tif ( finalKey in table ) {\n\t\t\tlastTable = table[finalKey];\n\t\t\tfromPair(lastTable) && throws(Error$1(`A table defined implicitly via key/value pair can not be accessed to via []` + where(', which at ')));\n\t\t\tdirectlyIfNot(lastTable) || throws(Error$1(`Duplicate Table definition` + where(' at ')));\n\t\t}\n\t\telse { table[finalKey] = lastTable = new Table(DIRECTLY); }\n\t\ttag && collect(tag, null, table, finalKey);\n\t}\n\treturn lastTable;\n};\n\nconst prepareInlineTable = (table , keys ) => {\n\tconst { length } = keys;\n\tlet index = 0;\n\twhile ( index<length ) {\n\t\tconst key = keys[index++] ;\n\t\tif ( key in table ) {\n\t\t\ttable = table[key];\n\t\t\tisTable(table) || throws(Error$1(`Trying to assign property through non-Table value` + where(' at ')));\n\t\t\tisInline(table) && throws(Error$1(`Trying to assign property through static Inline Table` + where(' at ')));\n\t\t\tfromPair(table) || throws(Error$1(`A table defined implicitly via [] can not be accessed to via key/value pair` + where(', which at ')));\n\t\t}\n\t\telse {\n\t\t\ttable = table[key] = new Table(IMPLICITLY, PAIR);\n\t\t\twhile ( index<length ) { table = table[keys[index++] ] = new Table(IMPLICITLY, PAIR); }\n\t\t\treturn table;\n\t\t}\n\t}\n\treturn table;\n};\n\nconst checkLiteralString = (literal ) => {\n\t__CONTROL_CHARACTER_EXCLUDE_test(literal) && throws(SyntaxError$1(`Control characters other than Tab are not permitted in a Literal String` + where(', which was found at ')));\n\treturn literal;\n};\n\nconst assignLiteralString = ( (table , finalKey , literal ) => {\n\tif ( !literal.startsWith(`'''`) ) {\n\t\tconst $ = LITERAL_STRING_exec(literal) || throws(SyntaxError$1(`Bad literal string` + where(' at ')));\n\t\tconst value = checkLiteralString($[1]);\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, value.length + 2), value) : value;\n\t\treturn $[2];\n\t}\n\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(literal.slice(3));\n\tif ( $ ) {\n\t\tconst value = checkLiteralString($[1]) + $[2];\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, value.length + 6), value) : value;\n\t\treturn $[3];\n\t}\n\tconst start = new mark('Multi-line Literal String', literal.length);\n\tconst leadingNewline = !( literal = literal.slice(3) );\n\tif ( leadingNewline ) {\n\t\tliteral = start.must();\n\t\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(literal);\n\t\tif ( $ ) {\n\t\t\tconst value = checkLiteralString($[1]) + $[2];\n\t\t\ttable[finalKey] = preserveLiteral ? LiteralObject([ `'''`, literal.slice(0, value.length + 3) ], value) : value;\n\t\t\treturn $[3];\n\t\t}\n\t}\n\tuseWhatToJoinMultilineString===null && start.nowrap(ARGS_MODE);\n\tfor ( const lines = [ checkLiteralString(literal) ]; ; ) {\n\t\tconst line = start.must();\n\t\tconst $ = __MULTI_LINE_LITERAL_STRING_exec(line);\n\t\tif ( $ ) {\n\t\t\tlines[lines.length] = checkLiteralString($[1]) + $[2];\n\t\t\tconst value = lines.join(useWhatToJoinMultilineString );\n\t\t\tif ( preserveLiteral ) {\n\t\t\t\tlines[lines.length - 1] += `'''`;\n\t\t\t\tleadingNewline ? lines.unshift(`'''`) : lines[0] = `'''${literal}`;\n\t\t\t\ttable[finalKey] = LiteralObject(lines, value);\n\t\t\t}\n\t\t\telse { table[finalKey] = value; }\n\t\t\treturn $[3];\n\t\t}\n\t\tlines[lines.length] = checkLiteralString(line);\n\t}\n} ) \n\t \n\t \n ;\n\nconst assignBasicString = ( (table , finalKey , literal ) => {\n\tif ( !literal.startsWith('\"\"\"') ) {\n\t\tconst index = BASIC_STRING_exec_1_endIndex(literal);\n\t\tconst value = BasicString(literal.slice(1, index));\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, index + 1), value) : value;\n\t\treturn literal.slice(index + 1).replace(PRE_WHITESPACE, '');\n\t}\n\tlet length = 3 + MULTI_LINE_BASIC_STRING_exec_0_length(literal.slice(3));\n\tif ( literal.length!==length ) {\n\t\tconst $ = literal.slice(3, length);\n\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\tconst value = BasicString($) + ( literal.startsWith('\"', length += 3) ? literal.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\ttable[finalKey] = preserveLiteral ? LiteralObject(literal.slice(0, length), value) : value;\n\t\treturn literal.slice(length).replace(PRE_WHITESPACE, '');\n\t}\n\tconst start = new mark('Multi-line Basic String', length);\n\tconst skipped = ( literal = literal.slice(3) ) ? 0 : 1;\n\tif ( skipped ) {\n\t\tliteral = start.must();\n\t\tlet length = MULTI_LINE_BASIC_STRING_exec_0_length(literal);\n\t\tif ( literal.length!==length ) {\n\t\t\tconst $ = literal.slice(0, length);\n\t\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\t\tconst value = MultilineBasicString($, useWhatToJoinMultilineString , skipped) + ( literal.startsWith('\"', length += 3) ? literal.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\t\ttable[finalKey] = preserveLiteral ? LiteralObject([ '\"\"\"', literal.slice(0, length) ], value) : value;\n\t\t\treturn literal.slice(length).replace(PRE_WHITESPACE, '');\n\t\t}\n\t}\n\tuseWhatToJoinMultilineString===null && start.nowrap(ARGS_MODE);\n\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test(literal + '\\n') || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\tfor ( const lines = [ literal ]; ; ) {\n\t\tconst line = start.must();\n\t\tlet length = MULTI_LINE_BASIC_STRING_exec_0_length(line);\n\t\tif ( line.length!==length ) {\n\t\t\tconst $ = line.slice(0, length);\n\t\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test($) || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\t\tconst value = MultilineBasicString(lines.join('\\n') + '\\n' + $, useWhatToJoinMultilineString , skipped) + ( line.startsWith('\"', length += 3) ? line.startsWith('\"', ++length) ? ( ++length, '\"\"' ) : '\"' : '' );\n\t\t\tif ( preserveLiteral ) {\n\t\t\t\tskipped ? lines.unshift('\"\"\"') : lines[0] = `\"\"\"${literal}`;\n\t\t\t\tlines[lines.length] = `${$}\"\"\"`;\n\t\t\t\ttable[finalKey] = LiteralObject(lines, value);\n\t\t\t}\n\t\t\telse { table[finalKey] = value; }\n\t\t\treturn line.slice(length).replace(PRE_WHITESPACE, '');\n\t\t}\n\t\tESCAPED_EXCLUDE_CONTROL_CHARACTER_test(line + '\\n') || throws(SyntaxError$1(`Bad multi-line basic string` + where(' at ')));\n\t\tlines[lines.length] = line;\n\t}\n} ) \n\t \n\t \n ;\n\nconst KEYS = /*#__PURE__*/Null$1 (null);\nconst commentFor = (key ) => KEYS[key] || ( KEYS[key] = Symbol$1(key) );\nconst commentForThis = Symbol$1('this') ;\n\nconst { test: includesNewline } = theRegExp(/\\r?\\n/g);\nconst getCOMMENT = (table , keyComment ) => {\n\tif ( keyComment in table ) {\n\t\tconst comment = table[keyComment];\n\t\tif ( typeof comment!=='string' ) { throw TypeError$1(`the value of comment must be a string, while \"${comment===null ? 'null' : typeof comment}\" type is found`); }\n\t\tif ( includesNewline(comment) ) { throw SyntaxError$1(`the value of comment must be a string and can not include newline`); }\n\t\treturn ` #${comment}`;///\n\t}\n\treturn '';\n};\nconst getComment = (table , key ) => key in KEYS ? getCOMMENT(table, KEYS[key] ) : '';\n\nconst { test: IS_OFFSET$ } = theRegExp(OFFSET$);\nconst { test: IS_EMPTY } = theRegExp(/^\\[[\\t ]*]/);\n\nconst parseKeys = (rest ) => {\n\tlet lineRest = rest;\n\tconst leadingKeys = [];\n\tlet lastIndex = -1;\n\tfor ( ; ; ) {\n\t\tlineRest || throws(SyntaxError$1(`Empty bare key` + where(' at ')));\n\t\tif ( lineRest[0]==='\"' ) {\n\t\t\tconst index = BASIC_STRING_exec_1_endIndex(lineRest);\n\t\t\tKEYS$1.test(leadingKeys[++lastIndex] = BasicString(lineRest.slice(1, index))) || throws(Error$1(`Key not allowed` + where(' at ')));\n\t\t\tlineRest = lineRest.slice(index + 1);\n\t\t}\n\t\telse {\n\t\t\tconst isQuoted = lineRest[0]==='\\'';\n\t\t\tconst key = ( ( isQuoted ? __LITERAL_KEY_exec : __BARE_KEY_exec )(lineRest) || throws(SyntaxError$1(`Bad ${isQuoted ? 'literal string' : 'bare'} key` + where(' at '))) )[0];\n\t\t\tlineRest = lineRest.slice(key.length);\n\t\t\tKEYS$1.test(leadingKeys[++lastIndex] = isQuoted ? key.slice(1, -1) : key) || throws(Error$1(`Key not allowed` + where(' at ')));\n\t\t}\n\t\tif ( IS_DOT_KEY(lineRest) ) { lineRest = lineRest.replace(DOT_KEY, ''); }\n\t\telse { break; }\n\t}\n\tif ( disableDigit ) {\n\t\tconst keys = rest.slice(0, -lineRest.length);\n\t\t( isAmazing(keys) || enableNull && keys==='null' ) && throws(SyntaxError$1(`Bad bare key disabled by xOptions.string` + where(' at ')));\n\t}\n\tif ( disallowEmptyKey ) {\n\t\tlet index = lastIndex;\n\t\tdo { leadingKeys[index] || throws(SyntaxError$1(`Empty key is not allowed before TOML v0.5` + where(', which at '))); }\n\t\twhile ( index-- );\n\t}\n\tconst finalKey = leadingKeys[lastIndex] ;\n\tleadingKeys.length = lastIndex;\n\treturn { leadingKeys, finalKey, lineRest };\n};\n\nconst push = (lastArray , lineRest ) => {\n\tif ( lineRest[0]==='<' ) {\n\t\tconst { 1: tag } = { 2: lineRest } = _VALUE_PAIR_exec(lineRest) || throws(SyntaxError$1(`Bad tag ` + where(' at ')));\n\t\tcollect(tag, lastArray, null);\n\t\tswitch ( lineRest && lineRest[0] ) {\n\t\t\tcase ',':\n\t\t\tcase ']':\n\t\t\tcase '':\n\t\t\tcase '#':\n\t\t\t\tlastArray[lastArray.length] = undefined$1;\n\t\t\t\treturn lineRest;\n\t\t}\n\t}\n\tswitch ( lineRest[0] ) {\n\t\tcase '\\'':\n\t\t\treturn assignLiteralString(asStrings(lastArray), lastArray.length, lineRest);\n\t\tcase '\"':\n\t\t\treturn assignBasicString(asStrings(lastArray), lastArray.length, lineRest);\n\t\tcase '{':\n\t\t\tinlineTable || throws(SyntaxError$1(`Inline Table is not allowed before TOML v0.4` + where(', which at ')));\n\t\t\treturn equalInlineTable(asTables(lastArray), lastArray.length, lineRest);\n\t\tcase '[':\n\t\t\treturn equalStaticArray(asArrays(lastArray), lastArray.length, lineRest);\n\t}\n\tconst { 1: literal } = { 2: lineRest } = VALUE_REST_exec(lineRest) || throws(SyntaxError$1(`Bad atom value` + where(' at ')));\n\tif ( literal==='true' ) { asBooleans(lastArray)[lastArray.length] = true; }\n\telse if ( literal==='false' ) { asBooleans(lastArray)[lastArray.length] = false; }\n\telse if ( enableNull && literal==='null' ) { asNulls(lastArray)[lastArray.length] = null; }\n\telse if ( literal.includes(':') ) {\n\t\tif ( literal.includes('-') ) {\n\t\t\tif ( IS_OFFSET$(literal) ) {\n\t\t\t\tasOffsetDateTimes(lastArray)[lastArray.length] = new OffsetDateTime(literal);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Date-Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\t\tasLocalDateTimes(lastArray)[lastArray.length] = new LocalDateTime(literal);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\tasLocalTimes(lastArray)[lastArray.length] = new LocalTime(literal);\n\t\t}\n\t}\n\telse if ( literal.indexOf('-')!==literal.lastIndexOf('-') && literal[0]!=='-' ) {\n\t\tmoreDatetime || throws(SyntaxError$1(`Local Date is not allowed before TOML v0.5` + where(', which at ')));\n\t\tasLocalDates(lastArray)[lastArray.length] = new LocalDate(literal);\n\t}\n\telse {\n\t\tliteral.includes('.') || literal.includes('n') || ( literal.includes('e') || literal.includes('E') ) && !literal.startsWith('0x')\n\t\t\t? asFloats(lastArray)[lastArray.length] = preserveLiteral ? LiteralObject(literal, Float(literal)) : Float(literal)\n\t\t\t: asIntegers(lastArray)[lastArray.length] = preserveLiteral ? LiteralObject(literal, Integer(literal)) : Integer(literal)\n\t\t;\n\t}\n\treturn lineRest;\n};\n\nconst equalStaticArray = function * ( table , finalKey , lineRest ) {\n\tconst staticArray = table[finalKey] = newArray(STATICALLY);\n\tif ( IS_EMPTY(lineRest) ) {\n\t\tbeInline(staticArray, lineRest[1]===']' ? 0 : 3);\n\t\treturn lineRest.slice(lineRest.indexOf(']')).replace(SYM_WHITESPACE, '');\n\t}\n\tconst start = new mark('Static Array', lineRest.length);\n\tlet inline = lineRest.startsWith('[ ') || lineRest.startsWith('[\\t') ? 3 : 0;\n\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\tinline = null;\n\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t}\n\tif ( lineRest[0]===']' ) {\n\t\tinline===null || beInline(staticArray, inline);\n\t\treturn lineRest.replace(SYM_WHITESPACE, '');\n\t}\n\tfor ( ; ; ) {\n\t\tconst rest = push(staticArray, lineRest);\n\t\tlineRest = typeof rest==='string' ? rest : yield rest;\n\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\tinline = null;\n\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t}\n\t\tif ( lineRest[0]===',' ) {\n\t\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\t\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\t\tinline = null;\n\t\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t\t}\n\t\t\tif ( lineRest[0]===']' ) { break; }\n\t\t}\n\t\telse {\n\t\t\tif ( lineRest[0]===']' ) { break; }\n\t\t\tthrow throws(SyntaxError$1(`Unexpect character in static array item value` + where(', which is found at ')));\n\t\t}\n\t}\n\tinline===null || beInline(staticArray, inline);\n\treturn lineRest.replace(SYM_WHITESPACE, '');\n} \n\t \n\t \n ;\n\nconst equalInlineTable = function * ( table , finalKey , lineRest ) {\n\tconst inlineTable = table[finalKey] = new Table(DIRECTLY, INLINE);\n\tif ( allowInlineTableMultilineAndTrailingCommaEvenNoComma ) {\n\t\tconst start = new mark('Inline Table', lineRest.length);\n\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '');\n\t\tlet inline = true;\n\t\tfor ( ; ; ) {\n\t\t\twhile ( !lineRest || lineRest[0]==='#' ) {\n\t\t\t\tinline = false;\n\t\t\t\tlineRest = start.must().replace(PRE_WHITESPACE, '');\n\t\t\t}\n\t\t\tif ( lineRest[0]==='}' ) { break; }\n\t\t\tconst forComment = ForComment(inlineTable, lineRest);\n\t\t\tconst rest = assign(forComment);\n\t\t\tlineRest = typeof rest==='string' ? rest : yield rest;\n\t\t\tif ( lineRest ) {\n\t\t\t\tif ( lineRest[0]==='#' ) {\n\t\t\t\t\tif ( preserveComment ) { forComment.table[commentFor(forComment.finalKey)] = lineRest.slice(1); }\n\t\t\t\t\tinline = false;\n\t\t\t\t\tdo { lineRest = start.must().replace(PRE_WHITESPACE, ''); }\n\t\t\t\t\twhile ( !lineRest || lineRest[0]==='#' );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinline = false;\n\t\t\t\tdo { lineRest = start.must().replace(PRE_WHITESPACE, ''); }\n\t\t\t\twhile ( !lineRest || lineRest[0]==='#' );\n\t\t\t}\n\t\t\tif ( lineRest[0]===',' ) { lineRest = lineRest.replace(SYM_WHITESPACE, ''); }\n\t\t}\n\t\tinline || beInline(inlineTable, false);\n\t}\n\telse {\n\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '') || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\tif ( lineRest[0]!=='}' ) {\n\t\t\tfor ( ; ; ) {\n\t\t\t\tlineRest[0]==='#' && throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\tconst rest = assign(ForComment(inlineTable, lineRest));\n\t\t\t\tlineRest = ( typeof rest==='string' ? rest : yield rest ) || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\tif ( lineRest[0]==='}' ) { break; }\n\t\t\t\tif ( lineRest[0]===',' ) {\n\t\t\t\t\tlineRest = lineRest.replace(SYM_WHITESPACE, '') || throws(SyntaxError$1(`Inline Table is intended to appear on a single line` + where(', which broken at ')));\n\t\t\t\t\tlineRest[0]==='}' && throws(SyntaxError$1(`The last property of an Inline Table can not have a trailing comma` + where(', which was found at ')));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn lineRest.replace(SYM_WHITESPACE, '');\n} \n\t \n\t \n ;\n\n \nconst ForComment = (lastInlineTable , lineRest ) => {\n\tconst { leadingKeys, finalKey, tag } = { lineRest } = KEY_VALUE_PAIR_exec_groups(parseKeys(lineRest));\n\treturn { table: prepareInlineTable(lastInlineTable, leadingKeys), finalKey, tag, lineRest };\n};\nconst assign = ({ finalKey, tag, lineRest, table } ) => {\n\tfinalKey in table && throws(Error$1(`Duplicate property definition` + where(' at ')));\n\tif ( tag ) {\n\t\tcollect(tag, null, table, finalKey);\n\t\tswitch ( lineRest && lineRest[0] ) {\n\t\t\tcase ',':\n\t\t\tcase '}':\n\t\t\tcase '':\n\t\t\tcase '#':\n\t\t\t\ttable[finalKey] = undefined$1;\n\t\t\t\treturn lineRest;\n\t\t}\n\t}\n\tswitch ( lineRest && lineRest[0] ) {\n\t\tcase '\\'':\n\t\t\treturn assignLiteralString(table, finalKey, lineRest);\n\t\tcase '\"':\n\t\t\treturn assignBasicString(table, finalKey, lineRest);\n\t\tcase '{':\n\t\t\tinlineTable || throws(SyntaxError$1(`Inline Table is not allowed before TOML v0.4` + where(', which at ')));\n\t\t\treturn equalInlineTable(table, finalKey, lineRest);\n\t\tcase '[':\n\t\t\treturn equalStaticArray(table, finalKey, lineRest);\n\t}\n\tconst { 1: literal } = { 2: lineRest } = VALUE_REST_exec(lineRest) || throws(SyntaxError$1(`Bad atom value` + where(' at ')));\n\tif ( literal==='true' ) { table[finalKey] = true; }\n\telse if ( literal==='false' ) { table[finalKey] = false; }\n\telse if ( enableNull && literal==='null' ) { table[finalKey] = null; }\n\telse if ( literal.includes(':') ) {\n\t\tif ( literal.includes('-') ) {\n\t\t\tif ( IS_OFFSET$(literal) ) {\n\t\t\t\ttable[finalKey] = new OffsetDateTime(literal);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Date-Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\t\ttable[finalKey] = new LocalDateTime(literal);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tmoreDatetime || throws(SyntaxError$1(`Local Time is not allowed before TOML v0.5` + where(', which at ')));\n\t\t\ttable[finalKey] = new LocalTime(literal);\n\t\t}\n\t}\n\telse if ( literal.indexOf('-')!==literal.lastIndexOf('-') && literal[0]!=='-' ) {\n\t\tmoreDatetime || throws(SyntaxError$1(`Local Date is not allowed before TOML v0.5` + where(', which at ')));\n\t\ttable[finalKey] = new LocalDate(literal);\n\t}\n\telse {\n\t\ttable[finalKey] = literal.includes('.') || literal.includes('n') || ( literal.includes('e') || literal.includes('E') ) && !literal.startsWith('0x')\n\t\t\t? preserveLiteral ? LiteralObject(literal, Float(literal)) : Float(literal)\n\t\t\t: preserveLiteral ? LiteralObject(literal, Integer(literal)) : Integer(literal)\n\t\t;\n\t}\n\treturn lineRest;\n};\n\nconst Root = () => {\n\tconst rootTable = new Table;\n\tlet lastSectionTable = rootTable;\n\twhile ( rest() ) {\n\t\tconst line = next().replace(PRE_WHITESPACE, '');\n\t\tif ( line ) {\n\t\t\tif ( line[0]==='[' ) {\n\t\t\t\tconst { leadingKeys, finalKey, asArrayItem, tag, lineRest } = TABLE_DEFINITION_exec_groups(line, parseKeys);\n\t\t\t\tconst table = prepareTable(rootTable, leadingKeys);\n\t\t\t\tif ( lineRest ) {\n\t\t\t\t\tlineRest[0]==='#' || throws(SyntaxError$1(`Unexpect charachtor after table header` + where(' at ')));\n\t\t\t\t}\n\t\t\t\tlastSectionTable = appendTable(table, finalKey, asArrayItem, tag);\n\t\t\t\tpreserveComment && lineRest && ( lastSectionTable[commentForThis] = asArrayItem ? lineRest.slice(1) : table[commentFor(finalKey)] = lineRest.slice(1) );\n\t\t\t}\n\t\t\telse if ( line[0]==='#' ) {\n\t\t\t\t__CONTROL_CHARACTER_EXCLUDE_test(line) && throws(SyntaxError$1(`Control characters other than Tab are not permitted in comments` + where(', which was found at ')));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst forComment = ForComment(lastSectionTable, line);\n\t\t\t\tlet rest = assign(forComment);\n\t\t\t\ttypeof rest==='string' || ( rest = x (rest) );\n\t\t\t\tif ( rest ) {\n\t\t\t\t\trest[0]==='#' || throws(SyntaxError$1(`Unexpect charachtor after key/value pair` + where(' at ')));\n\t\t\t\t\tif ( preserveComment ) { forComment.table[commentFor(forComment.finalKey)] = rest.slice(1); }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn rootTable;\n};\n\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n\nconst DATE = Date.prototype;\n\nconst valueOf$2 = String.prototype.valueOf;\n\nconst isString = (\n\t/* j-globals: class.isString (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf$2);\n\t\t\treturn function isString (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isString (value) {\n\t\t\ttry { valueOf$2.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isString (internal) */\n);\n\nconst valueOf$1 = Number.prototype.valueOf;\n\nconst isNumber = (\n\t/* j-globals: class.isNumber (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf$1);\n\t\t\treturn function isNumber (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isNumber (value) {\n\t\t\ttry { valueOf$1.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isNumber (internal) */\n);\n\nconst isBigInt = (\n\t/* j-globals: class.isBigInt (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( typeof BigInt==='function' ) {\n\t\t\tvar valueOf_apply = apply.bind(BigInt.prototype.valueOf);\n\t\t\treturn function isBigInt (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isBigInt () { return false; };\n\t}()\n\t/* j-globals: class.isBigInt (internal) */\n);\n\nconst valueOf = BigInt.prototype.valueOf;\n\nconst isBoolean = (\n\t/* j-globals: class.isBoolean (internal) */\n\t/*#__PURE__*/ function () {\n\t\tif ( apply.bind ) {\n\t\t\tvar valueOf_apply = apply.bind(valueOf);\n\t\t\treturn function isBoolean (value) {\n\t\t\t\ttry { valueOf_apply(value); }\n\t\t\t\tcatch (error) { return false; }\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\t\treturn function isBoolean (value) {\n\t\t\ttry { valueOf.apply(value); }\n\t\t\tcatch (error) { return false; }\n\t\t\treturn true;\n\t\t};\n\t}()\n\t/* j-globals: class.isBoolean (internal) */\n);\n\nconst ESCAPED = /*#__PURE__*/Null$1 ({\n\t.../*#__PURE__*/fromEntries(/*#__PURE__*/[ ...Array$1(0x20) ].map((_, charCode) => [ fromCharCode(charCode), '\\\\u' + charCode.toString(16).toUpperCase().padStart(4, '0') ])),\n\t'\\b': '\\\\b',\n\t'\\t': '\\\\t',\n\t'\\n': '\\\\n',\n\t'\\f': '\\\\f',\n\t'\\r': '\\\\r',\n\t'\"': '\\\\\"',\n\t'\"\"\"': '\"\"\\\\\"',\n\t'\\\\': '\\\\\\\\',\n\t'\\x7F': '\\\\u007F',\n});\n\nconst { test: NEED_BASIC } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F'\\x7F]/);\nconst BY_ESCAPE = /[^\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]+|./gs;\nconst { test: NEED_ESCAPE } = theRegExp(/^[\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]/);\nconst singlelineString = (value ) => {\n\tif ( NEED_BASIC(value) ) {\n\t\tconst parts = value.match(BY_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\treturn `\"${parts.join('')}\"`;\n\t}\n\treturn `'${value}'`;\n};\nconst singlelineBasicString = (value ) => {\n\tif ( value ) {\n\t\tconst parts = value.match(BY_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\treturn `\"${parts.join('')}\"`;\n\t}\n\treturn `\"\"`;\n};\n\nconst { test: NEED_MULTILINE_BASIC } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F\\x7F]|'''/);\nconst { test: multilineNeedBasic } = theRegExp(/[\\x00-\\x08\\x0B-\\x1F\\x7F]|'''/);\nconst { test: REAL_MULTILINE_ESCAPE } = theRegExp(/[\\x00-\\x08\\x0A-\\x1F\\\\\\x7F]|\"\"\"/);\nconst BY_MULTILINE_ESCAPE = /[^\\x00-\\x08\\x0A-\\x1F\"\\\\\\x7F]+|\"\"\"|./gs;\nconst { test: NEED_MULTILINE_ESCAPE } = theRegExp(/^(?:[\\x00-\\x08\\x0A-\\x1F\\\\\\x7F]|\"\"\")/);\nconst escape_multiline = (lines , lineIndex ) => {\n\tconst line = lines[lineIndex] ;\n\tif ( REAL_MULTILINE_ESCAPE(line) ) {\n\t\tconst parts = line.match(BY_MULTILINE_ESCAPE) ;\n\t\tlet index = parts.length;\n\t\tdo { if ( NEED_MULTILINE_ESCAPE(parts[--index] ) ) { parts[index] = ESCAPED[parts[index] ] ; } }\n\t\twhile ( index );\n\t\tlines[lineIndex] = parts.join('');\n\t}\n};\n\n \nconst Lines = (lines ) => ( lines = [ '', ...lines ] ).length===1 ? [ '', '' ] : lines ;\n\nconst multilineString = (lines ) => {\n\tconst lastIndex = lines.length - 1;\n\tlet index = lastIndex;\n\tdo { if ( NEED_MULTILINE_BASIC(lines[index] ) ) { break; } }\n\twhile ( --index );\n\tif ( index ) {\n\t\tindex = lastIndex;\n\t\tescape_multiline(lines, index);\n\t\tlines[index] += lines[0] = '\"\"\"';\n\t\twhile ( --index ) { escape_multiline(lines, index); }\n\t}\n\telse { lines[lastIndex] += lines[0] = '\\'\\'\\''; }\n\treturn lines ;\n};\n\nconst multilineBasicString = (lines ) => {\n\tlet index = lines.length - 1;\n\tescape_multiline(lines, index);\n\tlines[index] += lines[0] = '\"\"\"';\n\twhile ( --index ) { escape_multiline(lines, index); }\n\treturn lines ;\n};\n\nconst multilineLiteralString = (lines ) => {\n\tlines[lines.length - 1] += lines[0] = '\\'\\'\\'';\n\treturn lines ;\n};\n\nconst Float64Array$1 = Float64Array;\n\nconst Uint8Array$1 = Uint8Array;\n\nconst _Infinity = -Infinity;\n\nconst { test: INTEGER_LIKE } = theRegExp(/^-?\\d+$/);\nconst ensureFloat = (literal ) => INTEGER_LIKE(literal) ? literal + '.0' : literal;\n\nconst float64Array = new Float64Array$1([ NaN$1 ]);\nconst uint8Array = new Uint8Array$1(float64Array.buffer);\nconst NaN_7 = uint8Array[7] ;\n\nconst float = NaN_7===new Uint8Array$1(new Float64Array$1([ -NaN$1 ]).buffer)[7] \n\t? (value ) => value\n\t\t? value===Infinity ? 'inf' : value===_Infinity ? '-inf' : ensureFloat('' + value)\n\t\t: value===value ? is(value, 0) ? '0.0' : '-0.0' : 'nan'\n\t: (value ) => value\n\t\t? value===Infinity ? 'inf' : value===_Infinity ? '-inf' : ensureFloat('' + value)\n\t\t: value===value ? is(value, 0) ? '0.0' : '-0.0' : ( float64Array[0] = value, uint8Array[7] )===NaN_7 ? 'nan' : '-nan';\n\nconst isDate = /*#__PURE__*/isPrototypeOf.bind(DATE) ;\n\nconst { test: BARE } = theRegExp(/^[\\w-]+$/);\nconst $Key$ = (key ) => BARE(key) ? key : singlelineString(key);\n\nconst FIRST = /[^.]+/;\nconst literalString = (value ) => `'${value}'`;\nconst $Keys = (keys ) => isAmazing(keys) ? keys.replace(FIRST, literalString) : keys==='null' ? `'null'` : keys;\n\nclass TOMLSection extends Array$1 {\n\t\n\t document ;\n\t\n\tconstructor (document ) {\n\t\tsuper();\n\t\tthis.document = document;\n\t\treturn this;\n\t}\n\t\n\t[Symbol$1.toPrimitive] () { return this.join(this.document.newline); }\n\t\n\tappendNewline () { this[this.length] = ''; }\n\t set appendLine (source ) { this[this.length] = source; }\n\t set appendInline (source ) { this[this.length - 1] += source; } \n\t set appendInlineIf (source ) { source && ( this[this.length - 1] += source ); }///\n\t\n\t* assignBlock (documentKeys_ , sectionKeys_ , table , tableKeys ) {\n\t\tconst { document } = this;\n\t\tconst { newlineUnderHeader, newlineUnderSectionButPair } = document;\n\t\tconst newlineAfterDotted = sectionKeys_ ? document.newlineUnderPairButDotted : false;\n\t\tconst newlineAfterPair = sectionKeys_ ? document.newlineUnderDotted : document.newlineUnderPair;\n\t\tfor ( const tableKey of tableKeys ) {\n\t\t\tconst value = table[tableKey] ;\n\t\t\tconst $key$ = $Key$(tableKey);\n\t\t\tconst documentKeys = documentKeys_ + $key$;\n\t\t\tif ( isArray$1(value) ) {\n\t\t\t\tconst { length } = value;\n\t\t\t\tif ( length ) {\n\t\t\t\t\tlet firstItem = value[0];\n\t\t\t\t\tif ( isSection(firstItem) ) {\n\t\t\t\t\t\tconst tableHeader = `[[${documentKeys}]]` ;\n\t\t\t\t\t\tconst documentKeys_ = documentKeys + '.' ;\n\t\t\t\t\t\tlet index = 0;\n\t\t\t\t\t\tlet table = firstItem;\n\t\t\t\t\t\tfor ( ; ; ) {\n\t\t\t\t\t\t\tconst section = document.appendSection();\n\t\t\t\t\t\t\tsection[0] = tableHeader + getCOMMENT(table, commentForThis);\n\t\t\t\t\t\t\tif ( newlineUnderHeader ) {\n\t\t\t\t\t\t\t\tsection[1] = '';\n\t\t\t\t\t\t\t\tyield section.assignBlock(documentKeys_, ``, table, getOwnPropertyNames(table));\n\t\t\t\t\t\t\t\tnewlineUnderSectionButPair && section.length!==2 && section.appendNewline();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tyield section.assignBlock(documentKeys_, ``, table, getOwnPropertyNames(table));\n\t\t\t\t\t\t\t\tnewlineUnderSectionButPair && section.appendNewline();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( ++index===length ) { break; }\n\t\t\t\t\t\t\ttable = ( value )[index] ;\n\t\t\t\t\t\t\tif ( !isSection(table) ) { throw TypeError$1(`the first table item marked by Section() means the parent array is an array of tables, which can not include other types or table not marked by Section() any more in the rest items`); }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse { let index = 1; while ( index!==length ) { if ( isSection(value[index++] ) ) { throw TypeError$1(`if an array is not array of tables, it can not include any table that marked by Section()`); } } }\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( isSection(value) ) {\n\t\t\t\t\tconst section = document.appendSection();\n\t\t\t\t\tsection[0] = `[${documentKeys}]${\n\t\t\t\t\t\tdocument.preferCommentForThis\n\t\t\t\t\t\t\t? getCOMMENT(value, commentForThis) || getComment(table, tableKey)\n\t\t\t\t\t\t\t: getComment(table, tableKey) || getCOMMENT(value, commentForThis)\n\t\t\t\t\t}`;\n\t\t\t\t\tif ( newlineUnderHeader ) {\n\t\t\t\t\t\tsection[1] = '';\n\t\t\t\t\t\tyield section.assignBlock(documentKeys + '.' , ``, value, getOwnPropertyNames(value));\n\t\t\t\t\t\tnewlineUnderSectionButPair && section.length!==2 && section.appendNewline();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tyield section.assignBlock(documentKeys + '.' , ``, value, getOwnPropertyNames(value));\n\t\t\t\t\t\tnewlineUnderSectionButPair && section.appendNewline();\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst sectionKeys = sectionKeys_ + $key$;\n\t\t\tthis.appendLine = $Keys(sectionKeys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value('', value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\t--this.length;\n\t\t\t\tyield this.assignBlock(documentKeys + '.' , sectionKeys + '.' , value , valueKeysIfValueIsDottedTable);\n\t\t\t\tnewlineAfterDotted && this.appendNewline();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.appendInlineIf = getComment(table, tableKey);\n\t\t\t\tnewlineAfterPair && this.appendNewline();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t value (indent , value , returnValueKeysIfValueIsDottedTable ) {\n\t\tswitch ( typeof value ) {\n\t\t\tcase 'object':\n\t\t\t\tif ( value===null ) {\n\t\t\t\t\tif ( this.document.nullDisabled ) { throw TypeError$1(`toml can not stringify \"null\" type value without truthy options.xNull`); }\n\t\t\t\t\tthis.appendInline = 'null';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst inlineMode = ofInline(value);\n\t\t\t\tif ( isArray$1(value) ) {\n\t\t\t\t\tif ( inlineMode===undefined$1 ) { this.staticArray(indent, value); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst { $singlelineArray = inlineMode } = this.document;\n\t\t\t\t\t\tthis.singlelineArray(indent, value, $singlelineArray);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( inlineMode!==undefined$1 ) {\n\t\t\t\t\tinlineMode || this.document.multilineTableDisabled\n\t\t\t\t\t\t? this.inlineTable(indent, value )\n\t\t\t\t\t\t: this.multilineTable(indent, value , this.document.multilineTableComma);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( isDate(value) ) {\n\t\t\t\t\tthis.appendInline = value.toISOString().replace('T', this.document.T).replace('Z', this.document.Z);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( _literal in value ) {\n\t\t\t\t\tconst literal = ( value )[_literal];\n\t\t\t\t\tif ( typeof literal==='string' ) { this.appendInline = literal; }\n\t\t\t\t\telse if ( isArray$1(literal) ) {\n\t\t\t\t\t\tconst { length } = literal;\n\t\t\t\t\t\tif ( length ) {\n\t\t\t\t\t\t\tthis.appendInline = literal[0];\n\t\t\t\t\t\t\tlet index = 1;\n\t\t\t\t\t\t\twhile ( index!==length ) { this.appendLine = literal[index++] ; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { throw TypeError$1(`literal value is broken`); }\n\t\t\t\t\t}\n\t\t\t\t\telse { throw TypeError$1(`literal value is broken`); }\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( isString(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object String]`); }\n\t\t\t\tif ( isNumber(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object Number]`); }\n\t\t\t\tif ( isBigInt(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object BigInt]`); }\n\t\t\t\tif ( isBoolean(value) ) { throw TypeError$1(`TOML.stringify refuse to handle [object Boolean]`); }\n\t\t\t\tif ( returnValueKeysIfValueIsDottedTable ) {\n\t\t\t\t\tconst keys = getOwnPropertyNames(value );\n\t\t\t\t\tif ( keys.length ) { return keys; }\n\t\t\t\t\tthis.appendInline = '{ }';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.inlineTable(indent, value );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'bigint':\n\t\t\t\tthis.appendInline = '' + value;\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\tthis.appendInline = this.document.asInteger(value) ? is(value, -0) ? '-0' : '' + value : float(value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\tthis.appendInline = singlelineString(value);\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tthis.appendInline = value ? 'true' : 'false';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow TypeError$1(`toml can not stringify \"${typeof value}\" type value`);\n\t\t}\n\t\treturn null;\n\t}\n\t\n\t singlelineArray (indent , staticArray , inlineMode ) {\n\t\tconst { length } = staticArray;\n\t\tif ( length ) {\n\t\t\tthis.appendInline = inlineMode&0b10 ? '[ ' : '[';\n\t\t\tthis.value(indent, staticArray[0] , false);\n\t\t\tlet index = 1;\n\t\t\twhile ( index!==length ) {\n\t\t\t\tthis.appendInline = ', ';\n\t\t\t\tthis.value(indent, staticArray[index++] , false);\n\t\t\t}\n\t\t\tthis.appendInline = inlineMode&0b10 ? ' ]' : ']';\n\t\t}\n\t\telse { this.appendInline = inlineMode&0b01 ? '[ ]' : '[]'; }\n\t}\n\t staticArray (indent , staticArray ) {\n\t\tthis.appendInline = '[';\n\t\tconst indent_ = indent + this.document.indent;\n\t\tconst { length } = staticArray;\n\t\tlet index = 0;\n\t\twhile ( index!==length ) {\n\t\t\tthis.appendLine = indent_;\n\t\t\tthis.value(indent_, staticArray[index++] , false);\n\t\t\tthis.appendInline = ',';\n\t\t}\n\t\tthis.appendLine = indent + ']';\n\t}\n\t\n\t inlineTable (indent , inlineTable ) {\n\t\tconst keys = getOwnPropertyNames(inlineTable);\n\t\tif ( keys.length ) {\n\t\t\tthis.appendInline = '{ ';\n\t\t\tthis.assignInline(indent, inlineTable, ``, keys);\n\t\t\tthis[this.length - 1] = this[this.length - 1] .slice(0, -2) + ' }';\n\t\t}\n\t\telse { this.appendInline = '{ }'; }\n\t}\n\t multilineTable (indent , inlineTable , comma ) {\n\t\tthis.appendInline = '{';\n\t\tthis.assignMultiline(indent, inlineTable, ``, getOwnPropertyNames(inlineTable), comma);\n\t\tthis.appendLine = indent + '}';\n\t}\n\t assignInline (indent , inlineTable , keys_ , keys ) {\n\t\tfor ( const key of keys ) {\n\t\t\tconst value = inlineTable[key] ;\n\t\t\tconst keys = keys_ + $Key$(key);\n\t\t\tconst before_value = this.appendInline = $Keys(keys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value(indent, value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\tthis[this.length - 1] = this[this.length - 1] .slice(0, -before_value.length);\n\t\t\t\tthis.assignInline(indent, value , keys + '.' , valueKeysIfValueIsDottedTable);\n\t\t\t}\n\t\t\telse { this.appendInline = ', '; }\n\t\t}\n\t}\n\t assignMultiline (indent , inlineTable , keys_ , keys , comma ) {\n\t\tconst indent_ = indent + this.document.indent;\n\t\tfor ( const key of keys ) {\n\t\t\tconst value = inlineTable[key] ;\n\t\t\tconst keys = keys_ + $Key$(key);\n\t\t\tthis.appendLine = indent_ + $Keys(keys) + ' = ';\n\t\t\tconst valueKeysIfValueIsDottedTable = this.value(indent_, value, true);\n\t\t\tif ( valueKeysIfValueIsDottedTable ) {\n\t\t\t\t--this.length;\n\t\t\t\tthis.assignMultiline(indent, value , keys + '.' , valueKeysIfValueIsDottedTable, comma);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcomma\n\t\t\t\t\t? this.appendInline = ',' + getComment(inlineTable, key)\n\t\t\t\t\t: this.appendInlineIf = getComment(inlineTable, key);\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n\nconst name2code = /*#__PURE__*/Null$1({\n\tdocument: 0,\n\tsection: 1,\n\theader: 2,\n\tpairs: 3,\n\tpair: 4,\n} );\n\nconst { test: IS_INDENT } = theRegExp(/^[\\t ]*$/);\n\nconst return_false = () => false;\n\nclass TOMLDocument extends Array$1 {\n\t\n\t get ['constructor'] () { return Array$1; }\n\t\n\t0 = new TOMLSection(this);\n\t\n\t asInteger = return_false;\n\t newline = '';\n\t newlineUnderSection = true;\n\t newlineUnderSectionButPair = true;\n\t newlineUnderHeader = true;\n\t newlineUnderPair = false;\n\t newlineUnderPairButDotted = false;\n\t newlineUnderDotted = false;\n\t indent = '\\t';\n\t T = 'T';\n\t Z = 'Z';\n\t nullDisabled = true;\n\t multilineTableDisabled = true;\n\t multilineTableComma ;\n\t preferCommentForThis = false;\n\t $singlelineArray ;\n\t\n\tconstructor (options ) {\n\t\t\n\t\tsuper();\n\t\t\n\t\tif ( options==null ) { return this; }\n\t\t\n\t\tconst { integer } = options;\n\t\tif ( integer===undefined ) ;\n\t\telse if ( integer===MAX_SAFE_INTEGER ) { this.asInteger = isSafeInteger; }\n\t\telse if ( typeof integer==='number' ) {\n\t\t\tif ( !isSafeInteger(integer) ) { throw RangeError$1(`TOML.stringify(,{integer}) can only be a safe integer`); }\n\t\t\tconst max = integer>=0 ? integer : -integer - 1;\n\t\t\tconst min = integer>=0 ? -integer : integer;\n\t\t\tthis.asInteger = (number ) => isSafeInteger(number) && min<=number && number<=max;\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{integer}) can only be number`); }\n\t\t\n\t\tconst { newline } = options;\n\t\tif ( newline===undefined ) ;\n\t\telse if ( newline==='\\n' || newline==='\\r\\n' ) { this.newline = newline; }\n\t\telse {\n\t\t\tthrow typeof newline==='string'\n\t\t\t\t? SyntaxError$1(`TOML.stringify(,{newline}) can only be valid TOML newline`)\n\t\t\t\t: TypeError$1(`TOML.stringify(,{newline}) can only be string`);\n\t\t}\n\t\t\n\t\tconst { preferCommentFor } = options;\n\t\tif ( preferCommentFor===undefined ) ;\n\t\telse if ( preferCommentFor==='this' || preferCommentFor==='key' ) { this.preferCommentForThis = preferCommentFor==='this'; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{preferCommentFor) can only be 'key' or 'this'`); }\n\t\t\n\t\tconst { [options.newlineAround || 'header']: around = name2code.header } = name2code;\n\t\tthis.newlineUnderSection = around>0;\n\t\tthis.newlineUnderSectionButPair = around===1 || around===2;\n\t\tthis.newlineUnderHeader = around>1;\n\t\tthis.newlineUnderPair = around>2;\n\t\tthis.newlineUnderPairButDotted = around===3;\n\t\tthis.newlineUnderDotted = around>3;\n\t\t\n\t\tconst { indent } = options;\n\t\tif ( indent===undefined ) ;\n\t\telse if ( typeof indent==='string' ) {\n\t\t\tif ( !IS_INDENT(indent) ) { throw SyntaxError$1(`TOML.stringify(,{indent}) can only include Tab or Space`); }\n\t\t\tthis.indent = indent;\n\t\t}\n\t\telse if ( typeof indent==='number' ) {\n\t\t\tif ( !isSafeInteger(indent) ) { throw RangeError$1(`TOML.stringify(,{indent:${indent}}) is out of range`); }\n\t\t\tthis.indent = ' '.repeat(indent);\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{indent}) can not be \"${typeof indent}\" type`); }\n\t\t\n\t\tconst { T } = options;\n\t\tif ( T===undefined ) ;\n\t\telse if ( T===' ' || T==='t' || T==='T' ) { this.T = T; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{T}) can only be \"T\" or \" \" or \"t\"`); }\n\t\t\n\t\tconst { Z } = options;\n\t\tif ( Z===undefined ) ;\n\t\telse if ( Z==='z' || Z==='Z' ) { this.Z = Z; }\n\t\telse { throw TypeError$1(`TOML.stringify(,{Z}) can only be \"Z\" or \"z\"`); }\n\t\t\n\t\tif ( options.xNull ) { this.nullDisabled = false; }\n\t\t\n\t\tconst { xBeforeNewlineInMultilineTable } = options;\n\t\tif ( xBeforeNewlineInMultilineTable===undefined ) ;\n\t\telse if ( xBeforeNewlineInMultilineTable==='' || xBeforeNewlineInMultilineTable===',' ) {\n\t\t\tthis.multilineTableDisabled = false;\n\t\t\tthis.multilineTableComma = !!xBeforeNewlineInMultilineTable;\n\t\t}\n\t\telse { throw TypeError$1(`TOML.stringify(,{xBeforeNewlineInMultilineTable}) can only be \"\" or \",\"`); }\n\t\t\n\t\tconst $singlelineArray = options.forceInlineArraySpacing;\n\t\tswitch ( $singlelineArray ) {\n\t\t\tcase undefined:\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\tthis.$singlelineArray = $singlelineArray;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow typeof $singlelineArray==='number'\n\t\t\t\t\t? RangeError$1(`array inline mode must be 0 | 1 | 2 | 3, not including ${$singlelineArray}`)\n\t\t\t\t\t: TypeError$1(`array inline mode must be \"number\" type, not including ${$singlelineArray===null ? '\"null\"' : typeof $singlelineArray}`);\n\t\t}\n\t\t\n\t\treturn this;\n\t\t\n\t}\n\t\n\tappendSection () { return this[this.length] = new TOMLSection(this); }\n\t\n}\n\nconst linesFromStringify = new WeakSet$1 ();\nconst beLinesFromStringify = /*#__PURE__*/add.bind(linesFromStringify);\nconst isLinesFromStringify = /*#__PURE__*/has.bind(linesFromStringify);\nconst stringify = (rootTable , options ) => {\n\tconst document = new TOMLDocument(options);\n\tconst section = document[0];\n\tsection[0] = '';\n\tx (section.assignBlock(``, ``, rootTable, getOwnPropertyNames(rootTable)));\n\tdocument.newlineUnderSectionButPair && section.length!==1 && section.appendNewline();\n\tdocument.newlineUnderSection || document[document.length - 1] .appendNewline();\n\tif ( document.newline ) { return document.join(document.newline); }\n\tconst lines = document.flat();\n\tbeLinesFromStringify(lines);\n\treturn lines;\n};\nconst multiline = /*#__PURE__*/( () => {\n\tconst multiline = (value , string ) =>\n\t\ttypeof value==='string' ? LiteralObject(( multilineNeedBasic(value) ? multilineBasicString : multilineLiteralString )(( '\\n' + value ).split('\\n') ), value) :\n\t\t\tisArray$1(value) ? LiteralObject(multilineString(Lines(value)), typeof string==='string' ? string : Null$1(null)) :\n\t\t\t\tmultilineTable(value);\n\tmultiline.basic = (lines , string ) =>\n\t\ttypeof lines==='string'\n\t\t\t? LiteralObject(multilineBasicString(( '\\n' + lines ).split('\\n') ), lines)\n\t\t\t: LiteralObject(multilineBasicString(Lines(lines)), typeof string==='string' ? string : Null$1(null))\n\t;\n\tmultiline.array = multilineArray;\n\tfreeze(multiline);\n\treturn multiline;\n} )();\nconst basic = (value ) => LiteralObject(singlelineBasicString(value), value);\nconst literal = (literal , ...chars ) => {\n\tif ( typeof literal==='string' ) {\n\t\tif ( chars.length===1 ) {\n\t\t\treturn LiteralObject(literal.includes('\\n') ? literal.split('\\n') : literal, chars[0] );\n\t\t}\n\t}\n\telse {\n\t\tlet index = chars.length;\n\t\tif ( index ) {\n\t\t\tconst { raw } = literal;\n\t\t\tliteral = raw[index] ;\n\t\t\twhile ( index ) { chars[--index] += raw[index] ; }\n\t\t\tliteral = chars.join('') + literal;\n\t\t}\n\t\telse { literal = literal.raw[0] ; }\n\t}\n\treturn LiteralObject(literal.includes('\\n') ? literal.split('\\n') : literal, Null$1(null));\n};\n\nconst textDecoder = /*#__PURE__*/new TextDecoder$1('utf-8', Null$1({ fatal: true, ignoreBOM: false }));\nconst binary2string = (arrayBufferLike ) => {\n\tif ( isView(arrayBufferLike) ? arrayBufferLike.length!==arrayBufferLike.byteLength : !isArrayBuffer(arrayBufferLike) ) { throw TypeError$1(`only Uint8Array or ArrayBuffer is acceptable`); }\n\ttry { return textDecoder.decode(arrayBufferLike); }\n\tcatch { throw Error$1(`A TOML doc must be a (ful-scalar) valid UTF-8 file, without any unknown code point.`); }\n};\nconst isBinaryLike = (value ) => 'byteLength' in value;///\n\nconst { test: includesNonScalar } = theRegExp(/[\\uD800-\\uDFFF]/u);\nconst assertFulScalar = (string ) => {\n\tif ( clearRegExp$1(includesNonScalar(string)) ) { throw Error$1(`A TOML doc must be a (ful-scalar) valid UTF-8 file, without any uncoupled UCS-4 character code.`); }\n};\n\nlet holding = false;\n\nconst parse = (source , specificationVersion , multilineStringJoiner , bigint , x , argsMode ) => {\n\tlet sourcePath = '';\n\tif ( typeof source==='object' && source ) {\n\t\tif ( isArray$1(source) ) { throw TypeError$1(isLinesFromStringify(source) ? `TOML.parse(array from TOML.stringify(,{newline?}))` : `TOML.parse(array)`); }\n\t\telse if ( isBinaryLike(source) ) { source = binary2string(source); }\n\t\telse {\n\t\t\tsourcePath = source.path;\n\t\t\tif ( typeof sourcePath!=='string' ) { throw TypeError$1(`TOML.parse(source.path)`); }\n\t\t\tconst { data, require: req = typeof require==='function' ? require : undefined$1 } = source;\n\t\t\tif ( req ) {\n\t\t\t\tconst { resolve } = req;\n\t\t\t\tif ( resolve!=null ) {\n\t\t\t\t\tconst { paths } = resolve;\n\t\t\t\t\tif ( paths!=null ) {\n\t\t\t\t\t\tconst ret = apply$1(paths, resolve, [ '' ]);\n\t\t\t\t\t\tif ( ret!=null ) {\n\t\t\t\t\t\t\tconst val = ret[0];\n\t\t\t\t\t\t\tif ( val!=null ) {\n\t\t\t\t\t\t\t\tconst dirname_ = val.replace(/node_modules$/, '');\n\t\t\t\t\t\t\t\tif ( dirname_ ) {\n\t\t\t\t\t\t\t\t\tsourcePath = ( req )('path').resolve(dirname_, sourcePath);\n\t\t\t\t\t\t\t\t\tif ( typeof sourcePath!=='string' ) { throw TypeError$1(`TOML.parse(source.require('path').resolve)`); }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( data===undefined$1 ) {\n\t\t\t\t\tconst data = ( req )('fs').readFileSync(sourcePath);\n\t\t\t\t\tif ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\t\telse { throw TypeError$1(`TOML.parse(source.require('fs').readFileSync)`); }\n\t\t\t\t}\n\t\t\t\telse if ( typeof data==='string' ) { assertFulScalar(source = data); }\n\t\t\t\telse if ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\telse { throw TypeError$1(`TOML.parse(source.data)`); }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( data===undefined$1 ) { throw TypeError$1(`TOML.parse(source.data|source.require)`); }\n\t\t\t\telse if ( typeof data==='string' ) { assertFulScalar(source = data); }\n\t\t\t\telse if ( typeof data==='object' && data && isBinaryLike(data) ) { source = binary2string(data); }\n\t\t\t\telse { throw TypeError$1(`TOML.parse(source.data)`); }\n\t\t\t}\n\t\t}\n\t}\n\telse if ( typeof source==='string' ) { assertFulScalar(source); }\n\telse { throw TypeError$1(`TOML.parse(source)`); }\n\tlet joiner ;\n\tlet keys ;\n\tif ( typeof multilineStringJoiner==='object' && multilineStringJoiner ) {\n\t\tif ( bigint!==undefined$1 || x!==undefined$1 ) { throw TypeError$1(`options mode ? args mode`); }\n\t\tjoiner = multilineStringJoiner.joiner;\n\t\tbigint = multilineStringJoiner.bigint;\n\t\tkeys = multilineStringJoiner.keys;\n\t\tx = multilineStringJoiner.x;\n\t\targsMode = '';\n\t}\n\telse { joiner = multilineStringJoiner; }\n\tlet rootTable ;\n\tlet process ;\n\tif ( holding ) { throw Error$1(`parsing during parsing.`); }\n\tholding = true;\n\ttry {\n\t\tuse(specificationVersion, joiner, bigint, keys, x, argsMode);\n\t\ttodo(source, sourcePath);\n\t\tsource && source[0]==='\\uFEFF' && throws(TypeError$1(`TOML content (string) should not start with BOM (U+FEFF)` + where(' at ')));\n\t\trootTable = Root();\n\t\tprocess = Process();\n\t}\n\tfinally {\n\t\tdone();//clearWeakSets();\n\t\tclear();\n\t\tholding = false;\n\t\tclearRegExp$1();\n\t}\n\tprocess && process();\n\treturn rootTable;\n};\n\nconst parse$1 = /*#__PURE__*/assign$1(\n\t(source , specificationVersion , multilineStringJoiner , useBigInt , xOptions ) =>\n\t\ttypeof specificationVersion==='number'\n\t\t\t? parse(source, specificationVersion, multilineStringJoiner, useBigInt, xOptions, ',,')\n\t\t\t: parse(source, 1.0, specificationVersion , multilineStringJoiner , useBigInt , ',')\n\t,\n\t{\n\t\t'1.0': (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.1, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t1.0: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 1.0, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.5: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.5, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.4: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.4, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.3: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.3, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.2: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.2, multilineStringJoiner, useBigInt, xOptions, ','),\n\t\t0.1: (source , multilineStringJoiner , useBigInt , xOptions ) => parse(source, 0.1, multilineStringJoiner, useBigInt, xOptions, ','),\n\t}\n);\n\nconst _export = /*#__PURE__*/Default({\n\tversion,\n\tparse: parse$1,\n\tstringify,\n\tSection, inline, multiline, basic, literal, commentFor, commentForThis,\n\tOffsetDateTime, LocalDateTime, LocalDate, LocalTime,\n\tisInline, isSection,\n\tKeys,\n});\n\nreturn _export;\n\n}));\n\n//# sourceMappingURL=index.js.map","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nconst { Deflate, deflate, deflateRaw, gzip } = require('./lib/deflate');\n\nconst { Inflate, inflate, inflateRaw, ungzip } = require('./lib/inflate');\n\nconst constants = require('./lib/zlib/constants');\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = ungzip;\nmodule.exports.constants = constants;\n","'use strict';\n\n\nconst zlib_deflate = require('./zlib/deflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = zlib_deflate.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n this.result = utils.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nmodule.exports.Deflate = Deflate;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateRaw = deflateRaw;\nmodule.exports.gzip = gzip;\nmodule.exports.constants = require('./zlib/constants');\n","'use strict';\n\n\nconst zlib_inflate = require('./zlib/inflate');\nconst utils = require('./utils/common');\nconst strings = require('./utils/strings');\nconst msg = require('./zlib/messages');\nconst ZStream = require('./zlib/zstream');\nconst GZheader = require('./zlib/gzheader');\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = require('./zlib/constants');\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = utils.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n let status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = zlib_inflate.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n zlib_inflate.inflateReset(strm);\n status = zlib_inflate.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || msg[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nmodule.exports.Inflate = Inflate;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateRaw = inflateRaw;\nmodule.exports.ungzip = inflate;\nmodule.exports.constants = require('./zlib/constants');\n","'use strict';\n\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nmodule.exports.assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nmodule.exports.flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n","// String encode/decode helpers\n'use strict';\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nmodule.exports.string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nmodule.exports.buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nmodule.exports.utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = require('./trees');\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN,\n Z_DEFLATED\n} = require('./constants');\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42; /* zlib header -> BUSY_STATE */\n//#ifdef GZIP\nconst GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */\n//#endif\nconst EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */\nconst NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */\nconst COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */\nconst HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */\nconst BUSY_STATE = 113; /* deflate -> FINISH_STATE */\nconst FINISH_STATE = 666; /* stream complete */\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = msg[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) * 2) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n/* ===========================================================================\n * Slide the hash table when sliding the window down (could be avoided with 32\n * bit values at the expense of memory usage). We slide even when level == 0 to\n * keep the hash table consistent if we switch back to level > 0 later.\n */\nconst slide_hash = (s) => {\n let n, m;\n let p;\n let wsize = s.w_size;\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= wsize ? m - wsize : 0);\n } while (--n);\n n = wsize;\n//#ifndef FASTEST\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= wsize ? m - wsize : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n//#endif\n};\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output, except for\n * some deflate_stored() output, goes through this function so some\n * applications may wish to modify it to avoid allocating a large\n * strm->next_out buffer and copying into it. (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let n, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n slide_hash(s);\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n *\n * In case deflateParams() is used to later switch to a non-zero compression\n * level, s->matches (otherwise unused when storing) keeps track of the number\n * of hash table slides to perform. If s->matches is 1, then one hash table\n * slide will be done when switching. If s->matches is 2, the maximum value\n * allowed here, then the hash table will be cleared, since two or more slides\n * is the same as a clear.\n *\n * deflate_stored() is written to minimize the number of times an input byte is\n * copied. It is most efficient with large input and output buffers, which\n * maximizes the opportunites to have a single copy from next_in to next_out.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Smallest worthy block size when not flushing or finishing. By default\n * this is 32K. This can be as small as 507 bytes for memLevel == 1. For\n * large input and output buffers, the stored block size will be larger.\n */\n let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5;\n\n /* Copy as many min_block or larger stored blocks directly to next_out as\n * possible. If flushing, copy the remaining available input to next_out as\n * stored blocks, if there is enough space.\n */\n let len, left, have, last = 0;\n let used = s.strm.avail_in;\n do {\n /* Set len to the maximum size block that we can copy directly with the\n * available input data and output space. Set left to how much of that\n * would be copied from what's left in the window.\n */\n len = 65535/* MAX_STORED */; /* maximum deflate stored block length */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n if (s.strm.avail_out < have) { /* need room for header */\n break;\n }\n /* maximum stored block length that will fit in avail_out: */\n have = s.strm.avail_out - have;\n left = s.strstart - s.block_start; /* bytes left in window */\n if (len > left + s.strm.avail_in) {\n len = left + s.strm.avail_in; /* limit len to the input */\n }\n if (len > have) {\n len = have; /* limit len to the output */\n }\n\n /* If the stored block would be less than min_block in length, or if\n * unable to copy all of the available input when flushing, then try\n * copying to the window and the pending buffer instead. Also don't\n * write an empty block when flushing -- deflate() does that.\n */\n if (len < min_block && ((len === 0 && flush !== Z_FINISH) ||\n flush === Z_NO_FLUSH ||\n len !== left + s.strm.avail_in)) {\n break;\n }\n\n /* Make a dummy stored block in pending to get the header bytes,\n * including any pending bits. This also updates the debugging counts.\n */\n last = flush === Z_FINISH && len === left + s.strm.avail_in ? 1 : 0;\n _tr_stored_block(s, 0, 0, last);\n\n /* Replace the lengths in the dummy stored block with len. */\n s.pending_buf[s.pending - 4] = len;\n s.pending_buf[s.pending - 3] = len >> 8;\n s.pending_buf[s.pending - 2] = ~len;\n s.pending_buf[s.pending - 1] = ~len >> 8;\n\n /* Write the stored block header bytes. */\n flush_pending(s.strm);\n\n//#ifdef ZLIB_DEBUG\n// /* Update debugging counts for the data about to be copied. */\n// s->compressed_len += len << 3;\n// s->bits_sent += len << 3;\n//#endif\n\n /* Copy uncompressed bytes from the window to next_out. */\n if (left) {\n if (left > len) {\n left = len;\n }\n //zmemcpy(s->strm->next_out, s->window + s->block_start, left);\n s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out);\n s.strm.next_out += left;\n s.strm.avail_out -= left;\n s.strm.total_out += left;\n s.block_start += left;\n len -= left;\n }\n\n /* Copy uncompressed bytes directly from next_in to next_out, updating\n * the check value.\n */\n if (len) {\n read_buf(s.strm, s.strm.output, s.strm.next_out, len);\n s.strm.next_out += len;\n s.strm.avail_out -= len;\n s.strm.total_out += len;\n }\n } while (last === 0);\n\n /* Update the sliding window with the last s->w_size bytes of the copied\n * data, or append all of the copied data to the existing window if less\n * than s->w_size bytes were copied. Also update the number of bytes to\n * insert in the hash tables, in the event that deflateParams() switches to\n * a non-zero compression level.\n */\n used -= s.strm.avail_in; /* number of input bytes directly copied */\n if (used) {\n /* If any input was used, then no unused input remains in the window,\n * therefore s->block_start == s->strstart.\n */\n if (used >= s.w_size) { /* supplant the previous history */\n s.matches = 2; /* clear hash */\n //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);\n s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0);\n s.strstart = s.w_size;\n s.insert = s.strstart;\n }\n else {\n if (s.window_size - s.strstart <= used) {\n /* Slide the window down. */\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);\n s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart);\n s.strstart += used;\n s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;\n }\n s.block_start = s.strstart;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* If the last block was written to next_out, then done. */\n if (last) {\n return BS_FINISH_DONE;\n }\n\n /* If flushing and all input has been consumed, then done. */\n if (flush !== Z_NO_FLUSH && flush !== Z_FINISH &&\n s.strm.avail_in === 0 && s.strstart === s.block_start) {\n return BS_BLOCK_DONE;\n }\n\n /* Fill the window with any remaining input. */\n have = s.window_size - s.strstart;\n if (s.strm.avail_in > have && s.block_start >= s.w_size) {\n /* Slide the window down. */\n s.block_start -= s.w_size;\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n have += s.w_size; /* more space now */\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n if (have > s.strm.avail_in) {\n have = s.strm.avail_in;\n }\n if (have) {\n read_buf(s.strm, s.window, s.strstart, have);\n s.strstart += have;\n s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* There was not enough avail_out to write a complete worthy or flushed\n * stored block to next_out. Write a stored block to pending instead, if we\n * have enough input for a worthy block, or if flushing and there is enough\n * room for the remaining input as a stored block in the pending buffer.\n */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n /* maximum stored block length that will fit in pending: */\n have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have;\n min_block = have > s.w_size ? s.w_size : have;\n left = s.strstart - s.block_start;\n if (left >= min_block ||\n ((left || flush === Z_FINISH) && flush !== Z_NO_FLUSH &&\n s.strm.avail_in === 0 && left <= have)) {\n len = left > have ? have : left;\n last = flush === Z_FINISH && s.strm.avail_in === 0 &&\n len === left ? 1 : 0;\n _tr_stored_block(s, s.block_start, len, last);\n s.block_start += len;\n flush_pending(s.strm);\n }\n\n /* We've done all we can with the available input and output. */\n return last ? BS_FINISH_STARTED : BS_NEED_MORE;\n};\n\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.sym_buf = 0; /* buffer for distances and literals/lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.sym_next = 0; /* running index in sym_buf */\n this.sym_end = 0; /* symbol table full when sym_next reaches this */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\n/* =========================================================================\n * Check for a valid deflate stream state. Return 0 if ok, 1 if not.\n */\nconst deflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const s = strm.state;\n if (!s || s.strm !== strm || (s.status !== INIT_STATE &&\n//#ifdef GZIP\n s.status !== GZIP_STATE &&\n//#endif\n s.status !== EXTRA_STATE &&\n s.status !== NAME_STATE &&\n s.status !== COMMENT_STATE &&\n s.status !== HCRC_STATE &&\n s.status !== BUSY_STATE &&\n s.status !== FINISH_STATE)) {\n return 1;\n }\n return 0;\n};\n\n\nconst deflateResetKeep = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status =\n//#ifdef GZIP\n s.wrap === 2 ? GZIP_STATE :\n//#endif\n s.wrap ? INIT_STATE : BUSY_STATE;\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = -2;\n _tr_init(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (deflateStateCheck(strm) || strm.state.wrap !== 2) {\n return Z_STREAM_ERROR;\n }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n s.status = INIT_STATE; /* to pass state test in deflateReset() */\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n /* We overlay pending_buf and sym_buf. This works since the average size\n * for length/distance pairs over any compressed block is assured to be 31\n * bits or less.\n *\n * Analysis: The longest fixed codes are a length code of 8 bits plus 5\n * extra bits, for lengths 131 to 257. The longest fixed distance codes are\n * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest\n * possible fixed-codes length/distance pair is then 31 bits total.\n *\n * sym_buf starts one-fourth of the way into pending_buf. So there are\n * three bytes in sym_buf for every four bytes in pending_buf. Each symbol\n * in sym_buf is three bytes -- two for the distance and one for the\n * literal/length. As each symbol is consumed, the pointer to the next\n * sym_buf value to read moves forward three bytes. From that symbol, up to\n * 31 bits are written to pending_buf. The closest the written pending_buf\n * bits gets to the next sym_buf symbol to read is just before the last\n * code is written. At that time, 31*(n-2) bits have been written, just\n * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at\n * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1\n * symbols are written.) The closest the writing gets to what is unread is\n * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and\n * can range from 128 to 32768.\n *\n * Therefore, at a minimum, there are 142 bits of space between what is\n * written and what is read in the overlain buffers, so the symbols cannot\n * be overwritten by the compressed data. That space is actually 139 bits,\n * due to the three-bit fixed-code block header.\n *\n * That covers the case where either Z_FIXED is specified, forcing fixed\n * codes, or when the use of fixed codes is chosen, because that choice\n * results in a smaller compressed block than dynamic codes. That latter\n * condition then assures that the above analysis also covers all dynamic\n * blocks. A dynamic-code block will only be chosen to be emitted if it has\n * fewer bits than a fixed-code block would for the same set of symbols.\n * Therefore its average symbol length is assured to be less than 31. So\n * the compressed data for a dynamic block also cannot overwrite the\n * symbols from which it is being constructed.\n */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->sym_buf = s->pending_buf + s->lit_bufsize;\n s.sym_buf = s.lit_bufsize;\n\n //s->sym_end = (s->lit_bufsize - 1) * 3;\n s.sym_end = (s.lit_bufsize - 1) * 3;\n /* We avoid equality with lit_bufsize*3 because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\n/* ========================================================================= */\nconst deflate = (strm, flush) => {\n\n if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (strm.avail_in !== 0 && !strm.input) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Write the header */\n if (s.status === INIT_STATE && s.wrap === 0) {\n s.status = BUSY_STATE;\n }\n if (s.status === INIT_STATE) {\n /* zlib header */\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n//#ifdef GZIP\n if (s.status === GZIP_STATE) {\n /* gzip header */\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let left = (s.gzhead.extra.length & 0xffff) - s.gzindex;\n while (s.pending + left > s.pending_buf_size) {\n let copy = s.pending_buf_size - s.pending;\n // zmemcpy(s.pending_buf + s.pending,\n // s.gzhead.extra + s.gzindex, copy);\n s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending);\n s.pending = s.pending_buf_size;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex += copy;\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n left -= copy;\n }\n // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility\n // TypedArray.slice and TypedArray.from don't exist in IE10-IE11\n let gzhead_extra = new Uint8Array(s.gzhead.extra);\n // zmemcpy(s->pending_buf + s->pending,\n // s->gzhead->extra + s->gzindex, left);\n s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending);\n s.pending += left;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = NAME_STATE;\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = COMMENT_STATE;\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n }\n s.status = HCRC_STATE;\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n }\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK;\n }\n }\n//#endif\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = s.level === 0 ? deflate_stored(s, flush) :\n s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :\n s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush);\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nmodule.exports.deflateInit = deflateInit;\nmodule.exports.deflateInit2 = deflateInit2;\nmodule.exports.deflateReset = deflateReset;\nmodule.exports.deflateResetKeep = deflateResetKeep;\nmodule.exports.deflateSetHeader = deflateSetHeader;\nmodule.exports.deflate = deflate;\nmodule.exports.deflateEnd = deflateEnd;\nmodule.exports.deflateSetDictionary = deflateSetDictionary;\nmodule.exports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateGetDictionary = deflateGetDictionary;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = require('./adler32');\nconst crc32 = require('./crc32');\nconst inflate_fast = require('./inffast');\nconst inflate_table = require('./inftrees');\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH, Z_BLOCK, Z_TREES,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Z_BUF_ERROR,\n Z_DEFLATED\n} = require('./constants');\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 16180; /* i: waiting for magic header */\nconst FLAGS = 16181; /* i: waiting for method and flags (gzip) */\nconst TIME = 16182; /* i: waiting for modification time (gzip) */\nconst OS = 16183; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 16184; /* i: waiting for extra length (gzip) */\nconst EXTRA = 16185; /* i: waiting for extra bytes (gzip) */\nconst NAME = 16186; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 16187; /* i: waiting for end of comment (gzip) */\nconst HCRC = 16188; /* i: waiting for header crc (gzip) */\nconst DICTID = 16189; /* i: waiting for dictionary check value */\nconst DICT = 16190; /* waiting for inflateSetDictionary() call */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 16193; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 16194; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16195; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 16196; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 16197; /* i: waiting for code length code lengths */\nconst CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 16199; /* i: same as LEN below, but only first time in */\nconst LEN = 16200; /* i: waiting for length/lit/eob code */\nconst LENEXT = 16201; /* i: waiting for length extra bits */\nconst DIST = 16202; /* i: waiting for distance code */\nconst DISTEXT = 16203; /* i: waiting for distance extra bits */\nconst MATCH = 16204; /* o: waiting for output space to copy string */\nconst LIT = 16205; /* o: waiting for output space to write literal */\nconst CHECK = 16206; /* i: waiting for 32-bit check value */\nconst LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 16208; /* finished check, done -- remain here until reset */\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst MEM = 16210; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 16211; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,\n bit 2 true to validate check value */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib), or\n -1 if raw or no header yet */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const state = strm.state;\n if (!state || state.strm !== strm ||\n state.mode < HEAD || state.mode > SYNC) {\n return 1;\n }\n return 0;\n};\n\n\nconst inflateResetKeep = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.flags = -1;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 5;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.strm = strm;\n state.window = null/*Z_NULL*/;\n state.mode = HEAD; /* to pass state test in inflateReset2() */\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (inflateStateCheck(strm) || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n if (state.wbits === 0) {\n state.wbits = 15;\n }\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n if (len > 15 || len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n state.flags = 0; /* indicate zlib header */\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check =\n /*UPDATE_CHECK(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (inflateStateCheck(strm)) {\n return Z_STREAM_ERROR;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n};\n\n\nmodule.exports.inflateReset = inflateReset;\nmodule.exports.inflateReset2 = inflateReset2;\nmodule.exports.inflateResetKeep = inflateResetKeep;\nmodule.exports.inflateInit = inflateInit;\nmodule.exports.inflateInit2 = inflateInit2;\nmodule.exports.inflate = inflate;\nmodule.exports.inflateEnd = inflateEnd;\nmodule.exports.inflateGetHeader = inflateGetHeader;\nmodule.exports.inflateSetDictionary = inflateSetDictionary;\nmodule.exports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCodesUsed = inflateCodesUsed;\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\nmodule.exports.inflateValidate = inflateValidate;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n// let shoextra; /* extra bits table to use */\n let match; /* use base and extra for symbol >= match */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n match = 20;\n\n } else if (type === LENS) {\n base = lbase;\n extra = lext;\n match = 257;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n match = 0;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] + 1 < match) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] >= match) {\n here_op = extra[work[sym] - match];\n here_val = base[work[sym] - match];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nmodule.exports = inflate_table;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([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]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([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]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Tracev((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Tracev((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) => {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n code = (code + bl_count[bits - 1]) << 1;\n next_code[bits] = code;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.sym_next = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) => {\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let sx = 0; /* running index in sym_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.sym_next !== 0) {\n do {\n dist = s.pending_buf[s.sym_buf + sx++] & 0xff;\n dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8;\n lc = s.pending_buf[s.sym_buf + sx++];\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and sym_buf is ok: */\n //Assert(s->pending < s->lit_bufsize + sx, \"pendingBuf overflow\");\n\n } while (sx < s.sym_next);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) => {\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"block list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"allow list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* block_mask is the bit mask of block-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let block_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"block-listed\") bytes. */\n for (n = 0; n <= 31; n++, block_mask >>>= 1) {\n if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"allow-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"block-listed\" or \"allow-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n bi_windup(s); /* align on byte boundary */\n put_short(s, stored_len);\n put_short(s, ~stored_len);\n if (stored_len) {\n s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending);\n }\n s.pending += stored_len;\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and write out the encoded block.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->sym_next / 3));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) => {\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n\n s.pending_buf[s.sym_buf + s.sym_next++] = dist;\n s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8;\n s.pending_buf[s.sym_buf + s.sym_next++] = lc;\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n return (s.sym_next === s.sym_end);\n};\n\nmodule.exports._tr_init = _tr_init;\nmodule.exports._tr_stored_block = _tr_stored_block;\nmodule.exports._tr_flush_block = _tr_flush_block;\nmodule.exports._tr_tally = _tr_tally;\nmodule.exports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","/* unzipit@1.4.3, license MIT */\n/* global SharedArrayBuffer, process */\n\nfunction readBlobAsArrayBuffer(blob) {\n if (blob.arrayBuffer) {\n return blob.arrayBuffer();\n }\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.addEventListener('loadend', () => {\n resolve(reader.result);\n });\n reader.addEventListener('error', reject);\n reader.readAsArrayBuffer(blob);\n });\n}\n\nasync function readBlobAsUint8Array(blob) {\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n}\n\nfunction isBlob(v) {\n return typeof Blob !== 'undefined' && v instanceof Blob;\n}\n\nfunction isSharedArrayBuffer(b) {\n return typeof SharedArrayBuffer !== 'undefined' && b instanceof SharedArrayBuffer;\n}\n\nconst isNode =\n (typeof process !== 'undefined') &&\n process.versions &&\n (typeof process.versions.node !== 'undefined') &&\n (typeof process.versions.electron === 'undefined');\n\nfunction isTypedArraySameAsArrayBuffer(typedArray) {\n return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;\n}\n\nclass ArrayBufferReader {\n constructor(arrayBufferOrView) {\n this.typedArray = (arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView))\n ? new Uint8Array(arrayBufferOrView)\n : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);\n }\n async getLength() {\n return this.typedArray.byteLength;\n }\n async read(offset, length) {\n return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset, length);\n }\n}\n\nclass BlobReader {\n constructor(blob) {\n this.blob = blob;\n }\n async getLength() {\n return this.blob.size;\n }\n async read(offset, length) {\n const blob = this.blob.slice(offset, offset + length);\n const arrayBuffer = await readBlobAsArrayBuffer(blob);\n return new Uint8Array(arrayBuffer);\n }\n async sliceAsBlob(offset, length, type = '') {\n return this.blob.slice(offset, offset + length, type);\n }\n}\n\nclass HTTPRangeReader {\n constructor(url) {\n this.url = url;\n }\n async getLength() {\n if (this.length === undefined) {\n const req = await fetch(this.url, { method: 'HEAD' });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);\n }\n this.length = parseInt(req.headers.get('content-length'));\n if (Number.isNaN(this.length)) {\n throw Error('could not get length');\n }\n }\n return this.length;\n }\n async read(offset, size) {\n if (size === 0) {\n return new Uint8Array(0);\n }\n const req = await fetch(this.url, {\n headers: {\n Range: `bytes=${offset}-${offset + size - 1}`,\n },\n });\n if (!req.ok) {\n throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset} size: ${size}: ${req.statusText}`);\n }\n const buffer = await req.arrayBuffer();\n return new Uint8Array(buffer);\n }\n}\n\nfunction inflate(data, buf) {\n\tvar u8=Uint8Array;\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\n\tvar bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;\n\t\n\tvar noBuf = (buf==null);\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\n\t\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\n\tvar off = 0, pos = 0;\n\tvar lmap, dmap;\n\t\n\twhile(BFINAL==0) {\t\t\n\t\tBFINAL = bitsF(data, pos , 1);\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\n\t\t//console.log(BFINAL, BTYPE);\n\t\t\n\t\tif(BTYPE==0) {\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \n\t\t\tif(noBuf) buf=_check(buf, off+len);\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\n\t\t\t//for(var i=0; i<len; i++) buf[off+i] = data[p8+i];\n\t\t\t//for(var i=0; i<len; i++) if(buf[off+i] != data[p8+i]) throw \"e\";\n\t\t\tpos = ((p8+len)<<3); off+=len; continue;\n\t\t}\n\t\tif(noBuf) buf=_check(buf, off+(1<<17)); // really not enough in many cases (but PNG and ZIP provide buffer in advance)\n\t\tif(BTYPE==1) { lmap = U.flmap; dmap = U.fdmap; ML = (1<<9)-1; MD = (1<<5)-1; }\n\t\tif(BTYPE==2) {\n\t\t\tHLIT = bitsE(data, pos , 5)+257; \n\t\t\tHDIST = bitsE(data, pos+ 5, 5)+ 1; \n\t\t\tHCLEN = bitsE(data, pos+10, 4)+ 4; pos+=14;\n\t\t\tfor(var i=0; i<38; i+=2) { U.itree[i]=0; U.itree[i+1]=0; }\n\t\t\tvar tl = 1;\n\t\t\tfor(var i=0; i<HCLEN; i++) { var l=bitsE(data, pos+i*3, 3); U.itree[(U.ordr[i]<<1)+1] = l; if(l>tl)tl=l; } pos+=3*HCLEN; //console.log(itree);\n\t\t\tmakeCodes(U.itree, tl);\n\t\t\tcodes2map(U.itree, tl, U.imap);\n\t\t\t\n\t\t\tlmap = U.lmap; dmap = U.dmap;\n\t\t\t\n\t\t\tpos = decodeTiny(U.imap, (1<<tl)-1, HLIT+HDIST, data, pos, U.ttree);\n\t\t\tvar mx0 = _copyOut(U.ttree, 0, HLIT , U.ltree); ML = (1<<mx0)-1;\n\t\t\tvar mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree); MD = (1<<mx1)-1;\n\t\t\t\n\t\t\t//var ml = decodeTiny(U.imap, (1<<tl)-1, HLIT , data, pos, U.ltree); ML = (1<<(ml>>>24))-1; pos+=(ml&0xffffff);\n\t\t\tmakeCodes(U.ltree, mx0);\n\t\t\tcodes2map(U.ltree, mx0, lmap);\n\t\t\t\n\t\t\t//var md = decodeTiny(U.imap, (1<<tl)-1, HDIST, data, pos, U.dtree); MD = (1<<(md>>>24))-1; pos+=(md&0xffffff);\n\t\t\tmakeCodes(U.dtree, mx1);\n\t\t\tcodes2map(U.dtree, mx1, dmap);\n\t\t}\n\t\t//var ooff=off, opos=pos;\n\t\twhile(true) {\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\n\t\t\telse if(lit==256) { break; }\n\t\t\telse {\n\t\t\t\tvar end = off+lit-254;\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\n\t\t\t\t//dst[end-off]++;\n\t\t\t\t\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\n\t\t\t\tvar dlit = dcode>>>4;\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\n\t\t\t\t\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\n\t\t\t\t//if(stp>20) while(off<end) { buf.copyWithin(off, o0, o0+stp); off+=stp; } else\n\t\t\t\t//if(end-dst<=off) buf.copyWithin(off, off-dst, end-dst); else\n\t\t\t\t//if(dst==1) buf.fill(buf[off-1], off, end); else\n\t\t\t\tif(noBuf) buf=_check(buf, off+(1<<17));\n\t\t\t\twhile(off<end) { buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; buf[off]=buf[off++-dst]; } \n\t\t\t\toff=end;\n\t\t\t\t//while(off!=end) { buf[off]=buf[off++-dst]; }\n\t\t\t}\n\t\t}\n\t\t//console.log(off-ooff, (pos-opos)>>>3);\n\t}\n\t//console.log(dst);\n\t//console.log(tlen, dlen, off-tlen+tcnt);\n\treturn buf.length==off ? buf : buf.slice(0,off);\n}\nfunction _check(buf, len) {\n\tvar bl=buf.length; if(len<=bl) return buf;\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\n\t//for(var i=0; i<bl; i+=4) { nbuf[i]=buf[i]; nbuf[i+1]=buf[i+1]; nbuf[i+2]=buf[i+2]; nbuf[i+3]=buf[i+3]; }\n\treturn nbuf;\n}\n\nfunction _decodeTiny(lmap, LL, len, data, pos, tree) {\n\tvar bitsE = _bitsE, get17 = _get17;\n\tvar i = 0;\n\twhile(i<len) {\n\t\tvar code = lmap[get17(data, pos)&LL]; pos+=code&15;\n\t\tvar lit = code>>>4; \n\t\tif(lit<=15) { tree[i]=lit; i++; }\n\t\telse {\n\t\t\tvar ll = 0, n = 0;\n\t\t\tif(lit==16) {\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\n\t\t\t}\n\t\t\telse if(lit==17) {\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\n\t\t\t}\n\t\t\telse if(lit==18) {\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\n\t\t\t}\n\t\t\tvar ni = i+n;\n\t\t\twhile(i<ni) { tree[i]=ll; i++; }\n\t\t}\n\t}\n\treturn pos;\n}\nfunction _copyOut(src, off, len, tree) {\n\tvar mx=0, i=0, tl=tree.length>>>1;\n\twhile(i<len) { var v=src[i+off]; tree[(i<<1)]=0; tree[(i<<1)+1]=v; if(v>mx)mx=v; i++; }\n\twhile(i<tl ) { tree[(i<<1)]=0; tree[(i<<1)+1]=0; i++; }\n\treturn mx;\n}\n\nfunction makeCodes(tree, MAX_BITS) { // code, length\n\tvar max_code = tree.length;\n\tvar code, bits, n, i, len;\n\t\n\tvar bl_count = U.bl_count; for(var i=0; i<=MAX_BITS; i++) bl_count[i]=0;\n\tfor(i=1; i<max_code; i+=2) bl_count[tree[i]]++;\n\t\n\tvar next_code = U.next_code;\t// smallest code for each length\n\t\n\tcode = 0;\n\tbl_count[0] = 0;\n\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\tcode = (code + bl_count[bits-1]) << 1;\n\t\tnext_code[bits] = code;\n\t}\n\t\n\tfor (n = 0; n < max_code; n+=2) {\n\t\tlen = tree[n+1];\n\t\tif (len != 0) {\n\t\t\ttree[n] = next_code[len];\n\t\t\tnext_code[len]++;\n\t\t}\n\t}\n}\nfunction codes2map(tree, MAX_BITS, map) {\n\tvar max_code = tree.length;\n\tvar r15 = U.rev15;\n\tfor(var i=0; i<max_code; i+=2) if(tree[i+1]!=0) {\n\t\tvar lit = i>>1;\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<<rest, i1 = i0 + (1<<rest);\n\t\t//tree[i]=r15[i0]>>>(15-MAX_BITS);\n\t\twhile(i0!=i1) {\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\n\t\t\tmap[p0]=val; i0++;\n\t\t}\n\t}\n}\nfunction revCodes(tree, MAX_BITS) {\n\tvar r15 = U.rev15, imb = 15-MAX_BITS;\n\tfor(var i=0; i<tree.length; i+=2) { var i0 = (tree[i]<<(MAX_BITS-tree[i+1])); tree[i] = r15[i0]>>>imb; }\n}\n\nfunction _bitsE(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<<length)-1); }\nfunction _bitsF(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<<length)-1); }\n/*\nfunction _get9(dt, pos) {\n\treturn ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\n} */\nfunction _get17(dt, pos) {\t// return at least 17 meaningful bytes\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\n}\nconst U = function(){\n\tvar u16=Uint16Array, u32=Uint32Array;\n\treturn {\n\t\tnext_code : new u16(16),\n\t\tbl_count : new u16(16),\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n\t\tof0 : [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,999,999,999],\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n\t\tldef : new u16(32),\n\t\tdf0 : [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, 65535, 65535],\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n\t\tddef : new u32(32),\n\t\tflmap: new u16( 512), fltree: [],\n\t\tfdmap: new u16( 32), fdtree: [],\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\n\t\tdmap : new u16(32768), dtree : [],\n\t\timap : new u16( 512), itree : [],\n\t\t//rev9 : new u16( 512)\n\t\trev15: new u16(1<<15),\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n\t\tlits : new u32(15000),\n\t\tstrt : new u16(1<<16),\n\t\tprev : new u16(1<<15)\n\t}; \n} ();\n\n(function(){\t\n\tvar len = 1<<15;\n\tfor(var i=0; i<len; i++) {\n\t\tvar x = i;\n\t\tx = (((x & 0xaaaaaaaa) >>> 1) | ((x & 0x55555555) << 1));\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n\t}\n\t\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n\t\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n\t\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n\t/*\n\tvar i = 0;\n\tfor(; i<=143; i++) U.fltree.push(0,8);\n\tfor(; i<=255; i++) U.fltree.push(0,9);\n\tfor(; i<=279; i++) U.fltree.push(0,7);\n\tfor(; i<=287; i++) U.fltree.push(0,8);\n\t*/\n\tmakeCodes(U.fltree, 9);\n\tcodes2map(U.fltree, 9, U.flmap);\n\trevCodes (U.fltree, 9);\n\t\n\tpushV(U.fdtree,32,5);\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\n\tmakeCodes(U.fdtree, 5);\n\tcodes2map(U.fdtree, 5, U.fdmap);\n\trevCodes (U.fdtree, 5);\n\t\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n\t/*\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\n\t*/\n})();\n\nconst crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i<len; i++) c = crc.table[(c ^ buf[off+i]) & 0xff] ^ (c >>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n};\r\n\r\nfunction inflateRaw(file, buf) { return inflate(file, buf); }\n\n/* global module */\n\nconst config = {\n numWorkers: 1,\n workerURL: '',\n useWorkers: false,\n};\n\nlet nextId = 0;\n\n// Requests are put on a queue.\n// We don't send the request to the worker until the worker\n// is finished. This probably adds a small amount of latency\n// but the issue is imagine you have 2 workers. You give worker\n// A x seconds of work to do and worker B y seconds of work to\n// do. You don't know which will finish first. If you give\n// the worker with more work to do the request then you'll\n// waste time.\n\n// note: we can't check `workers.length` for deciding if\n// we've reached `config.numWorkers` because creation the worker\n// is async which means other requests to make workers might\n// come in before a worker gets added to `workers`\nlet numWorkers = 0;\nlet canUseWorkers = true; // gets set to false if we can't start a worker\nconst workers = [];\nconst availableWorkers = [];\nconst waitingForWorkerQueue = [];\nconst currentlyProcessingIdToRequestMap = new Map();\n\nfunction handleResult(e) {\n makeWorkerAvailable(e.target);\n const {id, error, data} = e.data;\n const request = currentlyProcessingIdToRequestMap.get(id);\n currentlyProcessingIdToRequestMap.delete(id);\n if (error) {\n request.reject(error);\n } else {\n request.resolve(data);\n }\n}\n\n// Because Firefox uses non-standard onerror to signal an error.\nfunction startWorker(url) {\n return new Promise((resolve, reject) => {\n const worker = new Worker(url);\n worker.onmessage = (e) => {\n if (e.data === 'start') {\n worker.onerror = undefined;\n worker.onmessage = undefined;\n resolve(worker);\n } else {\n reject(new Error(`unexpected message: ${e.data}`));\n }\n };\n worker.onerror = reject;\n });\n}\n\nfunction dynamicRequire(mod, request) {\n return mod.require ? mod.require(request) : {};\n}\n\nconst workerHelper = (function() {\n if (isNode) {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n const {Worker} = dynamicRequire(module, 'worker_threads');\n return {\n async createWorker(url) {\n return new Worker(url);\n },\n addEventListener(worker, fn) {\n worker.on('message', (data) => {\n fn({target: worker, data});\n });\n },\n async terminate(worker) {\n await worker.terminate();\n },\n };\n } else {\n return {\n async createWorker(url) {\n // I don't understand this security issue\n // Apparently there is some iframe setting or http header\n // that prevents cross domain workers. But, I can manually\n // download the text and do it. I reported this to Chrome\n // and they said it was fine so ¯\\_(ツ)_/¯\n try {\n const worker = await startWorker(url);\n return worker;\n } catch (e) {\n console.warn('could not load worker:', url);\n }\n\n let text;\n try {\n const req = await fetch(url, {mode: 'cors'});\n if (!req.ok) {\n throw new Error(`could not load: ${url}`);\n }\n text = await req.text();\n url = URL.createObjectURL(new Blob([text], {type: 'application/javascript'}));\n const worker = await startWorker(url);\n config.workerURL = url; // this is a hack. What's a better way to structure this code?\n return worker;\n } catch (e) {\n console.warn('could not load worker via fetch:', url);\n }\n\n if (text !== undefined) {\n try {\n url = `data:application/javascript;base64,${btoa(text)}`;\n const worker = await startWorker(url);\n config.workerURL = url;\n return worker;\n } catch (e) {\n console.warn('could not load worker via dataURI');\n }\n }\n\n console.warn('workers will not be used');\n throw new Error('can not start workers');\n },\n addEventListener(worker, fn) {\n worker.addEventListener('message', fn);\n },\n async terminate(worker) {\n worker.terminate();\n },\n };\n }\n}());\n\nfunction makeWorkerAvailable(worker) {\n availableWorkers.push(worker);\n processWaitingForWorkerQueue();\n}\n\nasync function getAvailableWorker() {\n if (availableWorkers.length === 0 && numWorkers < config.numWorkers) {\n ++numWorkers; // see comment at numWorkers declaration\n try {\n const worker = await workerHelper.createWorker(config.workerURL);\n workers.push(worker);\n availableWorkers.push(worker);\n workerHelper.addEventListener(worker, handleResult);\n } catch (e) {\n // set this global out-of-band (needs refactor)\n canUseWorkers = false;\n }\n }\n return availableWorkers.pop();\n}\n\n// @param {Uint8Array} src\n// @param {number} uncompressedSize\n// @param {string} [type] mime-type\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawLocal(src, uncompressedSize, type, resolve) {\n const dst = new Uint8Array(uncompressedSize);\n inflateRaw(src, dst);\n resolve(type\n ? new Blob([dst], {type})\n : dst.buffer);\n}\n\nasync function processWaitingForWorkerQueue() {\n if (waitingForWorkerQueue.length === 0) {\n return;\n }\n\n if (config.useWorkers && canUseWorkers) {\n const worker = await getAvailableWorker();\n // canUseWorkers might have been set out-of-band (need refactor)\n if (canUseWorkers) {\n if (worker) {\n if (waitingForWorkerQueue.length === 0) {\n // the queue might be empty while we awaited for a worker.\n makeWorkerAvailable(worker);\n return;\n }\n const {id, src, uncompressedSize, type, resolve, reject} = waitingForWorkerQueue.shift();\n currentlyProcessingIdToRequestMap.set(id, {id, resolve, reject});\n const transferables = [];\n // NOTE: Originally I thought you could transfer an ArrayBuffer.\n // The code on this side is often using views into the entire file\n // which means if we transferred we'd lose the entire file. That sucks\n // because it means there's an expensive copy to send the uncompressed\n // data to the worker.\n //\n // Also originally I thought we could send a Blob but we'd need to refactor\n // the code in unzipit/readEntryData as currently it reads the uncompressed\n // bytes.\n //\n //if (!isBlob(src) && !isSharedArrayBuffer(src)) {\n // transferables.push(src);\n //}\n worker.postMessage({\n type: 'inflate',\n data: {\n id,\n type,\n src,\n uncompressedSize,\n },\n }, transferables);\n }\n return;\n }\n }\n\n // inflate locally\n // We loop here because what happens if many requests happen at once\n // the first N requests will try to async make a worker. Other requests\n // will then be on the queue. But if we fail to make workers then there\n // are pending requests.\n while (waitingForWorkerQueue.length) {\n const {src, uncompressedSize, type, resolve} = waitingForWorkerQueue.shift();\n let data = src;\n if (isBlob(src)) {\n data = await readBlobAsUint8Array(src);\n }\n inflateRawLocal(data, uncompressedSize, type, resolve);\n }\n}\n\nfunction setOptions(options) {\n config.workerURL = options.workerURL || config.workerURL;\n // there's no reason to set the workerURL if you're not going to use workers\n if (options.workerURL) {\n config.useWorkers = true;\n }\n config.useWorkers = options.useWorkers !== undefined ? options.useWorkers : config.useWorkers;\n config.numWorkers = options.numWorkers || config.numWorkers;\n}\n\n// It has to take non-zero time to put a large typed array in a Blob since the very\n// next instruction you could change the contents of the array. So, if you're reading\n// the zip file for images/video/audio then all you want is a Blob on which to get a URL.\n// so that operation of putting the data in a Blob should happen in the worker.\n//\n// Conversely if you want the data itself then you want an ArrayBuffer immediately\n// since the worker can transfer its ArrayBuffer zero copy.\n//\n// @param {Uint8Array|Blob} src\n// @param {number} uncompressedSize\n// @param {string} [type] falsy or mimeType string (eg: 'image/png')\n// @returns {ArrayBuffer|Blob} ArrayBuffer if type is falsy or Blob otherwise.\nfunction inflateRawAsync(src, uncompressedSize, type) {\n return new Promise((resolve, reject) => {\n // note: there is potential an expensive copy here. In order for the data\n // to make it into the worker we need to copy the data to the worker unless\n // it's a Blob or a SharedArrayBuffer.\n //\n // Solutions:\n //\n // 1. A minor enhancement, if `uncompressedSize` is small don't call the worker.\n //\n // might be a win period as their is overhead calling the worker\n //\n // 2. Move the entire library to the worker\n //\n // Good, Maybe faster if you pass a URL, Blob, or SharedArrayBuffer? Not sure about that\n // as those are also easy to transfer. Still slow if you pass an ArrayBuffer\n // as the ArrayBuffer has to be copied to the worker.\n //\n // I guess benchmarking is really the only thing to try.\n waitingForWorkerQueue.push({src, uncompressedSize, type, resolve, reject, id: nextId++});\n processWaitingForWorkerQueue();\n });\n}\n\nfunction clearArray(arr) {\n arr.splice(0, arr.length);\n}\n\nasync function cleanup() {\n for (const worker of workers) {\n await workerHelper.terminate(worker);\n }\n clearArray(workers);\n clearArray(availableWorkers);\n clearArray(waitingForWorkerQueue);\n currentlyProcessingIdToRequestMap.clear();\n numWorkers = 0;\n canUseWorkers = true;\n}\n\n/*\nclass Zip {\n constructor(reader) {\n comment, // the comment for this entry\n commentBytes, // the raw comment for this entry\n }\n}\n*/\n\nfunction dosDateTimeToDate(date, time) {\n const day = date & 0x1f; // 1-31\n const month = (date >> 5 & 0xf) - 1; // 1-12, 0-11\n const year = (date >> 9 & 0x7f) + 1980; // 0-128, 1980-2108\n\n const millisecond = 0;\n const second = (time & 0x1f) * 2; // 0-29, 0-58 (even numbers)\n const minute = time >> 5 & 0x3f; // 0-59\n const hour = time >> 11 & 0x1f; // 0-23\n\n return new Date(year, month, day, hour, minute, second, millisecond);\n}\n\nclass ZipEntry {\n constructor(reader, rawEntry) {\n this._reader = reader;\n this._rawEntry = rawEntry;\n this.name = rawEntry.name;\n this.nameBytes = rawEntry.nameBytes;\n this.size = rawEntry.uncompressedSize;\n this.compressedSize = rawEntry.compressedSize;\n this.comment = rawEntry.comment;\n this.commentBytes = rawEntry.commentBytes;\n this.compressionMethod = rawEntry.compressionMethod;\n this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);\n this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith('/');\n this.encrypted = !!(rawEntry.generalPurposeBitFlag & 0x1);\n this.externalFileAttributes = rawEntry.externalFileAttributes;\n this.versionMadeBy = rawEntry.versionMadeBy;\n }\n // returns a promise that returns a Blob for this entry\n async blob(type = 'application/octet-stream') {\n return await readEntryDataAsBlob(this._reader, this._rawEntry, type);\n }\n // returns a promise that returns an ArrayBuffer for this entry\n async arrayBuffer() {\n return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);\n }\n // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself\n async text() {\n const buffer = await this.arrayBuffer();\n return decodeBuffer(new Uint8Array(buffer));\n }\n // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself\n async json() {\n const text = await this.text();\n return JSON.parse(text);\n }\n}\n\nconst EOCDR_WITHOUT_COMMENT_SIZE = 22;\nconst MAX_COMMENT_SIZE = 0xffff; // 2-byte size\nconst EOCDR_SIGNATURE = 0x06054b50;\nconst ZIP64_EOCDR_SIGNATURE = 0x06064b50;\n\nasync function readAs(reader, offset, length) {\n return await reader.read(offset, length);\n}\n\n// The point of this function is we want to be able to pass the data\n// to a worker as fast as possible so when decompressing if the data\n// is already a blob and we can get a blob then get a blob.\n//\n// I'm not sure what a better way to refactor this is. We've got examples\n// of multiple readers. Ideally, for every type of reader we could ask\n// it, \"give me a type that is zero copy both locally and when sent to a worker\".\n//\n// The problem is the worker would also have to know the how to handle this\n// opaque type. I suppose the correct solution is to register different\n// reader handlers in the worker so BlobReader would register some\n// `handleZeroCopyType<BlobReader>`. At the moment I don't feel like\n// refactoring. As it is you just pass in an instance of the reader\n// but instead you'd have to register the reader and some how get the\n// source for the `handleZeroCopyType` handler function into the worker.\n// That sounds like a huge PITA, requiring you to put the implementation\n// in a separate file so the worker can load it or some other workaround\n// hack.\n//\n// For now this hack works even if it's not generic.\nasync function readAsBlobOrTypedArray(reader, offset, length, type) {\n if (reader.sliceAsBlob) {\n return await reader.sliceAsBlob(offset, length, type);\n }\n return await reader.read(offset, length);\n}\n\nconst crc$1 = {\n unsigned() {\n return 0;\n },\n};\n\nfunction getUint16LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100;\n}\n\nfunction getUint32LE(uint8View, offset) {\n return uint8View[offset ] +\n uint8View[offset + 1] * 0x100 +\n uint8View[offset + 2] * 0x10000 +\n uint8View[offset + 3] * 0x1000000;\n}\n\nfunction getUint64LE(uint8View, offset) {\n return getUint32LE(uint8View, offset) +\n getUint32LE(uint8View, offset + 4) * 0x100000000;\n}\n\n/* eslint-disable no-irregular-whitespace */\n// const decodeCP437 = (function() {\n// const cp437 = '\\u0000☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ';\n//\n// return function(uint8view) {\n// return Array.from(uint8view).map(v => cp437[v]).join('');\n// };\n// }());\n/* eslint-enable no-irregular-whitespace */\n\nconst utf8Decoder = new TextDecoder();\nfunction decodeBuffer(uint8View, isUTF8) { /* eslint-disable-line no-unused-vars */ /* lgtm [js/superfluous-trailing-arguments] */\n if (isSharedArrayBuffer(uint8View.buffer)) {\n uint8View = new Uint8Array(uint8View);\n }\n return utf8Decoder.decode(uint8View);\n /*\n AFAICT the UTF8 flat is not set so it's 100% up to the user\n to self decode if their file is not utf8 filenames\n return isUTF8\n ? utf8Decoder.decode(uint8View)\n : decodeCP437(uint8View);\n */\n}\n\nasync function findEndOfCentralDirector(reader, totalLength) {\n const size = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);\n const readStart = totalLength - size;\n const data = await readAs(reader, readStart, size);\n for (let i = size - EOCDR_WITHOUT_COMMENT_SIZE; i >= 0; --i) {\n if (getUint32LE(data, i) !== EOCDR_SIGNATURE) {\n continue;\n }\n\n // 0 - End of central directory signature\n const eocdr = new Uint8Array(data.buffer, data.byteOffset + i, data.byteLength - i);\n // 4 - Number of this disk\n const diskNumber = getUint16LE(eocdr, 4);\n if (diskNumber !== 0) {\n throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);\n }\n\n // 6 - Disk where central directory starts\n // 8 - Number of central directory records on this disk\n // 10 - Total number of central directory records\n const entryCount = getUint16LE(eocdr, 10);\n // 12 - Size of central directory (bytes)\n const centralDirectorySize = getUint32LE(eocdr, 12);\n // 16 - Offset of start of central directory, relative to start of archive\n const centralDirectoryOffset = getUint32LE(eocdr, 16);\n // 20 - Comment length\n const commentLength = getUint16LE(eocdr, 20);\n const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;\n if (commentLength !== expectedCommentLength) {\n throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);\n }\n\n // 22 - Comment\n // the encoding is always cp437.\n const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);\n const comment = decodeBuffer(commentBytes);\n\n if (entryCount === 0xffff || centralDirectoryOffset === 0xffffffff) {\n return await readZip64CentralDirectory(reader, readStart + i, comment, commentBytes);\n } else {\n return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n }\n }\n\n throw new Error('could not find end of central directory. maybe not zip file');\n}\n\nconst END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 0x07064b50;\n\nasync function readZip64CentralDirectory(reader, offset, comment, commentBytes) {\n // ZIP64 Zip64 end of central directory locator\n const zip64EocdlOffset = offset - 20;\n const eocdl = await readAs(reader, zip64EocdlOffset, 20);\n\n // 0 - zip64 end of central dir locator signature\n if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory locator signature');\n }\n\n // 4 - number of the disk with the start of the zip64 end of central directory\n // 8 - relative offset of the zip64 end of central directory record\n const zip64EocdrOffset = getUint64LE(eocdl, 8);\n // 16 - total number of disks\n\n // ZIP64 end of central directory record\n const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);\n\n // 0 - zip64 end of central dir signature 4 bytes (0x06064b50)\n if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {\n throw new Error('invalid zip64 end of central directory record signature');\n }\n // 4 - size of zip64 end of central directory record 8 bytes\n // 12 - version made by 2 bytes\n // 14 - version needed to extract 2 bytes\n // 16 - number of this disk 4 bytes\n // 20 - number of the disk with the start of the central directory 4 bytes\n // 24 - total number of entries in the central directory on this disk 8 bytes\n // 32 - total number of entries in the central directory 8 bytes\n const entryCount = getUint64LE(zip64Eocdr, 32);\n // 40 - size of the central directory 8 bytes\n const centralDirectorySize = getUint64LE(zip64Eocdr, 40);\n // 48 - offset of start of central directory with respect to the starting disk number 8 bytes\n const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);\n // 56 - zip64 extensible data sector (variable size)\n return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);\n}\n\nconst CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 0x02014b50;\n\nasync function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {\n let readEntryCursor = 0;\n const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);\n const rawEntries = [];\n\n for (let e = 0; e < rawEntryCount; ++e) {\n const buffer = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);\n // 0 - Central directory file header signature\n const signature = getUint32LE(buffer, 0);\n if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {\n throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);\n }\n const rawEntry = {\n // 4 - Version made by\n versionMadeBy: getUint16LE(buffer, 4),\n // 6 - Version needed to extract (minimum)\n versionNeededToExtract: getUint16LE(buffer, 6),\n // 8 - General purpose bit flag\n generalPurposeBitFlag: getUint16LE(buffer, 8),\n // 10 - Compression method\n compressionMethod: getUint16LE(buffer, 10),\n // 12 - File last modification time\n lastModFileTime: getUint16LE(buffer, 12),\n // 14 - File last modification date\n lastModFileDate: getUint16LE(buffer, 14),\n // 16 - CRC-32\n crc32: getUint32LE(buffer, 16),\n // 20 - Compressed size\n compressedSize: getUint32LE(buffer, 20),\n // 24 - Uncompressed size\n uncompressedSize: getUint32LE(buffer, 24),\n // 28 - File name length (n)\n fileNameLength: getUint16LE(buffer, 28),\n // 30 - Extra field length (m)\n extraFieldLength: getUint16LE(buffer, 30),\n // 32 - File comment length (k)\n fileCommentLength: getUint16LE(buffer, 32),\n // 34 - Disk number where file starts\n // 36 - Internal file attributes\n internalFileAttributes: getUint16LE(buffer, 36),\n // 38 - External file attributes\n externalFileAttributes: getUint32LE(buffer, 38),\n // 42 - Relative offset of local file header\n relativeOffsetOfLocalHeader: getUint32LE(buffer, 42),\n };\n\n if (rawEntry.generalPurposeBitFlag & 0x40) {\n throw new Error('strong encryption is not supported');\n }\n\n readEntryCursor += 46;\n\n const data = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);\n rawEntry.nameBytes = data.slice(0, rawEntry.fileNameLength);\n rawEntry.name = decodeBuffer(rawEntry.nameBytes);\n\n // 46+n - Extra field\n const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;\n const extraFieldBuffer = data.slice(rawEntry.fileNameLength, fileCommentStart);\n rawEntry.extraFields = [];\n let i = 0;\n while (i < extraFieldBuffer.length - 3) {\n const headerId = getUint16LE(extraFieldBuffer, i + 0);\n const dataSize = getUint16LE(extraFieldBuffer, i + 2);\n const dataStart = i + 4;\n const dataEnd = dataStart + dataSize;\n if (dataEnd > extraFieldBuffer.length) {\n throw new Error('extra field length exceeds extra field buffer size');\n }\n rawEntry.extraFields.push({\n id: headerId,\n data: extraFieldBuffer.slice(dataStart, dataEnd),\n });\n i = dataEnd;\n }\n\n // 46+n+m - File comment\n rawEntry.commentBytes = data.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);\n rawEntry.comment = decodeBuffer(rawEntry.commentBytes);\n\n readEntryCursor += data.length;\n\n if (rawEntry.uncompressedSize === 0xffffffff ||\n rawEntry.compressedSize === 0xffffffff ||\n rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n // ZIP64 format\n // find the Zip64 Extended Information Extra Field\n const zip64ExtraField = rawEntry.extraFields.find(e => e.id === 0x0001);\n if (!zip64ExtraField) {\n throw new Error('expected zip64 extended information extra field');\n }\n const zip64EiefBuffer = zip64ExtraField.data;\n let index = 0;\n // 0 - Original Size 8 bytes\n if (rawEntry.uncompressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include uncompressed size');\n }\n rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 8 - Compressed Size 8 bytes\n if (rawEntry.compressedSize === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include compressed size');\n }\n rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 16 - Relative Header Offset 8 bytes\n if (rawEntry.relativeOffsetOfLocalHeader === 0xffffffff) {\n if (index + 8 > zip64EiefBuffer.length) {\n throw new Error('zip64 extended information extra field does not include relative header offset');\n }\n rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index);\n index += 8;\n }\n // 24 - Disk Start Number 4 bytes\n }\n\n // check for Info-ZIP Unicode Path Extra Field (0x7075)\n // see https://github.com/thejoshwolfe/yauzl/issues/33\n const nameField = rawEntry.extraFields.find(e =>\n e.id === 0x7075 &&\n e.data.length >= 6 && // too short to be meaningful\n e.data[0] === 1 && // Version 1 byte version of this extra field, currently 1\n getUint32LE(e.data, 1), crc$1.unsigned(rawEntry.nameBytes)); // NameCRC32 4 bytes File Name Field CRC32 Checksum\n // > If the CRC check fails, this UTF-8 Path Extra Field should be\n // > ignored and the File Name field in the header should be used instead.\n if (nameField) {\n // UnicodeName Variable UTF-8 version of the entry File Name\n rawEntry.fileName = decodeBuffer(nameField.data.slice(5));\n }\n\n // validate file size\n if (rawEntry.compressionMethod === 0) {\n let expectedCompressedSize = rawEntry.uncompressedSize;\n if ((rawEntry.generalPurposeBitFlag & 0x1) !== 0) {\n // traditional encryption prefixes the file data with a header\n expectedCompressedSize += 12;\n }\n if (rawEntry.compressedSize !== expectedCompressedSize) {\n throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);\n }\n }\n rawEntries.push(rawEntry);\n }\n const zip = {\n comment,\n commentBytes,\n };\n return {\n zip,\n entries: rawEntries.map(e => new ZipEntry(reader, e)),\n };\n}\n\nasync function readEntryDataHeader(reader, rawEntry) {\n if (rawEntry.generalPurposeBitFlag & 0x1) {\n throw new Error('encrypted entries not supported');\n }\n const buffer = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);\n // note: maybe this should be passed in or cached on entry\n // as it's async so there will be at least one tick (not sure about that)\n const totalLength = await reader.getLength();\n\n // 0 - Local file header signature = 0x04034b50\n const signature = getUint32LE(buffer, 0);\n if (signature !== 0x04034b50) {\n throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);\n }\n\n // all this should be redundant\n // 4 - Version needed to extract (minimum)\n // 6 - General purpose bit flag\n // 8 - Compression method\n // 10 - File last modification time\n // 12 - File last modification date\n // 14 - CRC-32\n // 18 - Compressed size\n // 22 - Uncompressed size\n // 26 - File name length (n)\n const fileNameLength = getUint16LE(buffer, 26);\n // 28 - Extra field length (m)\n const extraFieldLength = getUint16LE(buffer, 28);\n // 30 - File name\n // 30+n - Extra field\n const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer.length + fileNameLength + extraFieldLength;\n let decompress;\n if (rawEntry.compressionMethod === 0) {\n // 0 - The file is stored (no compression)\n decompress = false;\n } else if (rawEntry.compressionMethod === 8) {\n // 8 - The file is Deflated\n decompress = true;\n } else {\n throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);\n }\n const fileDataStart = localFileHeaderEnd;\n const fileDataEnd = fileDataStart + rawEntry.compressedSize;\n if (rawEntry.compressedSize !== 0) {\n // bounds check now, because the read streams will probably not complain loud enough.\n // since we're dealing with an unsigned offset plus an unsigned size,\n // we only have 1 thing to check for.\n if (fileDataEnd > totalLength) {\n throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);\n }\n }\n return {\n decompress,\n fileDataStart,\n };\n}\n\nasync function readEntryDataAsArrayBuffer(reader, rawEntry) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);\n // make copy?\n //\n // 1. The source is a Blob/file. In this case we'll get back TypedArray we can just hand to the user\n // 2. The source is a TypedArray. In this case we'll get back TypedArray that is a view into a larger buffer\n // but because ultimately this is used to return an ArrayBuffer to `someEntry.arrayBuffer()`\n // we need to return copy since we need the `ArrayBuffer`, not the TypedArray to exactly match the data.\n // Note: We could add another API function `bytes()` or something that returned a `Uint8Array`\n // instead of an `ArrayBuffer`. This would let us skip a copy here. But this case only happens for uncompressed\n // data. That seems like a rare enough case that adding a new API is not worth it? Or is it? A zip of jpegs or mp3s\n // might not be compressed. For now that's a TBD.\n return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;\n }\n // see comment in readEntryDateAsBlob\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);\n return result;\n}\n\nasync function readEntryDataAsBlob(reader, rawEntry, type) {\n const {decompress, fileDataStart} = await readEntryDataHeader(reader, rawEntry);\n if (!decompress) {\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type);\n if (isBlob(typedArrayOrBlob)) {\n return typedArrayOrBlob;\n }\n return new Blob([isSharedArrayBuffer(typedArrayOrBlob.buffer) ? new Uint8Array(typedArrayOrBlob) : typedArrayOrBlob], {type});\n }\n // Here's the issue with this mess (should refactor?)\n // if the source is a blob then we really want to pass a blob to inflateRawAsync to avoid a large\n // copy if we're going to a worker.\n const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);\n const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type);\n return result;\n}\n\nfunction setOptions$1(options) {\n setOptions(options);\n}\n\nasync function unzipRaw(source) {\n let reader;\n if (typeof Blob !== 'undefined' && source instanceof Blob) {\n reader = new BlobReader(source);\n } else if (source instanceof ArrayBuffer || (source && source.buffer && source.buffer instanceof ArrayBuffer)) {\n reader = new ArrayBufferReader(source);\n } else if (isSharedArrayBuffer(source) || isSharedArrayBuffer(source.buffer)) {\n reader = new ArrayBufferReader(source);\n } else if (typeof source === 'string') {\n const req = await fetch(source);\n if (!req.ok) {\n throw new Error(`failed http request ${source}, status: ${req.status}: ${req.statusText}`);\n }\n const blob = await req.blob();\n reader = new BlobReader(blob);\n } else if (typeof source.getLength === 'function' && typeof source.read === 'function') {\n reader = source;\n } else {\n throw new Error('unsupported source type');\n }\n\n const totalLength = await reader.getLength();\n\n if (totalLength > Number.MAX_SAFE_INTEGER) {\n throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);\n }\n\n return await findEndOfCentralDirector(reader, totalLength);\n}\n\n// If the names are not utf8 you should use unzipitRaw\nasync function unzip(source) {\n const {zip, entries} = await unzipRaw(source);\n return {\n zip,\n entries: Object.fromEntries(entries.map(v => [v.name, v])),\n };\n}\n\nfunction cleanup$1() {\n cleanup();\n}\n\nexport { HTTPRangeReader, cleanup$1 as cleanup, setOptions$1 as setOptions, unzip, unzipRaw };\n","\nlet imports = {};\nimports['__wbindgen_placeholder__'] = module.exports;\nlet wasm;\nconst { TextDecoder, TextEncoder } = require(`util`);\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n\ncachedTextDecoder.decode();\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_export_3.set(idx, obj);\n return idx;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet cachedTextEncoder = new TextEncoder('utf-8');\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nlet cachedDataViewMemory0 = null;\n\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n/**\n * @param {string} level\n */\nmodule.exports.init_log_level = function(level) {\n const ptr0 = passStringToWasm0(level, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.init_log_level(ptr0, len0);\n};\n\n/**\n * @returns {any}\n */\nmodule.exports.build_info = function() {\n const ret = wasm.build_info();\n return ret;\n};\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_3.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n/**\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ProgramCompileResult}\n */\nmodule.exports.compile_program = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_program(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ContractCompileResult}\n */\nmodule.exports.compile_contract = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_contract(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * This is a method that exposes the same API as `compile`\n * But uses the Context based APi internally\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ProgramCompileResult}\n */\nmodule.exports.compile_program_ = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_program_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\n/**\n * This is a method that exposes the same API as `compile`\n * But uses the Context based APi internally\n * @param {string} entry_point\n * @param {DependencyGraph | null | undefined} dependency_graph\n * @param {PathToFileSourceMap} file_source_map\n * @returns {ContractCompileResult}\n */\nmodule.exports.compile_contract_ = function(entry_point, dependency_graph, file_source_map) {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(file_source_map, PathToFileSourceMap);\n var ptr1 = file_source_map.__destroy_into_raw();\n const ret = wasm.compile_contract_(ptr0, len0, isLikeNone(dependency_graph) ? 0 : addToExternrefTable0(dependency_graph), ptr1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n};\n\nconst CompilerContextFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_compilercontext_free(ptr >>> 0, 1));\n/**\n * This is a wrapper class that is wasm-bindgen compatible\n * We do not use js_name and rename it like CrateId because\n * then the impl block is not picked up in javascript.\n */\nclass CompilerContext {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n CompilerContextFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_compilercontext_free(ptr, 0);\n }\n /**\n * @param {PathToFileSourceMap} source_map\n */\n constructor(source_map) {\n _assertClass(source_map, PathToFileSourceMap);\n var ptr0 = source_map.__destroy_into_raw();\n const ret = wasm.compilercontext_new(ptr0);\n this.__wbg_ptr = ret >>> 0;\n CompilerContextFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {string} path_to_crate\n * @returns {CrateId}\n */\n process_root_crate(path_to_crate) {\n const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.compilercontext_process_root_crate(this.__wbg_ptr, ptr0, len0);\n return CrateId.__wrap(ret);\n }\n /**\n * @param {string} path_to_crate\n * @returns {CrateId}\n */\n process_dependency_crate(path_to_crate) {\n const ptr0 = passStringToWasm0(path_to_crate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.compilercontext_process_dependency_crate(this.__wbg_ptr, ptr0, len0);\n return CrateId.__wrap(ret);\n }\n /**\n * @param {string} crate_name\n * @param {CrateId} from\n * @param {CrateId} to\n */\n add_dependency_edge(crate_name, from, to) {\n const ptr0 = passStringToWasm0(crate_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(from, CrateId);\n _assertClass(to, CrateId);\n const ret = wasm.compilercontext_add_dependency_edge(this.__wbg_ptr, ptr0, len0, from.__wbg_ptr, to.__wbg_ptr);\n if (ret[1]) {\n throw takeFromExternrefTable0(ret[0]);\n }\n }\n /**\n * @param {number} program_width\n * @returns {ProgramCompileResult}\n */\n compile_program(program_width) {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.compilercontext_compile_program(ptr, program_width);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n /**\n * @param {number} program_width\n * @returns {ContractCompileResult}\n */\n compile_contract(program_width) {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.compilercontext_compile_contract(ptr, program_width);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n}\nmodule.exports.CompilerContext = CompilerContext;\n\nconst CrateIdFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_crateid_free(ptr >>> 0, 1));\n\nclass CrateId {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(CrateId.prototype);\n obj.__wbg_ptr = ptr;\n CrateIdFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n CrateIdFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_crateid_free(ptr, 0);\n }\n}\nmodule.exports.CrateId = CrateId;\n\nconst PathToFileSourceMapFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_pathtofilesourcemap_free(ptr >>> 0, 1));\n/**\n * This map contains the paths of all of the files in the entry-point crate and\n * the transitive dependencies of the entry-point crate.\n *\n * This is for all intents and purposes the file system that the compiler will use to resolve/compile\n * files in the crate being compiled and its dependencies.\n *\n * Using a `BTreeMap` to add files to the [FileManager] in a deterministic order,\n * which affects the `FileId` in the `Location`s in the AST on which the `hash` is based.\n * Note that we cannot expect to match the IDs assigned by the `FileManager` used by `nargo`,\n * because there the order is determined by the dependency graph as well as the file name.\n */\nclass PathToFileSourceMap {\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n PathToFileSourceMapFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_pathtofilesourcemap_free(ptr, 0);\n }\n constructor() {\n const ret = wasm.pathtofilesourcemap_new();\n this.__wbg_ptr = ret >>> 0;\n PathToFileSourceMapFinalization.register(this, this.__wbg_ptr, this);\n return this;\n }\n /**\n * @param {string} path\n * @param {string} source_code\n * @returns {boolean}\n */\n add_source_code(path, source_code) {\n const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(source_code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.pathtofilesourcemap_add_source_code(this.__wbg_ptr, ptr0, len0, ptr1, len1);\n return ret !== 0;\n }\n}\nmodule.exports.PathToFileSourceMap = PathToFileSourceMap;\n\nmodule.exports.__wbg_constructor_028de84558e1bc6c = function() {\n const ret = new Object();\n return ret;\n};\n\nmodule.exports.__wbg_constructor_2e707aaa476d830f = function() {\n const ret = new Object();\n return ret;\n};\n\nmodule.exports.__wbg_constructor_8a689602cef0475e = function(arg0) {\n const ret = new Error(arg0);\n return ret;\n};\n\nmodule.exports.__wbg_debug_3cb59063b29f58c1 = function(arg0) {\n console.debug(arg0);\n};\n\nmodule.exports.__wbg_debug_e17b51583ca6a632 = function(arg0, arg1, arg2, arg3) {\n console.debug(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_error_524f506f44df1645 = function(arg0) {\n console.error(arg0);\n};\n\nmodule.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n};\n\nmodule.exports.__wbg_error_80de38b3f7cc3c3c = function(arg0, arg1, arg2, arg3) {\n console.error(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_getTime_46267b1c24877e30 = function(arg0) {\n const ret = arg0.getTime();\n return ret;\n};\n\nmodule.exports.__wbg_info_033d8b8a0838f1d3 = function(arg0, arg1, arg2, arg3) {\n console.info(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbg_info_3daf2e093e091b66 = function(arg0) {\n console.info(arg0);\n};\n\nmodule.exports.__wbg_new0_f788a2397c7ca929 = function() {\n const ret = new Date();\n return ret;\n};\n\nmodule.exports.__wbg_new_8a6f238a6ece86ea = function() {\n const ret = new Error();\n return ret;\n};\n\nmodule.exports.__wbg_parse_def2e24ef1252aff = function() { return handleError(function (arg0, arg1) {\n const ret = JSON.parse(getStringFromWasm0(arg0, arg1));\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(arg0, arg1, arg2);\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {\n const ret = arg1.stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(arg0);\n return ret;\n}, arguments) };\n\nmodule.exports.__wbg_warn_4ca3906c248c47c4 = function(arg0) {\n console.warn(arg0);\n};\n\nmodule.exports.__wbg_warn_aaf1f4664a035bd6 = function(arg0, arg1, arg2, arg3) {\n console.warn(arg0, arg1, arg2, arg3);\n};\n\nmodule.exports.__wbindgen_debug_string = function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_3;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n};\n\nmodule.exports.__wbindgen_is_undefined = function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n};\n\nmodule.exports.__wbindgen_string_get = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n};\n\nmodule.exports.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n};\n\nmodule.exports.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n};\n\nconst path = require('path').join(__dirname, 'index_bg.wasm');\nconst bytes = require('fs').readFileSync(path);\n\nconst wasmModule = new WebAssembly.Module(bytes);\nconst wasmInstance = new WebAssembly.Instance(wasmModule, imports);\nwasm = wasmInstance.exports;\nmodule.exports.__wasm = wasm;\n\nwasm.__wbindgen_start();\n\n","import { inflate } from 'pako';\n\n/**\n * Decompresses and decodes the debug symbols\n * @param debugSymbols - The base64 encoded debug symbols\n */\nexport function inflateDebugSymbols(debugSymbols: string) {\n return JSON.parse(inflate(Uint8Array.from(Buffer.from(debugSymbols, 'base64')), { to: 'string', raw: true }));\n}\n","import { join } from 'path';\n\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig } from '../../types/noir_package_config';\nimport { LogData, LogFn } from '../../utils';\n\n/**\n * Noir Dependency Resolver\n */\nexport class DependencyManager {\n #entryPoint: Package;\n #libraries = new Map<string, Dependency>();\n #dependencies = new Map<string, string[]>();\n #log: LogFn;\n #resolvers: readonly DependencyResolver[];\n\n /**\n * Creates a new dependency resolver\n * @param resolvers - A list of dependency resolvers to use\n * @param entryPoint - The entry point of the project\n */\n constructor(resolvers: readonly DependencyResolver[] = [], entryPoint: Package) {\n this.#resolvers = resolvers;\n this.#entryPoint = entryPoint;\n this.#log = (msg: string, _data?: LogData) => {\n console.log(msg);\n };\n }\n\n /**\n * Gets dependencies for the entry point\n */\n public getEntrypointDependencies() {\n return this.#dependencies.get('') ?? [];\n }\n\n /**\n * Get transitive libraries used by the package\n */\n public getLibraries() {\n return Array.from(this.#libraries.entries());\n }\n\n /**\n * A map of library dependencies\n */\n public getLibraryDependencies() {\n const entries = Array.from(this.#dependencies.entries());\n return Object.fromEntries(entries.filter(([name]) => name !== ''));\n }\n\n /**\n * Resolves dependencies for a package.\n */\n public async resolveDependencies(): Promise<void> {\n await this.#breadthFirstResolveDependencies();\n }\n\n /**\n * Gets the version of a dependency in the dependency tree\n * @param name - Dependency name\n * @returns The dependency's version\n */\n public getVersionOf(name: string): string | undefined {\n const dep = this.#libraries.get(name);\n return dep?.version;\n }\n\n async #breadthFirstResolveDependencies(): Promise<void> {\n /** Represents a package to resolve dependencies for */\n type Job = {\n /** Package name */\n packageName: string;\n /** The package location */\n noirPackage: Package;\n };\n\n const queue: Job[] = [\n {\n packageName: '',\n noirPackage: this.#entryPoint,\n },\n ];\n\n while (queue.length > 0) {\n const { packageName, noirPackage } = queue.shift()!;\n for (const [name, config] of Object.entries(noirPackage.getDependencies())) {\n // TODO what happens if more than one package has the same name but different versions?\n if (this.#libraries.has(name)) {\n this.#log(`skipping already resolved dependency ${name}`);\n this.#dependencies.set(packageName, [...(this.#dependencies.get(packageName) ?? []), name]);\n\n continue;\n }\n const dependency = await this.#resolveDependency(noirPackage, config);\n if (dependency.package.getType() !== 'lib') {\n this.#log(`Non-library package ${name}`, config);\n throw new Error(`Dependency ${name} is not a library`);\n }\n\n this.#libraries.set(name, dependency);\n this.#dependencies.set(packageName, [...(this.#dependencies.get(packageName) ?? []), name]);\n\n queue.push({\n noirPackage: dependency.package,\n packageName: name,\n });\n }\n }\n }\n\n async #resolveDependency(pkg: Package, config: DependencyConfig): Promise<Dependency> {\n let dependency: Dependency | null = null;\n for (const resolver of this.#resolvers) {\n dependency = await resolver.resolveDependency(pkg, config);\n if (dependency) {\n break;\n }\n }\n\n if (!dependency) {\n throw new Error('Dependency not resolved');\n }\n\n return dependency;\n }\n\n /**\n * Gets the names of the crates in this dependency list\n */\n public getPackageNames() {\n return [...this.#libraries.keys()];\n }\n\n /**\n * Looks up a dependency\n * @param sourceId - The source being resolved\n * @returns The path to the resolved file\n */\n public findFile(sourceId: string): string | null {\n const [lib, ...path] = sourceId.split('/').filter((x) => x);\n const dep = this.#libraries.get(lib);\n if (dep) {\n return join(dep.package.getSrcPath(), ...path);\n } else {\n return null;\n }\n }\n}\n","import { delimiter, join, sep } from 'path';\nimport { unzip } from 'unzipit';\n\nimport { FileManager } from '../file-manager/file-manager';\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig, GitDependencyConfig } from '../../types/noir_package_config';\nimport { LogData } from '../../utils';\n\n/**\n * Downloads dependencies from github\n */\nexport class GithubDependencyResolver implements DependencyResolver {\n #fm: FileManager;\n #fetch: typeof fetch;\n #log;\n\n constructor(fm: FileManager, fetcher: typeof fetch) {\n this.#fm = fm;\n this.#fetch = fetcher;\n this.#log = (msg: string, _data?: LogData) => {\n console.log(msg);\n };\n }\n\n /**\n * Resolves a dependency from github. Returns null if URL is for a different website.\n * @param _pkg - The package to resolve the dependency for\n * @param dependency - The dependency configuration\n * @returns asd\n */\n async resolveDependency(_pkg: Package, dependency: DependencyConfig): Promise<Dependency | null> {\n // TODO accept ssh urls?\n // TODO github authentication?\n if (!('git' in dependency) || new URL(dependency.git).hostname != 'github.com') {\n return null;\n }\n\n const archivePath = await this.#fetchZipFromGithub(dependency);\n const libPath = await this.#extractZip(dependency, archivePath);\n return {\n version: dependency.tag,\n package: await Package.open(libPath, this.#fm),\n };\n }\n\n async #fetchZipFromGithub(dependency: Pick<GitDependencyConfig, 'git' | 'tag'>): Promise<string> {\n const git_host = new URL(dependency.git);\n if (git_host !== null && git_host.host != 'github.com') {\n throw new Error('Only github dependencies are supported');\n }\n\n const url = resolveGithubCodeArchive(dependency, 'zip');\n const localArchivePath = join('archives', safeFilename(url.pathname));\n\n // TODO should check signature before accepting any file\n if (this.#fm.hasFileSync(localArchivePath)) {\n this.#log('using cached archive', { url: url.href, path: localArchivePath });\n return localArchivePath;\n }\n\n const response = await this.#fetch(url, {\n method: 'GET',\n });\n\n if (!response.ok || !response.body) {\n throw new Error(`Failed to fetch ${url}: ${response.statusText}`);\n }\n\n const tmpFile = localArchivePath + '.tmp';\n await this.#fm.writeFile(tmpFile, response.body);\n await this.#fm.moveFile(tmpFile, localArchivePath);\n\n return localArchivePath;\n }\n\n async #extractZip(dependency: GitDependencyConfig, archivePath: string): Promise<string> {\n const gitUrl = new URL(dependency.git);\n // extract the archive to this location\n const extractLocation = join('libs', safeFilename(gitUrl.pathname + '@' + (dependency.tag ?? 'HEAD')));\n\n // where we expect to find this package after extraction\n // it might already exist if the archive got unzipped previously\n const packagePath = join(extractLocation, dependency.directory ?? '');\n\n if (this.#fm.hasFileSync(packagePath)) {\n return packagePath;\n }\n\n const { entries } = await unzip(await this.#fm.readFile(archivePath));\n\n // extract to a temporary directory, then move it to the final location\n // TODO empty the temp directory first\n const tmpExtractLocation = extractLocation + '.tmp';\n for (const entry of Object.values(entries)) {\n if (entry.isDirectory) {\n continue;\n }\n\n // remove the first path segment, because it'll be the archive name\n const name = stripSegments(entry.name, 1);\n const path = join(tmpExtractLocation, name);\n await this.#fm.writeFile(path, (await entry.blob()).stream());\n }\n\n await this.#fm.moveFile(tmpExtractLocation, extractLocation);\n\n return packagePath;\n }\n}\n\n/**\n * Strips the first n segments from a path\n */\nfunction stripSegments(path: string, count: number): string {\n const segments = path.split(sep).filter(Boolean);\n return segments.slice(count).join(sep);\n}\n\n/**\n * Returns a safe filename for a value\n * @param val - The value to convert\n */\nexport function safeFilename(val: string): string {\n if (!val) {\n throw new Error('invalid value');\n }\n\n return val.replaceAll(sep, '_').replaceAll(delimiter, '_').replace(/^_+/, '');\n}\n\n/**\n * Resolves a dependency's archive URL.\n * @param dependency - The dependency configuration\n * @returns The URL to the library archive\n */\nexport function resolveGithubCodeArchive(dependency: GitDependencyConfig, format: 'zip' | 'tar'): URL {\n const gitUrl = new URL(dependency.git);\n const [owner, repo] = gitUrl.pathname.slice(1).split('/');\n const ref = dependency.tag ?? 'HEAD';\n const extension = format === 'zip' ? 'zip' : 'tar.gz';\n\n if (!owner || !repo || gitUrl.hostname !== 'github.com') {\n throw new Error('Invalid Github repository URL');\n }\n\n return new URL(`https://github.com/${owner}/${repo}/archive/${ref}.${extension}`);\n}\n","import { isAbsolute, join } from 'path';\n\nimport { FileManager } from '../file-manager/file-manager';\nimport { Package } from '../package';\nimport { Dependency, DependencyResolver } from './dependency-resolver';\nimport { DependencyConfig } from '../../types/noir_package_config';\n\n/**\n * Resolves dependencies on-disk, relative to current package\n */\nexport class LocalDependencyResolver implements DependencyResolver {\n #fm: FileManager;\n\n constructor(fm: FileManager) {\n this.#fm = fm;\n }\n\n async resolveDependency(parent: Package, config: DependencyConfig): Promise<Dependency | null> {\n if ('path' in config) {\n const parentPath = parent.getPackagePath();\n const dependencyPath = isAbsolute(config.path) ? config.path : join(parentPath, config.path);\n return {\n // unknown version, Nargo.toml doesn't have a version field\n version: undefined,\n package: await Package.open(dependencyPath, this.#fm),\n };\n } else {\n return null;\n }\n }\n}\n","import { dirname, isAbsolute, join } from 'path';\n\n/**\n * A file system interface that matches the node fs module.\n */\nexport interface FileSystem {\n /** Checks if the file exists */\n existsSync: (path: string) => boolean;\n /** Creates a directory structure */\n mkdir: (\n dir: string,\n opts?: {\n /** Create parent directories as needed */\n recursive: boolean;\n },\n ) => Promise<void>;\n /** Writes a file */\n writeFile: (path: string, data: Uint8Array) => Promise<void>;\n /** Reads a file */\n readFile: (path: string, encoding?: 'utf-8') => Promise<Uint8Array | string>;\n /** Renames a file */\n rename: (oldPath: string, newPath: string) => Promise<void>;\n /** Reads a directory */\n readdir: (\n path: string,\n options?: {\n /** Traverse child directories recursively */\n recursive: boolean;\n },\n ) => Promise<string[]>;\n}\n\n/**\n * A file manager that writes file to a specific directory but reads globally.\n */\nexport class FileManager {\n #fs: FileSystem;\n #dataDir: string;\n\n constructor(fs: FileSystem, dataDir: string) {\n this.#fs = fs;\n this.#dataDir = dataDir;\n }\n\n /**\n * Returns the data directory\n */\n getDataDir() {\n return this.#dataDir;\n }\n\n /**\n * Saves a file to the data directory.\n * @param name - File to save\n * @param stream - File contents\n */\n public async writeFile(name: string, stream: ReadableStream<Uint8Array>): Promise<void> {\n if (isAbsolute(name)) {\n throw new Error(\"can't write absolute path\");\n }\n\n const path = this.#getPath(name);\n const chunks: Uint8Array[] = [];\n const reader = stream.getReader();\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n\n chunks.push(value);\n }\n\n const file = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0));\n let offset = 0;\n for (const chunk of chunks) {\n file.set(chunk, offset);\n offset += chunk.length;\n }\n\n await this.#fs.mkdir(dirname(path), { recursive: true });\n await this.#fs.writeFile(this.#getPath(path), file);\n }\n\n /**\n * Reads a file from the filesystem and returns a buffer\n * Saves a file to the data directory.\n * @param oldName - File to save\n * @param newName - File contents\n */\n async moveFile(oldName: string, newName: string) {\n if (isAbsolute(oldName) || isAbsolute(newName)) {\n throw new Error(\"can't move absolute path\");\n }\n\n const oldPath = this.#getPath(oldName);\n const newPath = this.#getPath(newName);\n\n await this.#fs.mkdir(dirname(newPath), { recursive: true });\n await this.#fs.rename(oldPath, newPath);\n }\n\n /**\n * Reads a file from the disk and returns a buffer\n * @param name - File to read\n */\n public async readFile(name: string): Promise<Uint8Array>;\n /**\n * Reads a file from the filesystem as a string\n * @param name - File to read\n * @param encoding - Encoding to use\n */\n public async readFile(name: string, encoding: 'utf-8'): Promise<string>;\n /**\n * Reads a file from the filesystem\n * @param name - File to read\n * @param encoding - Encoding to use\n */\n public async readFile(name: string, encoding?: 'utf-8'): Promise<string | Uint8Array> {\n const path = this.#getPath(name);\n const data = await this.#fs.readFile(path, encoding);\n\n if (!encoding) {\n return typeof data === 'string'\n ? new TextEncoder().encode(data) // this branch shouldn't be hit, but just in case\n : new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n\n return data;\n }\n\n /**\n * Checks if a file exists and is accessible\n * @param name - File to check\n */\n public hasFileSync(name: string): boolean {\n return this.#fs.existsSync(this.#getPath(name));\n }\n\n #getPath(name: string) {\n return isAbsolute(name) ? name : join(this.#dataDir, name);\n }\n\n /**\n * Reads a file from the filesystem\n * @param dir - File to read\n * @param options - Readdir options\n */\n public async readdir(\n dir: string,\n options?: {\n /**\n * Traverse child directories recursively\n */\n recursive: boolean;\n },\n ) {\n const dirPath = this.#getPath(dir);\n return await this.#fs.readdir(dirPath, options);\n }\n}\n","import { existsSync } from 'fs';\nimport { promises as fs } from 'fs';\n\nimport { FileManager } from './file-manager';\n\n// This is needed because memfs doesn't support the recursive flag yet\nexport async function readdirRecursive(dir: string): Promise<string[]> {\n const contents = await fs.readdir(dir);\n let files: string[] = [];\n for (const handle of contents) {\n if ((await fs.stat(`${dir}/${handle}`)).isFile()) {\n files.push(`${dir}/${handle.toString()}`);\n } else {\n files = files.concat(await readdirRecursive(`${dir}/${handle.toString()}`));\n }\n }\n return files;\n}\n\n/**\n * Creates a new FileManager instance based on fs in node and memfs in the browser (via webpack alias)\n *\n * @param dataDir - root of the file system\n */\nexport function createNodejsFileManager(dataDir: string): FileManager {\n return new FileManager(\n {\n // ExistsSync is not available in the fs/promises module\n existsSync,\n // This is added here because the node types are not compatible with the FileSystem type for mkdir\n // Typescripts tries to use a different variant of the function that is not the one that has the optional options.\n mkdir: async (\n dir: string,\n opts?: {\n /**\n * Traverse child directories\n */\n recursive: boolean;\n },\n ) => {\n await fs.mkdir(dir, opts);\n },\n\n writeFile: fs.writeFile,\n readFile: fs.readFile,\n rename: fs.rename,\n readdir: async (\n dir: string,\n options?: {\n /**\n * Traverse child directories\n */\n recursive: boolean;\n },\n ) => {\n if (options?.recursive) {\n return readdirRecursive(dir);\n }\n return (await fs.readdir(dir)).map((handles) => handles.toString());\n },\n },\n dataDir,\n );\n}\n","import { isAbsolute } from 'path';\n\nimport { DependencyManager } from './dependencies/dependency-manager';\nimport { GithubDependencyResolver as GithubCodeArchiveDependencyResolver } from './dependencies/github-dependency-resolver';\nimport { LocalDependencyResolver } from './dependencies/local-dependency-resolver';\nimport { FileManager } from './file-manager/file-manager';\nimport { Package } from './package';\nimport { LogFn } from '../utils';\nimport { ContractCompilationArtifacts, ProgramCompilationArtifacts } from '../types/noir_artifact';\n\n/** Compilation options */\nexport type NoirWasmCompileOptions = {\n /** Logging function */\n log: LogFn;\n /** Log debugging information through this function */\n debugLog: LogFn;\n};\n\n/**\n * Noir Package Compiler\n */\nexport class NoirWasmCompiler {\n #log: LogFn;\n #debugLog: LogFn;\n #package: Package;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n #wasmCompiler: any;\n #sourceMap: any;\n #fm: FileManager;\n #dependencyManager: DependencyManager;\n\n private constructor(\n entrypoint: Package,\n dependencyManager: DependencyManager,\n fileManager: FileManager,\n wasmCompiler: unknown,\n sourceMap: unknown,\n opts: NoirWasmCompileOptions,\n ) {\n this.#log = opts.log;\n this.#debugLog = opts.debugLog;\n this.#package = entrypoint;\n this.#fm = fileManager;\n this.#wasmCompiler = wasmCompiler;\n this.#sourceMap = sourceMap;\n this.#dependencyManager = dependencyManager;\n }\n\n /**\n * Creates a new compiler instance.\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project\n * @param opts - Compilation options\n */\n public static async new(\n fileManager: FileManager,\n projectPath: string,\n /* eslint-disable @typescript-eslint/no-explicit-any */\n wasmCompiler: any,\n sourceMap: any,\n /* eslint-enable @typescript-eslint/no-explicit-any */\n opts: NoirWasmCompileOptions,\n ) {\n // Assume the filemanager is initialized at the project root\n if (!isAbsolute(projectPath)) {\n throw new Error('projectPath must be an absolute path');\n }\n\n const noirPackage = await Package.open(projectPath, fileManager);\n\n const dependencyManager = new DependencyManager(\n [\n new LocalDependencyResolver(fileManager),\n // use node's global fetch\n new GithubCodeArchiveDependencyResolver(fileManager, fetch),\n // TODO support actual Git repositories\n ],\n noirPackage,\n );\n\n return new NoirWasmCompiler(noirPackage, dependencyManager, fileManager, wasmCompiler, sourceMap, opts);\n }\n\n /**\n * Compile EntryPoint\n */\n public async compile_program(): Promise<ProgramCompilationArtifacts> {\n console.log(`Compiling at ${this.#package.getEntryPointPath()}`);\n\n if (this.#package.getType() !== 'bin') {\n throw new Error(`Expected to find package type \"bin\" but found ${this.#package.getType()}`);\n }\n await this.#dependencyManager.resolveDependencies();\n this.#debugLog(`Dependencies: ${this.#dependencyManager.getPackageNames().join(', ')}`);\n\n try {\n const entrypoint = this.#package.getEntryPointPath();\n const deps = {\n root_dependencies: this.#dependencyManager.getEntrypointDependencies(),\n library_dependencies: this.#dependencyManager.getLibraryDependencies(),\n };\n const packageSources = await this.#package.getSources(this.#fm);\n const librarySources = (\n await Promise.all(\n this.#dependencyManager\n .getLibraries()\n .map(async ([alias, library]) => await library.package.getSources(this.#fm, alias)),\n )\n ).flat();\n [...packageSources, ...librarySources].forEach((sourceFile) => {\n this.#debugLog(`Adding source ${sourceFile.path}`);\n this.#sourceMap.add_source_code(sourceFile.path, sourceFile.source);\n });\n const result = this.#wasmCompiler.compile_program(entrypoint, deps, this.#sourceMap);\n\n return result;\n } catch (err) {\n if (err instanceof Error && err.name === 'CompileError') {\n const logs = await this.#processCompileError(err);\n for (const log of logs) {\n this.#log(log);\n }\n throw new Error(logs.join('\\n'));\n }\n\n throw err;\n }\n }\n\n /**\n * Compile EntryPoint\n */\n public async compile_contract(): Promise<ContractCompilationArtifacts> {\n console.log(`Compiling at ${this.#package.getEntryPointPath()}`);\n\n if (this.#package.getType() !== 'contract') {\n throw new Error(`Expected to find package type \"contract\" but found ${this.#package.getType()}`);\n }\n await this.#dependencyManager.resolveDependencies();\n this.#debugLog(`Dependencies: ${this.#dependencyManager.getPackageNames().join(', ')}`);\n\n try {\n const entrypoint = this.#package.getEntryPointPath();\n const deps = {\n root_dependencies: this.#dependencyManager.getEntrypointDependencies(),\n library_dependencies: this.#dependencyManager.getLibraryDependencies(),\n };\n const packageSources = await this.#package.getSources(this.#fm);\n const librarySources = (\n await Promise.all(\n this.#dependencyManager\n .getLibraries()\n .map(async ([alias, library]) => await library.package.getSources(this.#fm, alias)),\n )\n ).flat();\n [...packageSources, ...librarySources].forEach((sourceFile) => {\n this.#debugLog(`Adding source ${sourceFile.path}`);\n this.#sourceMap.add_source_code(sourceFile.path, sourceFile.source);\n });\n const result = this.#wasmCompiler.compile_contract(entrypoint, deps, this.#sourceMap);\n\n return result;\n } catch (err) {\n if (err instanceof Error && err.name === 'CompileError') {\n const logs = await this.#processCompileError(err);\n for (const log of logs) {\n this.#log(log);\n }\n throw new Error(logs.join('\\n'));\n }\n\n throw err;\n }\n }\n\n async #resolveFile(path: string) {\n try {\n const libFile = this.#dependencyManager.findFile(path);\n return await this.#fm.readFile(libFile ?? path, 'utf-8');\n } catch (_err) {\n return '';\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async #processCompileError(err: any): Promise<string[]> {\n const logs = [];\n for (const diag of err.diagnostics) {\n logs.push(` ${diag.message}`);\n const contents = await this.#resolveFile(diag.file);\n const lines = contents.split('\\n');\n const lineOffsets = lines.reduce<number[]>((accum, _, idx) => {\n if (idx === 0) {\n accum.push(0);\n } else {\n accum.push(accum[idx - 1] + lines[idx - 1].length + 1);\n }\n return accum;\n }, []);\n\n for (const secondary of diag.secondaries) {\n const errorLine = lineOffsets.findIndex((offset) => offset > secondary.start);\n logs.push(` ${diag.file}:${errorLine}: ${contents.slice(secondary.start, secondary.end)}`);\n }\n }\n return logs;\n }\n}\n","import { parse } from '@ltd/j-toml';\nimport { join } from 'path';\n\nimport { FileManager } from './file-manager/file-manager';\nimport { DependencyConfig, PackageConfig, parseNoirPackageConfig } from '../types/noir_package_config';\n\nconst CONFIG_FILE_NAME = 'Nargo.toml';\nconst SOURCE_EXTENSIONS = ['.nr'];\n\n/**\n * An array of sources for a package\n */\ntype SourceList = Array<{\n /**\n * The source path, taking into account modules and aliases. Eg: mylib/mod/mysource.nr\n */\n path: string;\n /**\n * Resolved source plaintext\n */\n source: string;\n}>;\n\n/**\n * A Noir package.\n */\nexport class Package {\n #packagePath: string;\n #srcPath: string;\n #config: PackageConfig;\n\n public constructor(path: string, srcDir: string, config: PackageConfig) {\n this.#packagePath = path;\n this.#srcPath = srcDir;\n this.#config = config;\n }\n\n /**\n * Gets this package's path.\n */\n public getPackagePath() {\n return this.#packagePath;\n }\n\n /**\n * Gets this package's Nargo.toml (NoirPackage)Config.\n */\n public getPackageConfig() {\n return this.#config;\n }\n\n /**\n * The path to the source directory.\n */\n public getSrcPath() {\n return this.#srcPath;\n }\n\n /**\n * Gets the entrypoint path for this package.\n */\n public getEntryPointPath(): string {\n let entrypoint: string;\n\n switch (this.getType()) {\n case 'lib':\n // we shouldn't need to compile `lib` type, since the .nr source is read directly\n // when the lib is used as a dependency elsewhere.\n entrypoint = 'lib.nr';\n break;\n case 'contract':\n case 'bin':\n entrypoint = 'main.nr';\n break;\n default:\n throw new Error(`Unknown package type: ${this.getType()}`);\n }\n // TODO check that `src` exists\n return join(this.#srcPath, entrypoint);\n }\n\n /**\n * Gets the project type\n */\n public getType() {\n return this.#config.package.type;\n }\n\n /**\n * Gets this package's dependencies.\n */\n public getDependencies(): Record<string, DependencyConfig> {\n return this.#config.dependencies ?? {};\n }\n\n /**\n * Gets this package's sources.\n * @param fm - A file manager to use\n * @param alias - An alias for the sources, if this package is a dependency\n */\n public async getSources(fm: FileManager, alias?: string): Promise<SourceList> {\n const handles = await fm.readdir(this.#srcPath, { recursive: true });\n return Promise.all(\n handles\n .filter((handle) => SOURCE_EXTENSIONS.find((ext) => handle.endsWith(ext)))\n .map(async (file) => {\n // Github deps are directly added to the file manager, which causes them to be missing the absolute path to the source file\n // and only include the extraction directory relative to the fm root directory\n // This regexp ensures we remove the \"real\" source path for all dependencies, providing the compiler with what it expects for each source file:\n // <absoluteSourcePath> -> <sourceAsString> for bin/contract packages\n // <depAlias/relativePathToSource> -> <sourceAsString> for libs\n const suffix = file.replace(new RegExp(`.*${this.#srcPath}`), '');\n return {\n path: this.getType() === 'lib' ? `${alias ? alias : this.#config.package.name}${suffix}` : file,\n source: (await fm.readFile(file, 'utf-8')).toString(),\n };\n }),\n );\n }\n\n /**\n * Opens a path on the filesystem.\n * @param path - Path to the package.\n * @param fm - A file manager to use.\n * @returns The Noir package at the given location\n */\n public static async open(path: string, fm: FileManager): Promise<Package> {\n const fileContents = await fm.readFile(join(path, CONFIG_FILE_NAME), 'utf-8');\n const config = parseNoirPackageConfig(parse(fileContents));\n\n return new Package(path, join(path, 'src'), config);\n }\n}\n","type NoirGitDependencySchema = {\n git: string;\n tag: string;\n directory?: string;\n};\n\ntype NoirLocalDependencySchema = {\n path: string;\n};\n\ntype NoirPackageType = 'lib' | 'contract' | 'bin';\ntype NoirPackageConfigSchema = {\n package: {\n name: string;\n type: NoirPackageType;\n entry?: string;\n description?: string;\n authors?: string[];\n compiler_version?: string;\n backend?: string;\n license?: string;\n };\n dependencies?: Record<string, GitDependencyConfig | LocalDependencyConfig>;\n};\n\n/**\n * Noir package configuration.\n */\nexport type PackageConfig = NoirPackageConfigSchema;\n\n/**\n * A remote package dependency.\n */\nexport type GitDependencyConfig = NoirGitDependencySchema;\n\n/**\n * A local package dependency.\n */\nexport type LocalDependencyConfig = NoirLocalDependencySchema;\n\n/**\n * A package dependency.\n */\nexport type DependencyConfig = GitDependencyConfig | LocalDependencyConfig;\n\n/**\n * Checks that an object is a package configuration.\n * @param config - Config to check\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function parseNoirPackageConfig(config: any): PackageConfig {\n return config;\n}\n","module.exports = require(\"fs\");","module.exports = require(\"path\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { FileManager } from './noir/file-manager/file-manager';\nimport { createNodejsFileManager } from './noir/file-manager/nodejs-file-manager';\nimport { NoirWasmCompiler } from './noir/noir-wasm-compiler';\nimport { LogData, LogFn } from './utils';\nimport { ContractCompilationArtifacts, ProgramCompilationArtifacts } from './types/noir_artifact';\nimport { inflateDebugSymbols } from './noir/debug';\n\n/**\n * Compiles a Noir project\n *\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager\n * @param logFn - A logging function. If not provided, console.log will be used\n * @param debugLogFn - A debug logging function. If not provided, logFn will be used\n *\n * @example\n * ```typescript\n * // Node.js\n *\n * import { compile_program, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager(myProjectPath);\n * const myCompiledCode = await compile_program(fm);\n * ```\n *\n * ```typescript\n * // Browser\n *\n * import { compile_program, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager('/');\n * for (const path of files) {\n * await fm.writeFile(path, await getFileAsStream(path));\n * }\n * const myCompiledCode = await compile_program(fm);\n * ```\n */\nasync function compile_program(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<ProgramCompilationArtifacts> {\n const compiler = await setup_compiler(fileManager, projectPath, logFn, debugLogFn);\n return await compiler.compile_program();\n}\n\n/**\n * Compiles a Noir project\n *\n * @param fileManager - The file manager to use\n * @param projectPath - The path to the project inside the file manager. Defaults to the root of the file manager\n * @param logFn - A logging function. If not provided, console.log will be used\n * @param debugLogFn - A debug logging function. If not provided, logFn will be used\n *\n * @example\n * ```typescript\n * // Node.js\n *\n * import { compile_contract, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager(myProjectPath);\n * const myCompiledCode = await compile_contract(fm);\n * ```\n *\n * ```typescript\n * // Browser\n *\n * import { compile_contract, createFileManager } from '@noir-lang/noir_wasm';\n *\n * const fm = createFileManager('/');\n * for (const path of files) {\n * await fm.writeFile(path, await getFileAsStream(path));\n * }\n * const myCompiledCode = await compile_contract(fm);\n * ```\n */\nasync function compile_contract(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<ContractCompilationArtifacts> {\n const compiler = await setup_compiler(fileManager, projectPath, logFn, debugLogFn);\n return await compiler.compile_contract();\n}\n\nasync function setup_compiler(\n fileManager: FileManager,\n projectPath?: string,\n logFn?: LogFn,\n debugLogFn?: LogFn,\n): Promise<NoirWasmCompiler> {\n if (logFn && !debugLogFn) {\n debugLogFn = logFn;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const cjs = await require('../build/cjs');\n return await NoirWasmCompiler.new(\n fileManager,\n projectPath ?? fileManager.getDataDir(),\n cjs,\n new cjs.PathToFileSourceMap(),\n {\n log:\n logFn ??\n function (msg: string, data?: LogData) {\n if (data) {\n console.log(msg, data);\n } else {\n console.log(msg);\n }\n },\n debugLog:\n debugLogFn ??\n function (msg: string, data?: LogData) {\n if (data) {\n console.debug(msg, data);\n } else {\n console.debug(msg);\n }\n },\n },\n );\n}\n\nconst createFileManager = createNodejsFileManager;\n\nexport {\n compile_program as compile,\n compile_program,\n compile_contract,\n createFileManager,\n inflateDebugSymbols,\n ProgramCompilationArtifacts,\n ContractCompilationArtifacts,\n};\n"],"names":[],"sourceRoot":""}
|