@verdocs/web-sdk 5.0.73 → 5.0.75

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.
Files changed (156) hide show
  1. package/dist/cjs/{utils-Bxil_g6M.js → utils-DCB8q98B.js} +6 -2
  2. package/dist/cjs/utils-DCB8q98B.js.map +1 -0
  3. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +4 -1
  6. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js.map +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.entry.cjs.js.map +1 -1
  8. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -5
  10. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
  11. package/dist/cjs/verdocs-kba-dialog_3.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  16. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +4 -1
  17. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js.map +1 -1
  18. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js.map +1 -1
  19. package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js.map +1 -1
  20. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +1 -5
  21. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js.map +1 -1
  22. package/dist/collection/utils/utils.js +4 -0
  23. package/dist/collection/utils/utils.js.map +1 -1
  24. package/dist/components/{p-Clok0sKa.js → p-BqWxusTA.js} +4 -4
  25. package/dist/components/{p-Clok0sKa.js.map → p-BqWxusTA.js.map} +1 -1
  26. package/dist/components/p-CDTU_UJD.js.map +1 -1
  27. package/dist/components/{p-CG2DS0Ct.js → p-CLHwiJsu.js} +3 -3
  28. package/dist/components/{p-CG2DS0Ct.js.map → p-CLHwiJsu.js.map} +1 -1
  29. package/dist/components/{p-B3KdiIa6.js → p-CWHHlD3o.js} +3 -3
  30. package/dist/components/{p-B3KdiIa6.js.map → p-CWHHlD3o.js.map} +1 -1
  31. package/dist/components/{p-rafg8cJv.js → p-Cfx8TNcj.js} +4 -4
  32. package/dist/components/{p-rafg8cJv.js.map → p-Cfx8TNcj.js.map} +1 -1
  33. package/dist/components/{p-D-4uVyuT.js → p-CpHTrnj5.js} +3 -3
  34. package/dist/components/{p-D-4uVyuT.js.map → p-CpHTrnj5.js.map} +1 -1
  35. package/dist/components/{p-DDMPZ6xr.js → p-D38Lnu3J.js} +3 -3
  36. package/dist/components/{p-DDMPZ6xr.js.map → p-D38Lnu3J.js.map} +1 -1
  37. package/dist/components/{p-DA5NR945.js → p-De7UWCgq.js} +3 -7
  38. package/dist/components/p-De7UWCgq.js.map +1 -0
  39. package/dist/components/{p-rIIybUCF.js → p-DsBOZHKo.js} +6 -2
  40. package/dist/components/{p-rIIybUCF.js.map → p-DsBOZHKo.js.map} +1 -1
  41. package/dist/components/{p-DcAnGvC8.js → p-eiHT7SZQ.js} +5 -5
  42. package/dist/components/{p-DcAnGvC8.js.map → p-eiHT7SZQ.js.map} +1 -1
  43. package/dist/components/{p-BFgewNxB.js → p-iOb94GB3.js} +4 -4
  44. package/dist/components/{p-BFgewNxB.js.map → p-iOb94GB3.js.map} +1 -1
  45. package/dist/components/p-z0ZD30Bi.js.map +1 -1
  46. package/dist/components/verdocs-build.js +6 -6
  47. package/dist/components/verdocs-contact-picker.js +1 -1
  48. package/dist/components/verdocs-envelope-document-page.js +1 -1
  49. package/dist/components/verdocs-envelope-sidebar.js +4 -1
  50. package/dist/components/verdocs-envelope-sidebar.js.map +1 -1
  51. package/dist/components/verdocs-envelopes-list.js +2 -2
  52. package/dist/components/verdocs-field-textbox.js +1 -1
  53. package/dist/components/verdocs-preview.js +1 -1
  54. package/dist/components/verdocs-quick-filter.js +1 -1
  55. package/dist/components/verdocs-send.js +1 -1
  56. package/dist/components/verdocs-sign.js +3 -3
  57. package/dist/components/verdocs-template-document-page.js +1 -1
  58. package/dist/components/verdocs-template-fields.js +1 -1
  59. package/dist/components/verdocs-templates-list.js +1 -1
  60. package/dist/components/verdocs-view.js +1 -1
  61. package/dist/esm/{utils-CbfXTNEw.js → utils-DmfOx9Ey.js} +6 -2
  62. package/dist/esm/utils-DmfOx9Ey.js.map +1 -0
  63. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  64. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  65. package/dist/esm/verdocs-envelope-sidebar.entry.js +4 -1
  66. package/dist/esm/verdocs-envelope-sidebar.entry.js.map +1 -1
  67. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  68. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -5
  69. package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
  70. package/dist/esm/verdocs-kba-dialog_3.entry.js +1 -1
  71. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  72. package/dist/esm/verdocs-preview_7.entry.js +1 -1
  73. package/dist/esm/verdocs-sign.entry.js +1 -1
  74. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  75. package/dist/esm-es5/{utils-CbfXTNEw.js → utils-DmfOx9Ey.js} +2 -2
  76. package/dist/esm-es5/utils-DmfOx9Ey.js.map +1 -0
  77. package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
  78. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js.map +1 -1
  81. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  84. package/dist/esm-es5/verdocs-kba-dialog_3.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  89. package/dist/verdocs-web-sdk/{p-cfbef482.system.entry.js → p-03c76a24.system.entry.js} +2 -2
  90. package/dist/verdocs-web-sdk/{p-cfbef482.system.entry.js.map → p-03c76a24.system.entry.js.map} +1 -1
  91. package/dist/verdocs-web-sdk/{p-5af5bd43.entry.js → p-0bb8015d.entry.js} +2 -2
  92. package/dist/verdocs-web-sdk/{p-7e91292a.entry.js → p-13c9ac73.entry.js} +2 -2
  93. package/dist/verdocs-web-sdk/{p-3bf5dfcb.system.entry.js → p-1653b309.system.entry.js} +2 -2
  94. package/dist/verdocs-web-sdk/{p-8bee83ad.entry.js → p-1718b823.entry.js} +2 -2
  95. package/dist/verdocs-web-sdk/{p-3e4a6587.system.entry.js → p-2a183b90.system.entry.js} +3 -3
  96. package/dist/verdocs-web-sdk/{p-b78fa925.entry.js → p-3b68bc50.entry.js} +2 -2
  97. package/dist/verdocs-web-sdk/p-3b68bc50.entry.js.map +1 -0
  98. package/dist/verdocs-web-sdk/{p-ff182af0.entry.js → p-43326217.entry.js} +2 -2
  99. package/dist/verdocs-web-sdk/{p-77cb64e8.system.entry.js → p-44de70af.system.entry.js} +2 -2
  100. package/dist/verdocs-web-sdk/{p-04421e78.system.entry.js → p-524c1693.system.entry.js} +2 -2
  101. package/dist/verdocs-web-sdk/{p-7926e0ed.entry.js → p-5d4a9e54.entry.js} +2 -2
  102. package/dist/verdocs-web-sdk/{p-5f2740be.entry.js → p-65f4a435.entry.js} +2 -2
  103. package/dist/verdocs-web-sdk/{p-ba007f95.system.entry.js → p-68b0e020.system.entry.js} +2 -2
  104. package/dist/verdocs-web-sdk/{p-db22e373.system.entry.js → p-6d8c780d.system.entry.js} +2 -2
  105. package/dist/verdocs-web-sdk/{p-d73e5d98.system.entry.js → p-9f2bde83.system.entry.js} +2 -2
  106. package/dist/verdocs-web-sdk/{p-DwVINdLf.system.js.map → p-BEa6VFpF.system.js.map} +1 -1
  107. package/dist/verdocs-web-sdk/{p-DFxwv7XE.system.js.map → p-Bh0IfLXk.system.js.map} +1 -1
  108. package/dist/verdocs-web-sdk/{p-BxWHy8GG.system.js.map → p-BqV2sLyM.system.js.map} +1 -1
  109. package/dist/verdocs-web-sdk/p-C4Tt0CYc.system.js.map +1 -0
  110. package/dist/verdocs-web-sdk/{p-8wtUCSj6.system.js.map → p-C99h0Uet.system.js.map} +1 -1
  111. package/dist/verdocs-web-sdk/{p-CalyeRmL.system.js → p-CD5uiThi.system.js} +3 -3
  112. package/dist/verdocs-web-sdk/p-CD5uiThi.system.js.map +1 -0
  113. package/dist/verdocs-web-sdk/{p-Bf0islHu.system.js.map → p-CWs7NRzr.system.js.map} +1 -1
  114. package/dist/verdocs-web-sdk/p-CwXSduhy.system.js +1 -1
  115. package/dist/verdocs-web-sdk/{p-CTKsneFq.system.js.map → p-Cz3XayQm.system.js.map} +1 -1
  116. package/dist/verdocs-web-sdk/{p-CeQPkjRM.system.js.map → p-DRzyvgiA.system.js.map} +1 -1
  117. package/dist/verdocs-web-sdk/{p-SFqGy6JR.system.js.map → p-EQbSTcUE.system.js.map} +1 -1
  118. package/dist/verdocs-web-sdk/p-UTpMOeny.system.js.map +1 -0
  119. package/dist/verdocs-web-sdk/{p-7c58a33b.system.entry.js → p-a2ba1316.system.entry.js} +2 -2
  120. package/dist/verdocs-web-sdk/p-a2ba1316.system.entry.js.map +1 -0
  121. package/dist/verdocs-web-sdk/{p-6331769c.entry.js → p-aaf3cb2c.entry.js} +2 -2
  122. package/dist/verdocs-web-sdk/{p-6331769c.entry.js.map → p-aaf3cb2c.entry.js.map} +1 -1
  123. package/dist/verdocs-web-sdk/{p-d8a89fb3.entry.js → p-bb96a9af.entry.js} +2 -2
  124. package/dist/verdocs-web-sdk/{p-aa3436c1.entry.js → p-d3d531e3.entry.js} +2 -2
  125. package/dist/verdocs-web-sdk/{p-b29ae6dd.system.entry.js → p-e5f90a18.system.entry.js} +2 -2
  126. package/dist/verdocs-web-sdk/{p-Bf-kinKl.js → p-fL0BKEnm.js} +2 -2
  127. package/dist/verdocs-web-sdk/p-fL0BKEnm.js.map +1 -0
  128. package/dist/verdocs-web-sdk/verdocs-envelope-sidebar.entry.esm.js.map +1 -1
  129. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  130. package/package.json +2 -2
  131. package/dist/cjs/utils-Bxil_g6M.js.map +0 -1
  132. package/dist/components/p-DA5NR945.js.map +0 -1
  133. package/dist/esm/utils-CbfXTNEw.js.map +0 -1
  134. package/dist/esm-es5/utils-CbfXTNEw.js.map +0 -1
  135. package/dist/verdocs-web-sdk/p-7c58a33b.system.entry.js.map +0 -1
  136. package/dist/verdocs-web-sdk/p-Bf-kinKl.js.map +0 -1
  137. package/dist/verdocs-web-sdk/p-CalyeRmL.system.js.map +0 -1
  138. package/dist/verdocs-web-sdk/p-CuaH0Jft.system.js.map +0 -1
  139. package/dist/verdocs-web-sdk/p-b78fa925.entry.js.map +0 -1
  140. package/dist/verdocs-web-sdk/p-vPV-UVh5.system.js.map +0 -1
  141. /package/dist/verdocs-web-sdk/{p-5af5bd43.entry.js.map → p-0bb8015d.entry.js.map} +0 -0
  142. /package/dist/verdocs-web-sdk/{p-7e91292a.entry.js.map → p-13c9ac73.entry.js.map} +0 -0
  143. /package/dist/verdocs-web-sdk/{p-3bf5dfcb.system.entry.js.map → p-1653b309.system.entry.js.map} +0 -0
  144. /package/dist/verdocs-web-sdk/{p-8bee83ad.entry.js.map → p-1718b823.entry.js.map} +0 -0
  145. /package/dist/verdocs-web-sdk/{p-3e4a6587.system.entry.js.map → p-2a183b90.system.entry.js.map} +0 -0
  146. /package/dist/verdocs-web-sdk/{p-ff182af0.entry.js.map → p-43326217.entry.js.map} +0 -0
  147. /package/dist/verdocs-web-sdk/{p-77cb64e8.system.entry.js.map → p-44de70af.system.entry.js.map} +0 -0
  148. /package/dist/verdocs-web-sdk/{p-04421e78.system.entry.js.map → p-524c1693.system.entry.js.map} +0 -0
  149. /package/dist/verdocs-web-sdk/{p-7926e0ed.entry.js.map → p-5d4a9e54.entry.js.map} +0 -0
  150. /package/dist/verdocs-web-sdk/{p-5f2740be.entry.js.map → p-65f4a435.entry.js.map} +0 -0
  151. /package/dist/verdocs-web-sdk/{p-ba007f95.system.entry.js.map → p-68b0e020.system.entry.js.map} +0 -0
  152. /package/dist/verdocs-web-sdk/{p-db22e373.system.entry.js.map → p-6d8c780d.system.entry.js.map} +0 -0
  153. /package/dist/verdocs-web-sdk/{p-d73e5d98.system.entry.js.map → p-9f2bde83.system.entry.js.map} +0 -0
  154. /package/dist/verdocs-web-sdk/{p-d8a89fb3.entry.js.map → p-bb96a9af.entry.js.map} +0 -0
  155. /package/dist/verdocs-web-sdk/{p-aa3436c1.entry.js.map → p-d3d531e3.entry.js.map} +0 -0
  156. /package/dist/verdocs-web-sdk/{p-b29ae6dd.system.entry.js.map → p-e5f90a18.system.entry.js.map} +0 -0
@@ -9,5 +9,5 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
9
9
 
10
10
  JSZip uses the library pako released under the MIT license :
11
11
  https://github.com/nodeca/pako/blob/main/LICENSE
12
- */var hasRequiredJszip_min;function requireJszip_min(){if(hasRequiredJszip_min)return jszip_min.exports;hasRequiredJszip_min=1;(function(t,r){!function(r){t.exports=r()}((function(){return function t(r,e,i){function n(o,a){if(!e[o]){if(!r[o]){var u="function"==typeof commonjsRequire&&commonjsRequire;if(!a&&u)return u(o,true);if(s)return s(o,true);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var c=e[o]={exports:{}};r[o][0].call(c.exports,(function(t){var e=r[o][1][t];return n(e||t)}),c,c.exports,t,r,e,i)}return e[o].exports}for(var s="function"==typeof commonjsRequire&&commonjsRequire,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,r,e){var i=t("./utils"),n=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(t){for(var r,e,n,o,a,u,f,c=[],h=0,l=t.length,d=l,v="string"!==i.getTypeOf(t);h<t.length;)d=l-h,n=v?(r=t[h++],e=h<l?t[h++]:0,h<l?t[h++]:0):(r=t.charCodeAt(h++),e=h<l?t.charCodeAt(h++):0,h<l?t.charCodeAt(h++):0),o=r>>2,a=(3&r)<<4|e>>4,u=1<d?(15&e)<<2|n>>6:64,f=2<d?63&n:64,c.push(s.charAt(o)+s.charAt(a)+s.charAt(u)+s.charAt(f));return c.join("")},e.decode=function(t){var r,e,i,o,a,u,f=0,c=0,h="data:";if(t.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var l,d=3*(t=t.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&d--,t.charAt(t.length-2)===s.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=n.uint8array?new Uint8Array(0|d):new Array(0|d);f<t.length;)r=s.indexOf(t.charAt(f++))<<2|(o=s.indexOf(t.charAt(f++)))>>4,e=(15&o)<<4|(a=s.indexOf(t.charAt(f++)))>>2,i=(3&a)<<6|(u=s.indexOf(t.charAt(f++))),l[c++]=r,64!==a&&(l[c++]=e),64!==u&&(l[c++]=i);return l}},{"./support":30,"./utils":32}],2:[function(t,r,e){var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function a(t,r,e,i,n){this.compressedSize=t,this.uncompressedSize=r,this.crc32=e,this.compression=i,this.compressedContent=n}a.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),r=this;return t.on("end",(function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,r,e){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(r.compressWorker(e)).pipe(new o("compressedSize")).withStreamInfo("compression",r)},r.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,e){var i=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,e){var i=t("./utils");var n=function(){for(var t,r=[],e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;r[e]=t}return r}();r.exports=function(t,r){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,r,e,i){var s=n,o=i+e;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}(0|r,t,t.length,0):function(t,r,e,i){var s=n,o=i+e;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^r.charCodeAt(a))];return-1^t}(0|r,t,t.length,0):0}},{"./utils":32}],5:[function(t,r,e){e.base64=false,e.binary=false,e.dir=false,e.createFolders=true,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(t,r,e){var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),r.exports={Promise:i}},{lie:37}],7:[function(t,r,e){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=i?"uint8array":"array";function u(t,r){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=r,this.meta={}}e.magic="\b\0",s.inherits(u,o),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),false)},u.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],true)},u.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(r){t.push({data:r,meta:t.meta})}},e.compressWorker=function(t){return new u("Deflate",t)},e.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,e){function i(t,r){var e,i="";for(e=0;e<r;e++)i+=String.fromCharCode(255&t),t>>>=8;return i}function n(t,r,e,n,o,c){var h,l,d=t.file,v=t.compression,p=c!==a.utf8encode,m=s.transformTo("string",c(d.name)),w=s.transformTo("string",a.utf8encode(d.name)),b=d.comment,y=s.transformTo("string",c(b)),k=s.transformTo("string",a.utf8encode(b)),g=w.length!==d.name.length,E=k.length!==b.length,A="",S="",_="",j=d.dir,z=d.date,F={crc32:0,compressedSize:0,uncompressedSize:0};r&&!e||(F.crc32=t.crc32,F.compressedSize=t.compressedSize,F.uncompressedSize=t.uncompressedSize);var x=0;r&&(x|=8),p||!g&&!E||(x|=2048);var T=0,R=0;j&&(T|=16),"UNIX"===o?(R=798,T|=function(t,r){var e=t;return t||(e=r?16893:33204),(65535&e)<<16}(d.unixPermissions,j)):(R=20,T|=function(t){return 63&(t||0)}(d.dosPermissions)),h=z.getUTCHours(),h<<=6,h|=z.getUTCMinutes(),h<<=5,h|=z.getUTCSeconds()/2,l=z.getUTCFullYear()-1980,l<<=4,l|=z.getUTCMonth()+1,l<<=5,l|=z.getUTCDate(),g&&(S=i(1,1)+i(u(m),4)+w,A+="up"+i(S.length,2)+S),E&&(_=i(1,1)+i(u(y),4)+k,A+="uc"+i(_.length,2)+_);var U="";return U+="\n\0",U+=i(x,2),U+=v.magic,U+=i(h,2),U+=i(l,2),U+=i(F.crc32,4),U+=i(F.compressedSize,4),U+=i(F.uncompressedSize,4),U+=i(m.length,2),U+=i(A.length,2),{fileRecord:f.LOCAL_FILE_HEADER+U+m+A,dirRecord:f.CENTRAL_FILE_HEADER+i(R,2)+U+i(y.length,2)+"\0\0\0\0"+i(T,4)+i(n,4)+m+A+y}}var s=t("../utils"),o=t("../stream/GenericWorker"),a=t("../utf8"),u=t("../crc32"),f=t("../signature");function c(t,r,e,i){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=e,this.encodeFileName=i,this.streamFiles=t,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(c,o),c.prototype.push=function(t){var r=t.meta.percent||0,e=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:e?(r+100*(e-i-1))/e:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var r=this.streamFiles&&!t.file.dir;if(r){var e=n(t,r,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=true},c.prototype.closedSource=function(t){this.accumulate=false;var r=this.streamFiles&&!t.file.dir,e=n(t,r,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),r)this.push({data:function(t){return f.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var e=this.bytesWritten-t,n=function(t,r,e,n,o){var a=s.transformTo("string",o(n));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(r,4)+i(e,4)+i(a.length,2)+a}(this.dirRecords.length,e,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(t){this._sources.push(t);var r=this;return t.on("data",(function(t){r.processChunk(t)})),t.on("end",(function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()})),t.on("error",(function(t){r.error(t)})),this},c.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),true):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),true))},c.prototype.error=function(t){var r=this._sources;if(!o.prototype.error.call(this,t))return false;for(var e=0;e<r.length;e++)try{r[e].error(t)}catch(t){}return true},c.prototype.lock=function(){o.prototype.lock.call(this);for(var t=this._sources,r=0;r<t.length;r++)t[r].lock()},r.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,e){var i=t("../compressions"),n=t("./ZipFileWorker");e.generateWorker=function(t,r,e){var s=new n(r.streamFiles,e,r.platform,r.encodeFileName),o=0;try{t.forEach((function(t,e){o++;var n=function(t,r){var e=t||r,n=i[e];if(!n)throw new Error(e+" is not a valid compression method !");return n}(e.options.compression,r.compression),a=e.options.compressionOptions||r.compressionOptions||{},u=e.dir,f=e.date;e._compressWorker(n,a).withStreamInfo("file",{name:t,dir:u,date:f,comment:e.comment||"",unixPermissions:e.unixPermissions,dosPermissions:e.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r,e){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new i;for(var r in this)"function"!=typeof this[r]&&(t[r]=this[r]);return t}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(t,r){return(new i).loadAsync(t,r)},i.external=t("./external"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,r,e){var i=t("./utils"),n=t("./external"),s=t("./utf8"),o=t("./zipEntries"),a=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function f(t){return new n.Promise((function(r,e){var i=t.decompressed.getContentWorker().pipe(new a);i.on("error",(function(t){e(t)})).on("end",(function(){i.streamInfo.crc32!==t.decompressed.crc32?e(new Error("Corrupted zip : CRC32 mismatch")):r()})).resume()}))}r.exports=function(t,r){var e=this;return r=i.extend(r||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:s.utf8decode}),u.isNode&&u.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,true,r.optimizedBinaryString,r.base64).then((function(t){var e=new o(r);return e.load(t),e})).then((function(t){var e=[n.Promise.resolve(t)],i=t.files;if(r.checkCRC32)for(var s=0;s<i.length;s++)e.push(f(i[s]));return n.Promise.all(e)})).then((function(t){for(var n=t.shift(),s=n.files,o=0;o<s.length;o++){var a=s[o],u=a.fileNameStr,f=i.resolve(a.fileNameStr);e.file(f,a.decompressed,{binary:true,optimizedBinaryString:true,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:r.createFolders}),a.dir||(e.file(f).unsafeOriginalName=u)}return n.zipComment.length&&(e.comment=n.zipComment),e}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r,e){var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,r){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=false,this._bindStream(r)}i.inherits(s,n),s.prototype._bindStream=function(t){var r=this;(this._stream=t).pause(),t.on("data",(function(t){r.push({data:t,meta:{percent:0}})})).on("error",(function(t){r.isPaused?this.generatedError=t:r.error(t)})).on("end",(function(){r.isPaused?r._upstreamEnded=true:r.end()}))},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),true)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),true)},r.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r,e){var i=t("readable-stream").Readable;function n(t,r,e){i.call(this,r),this._helper=t;var n=this;t.on("data",(function(t,r){n.push(t)||n._helper.pause(),e&&e(r)})).on("error",(function(t){n.emit("error",t)})).on("end",(function(){n.push(null)}))}t("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},r.exports=n},{"../utils":32,"readable-stream":16}],14:[function(t,r,e){r.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,r);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,r)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var r=new Buffer(t);return r.fill(0),r},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,r,e){function i(t,r,e){var i,n=s.getTypeOf(r),a=s.extend(e||{},u);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=true),a.dosPermissions&&16&a.dosPermissions&&(a.dir=true),a.dir&&(t=p(t)),a.createFolders&&(i=v(t))&&m.call(this,i,true);var h="string"===n&&false===a.binary&&false===a.base64;e&&void 0!==e.binary||(a.binary=!h),(r instanceof f&&0===r.uncompressedSize||a.dir||!r||0===r.length)&&(a.base64=false,a.binary=true,r="",a.compression="STORE",n="string");var w=null;w=r instanceof f||r instanceof o?r:l.isNode&&l.isStream(r)?new d(t,r):s.prepareContent(t,r,a.binary,a.optimizedBinaryString,a.base64);var b=new c(t,w,a);this.files[t]=b}var n=t("./utf8"),s=t("./utils"),o=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),u=t("./defaults"),f=t("./compressedObject"),c=t("./zipObject"),h=t("./generate"),l=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),v=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var r=t.lastIndexOf("/");return 0<r?t.substring(0,r):""},p=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,r){return r=void 0!==r?r:u.createFolders,t=p(t),this.files[t]||i.call(this,t,null,{dir:true,createFolders:r}),this.files[t]};function w(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var r,e,i;for(r in this.files)i=this.files[r],(e=r.slice(this.root.length,r.length))&&r.slice(0,this.root.length)===this.root&&t(e,i)},filter:function(t){var r=[];return this.forEach((function(e,i){t(e,i)&&r.push(i)})),r},file:function(t,r,e){if(1!==arguments.length)return t=this.root+t,i.call(this,t,r,e),this;if(w(t)){var n=t;return this.filter((function(t,r){return!r.dir&&n.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(w(t))return this.filter((function(r,e){return e.dir&&t.test(r)}));var r=this.root+t,e=m.call(this,r),i=this.clone();return i.root=e.name,i},remove:function(t){t=this.root+t;var r=this.files[t];if(r||("/"!==t.slice(-1)&&(t+="/"),r=this.files[t]),r&&!r.dir)delete this.files[t];else for(var e=this.filter((function(r,e){return e.name.slice(0,t.length)===t})),i=0;i<e.length;i++)delete this.files[e[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var r,e={};try{if((e=s.extend(t||{},{streamFiles:false,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=e.type.toLowerCase(),e.compression=e.compression.toUpperCase(),"binarystring"===e.type&&(e.type="string"),!e.type)throw new Error("No output type specified.");s.checkSupport(e.type),"darwin"!==e.platform&&"freebsd"!==e.platform&&"linux"!==e.platform&&"sunos"!==e.platform||(e.platform="UNIX"),"win32"===e.platform&&(e.platform="DOS");var i=e.comment||this.comment||"";r=h.generateWorker(this,e,i)}catch(t){(r=new o("error")).error(t)}return new a(r,e.type||"string",e.mimeType)},generateAsync:function(t,r){return this.generateInternalStream(t).accumulate(r)},generateNodeStream:function(t,r){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(r)}};r.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,r,e){r.exports=t("stream")},{stream:void 0}],17:[function(t,r,e){var i=t("./DataReader");function n(t){i.call(this,t);for(var r=0;r<this.data.length;r++)t[r]=255&t[r]}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var r=t.charCodeAt(0),e=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===r&&this.data[s+1]===e&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var r=t.charCodeAt(0),e=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return r===s[0]&&e===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,r,e){var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var r,e=0;for(this.checkOffset(t),r=this.index+t-1;r>=this.index;r--)e=(e<<8)+this.byteAt(r);return this.index+=t,e},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},r.exports=n},{"../utils":32}],19:[function(t,r,e){var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,e){var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,r,e){var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,e){var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),o=t("./StringReader"),a=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");r.exports=function(t){var r=i.getTypeOf(t);return i.checkSupport(r),"string"!==r||n.uint8array?"nodebuffer"===r?new a(t):n.uint8array?new u(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,e){e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,r,e){var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},r.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,e){var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},r.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,e){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+t.data.length}n.prototype.processChunk.call(this,t)},r.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,e){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var r=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,t.then((function(t){r.dataIsReady=true,r.data=t,r.max=t&&t.length||0,r.type=i.getTypeOf(t),r.isPaused||r._tickAndRepeat()}),(function(t){r.error(t)}))}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,i.delay(this._tickAndRepeat,[],this)),true)},s.prototype._tickAndRepeat=function(){this._tickScheduled=false,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=true))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var t=null,r=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r)}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,e){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=true}catch(t){this.emit("error",t)}return true},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=true,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),true)},on:function(t,r){return this._listeners[t].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,r){if(this._listeners[t])for(var e=0;e<this._listeners[t].length;e++)this._listeners[t][e].call(this,r)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var r=this;return t.on("data",(function(t){r.processChunk(t)})),t.on("end",(function(){r.end()})),t.on("error",(function(t){r.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;var t=this.isPaused=false;return this.generatedError&&(this.error(this.generatedError),t=true),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,r){return this.extraStreamInfo[t]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},r.exports=i},{}],29:[function(t,r,e){var i=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),o=t("../base64"),a=t("../support"),u=t("../external"),f=null;if(a.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function c(t,r){return new u.Promise((function(e,n){var s=[],a=t._internalType,u=t._outputType,f=t._mimeType;t.on("data",(function(t,e){s.push(t),r&&r(e)})).on("error",(function(t){s=[],n(t)})).on("end",(function(){try{var t=function(t,r,e){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",r),e);case"base64":return o.encode(r);default:return i.transformTo(t,r)}}(u,function(t,r){var e,i=0,n=null,s=0;for(e=0;e<r.length;e++)s+=r[e].length;switch(t){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(n=new Uint8Array(s),e=0;e<r.length;e++)n.set(r[e],i),i+=r[e].length;return n;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,s),f);e(t)}catch(t){n(t)}s=[]})).resume()}))}function h(t,r,e){var o=r;switch(r){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=r,this._mimeType=e,i.checkSupport(o),this._worker=t.pipe(new n(o)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return c(this,t)},on:function(t,r){var e=this;return"data"===t?this._worker.on(t,(function(t){r.call(e,t.data,t.meta)})):this._worker.on(t,(function(){i.delay(r,arguments,e)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:"nodebuffer"!==this._outputType},t)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,e){if(e.base64=true,e.array=true,e.string=true,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer="undefined"!=typeof Buffer,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=false;else{var i=new ArrayBuffer(0);try{e.blob=0===new Blob([i],{type:"application/zip"}).size}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),e.blob=0===n.getBlob("application/zip").size}catch(t){e.blob=false}}}try{e.nodestream=!!t("readable-stream").Readable}catch(t){e.nodestream=false}},{"readable-stream":16}],31:[function(t,r,e){for(var i=t("./utils"),n=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;a[254]=a[254]=1;function f(){o.call(this,"utf-8 decode"),this.leftOver=null}function c(){o.call(this,"utf-8 encode")}e.utf8encode=function(t){return n.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var r,e,i,s,o,a=t.length,u=0;for(s=0;s<a;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(i-56320),s++),u+=e<128?1:e<2048?2:e<65536?3:4;for(r=n.uint8array?new Uint8Array(u):new Array(u),s=o=0;o<u;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(i-56320),s++),e<128?r[o++]=e:(e<2048?r[o++]=192|e>>>6:(e<65536?r[o++]=224|e>>>12:(r[o++]=240|e>>>18,r[o++]=128|e>>>12&63),r[o++]=128|e>>>6&63),r[o++]=128|63&e);return r}(t)},e.utf8decode=function(t){return n.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var r,e,n,s,o=t.length,u=new Array(2*o);for(r=e=0;r<o;)if((n=t[r++])<128)u[e++]=n;else if(4<(s=a[n]))u[e++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&r<o;)n=n<<6|63&t[r++],s--;1<s?u[e++]=65533:n<65536?u[e++]=n:(n-=65536,u[e++]=55296|n>>10&1023,u[e++]=56320|1023&n)}return u.length!==e&&(u.subarray?u=u.subarray(0,e):u.length=e),i.applyFromCharCode(u)}(t=i.transformTo(n.uint8array?"uint8array":"array",t))},i.inherits(f,o),f.prototype.processChunk=function(t){var r=i.transformTo(n.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var s=r;(r=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),r.set(s,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(t,r){var e;for((r=r||t.length)>t.length&&(r=t.length),e=r-1;0<=e&&128==(192&t[e]);)e--;return e<0?r:0===e?r:e+a[t[e]]>r?e:r}(r),u=r;o!==r.length&&(n.uint8array?(u=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(u=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:e.utf8decode(u),meta:t.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=f,i.inherits(c,o),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,e){var i=t("./support"),n=t("./base64"),s=t("./nodejsUtils"),o=t("./external");function a(t){return t}function u(t,r){for(var e=0;e<t.length;++e)r[e]=255&t.charCodeAt(e);return r}t("setimmediate"),e.newBlob=function(t,r){e.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(t,r,e){var i=[],n=0,s=t.length;if(s<=e)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===r||"nodebuffer"===r?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+e,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+e,s)))),n+=e;return i.join("")},stringifyByChar:function(t){for(var r="",e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return r},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return false}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return false}}()}};function c(t){var r=65536,i=e.getTypeOf(t),n=true;if("uint8array"===i?n=f.applyCanBeUsed.uint8array:"nodebuffer"===i&&(n=f.applyCanBeUsed.nodebuffer),n)for(;1<r;)try{return f.stringifyByChunk(t,i,r)}catch(t){r=Math.floor(r/2)}return f.stringifyByChar(t)}function h(t,r){for(var e=0;e<t.length;e++)r[e]=t[e];return r}e.applyFromCharCode=c;var l={};l.string={string:a,array:function(t){return u(t,new Array(t.length))},arraybuffer:function(t){return l.string.uint8array(t).buffer},uint8array:function(t){return u(t,new Uint8Array(t.length))},nodebuffer:function(t){return u(t,s.allocBuffer(t.length))}},l.array={string:c,array:a,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},l.arraybuffer={string:function(t){return c(new Uint8Array(t))},array:function(t){return h(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:a,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},l.uint8array={string:c,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:a,nodebuffer:function(t){return s.newBufferFrom(t)}},l.nodebuffer={string:c,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return l.nodebuffer.uint8array(t).buffer},uint8array:function(t){return h(t,new Uint8Array(t.length))},nodebuffer:a},e.transformTo=function(t,r){if(r=r||"",!t)return r;e.checkSupport(t);var i=e.getTypeOf(r);return l[i][t](r)},e.resolve=function(t){for(var r=t.split("/"),e=[],i=0;i<r.length;i++){var n=r[i];"."===n||""===n&&0!==i&&i!==r.length-1||(".."===n?e.pop():e.push(n))}return e.join("/")},e.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":i.nodebuffer&&s.isBuffer(t)?"nodebuffer":i.uint8array&&t instanceof Uint8Array?"uint8array":i.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(t){var r,e,i="";for(e=0;e<(t||"").length;e++)i+="\\x"+((r=t.charCodeAt(e))<16?"0":"")+r.toString(16).toUpperCase();return i},e.delay=function(t,r,e){setImmediate((function(){t.apply(e||null,r||[])}))},e.inherits=function(t,r){function e(){}e.prototype=r.prototype,t.prototype=new e},e.extend=function(){var t,r,e={};for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&void 0===e[r]&&(e[r]=arguments[t][r]);return e},e.prepareContent=function(t,r,s,a,f){return o.Promise.resolve(r).then((function(t){return i.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise((function(r,e){var i=new FileReader;i.onload=function(t){r(t.target.result)},i.onerror=function(t){e(t.target.error)},i.readAsArrayBuffer(t)})):t})).then((function(r){var c=e.getTypeOf(r);return c?("arraybuffer"===c?r=e.transformTo("uint8array",r):"string"===c&&(f?r=n.decode(r):s&&true!==a&&(r=function(t){return u(t,i.uint8array?new Uint8Array(t.length):new Array(t.length))}(r))),r):o.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,r,e){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),o=t("./zipEntry"),a=t("./support");function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(r)+", expected "+n.pretty(t)+")")}},isSignature:function(t,r){var e=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===r;return this.reader.setIndex(e),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),r=a.uint8array?"uint8array":"array",e=n.transformTo(r,t);this.zipComment=this.loadOptions.decodeFileName(e)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,r,e,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),r=this.reader.readInt(4),e=this.reader.readData(r),this.zip64ExtensibleData[t]={id:t,length:r,value:e}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,r;for(t=0;t<this.files.length;t++)r=this.files[t],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw!this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(t);var r=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=true,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var e=this.centralDirOffset+this.centralDirSize;this.zip64&&(e+=20,e+=12+this.zip64EndOfCentralSize);var i=r-e;if(0<i)this.isSignature(r,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r,e){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),a=t("./utf8"),u=t("./compressions"),f=t("./support");function c(t,r){this.options=t,this.loadOptions=r}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var r,e;if(t.skip(22),this.fileNameLength=t.readInt(2),e=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(e),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(r=function(t){for(var r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&u[r].magic===t)return u[r];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,r,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var r=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(r),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=true)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var r,e,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)r=t.readInt(2),e=t.readInt(2),i=t.readData(e),this.extraFields[r]={id:r,length:e,value:i};t.setIndex(n)},handleUTF8:function(){var t=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(null!==r)this.fileNameStr=r;else{var e=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(e)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var s=n.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var r=i(t.value);return 1!==r.readInt(1)?null:o(this.fileName)!==r.readInt(4)?null:a.utf8decode(r.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var r=i(t.value);return 1!==r.readInt(1)?null:o(this.fileComment)!==r.readInt(4)?null:a.utf8decode(r.readData(t.length-5))}return null}},r.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,e){function i(t,r,e){this.name=t,this.dir=e.dir,this.date=e.date,this.comment=e.comment,this.unixPermissions=e.unixPermissions,this.dosPermissions=e.dosPermissions,this._data=r,this._dataBinary=e.binary,this.options={compression:e.compression,compressionOptions:e.compressionOptions}}var n=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),o=t("./utf8"),a=t("./compressedObject"),u=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var r=null,e="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(e=t.toLowerCase())||"text"===e;"binarystring"!==e&&"text"!==e||(e="string"),r=this._decompressWorker();var s=!this._dataBinary;s&&!i&&(r=r.pipe(new o.Utf8EncodeWorker)),!s&&i&&(r=r.pipe(new o.Utf8DecodeWorker))}catch(t){(r=new u("error")).error(t)}return new n(r,e,"")},async:function(t,r){return this.internalStream(t).accumulate(r)},nodeStream:function(t,r){return this.internalStream(t||"nodebuffer").toNodejsStream(r)},_compressWorker:function(t,r){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var e=this._decompressWorker();return this._dataBinary||(e=e.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(e,t,r)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new s(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)i.prototype[f[h]]=c;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,e){(function(t){var e,i,n=t.MutationObserver||t.WebKitMutationObserver;if(n){var s=0,o=new n(c),a=t.document.createTextNode("");o.observe(a,{characterData:true}),e=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var r=t.document.createElement("script");r.onreadystatechange=function(){c(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},t.document.documentElement.appendChild(r)}:function(){setTimeout(c,0)};else{var u=new t.MessageChannel;u.port1.onmessage=c,e=function(){u.port2.postMessage(0)}}var f=[];function c(){var t,r;i=true;for(var e=f.length;e;){for(r=f,f=[],t=-1;++t<e;)r[t]();e=f.length}i=false}r.exports=function(t){1!==f.push(t)||i||e()}}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,r,e){var i=t("immediate");function n(){}var s={},o=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function f(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==n&&d(this,t)}function c(t,r,e){this.promise=t,"function"==typeof r&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),"function"==typeof e&&(this.onRejected=e,this.callRejected=this.otherCallRejected)}function h(t,r,e){i((function(){var i;try{i=r(e)}catch(i){return s.reject(t,i)}i===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,i)}))}function l(t){var r=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof r)return function(){r.apply(t,arguments)}}function d(t,r){var e=false;function i(r){e||(e=true,s.reject(t,r))}function n(r){e||(e=true,s.resolve(t,r))}var o=v((function(){r(n,i)}));"error"===o.status&&i(o.value)}function v(t,r){var e={};try{e.value=t(r),e.status="success"}catch(t){e.status="error",e.value=t}return e}(r.exports=f).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))}))},f.prototype.catch=function(t){return this.then(null,t)},f.prototype.then=function(t,r){if("function"!=typeof t&&this.state===a||"function"!=typeof r&&this.state===o)return this;var e=new this.constructor(n);this.state!==u?h(e,this.state===a?t:r,this.outcome):this.queue.push(new c(e,t,r));return e},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},s.resolve=function(t,r){var e=v(l,r);if("error"===e.status)return s.reject(t,e.value);var i=e.value;if(i)d(t,i);else{t.state=a,t.outcome=r;for(var n=-1,o=t.queue.length;++n<o;)t.queue[n].callFulfilled(r)}return t},s.reject=function(t,r){t.state=o,t.outcome=r;for(var e=-1,i=t.queue.length;++e<i;)t.queue[e].callRejected(r);return t},f.resolve=function(t){if(t instanceof this)return t;return s.resolve(new this(n),t)},f.reject=function(t){var r=new this(n);return s.reject(r,t)},f.all=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=false;if(!e)return this.resolve([]);var o=new Array(e),a=0,u=-1,f=new this(n);for(;++u<e;)c(t[u],u);return f;function c(t,n){r.resolve(t).then((function(t){o[n]=t,++a!==e||i||(i=true,s.resolve(f,o))}),(function(t){i||(i=true,s.reject(f,t))}))}},f.race=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=false;if(!e)return this.resolve([]);var o=-1,a=new this(n);for(;++o<e;)u=t[o],r.resolve(u).then((function(t){i||(i=true,s.resolve(a,t))}),(function(t){i||(i=true,s.reject(a,t))}));var u;return a}},{immediate:36}],38:[function(t,r,e){var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,r,e){var i=t("./zlib/deflate"),n=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),u=Object.prototype.toString,f=0,c=-1,h=0,l=8;function d(t){if(!(this instanceof d))return new d(t);this.options=n.assign({level:c,method:l,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},t||{});var r=this.options;r.raw&&0<r.windowBits?r.windowBits=-r.windowBits:r.gzip&&0<r.windowBits&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var e=i.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(e!==f)throw new Error(o[e]);if(r.header&&i.deflateSetHeader(this.strm,r.header),r.dictionary){var v;if(v="string"==typeof r.dictionary?s.string2buf(r.dictionary):"[object ArrayBuffer]"===u.call(r.dictionary)?new Uint8Array(r.dictionary):r.dictionary,(e=i.deflateSetDictionary(this.strm,v))!==f)throw new Error(o[e]);this._dict_set=true}}function v(t,r){var e=new d(r);if(e.push(t,true),e.err)throw e.msg||o[e.err];return e.result}d.prototype.push=function(t,r){var e,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return false;o=r===~~r?r:true===r?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new n.Buf8(c),a.next_out=0,a.avail_out=c),1!==(e=i.deflate(a,o))&&e!==f)return this.onEnd(e),!(this.ended=true);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==e);return 4===o?(e=i.deflateEnd(this.strm),this.onEnd(e),this.ended=true,e===f):2!==o||(this.onEnd(f),!(a.avail_out=0))},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=d,e.deflate=v,e.deflateRaw=function(t,r){return(r=r||{}).raw=true,v(t,r)},e.gzip=function(t,r){return(r=r||{}).gzip=true,v(t,r)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,e){var i=t("./zlib/inflate"),n=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),u=t("./zlib/zstream"),f=t("./zlib/gzheader"),c=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var r=this.options;r.raw&&0<=r.windowBits&&r.windowBits<16&&(r.windowBits=-r.windowBits,0===r.windowBits&&(r.windowBits=-15)),!(0<=r.windowBits&&r.windowBits<16)||t&&t.windowBits||(r.windowBits+=32),15<r.windowBits&&r.windowBits<48&&0==(15&r.windowBits)&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var e=i.inflateInit2(this.strm,r.windowBits);if(e!==o.Z_OK)throw new Error(a[e]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function l(t,r){var e=new h(r);if(e.push(t,true),e.err)throw e.msg||a[e.err];return e.result}h.prototype.push=function(t,r){var e,a,u,f,h,l,d=this.strm,v=this.options.chunkSize,p=this.options.dictionary,m=false;if(this.ended)return false;a=r===~~r?r:true===r?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?d.input=s.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new n.Buf8(v),d.next_out=0,d.avail_out=v),(e=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(l="string"==typeof p?s.string2buf(p):"[object ArrayBuffer]"===c.call(p)?new Uint8Array(p):p,e=i.inflateSetDictionary(this.strm,l)),e===o.Z_BUF_ERROR&&true===m&&(e=o.Z_OK,m=false),e!==o.Z_STREAM_END&&e!==o.Z_OK)return this.onEnd(e),!(this.ended=true);d.next_out&&(0!==d.avail_out&&e!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=s.utf8border(d.output,d.next_out),f=d.next_out-u,h=s.buf2string(d.output,u),d.next_out=f,d.avail_out=v-f,f&&n.arraySet(d.output,d.output,u,f,0),this.onData(h)):this.onData(n.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=true)}while((0<d.avail_in||0===d.avail_out)&&e!==o.Z_STREAM_END);return e===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(e=i.inflateEnd(this.strm),this.onEnd(e),this.ended=true,e===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=l,e.inflateRaw=function(t,r){return(r=r||{}).raw=true,l(t,r)},e.ungzip=l},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,r,e){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var e=r.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}}return t},e.shrinkBuf=function(t,r){return t.length===r?t:t.subarray?t.subarray(0,r):(t.length=r,t)};var n={arraySet:function(t,r,e,i,n){if(r.subarray&&t.subarray)t.set(r.subarray(e,e+i),n);else for(var s=0;s<i;s++)t[n+s]=r[e+s]},flattenChunks:function(t){var r,e,i,n,s,o;for(r=i=0,e=t.length;r<e;r++)i+=t[r].length;for(o=new Uint8Array(i),r=n=0,e=t.length;r<e;r++)s=t[r],o.set(s,n),n+=s.length;return o}},s={arraySet:function(t,r,e,i,n){for(var s=0;s<i;s++)t[n+s]=r[e+s]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(i)},{}],42:[function(t,r,e){var i=t("./common"),n=true,s=true;try{String.fromCharCode.apply(null,[0])}catch(t){n=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=false}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(t,r){if(r<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,r));for(var e="",o=0;o<r;o++)e+=String.fromCharCode(t[o]);return e}o[254]=o[254]=1,e.string2buf=function(t){var r,e,n,s,o,a=t.length,u=0;for(s=0;s<a;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(n-56320),s++),u+=e<128?1:e<2048?2:e<65536?3:4;for(r=new i.Buf8(u),s=o=0;o<u;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(n-56320),s++),e<128?r[o++]=e:(e<2048?r[o++]=192|e>>>6:(e<65536?r[o++]=224|e>>>12:(r[o++]=240|e>>>18,r[o++]=128|e>>>12&63),r[o++]=128|e>>>6&63),r[o++]=128|63&e);return r},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var r=new i.Buf8(t.length),e=0,n=r.length;e<n;e++)r[e]=t.charCodeAt(e);return r},e.buf2string=function(t,r){var e,i,n,s,a=r||t.length,f=new Array(2*a);for(e=i=0;e<a;)if((n=t[e++])<128)f[i++]=n;else if(4<(s=o[n]))f[i++]=65533,e+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&e<a;)n=n<<6|63&t[e++],s--;1<s?f[i++]=65533:n<65536?f[i++]=n:(n-=65536,f[i++]=55296|n>>10&1023,f[i++]=56320|1023&n)}return u(f,i)},e.utf8border=function(t,r){var e;for((r=r||t.length)>t.length&&(r=t.length),e=r-1;0<=e&&128==(192&t[e]);)e--;return e<0?r:0===e?r:e+o[t[e]]>r?e:r}},{"./common":41}],43:[function(t,r,e){r.exports=function(t,r,e,i){for(var n=65535&t|0,s=t>>>16&65535|0,o=0;0!==e;){for(e-=o=2e3<e?2e3:e;s=s+(n=n+r[i++]|0)|0,--o;);n%=65521,s%=65521}return n|s<<16|0}},{}],44:[function(t,r,e){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,r,e){var i=function(){for(var t,r=[],e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;r[e]=t}return r}();r.exports=function(t,r,e,n){var s=i,o=n+e;t^=-1;for(var a=n;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}},{}],46:[function(t,r,e){var i,n=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),u=t("./messages"),f=0,c=4,h=0,l=-2,d=-1,v=4,p=2,m=8,w=9,b=286,y=30,k=19,g=2*b+1,E=15,A=3,S=258,_=S+A+1,j=42,z=113,F=1,x=2,T=3,R=4;function U(t,r){return t.msg=u[r],r}function C(t){return(t<<1)-(4<t?9:0)}function D(t){for(var r=t.length;0<=--r;)t[r]=0}function O(t){var r=t.state,e=r.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(n.arraySet(t.output,r.pending_buf,r.pending_out,e,t.next_out),t.next_out+=e,r.pending_out+=e,t.total_out+=e,t.avail_out-=e,r.pending-=e,0===r.pending&&(r.pending_out=0))}function B(t,r){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,r),t.block_start=t.strstart,O(t.strm)}function W(t,r){t.pending_buf[t.pending++]=r}function I(t,r){t.pending_buf[t.pending++]=r>>>8&255,t.pending_buf[t.pending++]=255&r}function Z(t,r){var e,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-_?t.strstart-(t.w_size-_):0,f=t.window,c=t.w_mask,h=t.prev,l=t.strstart+S,d=f[s+o-1],v=f[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(f[(e=r)+o]===v&&f[e+o-1]===d&&f[e]===f[s]&&f[++e]===f[s+1]){s+=2,e++;do{}while(f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&s<l);if(i=S-(l-s),s=l-S,o<i){if(t.match_start=r,a<=(o=i))break;d=f[s+o-1],v=f[s+o]}}}while((r=h[r&c])>u&&0!=--n);return o<=t.lookahead?o:t.lookahead}function N(t){var r,e,i,s,u,f,c,h,l,d,v=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=v+(v-_)){for(n.arraySet(t.window,t.window,v,v,0),t.match_start-=v,t.strstart-=v,t.block_start-=v,r=e=t.hash_size;i=t.head[--r],t.head[r]=v<=i?i-v:0,--e;);for(r=e=v;i=t.prev[--r],t.prev[r]=v<=i?i-v:0,--e;);s+=v}if(0===t.strm.avail_in)break;if(f=t.strm,c=t.window,h=t.strstart+t.lookahead,l=s,d=void 0,d=f.avail_in,l<d&&(d=l),e=0===d?0:(f.avail_in-=d,n.arraySet(c,f.input,f.next_in,d,h),1===f.state.wrap?f.adler=o(f.adler,c,d,h):2===f.state.wrap&&(f.adler=a(f.adler,c,d,h)),f.next_in+=d,f.total_in+=d,d),t.lookahead+=e,t.lookahead+t.insert>=A)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+A-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<A)););}while(t.lookahead<_&&0!==t.strm.avail_in)}function P(t,r){for(var e,i;;){if(t.lookahead<_){if(N(t),t.lookahead<_&&r===f)return F;if(0===t.lookahead)break}if(e=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==e&&t.strstart-e<=t.w_size-_&&(t.match_length=Z(t,e)),t.match_length>=A)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-A),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=A){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=t.strstart<A-1?t.strstart:A-1,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}function G(t,r){for(var e,i,n;;){if(t.lookahead<_){if(N(t),t.lookahead<_&&r===f)return F;if(0===t.lookahead)break}if(e=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=A-1,0!==e&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-_&&(t.match_length=Z(t,e),t.match_length<=5&&(1===t.strategy||t.match_length===A&&4096<t.strstart-t.match_start)&&(t.match_length=A-1)),t.prev_length>=A&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-A,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-A),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=A-1,t.strstart++,i&&(B(t,false),0===t.strm.avail_out))return F}else if(t.match_available){if((i=s._tr_tally(t,0,t.window[t.strstart-1]))&&B(t,false),t.strstart++,t.lookahead--,0===t.strm.avail_out)return F}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<A-1?t.strstart:A-1,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}function L(t,r,e,i,n){this.good_length=t,this.max_lazy=r,this.nice_length=e,this.max_chain=i,this.func=n}function M(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(2*g),this.dyn_dtree=new n.Buf16(2*(2*y+1)),this.bl_tree=new n.Buf16(2*(2*k+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(E+1),this.heap=new n.Buf16(2*b+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*b+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(t){var r;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(r=t.state).pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?j:z,t.adler=2===r.wrap?0:1,r.last_flush=f,s._tr_init(r),h):U(t,l)}function H(t){var r=q(t);return r===h&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=A-1,t.match_available=0,t.ins_h=0}(t.state),r}function J(t,r,e,i,s,o){if(!t)return l;var a=1;if(r===d&&(r=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),s<1||w<s||e!==m||i<8||15<i||r<0||9<r||o<0||v<o)return U(t,l);8===i&&(i=9);var u=new M;return(t.state=u).strm=t,u.wrap=a,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=s+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+A-1)/A),u.window=new n.Buf8(2*u.w_size),u.head=new n.Buf16(u.hash_size),u.prev=new n.Buf16(u.w_size),u.lit_bufsize=1<<s+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new n.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=r,u.strategy=o,u.method=e,H(t)}i=[new L(0,0,0,0,(function(t,r){var e=65535;for(e>t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(N(t),0===t.lookahead&&r===f)return F;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+e;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,B(t,false),0===t.strm.avail_out))return F;if(t.strstart-t.block_start>=t.w_size-_&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):(t.strstart>t.block_start&&(B(t,false),t.strm.avail_out),F)})),new L(4,4,8,4,P),new L(4,5,16,8,P),new L(4,6,32,32,P),new L(4,4,16,16,G),new L(8,16,32,32,G),new L(8,16,128,128,G),new L(8,32,128,256,G),new L(32,128,258,1024,G),new L(32,258,258,4096,G)],e.deflateInit=function(t,r){return J(t,r,m,15,8,0)},e.deflateInit2=J,e.deflateReset=H,e.deflateResetKeep=q,e.deflateSetHeader=function(t,r){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=r,h):l},e.deflate=function(t,r){var e,n,o,u;if(!t||!t.state||5<r||r<0)return t?U(t,l):l;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&r!==c)return U(t,0===t.avail_out?-5:l);if(n.strm=t,e=n.last_flush,n.last_flush=r,n.status===j)if(2===n.wrap)t.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead?(W(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,255&n.gzhead.time),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),W(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,255&n.gzhead.extra.length),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),W(n,3),n.status=z);else{var d=m+(n.w_bits-8<<4)<<8;d|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(d|=32),d+=31-d%31,n.status=z,I(n,d),0!==n.strstart&&(I(n,t.adler>>>16),I(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending!==n.pending_buf_size));)W(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,W(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,W(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&O(t),n.pending+2<=n.pending_buf_size&&(W(n,255&t.adler),W(n,t.adler>>8&255),t.adler=0,n.status=z)):n.status=z),0!==n.pending){if(O(t),0===t.avail_out)return n.last_flush=-1,h}else if(0===t.avail_in&&C(r)<=C(e)&&r!==c)return U(t,-5);if(666===n.status&&0!==t.avail_in)return U(t,-5);if(0!==t.avail_in||0!==n.lookahead||r!==f&&666!==n.status){var v=2===n.strategy?function(t,r){for(var e;;){if(0===t.lookahead&&(N(t),0===t.lookahead)){if(r===f)return F;break}if(t.match_length=0,e=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}(n,r):3===n.strategy?function(t,r){for(var e,i,n,o,a=t.window;;){if(t.lookahead<=S){if(N(t),t.lookahead<=S&&r===f)return F;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=A&&0<t.strstart&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){o=t.strstart+S;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<o);t.match_length=S-(o-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=A?(e=s._tr_tally(t,1,t.match_length-A),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}(n,r):i[n.level].func(n,r);if(v!==T&&v!==R||(n.status=666),v===F||v===T)return 0===t.avail_out&&(n.last_flush=-1),h;if(v===x&&(1===r?s._tr_align(n):5!==r&&(s._tr_stored_block(n,0,0,false),3===r&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),O(t),0===t.avail_out))return n.last_flush=-1,h}return r!==c?h:n.wrap<=0?1:(2===n.wrap?(W(n,255&t.adler),W(n,t.adler>>8&255),W(n,t.adler>>16&255),W(n,t.adler>>24&255),W(n,255&t.total_in),W(n,t.total_in>>8&255),W(n,t.total_in>>16&255),W(n,t.total_in>>24&255)):(I(n,t.adler>>>16),I(n,65535&t.adler)),O(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?h:1)},e.deflateEnd=function(t){var r;return t&&t.state?(r=t.state.status)!==j&&69!==r&&73!==r&&91!==r&&103!==r&&r!==z&&666!==r?U(t,l):(t.state=null,r===z?U(t,-3):h):l},e.deflateSetDictionary=function(t,r){var e,i,s,a,u,f,c,d,v=r.length;if(!t||!t.state)return l;if(2===(a=(e=t.state).wrap)||1===a&&e.status!==j||e.lookahead)return l;for(1===a&&(t.adler=o(t.adler,r,v,0)),e.wrap=0,v>=e.w_size&&(0===a&&(D(e.head),e.strstart=0,e.block_start=0,e.insert=0),d=new n.Buf8(e.w_size),n.arraySet(d,r,v-e.w_size,e.w_size,0),r=d,v=e.w_size),u=t.avail_in,f=t.next_in,c=t.input,t.avail_in=v,t.next_in=0,t.input=r,N(e);e.lookahead>=A;){for(i=e.strstart,s=e.lookahead-(A-1);e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+A-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,--s;);e.strstart=i,e.lookahead=A-1,N(e)}return e.strstart+=e.lookahead,e.block_start=e.strstart,e.insert=e.lookahead,e.lookahead=0,e.match_length=e.prev_length=A-1,e.match_available=0,t.next_in=f,t.input=c,t.avail_in=u,e.wrap=a,h},e.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r,e){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=false}},{}],48:[function(t,r,e){r.exports=function(t,r){var e,i,n,s,o,a,u,f,c,h,l,d,v,p,m,w,b,y,k,g,E,A,S,_,j;e=t.state,i=t.next_in,_=t.input,n=i+(t.avail_in-5),s=t.next_out,j=t.output,o=s-(r-t.avail_out),a=s+(t.avail_out-257),u=e.dmax,f=e.wsize,c=e.whave,h=e.wnext,l=e.window,d=e.hold,v=e.bits,p=e.lencode,m=e.distcode,w=(1<<e.lenbits)-1,b=(1<<e.distbits)-1;t:do{v<15&&(d+=_[i++]<<v,v+=8,d+=_[i++]<<v,v+=8),y=p[d&w];r:for(;;){if(d>>>=k=y>>>24,v-=k,0===(k=y>>>16&255))j[s++]=65535&y;else{if(!(16&k)){if(0==(64&k)){y=p[(65535&y)+(d&(1<<k)-1)];continue r}if(32&k){e.mode=12;break t}t.msg="invalid literal/length code",e.mode=30;break t}g=65535&y,(k&=15)&&(v<k&&(d+=_[i++]<<v,v+=8),g+=d&(1<<k)-1,d>>>=k,v-=k),v<15&&(d+=_[i++]<<v,v+=8,d+=_[i++]<<v,v+=8),y=m[d&b];e:for(;;){if(d>>>=k=y>>>24,v-=k,!(16&(k=y>>>16&255))){if(0==(64&k)){y=m[(65535&y)+(d&(1<<k)-1)];continue e}t.msg="invalid distance code",e.mode=30;break t}if(E=65535&y,v<(k&=15)&&(d+=_[i++]<<v,(v+=8)<k&&(d+=_[i++]<<v,v+=8)),u<(E+=d&(1<<k)-1)){t.msg="invalid distance too far back",e.mode=30;break t}if(d>>>=k,v-=k,(k=s-o)<E){if(c<(k=E-k)&&e.sane){t.msg="invalid distance too far back",e.mode=30;break t}if(S=l,(A=0)===h){if(A+=f-k,k<g){for(g-=k;j[s++]=l[A++],--k;);A=s-E,S=j}}else if(h<k){if(A+=f+h-k,(k-=h)<g){for(g-=k;j[s++]=l[A++],--k;);if(A=0,h<g){for(g-=k=h;j[s++]=l[A++],--k;);A=s-E,S=j}}}else if(A+=h-k,k<g){for(g-=k;j[s++]=l[A++],--k;);A=s-E,S=j}for(;2<g;)j[s++]=S[A++],j[s++]=S[A++],j[s++]=S[A++],g-=3;g&&(j[s++]=S[A++],1<g&&(j[s++]=S[A++]))}else{for(A=s-E;j[s++]=j[A++],j[s++]=j[A++],j[s++]=j[A++],2<(g-=3););g&&(j[s++]=j[A++],1<g&&(j[s++]=j[A++]))}break}}break}}while(i<n&&s<a);i-=g=v>>3,d&=(1<<(v-=g<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<a?a-s+257:257-(s-a),e.hold=d,e.bits=v}},{}],49:[function(t,r,e){var i=t("../utils/common"),n=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),u=1,f=2,c=0,h=-2,l=1,d=852,v=592;function p(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function m(){this.mode=0,this.last=false,this.wrap=0,this.havedict=false,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(t){var r;return t&&t.state?(r=t.state,t.total_in=t.total_out=r.total=0,t.msg="",r.wrap&&(t.adler=1&r.wrap),r.mode=l,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new i.Buf32(d),r.distcode=r.distdyn=new i.Buf32(v),r.sane=1,r.back=-1,c):h}function b(t){var r;return t&&t.state?((r=t.state).wsize=0,r.whave=0,r.wnext=0,w(t)):h}function y(t,r){var e,i;return t&&t.state?(i=t.state,r<0?(e=0,r=-r):(e=1+(r>>4),r<48&&(r&=15)),r&&(r<8||15<r)?h:(null!==i.window&&i.wbits!==r&&(i.window=null),i.wrap=e,i.wbits=r,b(t))):h}function k(t,r){var e,i;return t?(i=new m,(t.state=i).window=null,(e=y(t,r))!==c&&(t.state=null),e):h}var g,E,A=true;function S(t){if(A){var r;for(g=new i.Buf32(512),E=new i.Buf32(32),r=0;r<144;)t.lens[r++]=8;for(;r<256;)t.lens[r++]=9;for(;r<280;)t.lens[r++]=7;for(;r<288;)t.lens[r++]=8;for(a(u,t.lens,0,288,g,0,t.work,{bits:9}),r=0;r<32;)t.lens[r++]=5;a(f,t.lens,0,32,E,0,t.work,{bits:5}),A=false}t.lencode=g,t.lenbits=9,t.distcode=E,t.distbits=5}function _(t,r,e,n){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new i.Buf8(o.wsize)),n>=o.wsize?(i.arraySet(o.window,r,e-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(n<(s=o.wsize-o.wnext)&&(s=n),i.arraySet(o.window,r,e-n,s,o.wnext),(n-=s)?(i.arraySet(o.window,r,e-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}e.inflateReset=b,e.inflateReset2=y,e.inflateResetKeep=w,e.inflateInit=function(t){return k(t,15)},e.inflateInit2=k,e.inflate=function(t,r){var e,d,v,m,w,b,y,k,g,E,A,j,z,F,x,T,R,U,C,D,O,B,W,I,Z=0,N=new i.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;12===(e=t.state).mode&&(e.mode=13),w=t.next_out,v=t.output,y=t.avail_out,m=t.next_in,d=t.input,b=t.avail_in,k=e.hold,g=e.bits,E=b,A=y,B=c;t:for(;;)switch(e.mode){case l:if(0===e.wrap){e.mode=13;break}for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(2&e.wrap&&35615===k){N[e.check=0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0),g=k=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=false),!(1&e.wrap)||(((255&k)<<8)+(k>>8))%31){t.msg="incorrect header check",e.mode=30;break}if(8!=(15&k)){t.msg="unknown compression method",e.mode=30;break}if(g-=4,O=8+(15&(k>>>=4)),0===e.wbits)e.wbits=O;else if(O>e.wbits){t.msg="invalid window size",e.mode=30;break}e.dmax=1<<O,t.adler=e.check=1,e.mode=512&k?10:12,g=k=0;break;case 2:for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(e.flags=k,8!=(255&e.flags)){t.msg="unknown compression method",e.mode=30;break}if(57344&e.flags){t.msg="unknown header flags set",e.mode=30;break}e.head&&(e.head.text=k>>8&1),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0,e.mode=3;case 3:for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.head&&(e.head.time=k),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,N[2]=k>>>16&255,N[3]=k>>>24&255,e.check=s(e.check,N,4,0)),g=k=0,e.mode=4;case 4:for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.head&&(e.head.xflags=255&k,e.head.os=k>>8),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0,e.mode=5;case 5:if(1024&e.flags){for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.length=k,e.head&&(e.head.extra_len=k),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(b<(j=e.length)&&(j=b),j&&(e.head&&(O=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),i.arraySet(e.head.extra,d,m,j,O)),512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,e.length-=j),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(0===b)break t;for(j=0;O=d[m+j++],e.head&&O&&e.length<65536&&(e.head.name+=String.fromCharCode(O)),O&&j<b;);if(512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,O)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=8;case 8:if(4096&e.flags){if(0===b)break t;for(j=0;O=d[m+j++],e.head&&O&&e.length<65536&&(e.head.comment+=String.fromCharCode(O)),O&&j<b;);if(512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,O)break t}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(512&e.flags){for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k!==(65535&e.check)){t.msg="header crc mismatch",e.mode=30;break}g=k=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=true),t.adler=e.check=0,e.mode=12;break;case 10:for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}t.adler=e.check=p(k),g=k=0,e.mode=11;case 11:if(0===e.havedict)return t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,2;t.adler=e.check=1,e.mode=12;case 12:if(5===r||6===r)break t;case 13:if(e.last){k>>>=7&g,g-=7&g,e.mode=27;break}for(;g<3;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}switch(e.last=1&k,g-=1,3&(k>>>=1)){case 0:e.mode=14;break;case 1:if(S(e),e.mode=20,6!==r)break;k>>>=2,g-=2;break t;case 2:e.mode=17;break;case 3:t.msg="invalid block type",e.mode=30}k>>>=2,g-=2;break;case 14:for(k>>>=7&g,g-=7&g;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if((65535&k)!=(k>>>16^65535)){t.msg="invalid stored block lengths",e.mode=30;break}if(e.length=65535&k,g=k=0,e.mode=15,6===r)break t;case 15:e.mode=16;case 16:if(j=e.length){if(b<j&&(j=b),y<j&&(j=y),0===j)break t;i.arraySet(v,d,m,j,w),b-=j,m+=j,y-=j,w+=j,e.length-=j;break}e.mode=12;break;case 17:for(;g<14;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(e.nlen=257+(31&k),k>>>=5,g-=5,e.ndist=1+(31&k),k>>>=5,g-=5,e.ncode=4+(15&k),k>>>=4,g-=4,286<e.nlen||30<e.ndist){t.msg="too many length or distance symbols",e.mode=30;break}e.have=0,e.mode=18;case 18:for(;e.have<e.ncode;){for(;g<3;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.lens[P[e.have++]]=7&k,k>>>=3,g-=3}for(;e.have<19;)e.lens[P[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,W={bits:e.lenbits},B=a(0,e.lens,0,19,e.lencode,0,e.work,W),e.lenbits=W.bits,B){t.msg="invalid code lengths set",e.mode=30;break}e.have=0,e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;T=(Z=e.lencode[k&(1<<e.lenbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(R<16)k>>>=x,g-=x,e.lens[e.have++]=R;else{if(16===R){for(I=x+2;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k>>>=x,g-=x,0===e.have){t.msg="invalid bit length repeat",e.mode=30;break}O=e.lens[e.have-1],j=3+(3&k),k>>>=2,g-=2}else if(17===R){for(I=x+3;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}g-=x,O=0,j=3+(7&(k>>>=x)),k>>>=3,g-=3}else{for(I=x+7;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}g-=x,O=0,j=11+(127&(k>>>=x)),k>>>=7,g-=7}if(e.have+j>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=30;break}for(;j--;)e.lens[e.have++]=O}}if(30===e.mode)break;if(0===e.lens[256]){t.msg="invalid code -- missing end-of-block",e.mode=30;break}if(e.lenbits=9,W={bits:e.lenbits},B=a(u,e.lens,0,e.nlen,e.lencode,0,e.work,W),e.lenbits=W.bits,B){t.msg="invalid literal/lengths set",e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,W={bits:e.distbits},B=a(f,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,W),e.distbits=W.bits,B){t.msg="invalid distances set",e.mode=30;break}if(e.mode=20,6===r)break t;case 20:e.mode=21;case 21:if(6<=b&&258<=y){t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,o(t,A),w=t.next_out,v=t.output,y=t.avail_out,m=t.next_in,d=t.input,b=t.avail_in,k=e.hold,g=e.bits,12===e.mode&&(e.back=-1);break}for(e.back=0;T=(Z=e.lencode[k&(1<<e.lenbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(T&&0==(240&T)){for(U=x,C=T,D=R;T=(Z=e.lencode[D+((k&(1<<U+C)-1)>>U)])>>>16&255,R=65535&Z,!(U+(x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}k>>>=U,g-=U,e.back+=U}if(k>>>=x,g-=x,e.back+=x,e.length=R,0===T){e.mode=26;break}if(32&T){e.back=-1,e.mode=12;break}if(64&T){t.msg="invalid literal/length code",e.mode=30;break}e.extra=15&T,e.mode=22;case 22:if(e.extra){for(I=e.extra;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.length+=k&(1<<e.extra)-1,k>>>=e.extra,g-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;T=(Z=e.distcode[k&(1<<e.distbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(0==(240&T)){for(U=x,C=T,D=R;T=(Z=e.distcode[D+((k&(1<<U+C)-1)>>U)])>>>16&255,R=65535&Z,!(U+(x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}k>>>=U,g-=U,e.back+=U}if(k>>>=x,g-=x,e.back+=x,64&T){t.msg="invalid distance code",e.mode=30;break}e.offset=R,e.extra=15&T,e.mode=24;case 24:if(e.extra){for(I=e.extra;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.offset+=k&(1<<e.extra)-1,k>>>=e.extra,g-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=30;break}e.mode=25;case 25:if(0===y)break t;if(j=A-y,e.offset>j){if((j=e.offset-j)>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=30;break}z=j>e.wnext?(j-=e.wnext,e.wsize-j):e.wnext-j,j>e.length&&(j=e.length),F=e.window}else F=v,z=w-e.offset,j=e.length;for(y<j&&(j=y),y-=j,e.length-=j;v[w++]=F[z++],--j;);0===e.length&&(e.mode=21);break;case 26:if(0===y)break t;v[w++]=e.length,y--,e.mode=21;break;case 27:if(e.wrap){for(;g<32;){if(0===b)break t;b--,k|=d[m++]<<g,g+=8}if(A-=y,t.total_out+=A,e.total+=A,A&&(t.adler=e.check=e.flags?s(e.check,v,A,w-A):n(e.check,v,A,w-A)),A=y,(e.flags?k:p(k))!==e.check){t.msg="incorrect data check",e.mode=30;break}g=k=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k!==(4294967295&e.total)){t.msg="incorrect length check",e.mode=30;break}g=k=0}e.mode=29;case 29:B=1;break t;case 30:B=-3;break t;case 31:return-4;case 32:default:return h}return t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,(e.wsize||A!==t.avail_out&&e.mode<30&&(e.mode<27||4!==r))&&_(t,t.output,t.next_out,A-t.avail_out)?(e.mode=31,-4):(E-=t.avail_in,A-=t.avail_out,t.total_in+=E,t.total_out+=A,e.total+=A,e.wrap&&A&&(t.adler=e.check=e.flags?s(e.check,v,A,t.next_out-A):n(e.check,v,A,t.next_out-A)),t.data_type=e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0),(0==E&&0===A||4===r)&&B===c&&(B=-5),B)},e.inflateEnd=function(t){if(!t||!t.state)return h;var r=t.state;return r.window&&(r.window=null),t.state=null,c},e.inflateGetHeader=function(t,r){var e;return t&&t.state?0==(2&(e=t.state).wrap)?h:((e.head=r).done=false,c):h},e.inflateSetDictionary=function(t,r){var e,i=r.length;return t&&t.state?0!==(e=t.state).wrap&&11!==e.mode?h:11===e.mode&&n(1,r,i,0)!==e.check?-3:_(t,r,i,i)?(e.mode=31,-4):(e.havedict=1,c):h},e.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r,e){var i=t("../utils/common"),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(t,r,e,u,f,c,h,l){var d,v,p,m,w,b,y,k,g,E=l.bits,A=0,S=0,_=0,j=0,z=0,F=0,x=0,T=0,R=0,U=0,C=null,D=0,O=new i.Buf16(16),B=new i.Buf16(16),W=null,I=0;for(A=0;A<=15;A++)O[A]=0;for(S=0;S<u;S++)O[r[e+S]]++;for(z=E,j=15;1<=j&&0===O[j];j--);if(j<z&&(z=j),0===j)return f[c++]=20971520,f[c++]=20971520,l.bits=1,0;for(_=1;_<j&&0===O[_];_++);for(z<_&&(z=_),A=T=1;A<=15;A++)if(T<<=1,(T-=O[A])<0)return-1;if(0<T&&(0===t||1!==j))return-1;for(B[1]=0,A=1;A<15;A++)B[A+1]=B[A]+O[A];for(S=0;S<u;S++)0!==r[e+S]&&(h[B[r[e+S]]++]=S);if(b=0===t?(C=W=h,19):1===t?(C=n,D-=257,W=s,I-=257,256):(C=o,W=a,-1),A=_,w=c,x=S=U=0,p=-1,m=(R=1<<(F=z))-1,1===t&&852<R||2===t&&592<R)return 1;for(;;){for(y=A-x,g=h[S]<b?(k=0,h[S]):h[S]>b?(k=W[I+h[S]],C[D+h[S]]):(k=96,0),d=1<<A-x,_=v=1<<F;f[w+(U>>x)+(v-=d)]=y<<24|k<<16|g|0,0!==v;);for(d=1<<A-1;U&d;)d>>=1;if(0!==d?(U&=d-1,U+=d):U=0,S++,0==--O[A]){if(A===j)break;A=r[e+h[S]]}if(z<A&&(U&m)!==p){for(0===x&&(x=z),w+=_,T=1<<(F=A-x);F+x<j&&!((T-=O[F+x])<=0);)F++,T<<=1;if(R+=1<<F,1===t&&852<R||2===t&&592<R)return 1;f[p=U&m]=z<<24|F<<16|w-c|0}}return 0!==U&&(f[w+U]=A-x<<24|64<<16|0),l.bits=z,0}},{"../utils/common":41}],51:[function(t,r,e){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,r,e){var i=t("../utils/common"),n=0,s=1;function o(t){for(var r=t.length;0<=--r;)t[r]=0}var a=0,u=29,f=256,c=f+1+u,h=30,l=19,d=2*c+1,v=15,p=16,m=7,w=256,b=16,y=17,k=18,g=[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],E=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_=new Array(2*(c+2));o(_);var j=new Array(2*h);o(j);var z=new Array(512);o(z);var F=new Array(256);o(F);var x=new Array(u);o(x);var T,R,U,C=new Array(h);function D(t,r,e,i,n){this.static_tree=t,this.extra_bits=r,this.extra_base=e,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function O(t,r){this.dyn_tree=t,this.max_code=0,this.stat_desc=r}function B(t){return t<256?z[t]:z[256+(t>>>7)]}function W(t,r){t.pending_buf[t.pending++]=255&r,t.pending_buf[t.pending++]=r>>>8&255}function I(t,r,e){t.bi_valid>p-e?(t.bi_buf|=r<<t.bi_valid&65535,W(t,t.bi_buf),t.bi_buf=r>>p-t.bi_valid,t.bi_valid+=e-p):(t.bi_buf|=r<<t.bi_valid&65535,t.bi_valid+=e)}function Z(t,r,e){I(t,e[2*r],e[2*r+1])}function N(t,r){for(var e=0;e|=1&t,t>>>=1,e<<=1,0<--r;);return e>>>1}function P(t,r,e){var i,n,s=new Array(v+1),o=0;for(i=1;i<=v;i++)s[i]=o=o+e[i-1]<<1;for(n=0;n<=r;n++){var a=t[2*n+1];0!==a&&(t[2*n]=N(s[a]++,a))}}function G(t){var r;for(r=0;r<c;r++)t.dyn_ltree[2*r]=0;for(r=0;r<h;r++)t.dyn_dtree[2*r]=0;for(r=0;r<l;r++)t.bl_tree[2*r]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function L(t){8<t.bi_valid?W(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function M(t,r,e,i){var n=2*r,s=2*e;return t[n]<t[s]||t[n]===t[s]&&i[r]<=i[e]}function q(t,r,e){for(var i=t.heap[e],n=e<<1;n<=t.heap_len&&(n<t.heap_len&&M(r,t.heap[n+1],t.heap[n],t.depth)&&n++,!M(r,i,t.heap[n],t.depth));)t.heap[e]=t.heap[n],e=n,n<<=1;t.heap[e]=i}function H(t,r,e){var i,n,s,o,a=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],n=t.pending_buf[t.l_buf+a],a++,0===i?Z(t,n,r):(Z(t,(s=F[n])+f+1,r),0!==(o=g[s])&&I(t,n-=x[s],o),Z(t,s=B(--i),e),0!==(o=E[s])&&I(t,i-=C[s],o)),a<t.last_lit;);Z(t,w,r)}function J(t,r){var e,i,n,s=r.dyn_tree,o=r.stat_desc.static_tree,a=r.stat_desc.has_stree,u=r.stat_desc.elems,f=-1;for(t.heap_len=0,t.heap_max=d,e=0;e<u;e++)0!==s[2*e]?(t.heap[++t.heap_len]=f=e,t.depth[e]=0):s[2*e+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=f<2?++f:0)]=1,t.depth[n]=0,t.opt_len--,a&&(t.static_len-=o[2*n+1]);for(r.max_code=f,e=t.heap_len>>1;1<=e;e--)q(t,s,e);for(n=u;e=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=e,t.heap[--t.heap_max]=i,s[2*n]=s[2*e]+s[2*i],t.depth[n]=(t.depth[e]>=t.depth[i]?t.depth[e]:t.depth[i])+1,s[2*e+1]=s[2*i+1]=n,t.heap[1]=n++,q(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,r){var e,i,n,s,o,a,u=r.dyn_tree,f=r.max_code,c=r.stat_desc.static_tree,h=r.stat_desc.has_stree,l=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,m=r.stat_desc.max_length,w=0;for(s=0;s<=v;s++)t.bl_count[s]=0;for(u[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;e<d;e++)m<(s=u[2*u[2*(i=t.heap[e])+1]+1]+1)&&(s=m,w++),u[2*i+1]=s,f<i||(t.bl_count[s]++,o=0,p<=i&&(o=l[i-p]),a=u[2*i],t.opt_len+=a*(s+o),h&&(t.static_len+=a*(c[2*i+1]+o)));if(0!==w){do{for(s=m-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[m]--,w-=2}while(0<w);for(s=m;0!==s;s--)for(i=t.bl_count[s];0!==i;)f<(n=t.heap[--e])||(u[2*n+1]!==s&&(t.opt_len+=(s-u[2*n+1])*u[2*n],u[2*n+1]=s),i--)}}(t,r),P(s,f,t.bl_count)}function K(t,r,e){var i,n,s=-1,o=r[1],a=0,u=7,f=4;for(0===o&&(u=138,f=3),r[2*(e+1)+1]=65535,i=0;i<=e;i++)n=o,o=r[2*(i+1)+1],++a<u&&n===o||(a<f?t.bl_tree[2*n]+=a:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*b]++):a<=10?t.bl_tree[2*y]++:t.bl_tree[2*k]++,s=n,f=(a=0)===o?(u=138,3):n===o?(u=6,3):(u=7,4))}function V(t,r,e){var i,n,s=-1,o=r[1],a=0,u=7,f=4;for(0===o&&(u=138,f=3),i=0;i<=e;i++)if(n=o,o=r[2*(i+1)+1],!(++a<u&&n===o)){if(a<f)for(;Z(t,n,t.bl_tree),0!=--a;);else 0!==n?(n!==s&&(Z(t,n,t.bl_tree),a--),Z(t,b,t.bl_tree),I(t,a-3,2)):a<=10?(Z(t,y,t.bl_tree),I(t,a-3,3)):(Z(t,k,t.bl_tree),I(t,a-11,7));s=n,f=(a=0)===o?(u=138,3):n===o?(u=6,3):(u=7,4)}}o(C);var X=false;function Y(t,r,e,n){I(t,(a<<1)+(n?1:0),3),function(t,r,e,n){L(t),W(t,e),W(t,~e),i.arraySet(t.pending_buf,t.window,r,e,t.pending),t.pending+=e}(t,r,e)}e._tr_init=function(t){X||(function(){var t,r,e,i,n,s=new Array(v+1);for(i=e=0;i<u-1;i++)for(x[i]=e,t=0;t<1<<g[i];t++)F[e++]=i;for(F[e-1]=i,i=n=0;i<16;i++)for(C[i]=n,t=0;t<1<<E[i];t++)z[n++]=i;for(n>>=7;i<h;i++)for(C[i]=n<<7,t=0;t<1<<E[i]-7;t++)z[256+n++]=i;for(r=0;r<=v;r++)s[r]=0;for(t=0;t<=143;)_[2*t+1]=8,t++,s[8]++;for(;t<=255;)_[2*t+1]=9,t++,s[9]++;for(;t<=279;)_[2*t+1]=7,t++,s[7]++;for(;t<=287;)_[2*t+1]=8,t++,s[8]++;for(P(_,c+1,s),t=0;t<h;t++)j[2*t+1]=5,j[2*t]=N(t,5);T=new D(_,g,f+1,c,v),R=new D(j,E,0,h,v),U=new D(new Array(0),A,0,l,m)}(),X=true),t.l_desc=new O(t.dyn_ltree,T),t.d_desc=new O(t.dyn_dtree,R),t.bl_desc=new O(t.bl_tree,U),t.bi_buf=0,t.bi_valid=0,G(t)},e._tr_stored_block=Y,e._tr_flush_block=function(t,r,e,i){var o,a,u=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var r,e=4093624447;for(r=0;r<=31;r++,e>>>=1)if(1&e&&0!==t.dyn_ltree[2*r])return n;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(r=32;r<f;r++)if(0!==t.dyn_ltree[2*r])return s;return n}(t)),J(t,t.l_desc),J(t,t.d_desc),u=function(t){var r;for(K(t,t.dyn_ltree,t.l_desc.max_code),K(t,t.dyn_dtree,t.d_desc.max_code),J(t,t.bl_desc),r=l-1;3<=r&&0===t.bl_tree[2*S[r]+1];r--);return t.opt_len+=3*(r+1)+5+5+4,r}(t),o=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=o&&(o=a)):o=a=e+5,e+4<=o&&-1!==r?Y(t,r,e,i):4===t.strategy||a===o?(I(t,2+(i?1:0),3),H(t,_,j)):(I(t,4+(i?1:0),3),function(t,r,e,i){var n;for(I(t,r-257,5),I(t,e-1,5),I(t,i-4,4),n=0;n<i;n++)I(t,t.bl_tree[2*S[n]+1],3);V(t,t.dyn_ltree,r-1),V(t,t.dyn_dtree,e-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),H(t,t.dyn_ltree,t.dyn_dtree)),G(t),i&&L(t)},e._tr_tally=function(t,r,e){return t.pending_buf[t.d_buf+2*t.last_lit]=r>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&r,t.pending_buf[t.l_buf+t.last_lit]=255&e,t.last_lit++,0===r?t.dyn_ltree[2*e]++:(t.matches++,r--,t.dyn_ltree[2*(F[e]+f+1)]++,t.dyn_dtree[2*B(r)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){I(t,2,3),Z(t,w,_),function(t){16===t.bi_valid?(W(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,r,e){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,r,e){(function(t){!function(t,r){if(!t.setImmediate){var e,i,n,s,o=1,a={},u=false,f=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,e="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){l(t)}))}:function(){if(t.postMessage&&!t.importScripts){var r=true,e=t.onmessage;return t.onmessage=function(){r=false},t.postMessage("","*"),t.onmessage=e,r}}()?(s="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",d,false):t.attachEvent("onmessage",d),function(r){t.postMessage(s+r,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){l(t.data)},function(t){n.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,function(t){var r=f.createElement("script");r.onreadystatechange=function(){l(t),r.onreadystatechange=null,i.removeChild(r),r=null},i.appendChild(r)}):function(t){setTimeout(l,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var r=new Array(arguments.length-1),i=0;i<r.length;i++)r[i]=arguments[i+1];var n={callback:t,args:r};return a[o]=n,e(o),o++},c.clearImmediate=h}function h(t){delete a[t]}function l(t){if(u)setTimeout(l,0,t);else{var e=a[t];if(e){u=true;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(r,i)}}(e)}finally{h(t),u=false}}}}function d(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(s)&&l(+r.data.slice(s.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}))})(jszip_min);return jszip_min.exports}var jszip_minExports=requireJszip_min();var jszip=getDefaultExportFromCjs(jszip_minExports);var defaultWidth=function(t){switch(t){case"textarea":return 150;case"textbox":return 150;case"timestamp":return 105;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 71}return 150};var defaultHeight=function(t){switch(t){case"textarea":return 41;case"textbox":return 15;case"timestamp":return 15;case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 36}return 50};var setControlStyles=function(t,r,e,i){var n=r.x,s=n===void 0?0:n,o=r.y,a=o===void 0?0:o,u=r.width,f=u===void 0?defaultWidth(r.type):u,c=r.height,h=c===void 0?defaultHeight(r.type):c;t.style.width="".concat(f,"px");t.style.height="".concat(h,"px");t.style.position="absolute";t.style.left="".concat(rescale(e,s),"px");t.style.bottom="".concat(rescale(i,a),"px");t.style.transform="scale(".concat(e,", ").concat(i,")")};var getControlStyles=function(t,r,e){var i=t.x,n=i===void 0?0:i,s=t.y,o=s===void 0?0:s,a=t.width,u=a===void 0?defaultWidth(t.type):a,f=t.height,c=f===void 0?defaultHeight(t.type):f;return{zIndex:"100",width:"".concat(u,"px"),height:"".concat(c,"px"),position:"absolute",left:"".concat(rescale(r,n),"px"),bottom:"".concat(rescale(e,o),"px"),transform:"scale(".concat(r,", ").concat(e,")")}};var getFieldId=function(t){return"verdocs-doc-fld-".concat(t.name)};var updateDocumentFieldValue=function(t){var r=getFieldId(t);var e=document.getElementById(r);if(e){e.field=t;e.roleindex=t;e.setAttribute("id",r);e.setAttribute("disabled",true);e.setAttribute("disabled",false)}};var renderDocumentField=function(t,r,e,i,n){if(n===void 0){n=1}var s,o;var a=i.disabled,u=a===void 0?false:a,f=i.editable,c=f===void 0?false:f,h=i.draggable,l=h===void 0?false:h,d=i.done,v=d===void 0?false:d;var p=document.getElementById(e.containerId+"-controls");if(!p){console.log("[renderDocumentField] No controls DIV found",e.containerId+"-controls",e);return}switch(r.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var b=r.type;if(b==="textbox"){if(((s=r["setting"])===null||s===void 0?void 0:s.leading)>0||((o=r["settings"])===null||o===void 0?void 0:o.leading)>0){b="textarea"}}var y=document.createElement("verdocs-field-".concat(b));y.field=r;y.setAttribute("id",m);y.setAttribute("fieldname",r.name);y.setAttribute("source",t);y.setAttribute("sourceid","template_id"in r?r.template_id:r.envelope_id);if(u){y.setAttribute("tabindex",-1);y.setAttribute("disabled",true)}else{y.setAttribute("tabIndex",n)}y.setAttribute("editable",c);y.setAttribute("draggable",l);y.setAttribute("done",v);setControlStyles(y,r,e.xScale,e.yScale);p.appendChild(y);return y}case"checkbox":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var k=document.createElement("verdocs-field-checkbox");k.field=r;k.setAttribute("id",m);k.setAttribute("option",0);if(u){k.setAttribute("disabled",true)}if(v){k.setAttribute("done",true)}if(c){k.setAttribute("editable",true)}if(l){k.setAttribute("draggable",true)}setControlStyles(k,r,e.xScale,e.yScale);p.appendChild(k);return k}case"radio":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var g=document.createElement("verdocs-field-radio");g.field=r;g.setAttribute("id",m);g.setAttribute("option",0);if(u){g.setAttribute("disabled",true)}if(v){g.setAttribute("done",true)}if(c){g.setAttribute("editable",true)}if(l){g.setAttribute("draggable",true)}setControlStyles(g,r,e.xScale,e.yScale);p.appendChild(g);return g}default:console.log("[PREVIEW] Skipping unsupported field type",r);return null}};var updateCssTransform=function(t,r,e){var i=t.style.transform||"";var n="".concat(r,"(").concat(e,")");if(i.includes(r)){t.style.transform=i.replace(new RegExp("".concat(r,"\\(.+?\\)")),n)}else{t.style.transform=i+" "+n}};var removeCssTransform=function(t){t.style.transform=t.style.transform.split(")")[0]+")"};var saveAttachment=function(t,r,e){return __awaiter(void 0,void 0,void 0,(function(){var i,n,s;return __generator(this,(function(o){switch(o.label){case 0:i=dateFnsExports.format(new Date(r.updated_at),FORMAT_DATE);n="".concat(r.name," - ").concat(i,".pdf");return[4,getEnvelopeFile(t,r.id,e)];case 1:s=o.sent();downloadBlob(s,n);return[2]}}))}))};var saveEnvelopesAsZip=function(t,r){return __awaiter(void 0,void 0,void 0,(function(){var e,i,n,s,o,a,u,f,c,h,l,d,v,p,m,w,b,y,k,g,E,A,S,_;var j,z,F;var x,T,R,U,C,D,O,B,W,I,Z,N;return __generator(this,(function(P){switch(P.label){case 0:i=new jszip;P.label=1;case 1:P.trys.push([1,30,31,36]);j=true,z=__asyncValues(r);P.label=2;case 2:return[4,z.next()];case 3:if(!(F=P.sent(),x=F.done,!x))return[3,29];U=F.value;j=false;n=U;s=dateFnsExports.format(new Date(n.updated_at),FORMAT_DATE);o=r.length>0?i.folder("".concat(n.id," - ").concat(n.name," - ").concat(s)):null;P.label=4;case 4:P.trys.push([4,22,23,28]);a=true,u=(D=void 0,__asyncValues(n.documents));P.label=5;case 5:return[4,u.next()];case 6:if(!(f=P.sent(),C=f.done,!C))return[3,21];B=f.value;a=false;c=B;h=c.type==="certificate"?"".concat(n.name,"_certificate.pdf"):"".concat(c.name.replace(".pdf","").replace(/\//g,"_"),".pdf");return[4,getEnvelopeFile(t,n.id,c.id)];case 7:l=P.sent();if(o){o.file(h,l,{compression:"DEFLATE"})}else{i.file(h,l,{compression:"DEFLATE"})}d=((e=n.fields)===null||e===void 0?void 0:e.filter((function(t){return t.type==="attachment"&&t.settings["name"]})))||[];if(!(d.length>0))return[3,20];v=o?o.folder("attachments"):i.folder("attachments");P.label=8;case 8:P.trys.push([8,14,15,20]);p=true,m=(I=void 0,__asyncValues(d));P.label=9;case 9:return[4,m.next()];case 10:if(!(w=P.sent(),W=w.done,!W))return[3,13];N=w.value;p=false;b=N;return[4,getFieldAttachment(t,n.id,b.name)];case 11:y=P.sent();v.file(b.settings["name"].replace(/\//g,"_"),y,{compression:"DEFLATE"});P.label=12;case 12:p=true;return[3,9];case 13:return[3,20];case 14:k=P.sent();I={error:k};return[3,20];case 15:P.trys.push([15,,18,19]);if(!(!p&&!W&&(Z=m.return)))return[3,17];return[4,Z.call(m)];case 16:P.sent();P.label=17;case 17:return[3,19];case 18:if(I)throw I.error;return[7];case 19:return[7];case 20:a=true;return[3,5];case 21:return[3,28];case 22:g=P.sent();D={error:g};return[3,28];case 23:P.trys.push([23,,26,27]);if(!(!a&&!C&&(O=u.return)))return[3,25];return[4,O.call(u)];case 24:P.sent();P.label=25;case 25:return[3,27];case 26:if(D)throw D.error;return[7];case 27:return[7];case 28:j=true;return[3,2];case 29:return[3,36];case 30:E=P.sent();T={error:E};return[3,36];case 31:P.trys.push([31,,34,35]);if(!(!j&&!x&&(R=z.return)))return[3,33];return[4,R.call(z)];case 32:P.sent();P.label=33;case 33:return[3,35];case 34:if(T)throw T.error;return[7];case 35:return[7];case 36:A=dateFnsExports.format(r.length===1?new Date(r[0].updated_at):new Date,FORMAT_DATE);S=r.length===1?"".concat(r[0].name," - ").concat(A,".zip"):"Verdocs-Envelopes-".concat(A);return[4,i.generateAsync({type:"blob",compression:"DEFLATE"})];case 37:_=P.sent();downloadBlob(_,S);return[2]}}))}))};var throttle=function(t,r){var e=0;return function(){var i=this;var n=[];for(var s=0;s<arguments.length;s++){n[s]=arguments[s]}clearTimeout(e);e=setTimeout((function(){return t.apply(i,n)}),r)}};var renderedTextWidth=function(t,r){if(r===void 0){r="16px Arial"}var e=document.createElement("canvas");var i=e.getContext("2d");i.font=r;return i.measureText(t).width};var convertToE164=function(t){var r=(t||"").trim();if(!r||r.startsWith("+")){return r}r=r.replace(/[^0-9]/g,"");r=r.replace(/^0/g,"");return"+1".concat(r)};export{saveAttachment as a,renderedTextWidth as b,getControlStyles as c,convertToE164 as d,updateCssTransform as e,removeCssTransform as f,getFieldId as g,setControlStyles as h,defaultHeight as i,defaultWidth as j,renderDocumentField as r,saveEnvelopesAsZip as s,throttle as t,updateDocumentFieldValue as u};
13
- //# sourceMappingURL=utils-CbfXTNEw.js.map
12
+ */var hasRequiredJszip_min;function requireJszip_min(){if(hasRequiredJszip_min)return jszip_min.exports;hasRequiredJszip_min=1;(function(t,r){!function(r){t.exports=r()}((function(){return function t(r,e,i){function n(o,a){if(!e[o]){if(!r[o]){var u="function"==typeof commonjsRequire&&commonjsRequire;if(!a&&u)return u(o,true);if(s)return s(o,true);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var c=e[o]={exports:{}};r[o][0].call(c.exports,(function(t){var e=r[o][1][t];return n(e||t)}),c,c.exports,t,r,e,i)}return e[o].exports}for(var s="function"==typeof commonjsRequire&&commonjsRequire,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,r,e){var i=t("./utils"),n=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(t){for(var r,e,n,o,a,u,f,c=[],h=0,l=t.length,d=l,v="string"!==i.getTypeOf(t);h<t.length;)d=l-h,n=v?(r=t[h++],e=h<l?t[h++]:0,h<l?t[h++]:0):(r=t.charCodeAt(h++),e=h<l?t.charCodeAt(h++):0,h<l?t.charCodeAt(h++):0),o=r>>2,a=(3&r)<<4|e>>4,u=1<d?(15&e)<<2|n>>6:64,f=2<d?63&n:64,c.push(s.charAt(o)+s.charAt(a)+s.charAt(u)+s.charAt(f));return c.join("")},e.decode=function(t){var r,e,i,o,a,u,f=0,c=0,h="data:";if(t.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var l,d=3*(t=t.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&d--,t.charAt(t.length-2)===s.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=n.uint8array?new Uint8Array(0|d):new Array(0|d);f<t.length;)r=s.indexOf(t.charAt(f++))<<2|(o=s.indexOf(t.charAt(f++)))>>4,e=(15&o)<<4|(a=s.indexOf(t.charAt(f++)))>>2,i=(3&a)<<6|(u=s.indexOf(t.charAt(f++))),l[c++]=r,64!==a&&(l[c++]=e),64!==u&&(l[c++]=i);return l}},{"./support":30,"./utils":32}],2:[function(t,r,e){var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function a(t,r,e,i,n){this.compressedSize=t,this.uncompressedSize=r,this.crc32=e,this.compression=i,this.compressedContent=n}a.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),r=this;return t.on("end",(function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,r,e){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(r.compressWorker(e)).pipe(new o("compressedSize")).withStreamInfo("compression",r)},r.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,e){var i=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,e){var i=t("./utils");var n=function(){for(var t,r=[],e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;r[e]=t}return r}();r.exports=function(t,r){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,r,e,i){var s=n,o=i+e;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}(0|r,t,t.length,0):function(t,r,e,i){var s=n,o=i+e;t^=-1;for(var a=i;a<o;a++)t=t>>>8^s[255&(t^r.charCodeAt(a))];return-1^t}(0|r,t,t.length,0):0}},{"./utils":32}],5:[function(t,r,e){e.base64=false,e.binary=false,e.dir=false,e.createFolders=true,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(t,r,e){var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),r.exports={Promise:i}},{lie:37}],7:[function(t,r,e){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=i?"uint8array":"array";function u(t,r){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=r,this.meta={}}e.magic="\b\0",s.inherits(u,o),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),false)},u.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],true)},u.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(r){t.push({data:r,meta:t.meta})}},e.compressWorker=function(t){return new u("Deflate",t)},e.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,e){function i(t,r){var e,i="";for(e=0;e<r;e++)i+=String.fromCharCode(255&t),t>>>=8;return i}function n(t,r,e,n,o,c){var h,l,d=t.file,v=t.compression,p=c!==a.utf8encode,m=s.transformTo("string",c(d.name)),w=s.transformTo("string",a.utf8encode(d.name)),b=d.comment,y=s.transformTo("string",c(b)),k=s.transformTo("string",a.utf8encode(b)),g=w.length!==d.name.length,E=k.length!==b.length,A="",S="",_="",j=d.dir,z=d.date,F={crc32:0,compressedSize:0,uncompressedSize:0};r&&!e||(F.crc32=t.crc32,F.compressedSize=t.compressedSize,F.uncompressedSize=t.uncompressedSize);var x=0;r&&(x|=8),p||!g&&!E||(x|=2048);var T=0,R=0;j&&(T|=16),"UNIX"===o?(R=798,T|=function(t,r){var e=t;return t||(e=r?16893:33204),(65535&e)<<16}(d.unixPermissions,j)):(R=20,T|=function(t){return 63&(t||0)}(d.dosPermissions)),h=z.getUTCHours(),h<<=6,h|=z.getUTCMinutes(),h<<=5,h|=z.getUTCSeconds()/2,l=z.getUTCFullYear()-1980,l<<=4,l|=z.getUTCMonth()+1,l<<=5,l|=z.getUTCDate(),g&&(S=i(1,1)+i(u(m),4)+w,A+="up"+i(S.length,2)+S),E&&(_=i(1,1)+i(u(y),4)+k,A+="uc"+i(_.length,2)+_);var U="";return U+="\n\0",U+=i(x,2),U+=v.magic,U+=i(h,2),U+=i(l,2),U+=i(F.crc32,4),U+=i(F.compressedSize,4),U+=i(F.uncompressedSize,4),U+=i(m.length,2),U+=i(A.length,2),{fileRecord:f.LOCAL_FILE_HEADER+U+m+A,dirRecord:f.CENTRAL_FILE_HEADER+i(R,2)+U+i(y.length,2)+"\0\0\0\0"+i(T,4)+i(n,4)+m+A+y}}var s=t("../utils"),o=t("../stream/GenericWorker"),a=t("../utf8"),u=t("../crc32"),f=t("../signature");function c(t,r,e,i){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=e,this.encodeFileName=i,this.streamFiles=t,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(c,o),c.prototype.push=function(t){var r=t.meta.percent||0,e=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:e?(r+100*(e-i-1))/e:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var r=this.streamFiles&&!t.file.dir;if(r){var e=n(t,r,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=true},c.prototype.closedSource=function(t){this.accumulate=false;var r=this.streamFiles&&!t.file.dir,e=n(t,r,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),r)this.push({data:function(t){return f.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var e=this.bytesWritten-t,n=function(t,r,e,n,o){var a=s.transformTo("string",o(n));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(r,4)+i(e,4)+i(a.length,2)+a}(this.dirRecords.length,e,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(t){this._sources.push(t);var r=this;return t.on("data",(function(t){r.processChunk(t)})),t.on("end",(function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()})),t.on("error",(function(t){r.error(t)})),this},c.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),true):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),true))},c.prototype.error=function(t){var r=this._sources;if(!o.prototype.error.call(this,t))return false;for(var e=0;e<r.length;e++)try{r[e].error(t)}catch(t){}return true},c.prototype.lock=function(){o.prototype.lock.call(this);for(var t=this._sources,r=0;r<t.length;r++)t[r].lock()},r.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,e){var i=t("../compressions"),n=t("./ZipFileWorker");e.generateWorker=function(t,r,e){var s=new n(r.streamFiles,e,r.platform,r.encodeFileName),o=0;try{t.forEach((function(t,e){o++;var n=function(t,r){var e=t||r,n=i[e];if(!n)throw new Error(e+" is not a valid compression method !");return n}(e.options.compression,r.compression),a=e.options.compressionOptions||r.compressionOptions||{},u=e.dir,f=e.date;e._compressWorker(n,a).withStreamInfo("file",{name:t,dir:u,date:f,comment:e.comment||"",unixPermissions:e.unixPermissions,dosPermissions:e.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r,e){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new i;for(var r in this)"function"!=typeof this[r]&&(t[r]=this[r]);return t}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(t,r){return(new i).loadAsync(t,r)},i.external=t("./external"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,r,e){var i=t("./utils"),n=t("./external"),s=t("./utf8"),o=t("./zipEntries"),a=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function f(t){return new n.Promise((function(r,e){var i=t.decompressed.getContentWorker().pipe(new a);i.on("error",(function(t){e(t)})).on("end",(function(){i.streamInfo.crc32!==t.decompressed.crc32?e(new Error("Corrupted zip : CRC32 mismatch")):r()})).resume()}))}r.exports=function(t,r){var e=this;return r=i.extend(r||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:s.utf8decode}),u.isNode&&u.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,true,r.optimizedBinaryString,r.base64).then((function(t){var e=new o(r);return e.load(t),e})).then((function(t){var e=[n.Promise.resolve(t)],i=t.files;if(r.checkCRC32)for(var s=0;s<i.length;s++)e.push(f(i[s]));return n.Promise.all(e)})).then((function(t){for(var n=t.shift(),s=n.files,o=0;o<s.length;o++){var a=s[o],u=a.fileNameStr,f=i.resolve(a.fileNameStr);e.file(f,a.decompressed,{binary:true,optimizedBinaryString:true,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:r.createFolders}),a.dir||(e.file(f).unsafeOriginalName=u)}return n.zipComment.length&&(e.comment=n.zipComment),e}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r,e){var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,r){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=false,this._bindStream(r)}i.inherits(s,n),s.prototype._bindStream=function(t){var r=this;(this._stream=t).pause(),t.on("data",(function(t){r.push({data:t,meta:{percent:0}})})).on("error",(function(t){r.isPaused?this.generatedError=t:r.error(t)})).on("end",(function(){r.isPaused?r._upstreamEnded=true:r.end()}))},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),true)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),true)},r.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r,e){var i=t("readable-stream").Readable;function n(t,r,e){i.call(this,r),this._helper=t;var n=this;t.on("data",(function(t,r){n.push(t)||n._helper.pause(),e&&e(r)})).on("error",(function(t){n.emit("error",t)})).on("end",(function(){n.push(null)}))}t("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},r.exports=n},{"../utils":32,"readable-stream":16}],14:[function(t,r,e){r.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,r);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,r)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var r=new Buffer(t);return r.fill(0),r},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,r,e){function i(t,r,e){var i,n=s.getTypeOf(r),a=s.extend(e||{},u);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=true),a.dosPermissions&&16&a.dosPermissions&&(a.dir=true),a.dir&&(t=p(t)),a.createFolders&&(i=v(t))&&m.call(this,i,true);var h="string"===n&&false===a.binary&&false===a.base64;e&&void 0!==e.binary||(a.binary=!h),(r instanceof f&&0===r.uncompressedSize||a.dir||!r||0===r.length)&&(a.base64=false,a.binary=true,r="",a.compression="STORE",n="string");var w=null;w=r instanceof f||r instanceof o?r:l.isNode&&l.isStream(r)?new d(t,r):s.prepareContent(t,r,a.binary,a.optimizedBinaryString,a.base64);var b=new c(t,w,a);this.files[t]=b}var n=t("./utf8"),s=t("./utils"),o=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),u=t("./defaults"),f=t("./compressedObject"),c=t("./zipObject"),h=t("./generate"),l=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),v=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var r=t.lastIndexOf("/");return 0<r?t.substring(0,r):""},p=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},m=function(t,r){return r=void 0!==r?r:u.createFolders,t=p(t),this.files[t]||i.call(this,t,null,{dir:true,createFolders:r}),this.files[t]};function w(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var r,e,i;for(r in this.files)i=this.files[r],(e=r.slice(this.root.length,r.length))&&r.slice(0,this.root.length)===this.root&&t(e,i)},filter:function(t){var r=[];return this.forEach((function(e,i){t(e,i)&&r.push(i)})),r},file:function(t,r,e){if(1!==arguments.length)return t=this.root+t,i.call(this,t,r,e),this;if(w(t)){var n=t;return this.filter((function(t,r){return!r.dir&&n.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(w(t))return this.filter((function(r,e){return e.dir&&t.test(r)}));var r=this.root+t,e=m.call(this,r),i=this.clone();return i.root=e.name,i},remove:function(t){t=this.root+t;var r=this.files[t];if(r||("/"!==t.slice(-1)&&(t+="/"),r=this.files[t]),r&&!r.dir)delete this.files[t];else for(var e=this.filter((function(r,e){return e.name.slice(0,t.length)===t})),i=0;i<e.length;i++)delete this.files[e[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var r,e={};try{if((e=s.extend(t||{},{streamFiles:false,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=e.type.toLowerCase(),e.compression=e.compression.toUpperCase(),"binarystring"===e.type&&(e.type="string"),!e.type)throw new Error("No output type specified.");s.checkSupport(e.type),"darwin"!==e.platform&&"freebsd"!==e.platform&&"linux"!==e.platform&&"sunos"!==e.platform||(e.platform="UNIX"),"win32"===e.platform&&(e.platform="DOS");var i=e.comment||this.comment||"";r=h.generateWorker(this,e,i)}catch(t){(r=new o("error")).error(t)}return new a(r,e.type||"string",e.mimeType)},generateAsync:function(t,r){return this.generateInternalStream(t).accumulate(r)},generateNodeStream:function(t,r){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(r)}};r.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,r,e){r.exports=t("stream")},{stream:void 0}],17:[function(t,r,e){var i=t("./DataReader");function n(t){i.call(this,t);for(var r=0;r<this.data.length;r++)t[r]=255&t[r]}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var r=t.charCodeAt(0),e=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===r&&this.data[s+1]===e&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var r=t.charCodeAt(0),e=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return r===s[0]&&e===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,r,e){var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var r,e=0;for(this.checkOffset(t),r=this.index+t-1;r>=this.index;r--)e=(e<<8)+this.byteAt(r);return this.index+=t,e},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},r.exports=n},{"../utils":32}],19:[function(t,r,e){var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,e){var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var r=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,r,e){var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,r},r.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,e){var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),o=t("./StringReader"),a=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");r.exports=function(t){var r=i.getTypeOf(t);return i.checkSupport(r),"string"!==r||n.uint8array?"nodebuffer"===r?new a(t):n.uint8array?new u(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,e){e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,r,e){var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},r.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,e){var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},r.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,e){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+t.data.length}n.prototype.processChunk.call(this,t)},r.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,e){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var r=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,t.then((function(t){r.dataIsReady=true,r.data=t,r.max=t&&t.length||0,r.type=i.getTypeOf(t),r.isPaused||r._tickAndRepeat()}),(function(t){r.error(t)}))}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,i.delay(this._tickAndRepeat,[],this)),true)},s.prototype._tickAndRepeat=function(){this._tickScheduled=false,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=true))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var t=null,r=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r)}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,e){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=true}catch(t){this.emit("error",t)}return true},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=true,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),true)},on:function(t,r){return this._listeners[t].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,r){if(this._listeners[t])for(var e=0;e<this._listeners[t].length;e++)this._listeners[t][e].call(this,r)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var r=this;return t.on("data",(function(t){r.processChunk(t)})),t.on("end",(function(){r.end()})),t.on("error",(function(t){r.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;var t=this.isPaused=false;return this.generatedError&&(this.error(this.generatedError),t=true),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,r){return this.extraStreamInfo[t]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},r.exports=i},{}],29:[function(t,r,e){var i=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),o=t("../base64"),a=t("../support"),u=t("../external"),f=null;if(a.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function c(t,r){return new u.Promise((function(e,n){var s=[],a=t._internalType,u=t._outputType,f=t._mimeType;t.on("data",(function(t,e){s.push(t),r&&r(e)})).on("error",(function(t){s=[],n(t)})).on("end",(function(){try{var t=function(t,r,e){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",r),e);case"base64":return o.encode(r);default:return i.transformTo(t,r)}}(u,function(t,r){var e,i=0,n=null,s=0;for(e=0;e<r.length;e++)s+=r[e].length;switch(t){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(n=new Uint8Array(s),e=0;e<r.length;e++)n.set(r[e],i),i+=r[e].length;return n;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,s),f);e(t)}catch(t){n(t)}s=[]})).resume()}))}function h(t,r,e){var o=r;switch(r){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=r,this._mimeType=e,i.checkSupport(o),this._worker=t.pipe(new n(o)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return c(this,t)},on:function(t,r){var e=this;return"data"===t?this._worker.on(t,(function(t){r.call(e,t.data,t.meta)})):this._worker.on(t,(function(){i.delay(r,arguments,e)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:"nodebuffer"!==this._outputType},t)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,e){if(e.base64=true,e.array=true,e.string=true,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer="undefined"!=typeof Buffer,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=false;else{var i=new ArrayBuffer(0);try{e.blob=0===new Blob([i],{type:"application/zip"}).size}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),e.blob=0===n.getBlob("application/zip").size}catch(t){e.blob=false}}}try{e.nodestream=!!t("readable-stream").Readable}catch(t){e.nodestream=false}},{"readable-stream":16}],31:[function(t,r,e){for(var i=t("./utils"),n=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;a[254]=a[254]=1;function f(){o.call(this,"utf-8 decode"),this.leftOver=null}function c(){o.call(this,"utf-8 encode")}e.utf8encode=function(t){return n.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var r,e,i,s,o,a=t.length,u=0;for(s=0;s<a;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(i-56320),s++),u+=e<128?1:e<2048?2:e<65536?3:4;for(r=n.uint8array?new Uint8Array(u):new Array(u),s=o=0;o<u;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(i-56320),s++),e<128?r[o++]=e:(e<2048?r[o++]=192|e>>>6:(e<65536?r[o++]=224|e>>>12:(r[o++]=240|e>>>18,r[o++]=128|e>>>12&63),r[o++]=128|e>>>6&63),r[o++]=128|63&e);return r}(t)},e.utf8decode=function(t){return n.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var r,e,n,s,o=t.length,u=new Array(2*o);for(r=e=0;r<o;)if((n=t[r++])<128)u[e++]=n;else if(4<(s=a[n]))u[e++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&r<o;)n=n<<6|63&t[r++],s--;1<s?u[e++]=65533:n<65536?u[e++]=n:(n-=65536,u[e++]=55296|n>>10&1023,u[e++]=56320|1023&n)}return u.length!==e&&(u.subarray?u=u.subarray(0,e):u.length=e),i.applyFromCharCode(u)}(t=i.transformTo(n.uint8array?"uint8array":"array",t))},i.inherits(f,o),f.prototype.processChunk=function(t){var r=i.transformTo(n.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var s=r;(r=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),r.set(s,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(t,r){var e;for((r=r||t.length)>t.length&&(r=t.length),e=r-1;0<=e&&128==(192&t[e]);)e--;return e<0?r:0===e?r:e+a[t[e]]>r?e:r}(r),u=r;o!==r.length&&(n.uint8array?(u=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(u=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:e.utf8decode(u),meta:t.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=f,i.inherits(c,o),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,e){var i=t("./support"),n=t("./base64"),s=t("./nodejsUtils"),o=t("./external");function a(t){return t}function u(t,r){for(var e=0;e<t.length;++e)r[e]=255&t.charCodeAt(e);return r}t("setimmediate"),e.newBlob=function(t,r){e.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(t,r,e){var i=[],n=0,s=t.length;if(s<=e)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===r||"nodebuffer"===r?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+e,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+e,s)))),n+=e;return i.join("")},stringifyByChar:function(t){for(var r="",e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return r},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return false}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return false}}()}};function c(t){var r=65536,i=e.getTypeOf(t),n=true;if("uint8array"===i?n=f.applyCanBeUsed.uint8array:"nodebuffer"===i&&(n=f.applyCanBeUsed.nodebuffer),n)for(;1<r;)try{return f.stringifyByChunk(t,i,r)}catch(t){r=Math.floor(r/2)}return f.stringifyByChar(t)}function h(t,r){for(var e=0;e<t.length;e++)r[e]=t[e];return r}e.applyFromCharCode=c;var l={};l.string={string:a,array:function(t){return u(t,new Array(t.length))},arraybuffer:function(t){return l.string.uint8array(t).buffer},uint8array:function(t){return u(t,new Uint8Array(t.length))},nodebuffer:function(t){return u(t,s.allocBuffer(t.length))}},l.array={string:c,array:a,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},l.arraybuffer={string:function(t){return c(new Uint8Array(t))},array:function(t){return h(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:a,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},l.uint8array={string:c,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:a,nodebuffer:function(t){return s.newBufferFrom(t)}},l.nodebuffer={string:c,array:function(t){return h(t,new Array(t.length))},arraybuffer:function(t){return l.nodebuffer.uint8array(t).buffer},uint8array:function(t){return h(t,new Uint8Array(t.length))},nodebuffer:a},e.transformTo=function(t,r){if(r=r||"",!t)return r;e.checkSupport(t);var i=e.getTypeOf(r);return l[i][t](r)},e.resolve=function(t){for(var r=t.split("/"),e=[],i=0;i<r.length;i++){var n=r[i];"."===n||""===n&&0!==i&&i!==r.length-1||(".."===n?e.pop():e.push(n))}return e.join("/")},e.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":i.nodebuffer&&s.isBuffer(t)?"nodebuffer":i.uint8array&&t instanceof Uint8Array?"uint8array":i.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(t){var r,e,i="";for(e=0;e<(t||"").length;e++)i+="\\x"+((r=t.charCodeAt(e))<16?"0":"")+r.toString(16).toUpperCase();return i},e.delay=function(t,r,e){setImmediate((function(){t.apply(e||null,r||[])}))},e.inherits=function(t,r){function e(){}e.prototype=r.prototype,t.prototype=new e},e.extend=function(){var t,r,e={};for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&void 0===e[r]&&(e[r]=arguments[t][r]);return e},e.prepareContent=function(t,r,s,a,f){return o.Promise.resolve(r).then((function(t){return i.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise((function(r,e){var i=new FileReader;i.onload=function(t){r(t.target.result)},i.onerror=function(t){e(t.target.error)},i.readAsArrayBuffer(t)})):t})).then((function(r){var c=e.getTypeOf(r);return c?("arraybuffer"===c?r=e.transformTo("uint8array",r):"string"===c&&(f?r=n.decode(r):s&&true!==a&&(r=function(t){return u(t,i.uint8array?new Uint8Array(t.length):new Array(t.length))}(r))),r):o.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,r,e){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),o=t("./zipEntry"),a=t("./support");function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(r)+", expected "+n.pretty(t)+")")}},isSignature:function(t,r){var e=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===r;return this.reader.setIndex(e),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),r=a.uint8array?"uint8array":"array",e=n.transformTo(r,t);this.zipComment=this.loadOptions.decodeFileName(e)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,r,e,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),r=this.reader.readInt(4),e=this.reader.readData(r),this.zip64ExtensibleData[t]={id:t,length:r,value:e}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,r;for(t=0;t<this.files.length;t++)r=this.files[t],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw!this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(t);var r=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=true,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var e=this.centralDirOffset+this.centralDirSize;this.zip64&&(e+=20,e+=12+this.zip64EndOfCentralSize);var i=r-e;if(0<i)this.isSignature(r,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r,e){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),a=t("./utf8"),u=t("./compressions"),f=t("./support");function c(t,r){this.options=t,this.loadOptions=r}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var r,e;if(t.skip(22),this.fileNameLength=t.readInt(2),e=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(e),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(r=function(t){for(var r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&u[r].magic===t)return u[r];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,r,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var r=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(r),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=true)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var r,e,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)r=t.readInt(2),e=t.readInt(2),i=t.readData(e),this.extraFields[r]={id:r,length:e,value:i};t.setIndex(n)},handleUTF8:function(){var t=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(null!==r)this.fileNameStr=r;else{var e=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(e)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var s=n.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var r=i(t.value);return 1!==r.readInt(1)?null:o(this.fileName)!==r.readInt(4)?null:a.utf8decode(r.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var r=i(t.value);return 1!==r.readInt(1)?null:o(this.fileComment)!==r.readInt(4)?null:a.utf8decode(r.readData(t.length-5))}return null}},r.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,e){function i(t,r,e){this.name=t,this.dir=e.dir,this.date=e.date,this.comment=e.comment,this.unixPermissions=e.unixPermissions,this.dosPermissions=e.dosPermissions,this._data=r,this._dataBinary=e.binary,this.options={compression:e.compression,compressionOptions:e.compressionOptions}}var n=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),o=t("./utf8"),a=t("./compressedObject"),u=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var r=null,e="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(e=t.toLowerCase())||"text"===e;"binarystring"!==e&&"text"!==e||(e="string"),r=this._decompressWorker();var s=!this._dataBinary;s&&!i&&(r=r.pipe(new o.Utf8EncodeWorker)),!s&&i&&(r=r.pipe(new o.Utf8DecodeWorker))}catch(t){(r=new u("error")).error(t)}return new n(r,e,"")},async:function(t,r){return this.internalStream(t).accumulate(r)},nodeStream:function(t,r){return this.internalStream(t||"nodebuffer").toNodejsStream(r)},_compressWorker:function(t,r){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var e=this._decompressWorker();return this._dataBinary||(e=e.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(e,t,r)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new s(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)i.prototype[f[h]]=c;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,e){(function(t){var e,i,n=t.MutationObserver||t.WebKitMutationObserver;if(n){var s=0,o=new n(c),a=t.document.createTextNode("");o.observe(a,{characterData:true}),e=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var r=t.document.createElement("script");r.onreadystatechange=function(){c(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},t.document.documentElement.appendChild(r)}:function(){setTimeout(c,0)};else{var u=new t.MessageChannel;u.port1.onmessage=c,e=function(){u.port2.postMessage(0)}}var f=[];function c(){var t,r;i=true;for(var e=f.length;e;){for(r=f,f=[],t=-1;++t<e;)r[t]();e=f.length}i=false}r.exports=function(t){1!==f.push(t)||i||e()}}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,r,e){var i=t("immediate");function n(){}var s={},o=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function f(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==n&&d(this,t)}function c(t,r,e){this.promise=t,"function"==typeof r&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),"function"==typeof e&&(this.onRejected=e,this.callRejected=this.otherCallRejected)}function h(t,r,e){i((function(){var i;try{i=r(e)}catch(i){return s.reject(t,i)}i===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,i)}))}function l(t){var r=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof r)return function(){r.apply(t,arguments)}}function d(t,r){var e=false;function i(r){e||(e=true,s.reject(t,r))}function n(r){e||(e=true,s.resolve(t,r))}var o=v((function(){r(n,i)}));"error"===o.status&&i(o.value)}function v(t,r){var e={};try{e.value=t(r),e.status="success"}catch(t){e.status="error",e.value=t}return e}(r.exports=f).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))}))},f.prototype.catch=function(t){return this.then(null,t)},f.prototype.then=function(t,r){if("function"!=typeof t&&this.state===a||"function"!=typeof r&&this.state===o)return this;var e=new this.constructor(n);this.state!==u?h(e,this.state===a?t:r,this.outcome):this.queue.push(new c(e,t,r));return e},c.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){s.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},s.resolve=function(t,r){var e=v(l,r);if("error"===e.status)return s.reject(t,e.value);var i=e.value;if(i)d(t,i);else{t.state=a,t.outcome=r;for(var n=-1,o=t.queue.length;++n<o;)t.queue[n].callFulfilled(r)}return t},s.reject=function(t,r){t.state=o,t.outcome=r;for(var e=-1,i=t.queue.length;++e<i;)t.queue[e].callRejected(r);return t},f.resolve=function(t){if(t instanceof this)return t;return s.resolve(new this(n),t)},f.reject=function(t){var r=new this(n);return s.reject(r,t)},f.all=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=false;if(!e)return this.resolve([]);var o=new Array(e),a=0,u=-1,f=new this(n);for(;++u<e;)c(t[u],u);return f;function c(t,n){r.resolve(t).then((function(t){o[n]=t,++a!==e||i||(i=true,s.resolve(f,o))}),(function(t){i||(i=true,s.reject(f,t))}))}},f.race=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,i=false;if(!e)return this.resolve([]);var o=-1,a=new this(n);for(;++o<e;)u=t[o],r.resolve(u).then((function(t){i||(i=true,s.resolve(a,t))}),(function(t){i||(i=true,s.reject(a,t))}));var u;return a}},{immediate:36}],38:[function(t,r,e){var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,r,e){var i=t("./zlib/deflate"),n=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),u=Object.prototype.toString,f=0,c=-1,h=0,l=8;function d(t){if(!(this instanceof d))return new d(t);this.options=n.assign({level:c,method:l,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},t||{});var r=this.options;r.raw&&0<r.windowBits?r.windowBits=-r.windowBits:r.gzip&&0<r.windowBits&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var e=i.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(e!==f)throw new Error(o[e]);if(r.header&&i.deflateSetHeader(this.strm,r.header),r.dictionary){var v;if(v="string"==typeof r.dictionary?s.string2buf(r.dictionary):"[object ArrayBuffer]"===u.call(r.dictionary)?new Uint8Array(r.dictionary):r.dictionary,(e=i.deflateSetDictionary(this.strm,v))!==f)throw new Error(o[e]);this._dict_set=true}}function v(t,r){var e=new d(r);if(e.push(t,true),e.err)throw e.msg||o[e.err];return e.result}d.prototype.push=function(t,r){var e,o,a=this.strm,c=this.options.chunkSize;if(this.ended)return false;o=r===~~r?r:true===r?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new n.Buf8(c),a.next_out=0,a.avail_out=c),1!==(e=i.deflate(a,o))&&e!==f)return this.onEnd(e),!(this.ended=true);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==e);return 4===o?(e=i.deflateEnd(this.strm),this.onEnd(e),this.ended=true,e===f):2!==o||(this.onEnd(f),!(a.avail_out=0))},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=d,e.deflate=v,e.deflateRaw=function(t,r){return(r=r||{}).raw=true,v(t,r)},e.gzip=function(t,r){return(r=r||{}).gzip=true,v(t,r)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,e){var i=t("./zlib/inflate"),n=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),u=t("./zlib/zstream"),f=t("./zlib/gzheader"),c=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var r=this.options;r.raw&&0<=r.windowBits&&r.windowBits<16&&(r.windowBits=-r.windowBits,0===r.windowBits&&(r.windowBits=-15)),!(0<=r.windowBits&&r.windowBits<16)||t&&t.windowBits||(r.windowBits+=32),15<r.windowBits&&r.windowBits<48&&0==(15&r.windowBits)&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var e=i.inflateInit2(this.strm,r.windowBits);if(e!==o.Z_OK)throw new Error(a[e]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function l(t,r){var e=new h(r);if(e.push(t,true),e.err)throw e.msg||a[e.err];return e.result}h.prototype.push=function(t,r){var e,a,u,f,h,l,d=this.strm,v=this.options.chunkSize,p=this.options.dictionary,m=false;if(this.ended)return false;a=r===~~r?r:true===r?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?d.input=s.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new n.Buf8(v),d.next_out=0,d.avail_out=v),(e=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(l="string"==typeof p?s.string2buf(p):"[object ArrayBuffer]"===c.call(p)?new Uint8Array(p):p,e=i.inflateSetDictionary(this.strm,l)),e===o.Z_BUF_ERROR&&true===m&&(e=o.Z_OK,m=false),e!==o.Z_STREAM_END&&e!==o.Z_OK)return this.onEnd(e),!(this.ended=true);d.next_out&&(0!==d.avail_out&&e!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=s.utf8border(d.output,d.next_out),f=d.next_out-u,h=s.buf2string(d.output,u),d.next_out=f,d.avail_out=v-f,f&&n.arraySet(d.output,d.output,u,f,0),this.onData(h)):this.onData(n.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=true)}while((0<d.avail_in||0===d.avail_out)&&e!==o.Z_STREAM_END);return e===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(e=i.inflateEnd(this.strm),this.onEnd(e),this.ended=true,e===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=h,e.inflate=l,e.inflateRaw=function(t,r){return(r=r||{}).raw=true,l(t,r)},e.ungzip=l},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,r,e){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var e=r.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}}return t},e.shrinkBuf=function(t,r){return t.length===r?t:t.subarray?t.subarray(0,r):(t.length=r,t)};var n={arraySet:function(t,r,e,i,n){if(r.subarray&&t.subarray)t.set(r.subarray(e,e+i),n);else for(var s=0;s<i;s++)t[n+s]=r[e+s]},flattenChunks:function(t){var r,e,i,n,s,o;for(r=i=0,e=t.length;r<e;r++)i+=t[r].length;for(o=new Uint8Array(i),r=n=0,e=t.length;r<e;r++)s=t[r],o.set(s,n),n+=s.length;return o}},s={arraySet:function(t,r,e,i,n){for(var s=0;s<i;s++)t[n+s]=r[e+s]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(i)},{}],42:[function(t,r,e){var i=t("./common"),n=true,s=true;try{String.fromCharCode.apply(null,[0])}catch(t){n=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=false}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(t,r){if(r<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,r));for(var e="",o=0;o<r;o++)e+=String.fromCharCode(t[o]);return e}o[254]=o[254]=1,e.string2buf=function(t){var r,e,n,s,o,a=t.length,u=0;for(s=0;s<a;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(n-56320),s++),u+=e<128?1:e<2048?2:e<65536?3:4;for(r=new i.Buf8(u),s=o=0;o<u;s++)55296==(64512&(e=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(e=65536+(e-55296<<10)+(n-56320),s++),e<128?r[o++]=e:(e<2048?r[o++]=192|e>>>6:(e<65536?r[o++]=224|e>>>12:(r[o++]=240|e>>>18,r[o++]=128|e>>>12&63),r[o++]=128|e>>>6&63),r[o++]=128|63&e);return r},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var r=new i.Buf8(t.length),e=0,n=r.length;e<n;e++)r[e]=t.charCodeAt(e);return r},e.buf2string=function(t,r){var e,i,n,s,a=r||t.length,f=new Array(2*a);for(e=i=0;e<a;)if((n=t[e++])<128)f[i++]=n;else if(4<(s=o[n]))f[i++]=65533,e+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&e<a;)n=n<<6|63&t[e++],s--;1<s?f[i++]=65533:n<65536?f[i++]=n:(n-=65536,f[i++]=55296|n>>10&1023,f[i++]=56320|1023&n)}return u(f,i)},e.utf8border=function(t,r){var e;for((r=r||t.length)>t.length&&(r=t.length),e=r-1;0<=e&&128==(192&t[e]);)e--;return e<0?r:0===e?r:e+o[t[e]]>r?e:r}},{"./common":41}],43:[function(t,r,e){r.exports=function(t,r,e,i){for(var n=65535&t|0,s=t>>>16&65535|0,o=0;0!==e;){for(e-=o=2e3<e?2e3:e;s=s+(n=n+r[i++]|0)|0,--o;);n%=65521,s%=65521}return n|s<<16|0}},{}],44:[function(t,r,e){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,r,e){var i=function(){for(var t,r=[],e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;r[e]=t}return r}();r.exports=function(t,r,e,n){var s=i,o=n+e;t^=-1;for(var a=n;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}},{}],46:[function(t,r,e){var i,n=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),u=t("./messages"),f=0,c=4,h=0,l=-2,d=-1,v=4,p=2,m=8,w=9,b=286,y=30,k=19,g=2*b+1,E=15,A=3,S=258,_=S+A+1,j=42,z=113,F=1,x=2,T=3,R=4;function U(t,r){return t.msg=u[r],r}function C(t){return(t<<1)-(4<t?9:0)}function D(t){for(var r=t.length;0<=--r;)t[r]=0}function O(t){var r=t.state,e=r.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(n.arraySet(t.output,r.pending_buf,r.pending_out,e,t.next_out),t.next_out+=e,r.pending_out+=e,t.total_out+=e,t.avail_out-=e,r.pending-=e,0===r.pending&&(r.pending_out=0))}function B(t,r){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,r),t.block_start=t.strstart,O(t.strm)}function W(t,r){t.pending_buf[t.pending++]=r}function I(t,r){t.pending_buf[t.pending++]=r>>>8&255,t.pending_buf[t.pending++]=255&r}function Z(t,r){var e,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-_?t.strstart-(t.w_size-_):0,f=t.window,c=t.w_mask,h=t.prev,l=t.strstart+S,d=f[s+o-1],v=f[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(f[(e=r)+o]===v&&f[e+o-1]===d&&f[e]===f[s]&&f[++e]===f[s+1]){s+=2,e++;do{}while(f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&f[++s]===f[++e]&&s<l);if(i=S-(l-s),s=l-S,o<i){if(t.match_start=r,a<=(o=i))break;d=f[s+o-1],v=f[s+o]}}}while((r=h[r&c])>u&&0!=--n);return o<=t.lookahead?o:t.lookahead}function N(t){var r,e,i,s,u,f,c,h,l,d,v=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=v+(v-_)){for(n.arraySet(t.window,t.window,v,v,0),t.match_start-=v,t.strstart-=v,t.block_start-=v,r=e=t.hash_size;i=t.head[--r],t.head[r]=v<=i?i-v:0,--e;);for(r=e=v;i=t.prev[--r],t.prev[r]=v<=i?i-v:0,--e;);s+=v}if(0===t.strm.avail_in)break;if(f=t.strm,c=t.window,h=t.strstart+t.lookahead,l=s,d=void 0,d=f.avail_in,l<d&&(d=l),e=0===d?0:(f.avail_in-=d,n.arraySet(c,f.input,f.next_in,d,h),1===f.state.wrap?f.adler=o(f.adler,c,d,h):2===f.state.wrap&&(f.adler=a(f.adler,c,d,h)),f.next_in+=d,f.total_in+=d,d),t.lookahead+=e,t.lookahead+t.insert>=A)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+A-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<A)););}while(t.lookahead<_&&0!==t.strm.avail_in)}function P(t,r){for(var e,i;;){if(t.lookahead<_){if(N(t),t.lookahead<_&&r===f)return F;if(0===t.lookahead)break}if(e=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==e&&t.strstart-e<=t.w_size-_&&(t.match_length=Z(t,e)),t.match_length>=A)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-A),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=A){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=t.strstart<A-1?t.strstart:A-1,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}function G(t,r){for(var e,i,n;;){if(t.lookahead<_){if(N(t),t.lookahead<_&&r===f)return F;if(0===t.lookahead)break}if(e=0,t.lookahead>=A&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=A-1,0!==e&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-_&&(t.match_length=Z(t,e),t.match_length<=5&&(1===t.strategy||t.match_length===A&&4096<t.strstart-t.match_start)&&(t.match_length=A-1)),t.prev_length>=A&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-A,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-A),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+A-1])&t.hash_mask,e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=A-1,t.strstart++,i&&(B(t,false),0===t.strm.avail_out))return F}else if(t.match_available){if((i=s._tr_tally(t,0,t.window[t.strstart-1]))&&B(t,false),t.strstart++,t.lookahead--,0===t.strm.avail_out)return F}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<A-1?t.strstart:A-1,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}function L(t,r,e,i,n){this.good_length=t,this.max_lazy=r,this.nice_length=e,this.max_chain=i,this.func=n}function M(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(2*g),this.dyn_dtree=new n.Buf16(2*(2*y+1)),this.bl_tree=new n.Buf16(2*(2*k+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(E+1),this.heap=new n.Buf16(2*b+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*b+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(t){var r;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(r=t.state).pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?j:z,t.adler=2===r.wrap?0:1,r.last_flush=f,s._tr_init(r),h):U(t,l)}function H(t){var r=q(t);return r===h&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=A-1,t.match_available=0,t.ins_h=0}(t.state),r}function J(t,r,e,i,s,o){if(!t)return l;var a=1;if(r===d&&(r=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),s<1||w<s||e!==m||i<8||15<i||r<0||9<r||o<0||v<o)return U(t,l);8===i&&(i=9);var u=new M;return(t.state=u).strm=t,u.wrap=a,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=s+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+A-1)/A),u.window=new n.Buf8(2*u.w_size),u.head=new n.Buf16(u.hash_size),u.prev=new n.Buf16(u.w_size),u.lit_bufsize=1<<s+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new n.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=r,u.strategy=o,u.method=e,H(t)}i=[new L(0,0,0,0,(function(t,r){var e=65535;for(e>t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(N(t),0===t.lookahead&&r===f)return F;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+e;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,B(t,false),0===t.strm.avail_out))return F;if(t.strstart-t.block_start>=t.w_size-_&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):(t.strstart>t.block_start&&(B(t,false),t.strm.avail_out),F)})),new L(4,4,8,4,P),new L(4,5,16,8,P),new L(4,6,32,32,P),new L(4,4,16,16,G),new L(8,16,32,32,G),new L(8,16,128,128,G),new L(8,32,128,256,G),new L(32,128,258,1024,G),new L(32,258,258,4096,G)],e.deflateInit=function(t,r){return J(t,r,m,15,8,0)},e.deflateInit2=J,e.deflateReset=H,e.deflateResetKeep=q,e.deflateSetHeader=function(t,r){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=r,h):l},e.deflate=function(t,r){var e,n,o,u;if(!t||!t.state||5<r||r<0)return t?U(t,l):l;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&r!==c)return U(t,0===t.avail_out?-5:l);if(n.strm=t,e=n.last_flush,n.last_flush=r,n.status===j)if(2===n.wrap)t.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead?(W(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,255&n.gzhead.time),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),W(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,255&n.gzhead.extra.length),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),W(n,3),n.status=z);else{var d=m+(n.w_bits-8<<4)<<8;d|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(d|=32),d+=31-d%31,n.status=z,I(n,d),0!==n.strstart&&(I(n,t.adler>>>16),I(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending!==n.pending_buf_size));)W(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,W(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),O(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,W(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&O(t),n.pending+2<=n.pending_buf_size&&(W(n,255&t.adler),W(n,t.adler>>8&255),t.adler=0,n.status=z)):n.status=z),0!==n.pending){if(O(t),0===t.avail_out)return n.last_flush=-1,h}else if(0===t.avail_in&&C(r)<=C(e)&&r!==c)return U(t,-5);if(666===n.status&&0!==t.avail_in)return U(t,-5);if(0!==t.avail_in||0!==n.lookahead||r!==f&&666!==n.status){var v=2===n.strategy?function(t,r){for(var e;;){if(0===t.lookahead&&(N(t),0===t.lookahead)){if(r===f)return F;break}if(t.match_length=0,e=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}(n,r):3===n.strategy?function(t,r){for(var e,i,n,o,a=t.window;;){if(t.lookahead<=S){if(N(t),t.lookahead<=S&&r===f)return F;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=A&&0<t.strstart&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){o=t.strstart+S;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<o);t.match_length=S-(o-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=A?(e=s._tr_tally(t,1,t.match_length-A),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(B(t,false),0===t.strm.avail_out))return F}return t.insert=0,r===c?(B(t,true),0===t.strm.avail_out?T:R):t.last_lit&&(B(t,false),0===t.strm.avail_out)?F:x}(n,r):i[n.level].func(n,r);if(v!==T&&v!==R||(n.status=666),v===F||v===T)return 0===t.avail_out&&(n.last_flush=-1),h;if(v===x&&(1===r?s._tr_align(n):5!==r&&(s._tr_stored_block(n,0,0,false),3===r&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),O(t),0===t.avail_out))return n.last_flush=-1,h}return r!==c?h:n.wrap<=0?1:(2===n.wrap?(W(n,255&t.adler),W(n,t.adler>>8&255),W(n,t.adler>>16&255),W(n,t.adler>>24&255),W(n,255&t.total_in),W(n,t.total_in>>8&255),W(n,t.total_in>>16&255),W(n,t.total_in>>24&255)):(I(n,t.adler>>>16),I(n,65535&t.adler)),O(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?h:1)},e.deflateEnd=function(t){var r;return t&&t.state?(r=t.state.status)!==j&&69!==r&&73!==r&&91!==r&&103!==r&&r!==z&&666!==r?U(t,l):(t.state=null,r===z?U(t,-3):h):l},e.deflateSetDictionary=function(t,r){var e,i,s,a,u,f,c,d,v=r.length;if(!t||!t.state)return l;if(2===(a=(e=t.state).wrap)||1===a&&e.status!==j||e.lookahead)return l;for(1===a&&(t.adler=o(t.adler,r,v,0)),e.wrap=0,v>=e.w_size&&(0===a&&(D(e.head),e.strstart=0,e.block_start=0,e.insert=0),d=new n.Buf8(e.w_size),n.arraySet(d,r,v-e.w_size,e.w_size,0),r=d,v=e.w_size),u=t.avail_in,f=t.next_in,c=t.input,t.avail_in=v,t.next_in=0,t.input=r,N(e);e.lookahead>=A;){for(i=e.strstart,s=e.lookahead-(A-1);e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+A-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,--s;);e.strstart=i,e.lookahead=A-1,N(e)}return e.strstart+=e.lookahead,e.block_start=e.strstart,e.insert=e.lookahead,e.lookahead=0,e.match_length=e.prev_length=A-1,e.match_available=0,t.next_in=f,t.input=c,t.avail_in=u,e.wrap=a,h},e.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r,e){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=false}},{}],48:[function(t,r,e){r.exports=function(t,r){var e,i,n,s,o,a,u,f,c,h,l,d,v,p,m,w,b,y,k,g,E,A,S,_,j;e=t.state,i=t.next_in,_=t.input,n=i+(t.avail_in-5),s=t.next_out,j=t.output,o=s-(r-t.avail_out),a=s+(t.avail_out-257),u=e.dmax,f=e.wsize,c=e.whave,h=e.wnext,l=e.window,d=e.hold,v=e.bits,p=e.lencode,m=e.distcode,w=(1<<e.lenbits)-1,b=(1<<e.distbits)-1;t:do{v<15&&(d+=_[i++]<<v,v+=8,d+=_[i++]<<v,v+=8),y=p[d&w];r:for(;;){if(d>>>=k=y>>>24,v-=k,0===(k=y>>>16&255))j[s++]=65535&y;else{if(!(16&k)){if(0==(64&k)){y=p[(65535&y)+(d&(1<<k)-1)];continue r}if(32&k){e.mode=12;break t}t.msg="invalid literal/length code",e.mode=30;break t}g=65535&y,(k&=15)&&(v<k&&(d+=_[i++]<<v,v+=8),g+=d&(1<<k)-1,d>>>=k,v-=k),v<15&&(d+=_[i++]<<v,v+=8,d+=_[i++]<<v,v+=8),y=m[d&b];e:for(;;){if(d>>>=k=y>>>24,v-=k,!(16&(k=y>>>16&255))){if(0==(64&k)){y=m[(65535&y)+(d&(1<<k)-1)];continue e}t.msg="invalid distance code",e.mode=30;break t}if(E=65535&y,v<(k&=15)&&(d+=_[i++]<<v,(v+=8)<k&&(d+=_[i++]<<v,v+=8)),u<(E+=d&(1<<k)-1)){t.msg="invalid distance too far back",e.mode=30;break t}if(d>>>=k,v-=k,(k=s-o)<E){if(c<(k=E-k)&&e.sane){t.msg="invalid distance too far back",e.mode=30;break t}if(S=l,(A=0)===h){if(A+=f-k,k<g){for(g-=k;j[s++]=l[A++],--k;);A=s-E,S=j}}else if(h<k){if(A+=f+h-k,(k-=h)<g){for(g-=k;j[s++]=l[A++],--k;);if(A=0,h<g){for(g-=k=h;j[s++]=l[A++],--k;);A=s-E,S=j}}}else if(A+=h-k,k<g){for(g-=k;j[s++]=l[A++],--k;);A=s-E,S=j}for(;2<g;)j[s++]=S[A++],j[s++]=S[A++],j[s++]=S[A++],g-=3;g&&(j[s++]=S[A++],1<g&&(j[s++]=S[A++]))}else{for(A=s-E;j[s++]=j[A++],j[s++]=j[A++],j[s++]=j[A++],2<(g-=3););g&&(j[s++]=j[A++],1<g&&(j[s++]=j[A++]))}break}}break}}while(i<n&&s<a);i-=g=v>>3,d&=(1<<(v-=g<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<a?a-s+257:257-(s-a),e.hold=d,e.bits=v}},{}],49:[function(t,r,e){var i=t("../utils/common"),n=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),u=1,f=2,c=0,h=-2,l=1,d=852,v=592;function p(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function m(){this.mode=0,this.last=false,this.wrap=0,this.havedict=false,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(t){var r;return t&&t.state?(r=t.state,t.total_in=t.total_out=r.total=0,t.msg="",r.wrap&&(t.adler=1&r.wrap),r.mode=l,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new i.Buf32(d),r.distcode=r.distdyn=new i.Buf32(v),r.sane=1,r.back=-1,c):h}function b(t){var r;return t&&t.state?((r=t.state).wsize=0,r.whave=0,r.wnext=0,w(t)):h}function y(t,r){var e,i;return t&&t.state?(i=t.state,r<0?(e=0,r=-r):(e=1+(r>>4),r<48&&(r&=15)),r&&(r<8||15<r)?h:(null!==i.window&&i.wbits!==r&&(i.window=null),i.wrap=e,i.wbits=r,b(t))):h}function k(t,r){var e,i;return t?(i=new m,(t.state=i).window=null,(e=y(t,r))!==c&&(t.state=null),e):h}var g,E,A=true;function S(t){if(A){var r;for(g=new i.Buf32(512),E=new i.Buf32(32),r=0;r<144;)t.lens[r++]=8;for(;r<256;)t.lens[r++]=9;for(;r<280;)t.lens[r++]=7;for(;r<288;)t.lens[r++]=8;for(a(u,t.lens,0,288,g,0,t.work,{bits:9}),r=0;r<32;)t.lens[r++]=5;a(f,t.lens,0,32,E,0,t.work,{bits:5}),A=false}t.lencode=g,t.lenbits=9,t.distcode=E,t.distbits=5}function _(t,r,e,n){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new i.Buf8(o.wsize)),n>=o.wsize?(i.arraySet(o.window,r,e-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(n<(s=o.wsize-o.wnext)&&(s=n),i.arraySet(o.window,r,e-n,s,o.wnext),(n-=s)?(i.arraySet(o.window,r,e-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}e.inflateReset=b,e.inflateReset2=y,e.inflateResetKeep=w,e.inflateInit=function(t){return k(t,15)},e.inflateInit2=k,e.inflate=function(t,r){var e,d,v,m,w,b,y,k,g,E,A,j,z,F,x,T,R,U,C,D,O,B,W,I,Z=0,N=new i.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return h;12===(e=t.state).mode&&(e.mode=13),w=t.next_out,v=t.output,y=t.avail_out,m=t.next_in,d=t.input,b=t.avail_in,k=e.hold,g=e.bits,E=b,A=y,B=c;t:for(;;)switch(e.mode){case l:if(0===e.wrap){e.mode=13;break}for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(2&e.wrap&&35615===k){N[e.check=0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0),g=k=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=false),!(1&e.wrap)||(((255&k)<<8)+(k>>8))%31){t.msg="incorrect header check",e.mode=30;break}if(8!=(15&k)){t.msg="unknown compression method",e.mode=30;break}if(g-=4,O=8+(15&(k>>>=4)),0===e.wbits)e.wbits=O;else if(O>e.wbits){t.msg="invalid window size",e.mode=30;break}e.dmax=1<<O,t.adler=e.check=1,e.mode=512&k?10:12,g=k=0;break;case 2:for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(e.flags=k,8!=(255&e.flags)){t.msg="unknown compression method",e.mode=30;break}if(57344&e.flags){t.msg="unknown header flags set",e.mode=30;break}e.head&&(e.head.text=k>>8&1),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0,e.mode=3;case 3:for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.head&&(e.head.time=k),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,N[2]=k>>>16&255,N[3]=k>>>24&255,e.check=s(e.check,N,4,0)),g=k=0,e.mode=4;case 4:for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.head&&(e.head.xflags=255&k,e.head.os=k>>8),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0,e.mode=5;case 5:if(1024&e.flags){for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.length=k,e.head&&(e.head.extra_len=k),512&e.flags&&(N[0]=255&k,N[1]=k>>>8&255,e.check=s(e.check,N,2,0)),g=k=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(b<(j=e.length)&&(j=b),j&&(e.head&&(O=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),i.arraySet(e.head.extra,d,m,j,O)),512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,e.length-=j),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(0===b)break t;for(j=0;O=d[m+j++],e.head&&O&&e.length<65536&&(e.head.name+=String.fromCharCode(O)),O&&j<b;);if(512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,O)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=8;case 8:if(4096&e.flags){if(0===b)break t;for(j=0;O=d[m+j++],e.head&&O&&e.length<65536&&(e.head.comment+=String.fromCharCode(O)),O&&j<b;);if(512&e.flags&&(e.check=s(e.check,d,j,m)),b-=j,m+=j,O)break t}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(512&e.flags){for(;g<16;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k!==(65535&e.check)){t.msg="header crc mismatch",e.mode=30;break}g=k=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=true),t.adler=e.check=0,e.mode=12;break;case 10:for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}t.adler=e.check=p(k),g=k=0,e.mode=11;case 11:if(0===e.havedict)return t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,2;t.adler=e.check=1,e.mode=12;case 12:if(5===r||6===r)break t;case 13:if(e.last){k>>>=7&g,g-=7&g,e.mode=27;break}for(;g<3;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}switch(e.last=1&k,g-=1,3&(k>>>=1)){case 0:e.mode=14;break;case 1:if(S(e),e.mode=20,6!==r)break;k>>>=2,g-=2;break t;case 2:e.mode=17;break;case 3:t.msg="invalid block type",e.mode=30}k>>>=2,g-=2;break;case 14:for(k>>>=7&g,g-=7&g;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if((65535&k)!=(k>>>16^65535)){t.msg="invalid stored block lengths",e.mode=30;break}if(e.length=65535&k,g=k=0,e.mode=15,6===r)break t;case 15:e.mode=16;case 16:if(j=e.length){if(b<j&&(j=b),y<j&&(j=y),0===j)break t;i.arraySet(v,d,m,j,w),b-=j,m+=j,y-=j,w+=j,e.length-=j;break}e.mode=12;break;case 17:for(;g<14;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(e.nlen=257+(31&k),k>>>=5,g-=5,e.ndist=1+(31&k),k>>>=5,g-=5,e.ncode=4+(15&k),k>>>=4,g-=4,286<e.nlen||30<e.ndist){t.msg="too many length or distance symbols",e.mode=30;break}e.have=0,e.mode=18;case 18:for(;e.have<e.ncode;){for(;g<3;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.lens[P[e.have++]]=7&k,k>>>=3,g-=3}for(;e.have<19;)e.lens[P[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,W={bits:e.lenbits},B=a(0,e.lens,0,19,e.lencode,0,e.work,W),e.lenbits=W.bits,B){t.msg="invalid code lengths set",e.mode=30;break}e.have=0,e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;T=(Z=e.lencode[k&(1<<e.lenbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(R<16)k>>>=x,g-=x,e.lens[e.have++]=R;else{if(16===R){for(I=x+2;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k>>>=x,g-=x,0===e.have){t.msg="invalid bit length repeat",e.mode=30;break}O=e.lens[e.have-1],j=3+(3&k),k>>>=2,g-=2}else if(17===R){for(I=x+3;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}g-=x,O=0,j=3+(7&(k>>>=x)),k>>>=3,g-=3}else{for(I=x+7;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}g-=x,O=0,j=11+(127&(k>>>=x)),k>>>=7,g-=7}if(e.have+j>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=30;break}for(;j--;)e.lens[e.have++]=O}}if(30===e.mode)break;if(0===e.lens[256]){t.msg="invalid code -- missing end-of-block",e.mode=30;break}if(e.lenbits=9,W={bits:e.lenbits},B=a(u,e.lens,0,e.nlen,e.lencode,0,e.work,W),e.lenbits=W.bits,B){t.msg="invalid literal/lengths set",e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,W={bits:e.distbits},B=a(f,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,W),e.distbits=W.bits,B){t.msg="invalid distances set",e.mode=30;break}if(e.mode=20,6===r)break t;case 20:e.mode=21;case 21:if(6<=b&&258<=y){t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,o(t,A),w=t.next_out,v=t.output,y=t.avail_out,m=t.next_in,d=t.input,b=t.avail_in,k=e.hold,g=e.bits,12===e.mode&&(e.back=-1);break}for(e.back=0;T=(Z=e.lencode[k&(1<<e.lenbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(T&&0==(240&T)){for(U=x,C=T,D=R;T=(Z=e.lencode[D+((k&(1<<U+C)-1)>>U)])>>>16&255,R=65535&Z,!(U+(x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}k>>>=U,g-=U,e.back+=U}if(k>>>=x,g-=x,e.back+=x,e.length=R,0===T){e.mode=26;break}if(32&T){e.back=-1,e.mode=12;break}if(64&T){t.msg="invalid literal/length code",e.mode=30;break}e.extra=15&T,e.mode=22;case 22:if(e.extra){for(I=e.extra;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.length+=k&(1<<e.extra)-1,k>>>=e.extra,g-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;T=(Z=e.distcode[k&(1<<e.distbits)-1])>>>16&255,R=65535&Z,!((x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(0==(240&T)){for(U=x,C=T,D=R;T=(Z=e.distcode[D+((k&(1<<U+C)-1)>>U)])>>>16&255,R=65535&Z,!(U+(x=Z>>>24)<=g);){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}k>>>=U,g-=U,e.back+=U}if(k>>>=x,g-=x,e.back+=x,64&T){t.msg="invalid distance code",e.mode=30;break}e.offset=R,e.extra=15&T,e.mode=24;case 24:if(e.extra){for(I=e.extra;g<I;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}e.offset+=k&(1<<e.extra)-1,k>>>=e.extra,g-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=30;break}e.mode=25;case 25:if(0===y)break t;if(j=A-y,e.offset>j){if((j=e.offset-j)>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=30;break}z=j>e.wnext?(j-=e.wnext,e.wsize-j):e.wnext-j,j>e.length&&(j=e.length),F=e.window}else F=v,z=w-e.offset,j=e.length;for(y<j&&(j=y),y-=j,e.length-=j;v[w++]=F[z++],--j;);0===e.length&&(e.mode=21);break;case 26:if(0===y)break t;v[w++]=e.length,y--,e.mode=21;break;case 27:if(e.wrap){for(;g<32;){if(0===b)break t;b--,k|=d[m++]<<g,g+=8}if(A-=y,t.total_out+=A,e.total+=A,A&&(t.adler=e.check=e.flags?s(e.check,v,A,w-A):n(e.check,v,A,w-A)),A=y,(e.flags?k:p(k))!==e.check){t.msg="incorrect data check",e.mode=30;break}g=k=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;g<32;){if(0===b)break t;b--,k+=d[m++]<<g,g+=8}if(k!==(4294967295&e.total)){t.msg="incorrect length check",e.mode=30;break}g=k=0}e.mode=29;case 29:B=1;break t;case 30:B=-3;break t;case 31:return-4;case 32:default:return h}return t.next_out=w,t.avail_out=y,t.next_in=m,t.avail_in=b,e.hold=k,e.bits=g,(e.wsize||A!==t.avail_out&&e.mode<30&&(e.mode<27||4!==r))&&_(t,t.output,t.next_out,A-t.avail_out)?(e.mode=31,-4):(E-=t.avail_in,A-=t.avail_out,t.total_in+=E,t.total_out+=A,e.total+=A,e.wrap&&A&&(t.adler=e.check=e.flags?s(e.check,v,A,t.next_out-A):n(e.check,v,A,t.next_out-A)),t.data_type=e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0),(0==E&&0===A||4===r)&&B===c&&(B=-5),B)},e.inflateEnd=function(t){if(!t||!t.state)return h;var r=t.state;return r.window&&(r.window=null),t.state=null,c},e.inflateGetHeader=function(t,r){var e;return t&&t.state?0==(2&(e=t.state).wrap)?h:((e.head=r).done=false,c):h},e.inflateSetDictionary=function(t,r){var e,i=r.length;return t&&t.state?0!==(e=t.state).wrap&&11!==e.mode?h:11===e.mode&&n(1,r,i,0)!==e.check?-3:_(t,r,i,i)?(e.mode=31,-4):(e.havedict=1,c):h},e.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r,e){var i=t("../utils/common"),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(t,r,e,u,f,c,h,l){var d,v,p,m,w,b,y,k,g,E=l.bits,A=0,S=0,_=0,j=0,z=0,F=0,x=0,T=0,R=0,U=0,C=null,D=0,O=new i.Buf16(16),B=new i.Buf16(16),W=null,I=0;for(A=0;A<=15;A++)O[A]=0;for(S=0;S<u;S++)O[r[e+S]]++;for(z=E,j=15;1<=j&&0===O[j];j--);if(j<z&&(z=j),0===j)return f[c++]=20971520,f[c++]=20971520,l.bits=1,0;for(_=1;_<j&&0===O[_];_++);for(z<_&&(z=_),A=T=1;A<=15;A++)if(T<<=1,(T-=O[A])<0)return-1;if(0<T&&(0===t||1!==j))return-1;for(B[1]=0,A=1;A<15;A++)B[A+1]=B[A]+O[A];for(S=0;S<u;S++)0!==r[e+S]&&(h[B[r[e+S]]++]=S);if(b=0===t?(C=W=h,19):1===t?(C=n,D-=257,W=s,I-=257,256):(C=o,W=a,-1),A=_,w=c,x=S=U=0,p=-1,m=(R=1<<(F=z))-1,1===t&&852<R||2===t&&592<R)return 1;for(;;){for(y=A-x,g=h[S]<b?(k=0,h[S]):h[S]>b?(k=W[I+h[S]],C[D+h[S]]):(k=96,0),d=1<<A-x,_=v=1<<F;f[w+(U>>x)+(v-=d)]=y<<24|k<<16|g|0,0!==v;);for(d=1<<A-1;U&d;)d>>=1;if(0!==d?(U&=d-1,U+=d):U=0,S++,0==--O[A]){if(A===j)break;A=r[e+h[S]]}if(z<A&&(U&m)!==p){for(0===x&&(x=z),w+=_,T=1<<(F=A-x);F+x<j&&!((T-=O[F+x])<=0);)F++,T<<=1;if(R+=1<<F,1===t&&852<R||2===t&&592<R)return 1;f[p=U&m]=z<<24|F<<16|w-c|0}}return 0!==U&&(f[w+U]=A-x<<24|64<<16|0),l.bits=z,0}},{"../utils/common":41}],51:[function(t,r,e){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,r,e){var i=t("../utils/common"),n=0,s=1;function o(t){for(var r=t.length;0<=--r;)t[r]=0}var a=0,u=29,f=256,c=f+1+u,h=30,l=19,d=2*c+1,v=15,p=16,m=7,w=256,b=16,y=17,k=18,g=[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],E=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_=new Array(2*(c+2));o(_);var j=new Array(2*h);o(j);var z=new Array(512);o(z);var F=new Array(256);o(F);var x=new Array(u);o(x);var T,R,U,C=new Array(h);function D(t,r,e,i,n){this.static_tree=t,this.extra_bits=r,this.extra_base=e,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function O(t,r){this.dyn_tree=t,this.max_code=0,this.stat_desc=r}function B(t){return t<256?z[t]:z[256+(t>>>7)]}function W(t,r){t.pending_buf[t.pending++]=255&r,t.pending_buf[t.pending++]=r>>>8&255}function I(t,r,e){t.bi_valid>p-e?(t.bi_buf|=r<<t.bi_valid&65535,W(t,t.bi_buf),t.bi_buf=r>>p-t.bi_valid,t.bi_valid+=e-p):(t.bi_buf|=r<<t.bi_valid&65535,t.bi_valid+=e)}function Z(t,r,e){I(t,e[2*r],e[2*r+1])}function N(t,r){for(var e=0;e|=1&t,t>>>=1,e<<=1,0<--r;);return e>>>1}function P(t,r,e){var i,n,s=new Array(v+1),o=0;for(i=1;i<=v;i++)s[i]=o=o+e[i-1]<<1;for(n=0;n<=r;n++){var a=t[2*n+1];0!==a&&(t[2*n]=N(s[a]++,a))}}function G(t){var r;for(r=0;r<c;r++)t.dyn_ltree[2*r]=0;for(r=0;r<h;r++)t.dyn_dtree[2*r]=0;for(r=0;r<l;r++)t.bl_tree[2*r]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function L(t){8<t.bi_valid?W(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function M(t,r,e,i){var n=2*r,s=2*e;return t[n]<t[s]||t[n]===t[s]&&i[r]<=i[e]}function q(t,r,e){for(var i=t.heap[e],n=e<<1;n<=t.heap_len&&(n<t.heap_len&&M(r,t.heap[n+1],t.heap[n],t.depth)&&n++,!M(r,i,t.heap[n],t.depth));)t.heap[e]=t.heap[n],e=n,n<<=1;t.heap[e]=i}function H(t,r,e){var i,n,s,o,a=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],n=t.pending_buf[t.l_buf+a],a++,0===i?Z(t,n,r):(Z(t,(s=F[n])+f+1,r),0!==(o=g[s])&&I(t,n-=x[s],o),Z(t,s=B(--i),e),0!==(o=E[s])&&I(t,i-=C[s],o)),a<t.last_lit;);Z(t,w,r)}function J(t,r){var e,i,n,s=r.dyn_tree,o=r.stat_desc.static_tree,a=r.stat_desc.has_stree,u=r.stat_desc.elems,f=-1;for(t.heap_len=0,t.heap_max=d,e=0;e<u;e++)0!==s[2*e]?(t.heap[++t.heap_len]=f=e,t.depth[e]=0):s[2*e+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=f<2?++f:0)]=1,t.depth[n]=0,t.opt_len--,a&&(t.static_len-=o[2*n+1]);for(r.max_code=f,e=t.heap_len>>1;1<=e;e--)q(t,s,e);for(n=u;e=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=e,t.heap[--t.heap_max]=i,s[2*n]=s[2*e]+s[2*i],t.depth[n]=(t.depth[e]>=t.depth[i]?t.depth[e]:t.depth[i])+1,s[2*e+1]=s[2*i+1]=n,t.heap[1]=n++,q(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,r){var e,i,n,s,o,a,u=r.dyn_tree,f=r.max_code,c=r.stat_desc.static_tree,h=r.stat_desc.has_stree,l=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,m=r.stat_desc.max_length,w=0;for(s=0;s<=v;s++)t.bl_count[s]=0;for(u[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;e<d;e++)m<(s=u[2*u[2*(i=t.heap[e])+1]+1]+1)&&(s=m,w++),u[2*i+1]=s,f<i||(t.bl_count[s]++,o=0,p<=i&&(o=l[i-p]),a=u[2*i],t.opt_len+=a*(s+o),h&&(t.static_len+=a*(c[2*i+1]+o)));if(0!==w){do{for(s=m-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[m]--,w-=2}while(0<w);for(s=m;0!==s;s--)for(i=t.bl_count[s];0!==i;)f<(n=t.heap[--e])||(u[2*n+1]!==s&&(t.opt_len+=(s-u[2*n+1])*u[2*n],u[2*n+1]=s),i--)}}(t,r),P(s,f,t.bl_count)}function K(t,r,e){var i,n,s=-1,o=r[1],a=0,u=7,f=4;for(0===o&&(u=138,f=3),r[2*(e+1)+1]=65535,i=0;i<=e;i++)n=o,o=r[2*(i+1)+1],++a<u&&n===o||(a<f?t.bl_tree[2*n]+=a:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*b]++):a<=10?t.bl_tree[2*y]++:t.bl_tree[2*k]++,s=n,f=(a=0)===o?(u=138,3):n===o?(u=6,3):(u=7,4))}function V(t,r,e){var i,n,s=-1,o=r[1],a=0,u=7,f=4;for(0===o&&(u=138,f=3),i=0;i<=e;i++)if(n=o,o=r[2*(i+1)+1],!(++a<u&&n===o)){if(a<f)for(;Z(t,n,t.bl_tree),0!=--a;);else 0!==n?(n!==s&&(Z(t,n,t.bl_tree),a--),Z(t,b,t.bl_tree),I(t,a-3,2)):a<=10?(Z(t,y,t.bl_tree),I(t,a-3,3)):(Z(t,k,t.bl_tree),I(t,a-11,7));s=n,f=(a=0)===o?(u=138,3):n===o?(u=6,3):(u=7,4)}}o(C);var X=false;function Y(t,r,e,n){I(t,(a<<1)+(n?1:0),3),function(t,r,e,n){L(t),W(t,e),W(t,~e),i.arraySet(t.pending_buf,t.window,r,e,t.pending),t.pending+=e}(t,r,e)}e._tr_init=function(t){X||(function(){var t,r,e,i,n,s=new Array(v+1);for(i=e=0;i<u-1;i++)for(x[i]=e,t=0;t<1<<g[i];t++)F[e++]=i;for(F[e-1]=i,i=n=0;i<16;i++)for(C[i]=n,t=0;t<1<<E[i];t++)z[n++]=i;for(n>>=7;i<h;i++)for(C[i]=n<<7,t=0;t<1<<E[i]-7;t++)z[256+n++]=i;for(r=0;r<=v;r++)s[r]=0;for(t=0;t<=143;)_[2*t+1]=8,t++,s[8]++;for(;t<=255;)_[2*t+1]=9,t++,s[9]++;for(;t<=279;)_[2*t+1]=7,t++,s[7]++;for(;t<=287;)_[2*t+1]=8,t++,s[8]++;for(P(_,c+1,s),t=0;t<h;t++)j[2*t+1]=5,j[2*t]=N(t,5);T=new D(_,g,f+1,c,v),R=new D(j,E,0,h,v),U=new D(new Array(0),A,0,l,m)}(),X=true),t.l_desc=new O(t.dyn_ltree,T),t.d_desc=new O(t.dyn_dtree,R),t.bl_desc=new O(t.bl_tree,U),t.bi_buf=0,t.bi_valid=0,G(t)},e._tr_stored_block=Y,e._tr_flush_block=function(t,r,e,i){var o,a,u=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var r,e=4093624447;for(r=0;r<=31;r++,e>>>=1)if(1&e&&0!==t.dyn_ltree[2*r])return n;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(r=32;r<f;r++)if(0!==t.dyn_ltree[2*r])return s;return n}(t)),J(t,t.l_desc),J(t,t.d_desc),u=function(t){var r;for(K(t,t.dyn_ltree,t.l_desc.max_code),K(t,t.dyn_dtree,t.d_desc.max_code),J(t,t.bl_desc),r=l-1;3<=r&&0===t.bl_tree[2*S[r]+1];r--);return t.opt_len+=3*(r+1)+5+5+4,r}(t),o=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=o&&(o=a)):o=a=e+5,e+4<=o&&-1!==r?Y(t,r,e,i):4===t.strategy||a===o?(I(t,2+(i?1:0),3),H(t,_,j)):(I(t,4+(i?1:0),3),function(t,r,e,i){var n;for(I(t,r-257,5),I(t,e-1,5),I(t,i-4,4),n=0;n<i;n++)I(t,t.bl_tree[2*S[n]+1],3);V(t,t.dyn_ltree,r-1),V(t,t.dyn_dtree,e-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),H(t,t.dyn_ltree,t.dyn_dtree)),G(t),i&&L(t)},e._tr_tally=function(t,r,e){return t.pending_buf[t.d_buf+2*t.last_lit]=r>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&r,t.pending_buf[t.l_buf+t.last_lit]=255&e,t.last_lit++,0===r?t.dyn_ltree[2*e]++:(t.matches++,r--,t.dyn_ltree[2*(F[e]+f+1)]++,t.dyn_dtree[2*B(r)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){I(t,2,3),Z(t,w,_),function(t){16===t.bi_valid?(W(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,r,e){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,r,e){(function(t){!function(t,r){if(!t.setImmediate){var e,i,n,s,o=1,a={},u=false,f=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,e="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){l(t)}))}:function(){if(t.postMessage&&!t.importScripts){var r=true,e=t.onmessage;return t.onmessage=function(){r=false},t.postMessage("","*"),t.onmessage=e,r}}()?(s="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",d,false):t.attachEvent("onmessage",d),function(r){t.postMessage(s+r,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){l(t.data)},function(t){n.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,function(t){var r=f.createElement("script");r.onreadystatechange=function(){l(t),r.onreadystatechange=null,i.removeChild(r),r=null},i.appendChild(r)}):function(t){setTimeout(l,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var r=new Array(arguments.length-1),i=0;i<r.length;i++)r[i]=arguments[i+1];var n={callback:t,args:r};return a[o]=n,e(o),o++},c.clearImmediate=h}function h(t){delete a[t]}function l(t){if(u)setTimeout(l,0,t);else{var e=a[t];if(e){u=true;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(r,i)}}(e)}finally{h(t),u=false}}}}function d(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(s)&&l(+r.data.slice(s.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}))})(jszip_min);return jszip_min.exports}var jszip_minExports=requireJszip_min();var jszip=getDefaultExportFromCjs(jszip_minExports);var defaultWidth=function(t){switch(t){case"textarea":return 150;case"textbox":return 150;case"timestamp":return 105;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 71}return 150};var defaultHeight=function(t){switch(t){case"textarea":return 41;case"textbox":return 15;case"timestamp":return 15;case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 36}return 50};var setControlStyles=function(t,r,e,i){var n=r.x,s=n===void 0?0:n,o=r.y,a=o===void 0?0:o,u=r.width,f=u===void 0?defaultWidth(r.type):u,c=r.height,h=c===void 0?defaultHeight(r.type):c;t.style.width="".concat(f,"px");t.style.height="".concat(h,"px");t.style.position="absolute";t.style.left="".concat(rescale(e,s),"px");t.style.bottom="".concat(rescale(i,a),"px");t.style.transform="scale(".concat(e,", ").concat(i,")")};var getControlStyles=function(t,r,e){var i=t.x,n=i===void 0?0:i,s=t.y,o=s===void 0?0:s,a=t.width,u=a===void 0?defaultWidth(t.type):a,f=t.height,c=f===void 0?defaultHeight(t.type):f;return{zIndex:"100",width:"".concat(u,"px"),height:"".concat(c,"px"),position:"absolute",left:"".concat(rescale(r,n),"px"),bottom:"".concat(rescale(e,o),"px"),transform:"scale(".concat(r,", ").concat(e,")")}};var getFieldId=function(t){return"verdocs-doc-fld-".concat(t.name)};var updateDocumentFieldValue=function(t){var r=getFieldId(t);var e=document.getElementById(r);if(e){e.field=t;e.roleindex=t;e.setAttribute("id",r);e.setAttribute("disabled",true);e.setAttribute("disabled",false)}};var renderDocumentField=function(t,r,e,i,n){if(n===void 0){n=1}var s,o;var a=i.disabled,u=a===void 0?false:a,f=i.editable,c=f===void 0?false:f,h=i.draggable,l=h===void 0?false:h,d=i.done,v=d===void 0?false:d;var p=document.getElementById(e.containerId+"-controls");if(!p){console.log("[renderDocumentField] No controls DIV found",e.containerId+"-controls",e);return}switch(r.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var b=r.type;if(b==="textbox"){if(((s=r["setting"])===null||s===void 0?void 0:s.leading)>0||((o=r["settings"])===null||o===void 0?void 0:o.leading)>0){b="textarea"}}var y=document.createElement("verdocs-field-".concat(b));y.field=r;y.setAttribute("id",m);y.setAttribute("fieldname",r.name);y.setAttribute("source",t);y.setAttribute("sourceid","template_id"in r?r.template_id:r.envelope_id);if(u){y.setAttribute("tabindex",-1);y.setAttribute("disabled",true)}else{y.setAttribute("tabIndex",n)}y.setAttribute("editable",c);y.setAttribute("draggable",l);y.setAttribute("done",v);setControlStyles(y,r,e.xScale,e.yScale);p.appendChild(y);return y}case"checkbox":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var k=document.createElement("verdocs-field-checkbox");k.field=r;k.setAttribute("id",m);k.setAttribute("option",0);k.setAttribute("source",t);k.setAttribute("sourceid","template_id"in r?r.template_id:r.envelope_id);if(u){k.setAttribute("disabled",true)}if(v){k.setAttribute("done",true)}if(c){k.setAttribute("editable",true)}if(l){k.setAttribute("draggable",true)}setControlStyles(k,r,e.xScale,e.yScale);p.appendChild(k);return k}case"radio":{var m=getFieldId(r);var w=document.getElementById(m);if(w){setControlStyles(w,r,e.xScale,e.yScale);return w}var g=document.createElement("verdocs-field-radio");g.field=r;g.setAttribute("id",m);g.setAttribute("option",0);g.setAttribute("source",t);g.setAttribute("sourceid","template_id"in r?r.template_id:r.envelope_id);if(u){g.setAttribute("disabled",true)}if(v){g.setAttribute("done",true)}if(c){g.setAttribute("editable",true)}if(l){g.setAttribute("draggable",true)}setControlStyles(g,r,e.xScale,e.yScale);p.appendChild(g);return g}default:console.log("[PREVIEW] Skipping unsupported field type",r);return null}};var updateCssTransform=function(t,r,e){var i=t.style.transform||"";var n="".concat(r,"(").concat(e,")");if(i.includes(r)){t.style.transform=i.replace(new RegExp("".concat(r,"\\(.+?\\)")),n)}else{t.style.transform=i+" "+n}};var removeCssTransform=function(t){t.style.transform=t.style.transform.split(")")[0]+")"};var saveAttachment=function(t,r,e){return __awaiter(void 0,void 0,void 0,(function(){var i,n,s;return __generator(this,(function(o){switch(o.label){case 0:i=dateFnsExports.format(new Date(r.updated_at),FORMAT_DATE);n="".concat(r.name," - ").concat(i,".pdf");return[4,getEnvelopeFile(t,r.id,e)];case 1:s=o.sent();downloadBlob(s,n);return[2]}}))}))};var saveEnvelopesAsZip=function(t,r){return __awaiter(void 0,void 0,void 0,(function(){var e,i,n,s,o,a,u,f,c,h,l,d,v,p,m,w,b,y,k,g,E,A,S,_;var j,z,F;var x,T,R,U,C,D,O,B,W,I,Z,N;return __generator(this,(function(P){switch(P.label){case 0:i=new jszip;P.label=1;case 1:P.trys.push([1,30,31,36]);j=true,z=__asyncValues(r);P.label=2;case 2:return[4,z.next()];case 3:if(!(F=P.sent(),x=F.done,!x))return[3,29];U=F.value;j=false;n=U;s=dateFnsExports.format(new Date(n.updated_at),FORMAT_DATE);o=r.length>0?i.folder("".concat(n.id," - ").concat(n.name," - ").concat(s)):null;P.label=4;case 4:P.trys.push([4,22,23,28]);a=true,u=(D=void 0,__asyncValues(n.documents));P.label=5;case 5:return[4,u.next()];case 6:if(!(f=P.sent(),C=f.done,!C))return[3,21];B=f.value;a=false;c=B;h=c.type==="certificate"?"".concat(n.name,"_certificate.pdf"):"".concat(c.name.replace(".pdf","").replace(/\//g,"_"),".pdf");return[4,getEnvelopeFile(t,n.id,c.id)];case 7:l=P.sent();if(o){o.file(h,l,{compression:"DEFLATE"})}else{i.file(h,l,{compression:"DEFLATE"})}d=((e=n.fields)===null||e===void 0?void 0:e.filter((function(t){return t.type==="attachment"&&t.settings["name"]})))||[];if(!(d.length>0))return[3,20];v=o?o.folder("attachments"):i.folder("attachments");P.label=8;case 8:P.trys.push([8,14,15,20]);p=true,m=(I=void 0,__asyncValues(d));P.label=9;case 9:return[4,m.next()];case 10:if(!(w=P.sent(),W=w.done,!W))return[3,13];N=w.value;p=false;b=N;return[4,getFieldAttachment(t,n.id,b.name)];case 11:y=P.sent();v.file(b.settings["name"].replace(/\//g,"_"),y,{compression:"DEFLATE"});P.label=12;case 12:p=true;return[3,9];case 13:return[3,20];case 14:k=P.sent();I={error:k};return[3,20];case 15:P.trys.push([15,,18,19]);if(!(!p&&!W&&(Z=m.return)))return[3,17];return[4,Z.call(m)];case 16:P.sent();P.label=17;case 17:return[3,19];case 18:if(I)throw I.error;return[7];case 19:return[7];case 20:a=true;return[3,5];case 21:return[3,28];case 22:g=P.sent();D={error:g};return[3,28];case 23:P.trys.push([23,,26,27]);if(!(!a&&!C&&(O=u.return)))return[3,25];return[4,O.call(u)];case 24:P.sent();P.label=25;case 25:return[3,27];case 26:if(D)throw D.error;return[7];case 27:return[7];case 28:j=true;return[3,2];case 29:return[3,36];case 30:E=P.sent();T={error:E};return[3,36];case 31:P.trys.push([31,,34,35]);if(!(!j&&!x&&(R=z.return)))return[3,33];return[4,R.call(z)];case 32:P.sent();P.label=33;case 33:return[3,35];case 34:if(T)throw T.error;return[7];case 35:return[7];case 36:A=dateFnsExports.format(r.length===1?new Date(r[0].updated_at):new Date,FORMAT_DATE);S=r.length===1?"".concat(r[0].name," - ").concat(A,".zip"):"Verdocs-Envelopes-".concat(A);return[4,i.generateAsync({type:"blob",compression:"DEFLATE"})];case 37:_=P.sent();downloadBlob(_,S);return[2]}}))}))};var throttle=function(t,r){var e=0;return function(){var i=this;var n=[];for(var s=0;s<arguments.length;s++){n[s]=arguments[s]}clearTimeout(e);e=setTimeout((function(){return t.apply(i,n)}),r)}};var renderedTextWidth=function(t,r){if(r===void 0){r="16px Arial"}var e=document.createElement("canvas");var i=e.getContext("2d");i.font=r;return i.measureText(t).width};var convertToE164=function(t){var r=(t||"").trim();if(!r||r.startsWith("+")){return r}r=r.replace(/[^0-9]/g,"");r=r.replace(/^0/g,"");return"+1".concat(r)};export{saveAttachment as a,renderedTextWidth as b,getControlStyles as c,convertToE164 as d,updateCssTransform as e,removeCssTransform as f,getFieldId as g,setControlStyles as h,defaultHeight as i,defaultWidth as j,renderDocumentField as r,saveEnvelopesAsZip as s,throttle as t,updateDocumentFieldValue as u};
13
+ //# sourceMappingURL=utils-DmfOx9Ey.js.map