@verdocs/web-sdk 2.3.73 → 2.3.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 (128) hide show
  1. package/dist/cjs/{Types-fb95ed6b.js → Types-f83b8488.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{utils-7cc3fe3c.js → utils-13f8ed3f.js} +2 -2
  4. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
  5. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
  6. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +22 -22
  9. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  10. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-sign.cjs.entry.js +5 -2
  14. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +26 -33
  15. package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  17. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +3 -0
  18. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.css +1 -1
  19. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.css +1 -1
  20. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +1 -1
  21. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.css +1 -1
  22. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.css +1 -1
  23. package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.css +1 -1
  24. package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.css +1 -1
  25. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.css +1 -1
  26. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +1 -1
  27. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
  28. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +0 -1
  29. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +1 -1
  30. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +28 -9
  31. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +25 -32
  32. package/dist/collection/utils/Types.js +1 -1
  33. package/dist/collection/utils/utils.js +1 -1
  34. package/dist/components/Types2.js +1 -1
  35. package/dist/components/utils.js +1 -1
  36. package/dist/components/verdocs-field-attachment2.js +1 -1
  37. package/dist/components/verdocs-field-checkbox2.js +1 -1
  38. package/dist/components/verdocs-field-date2.js +1 -1
  39. package/dist/components/verdocs-field-dropdown2.js +1 -1
  40. package/dist/components/verdocs-field-initial2.js +1 -1
  41. package/dist/components/verdocs-field-payment.js +1 -1
  42. package/dist/components/verdocs-field-radio-button2.js +1 -1
  43. package/dist/components/verdocs-field-signature2.js +1 -1
  44. package/dist/components/verdocs-field-textarea2.js +1 -1
  45. package/dist/components/verdocs-field-textbox2.js +1 -2
  46. package/dist/components/verdocs-field-timestamp2.js +1 -1
  47. package/dist/components/verdocs-sign.js +3 -0
  48. package/dist/components/verdocs-template-document-page2.js +11 -9
  49. package/dist/components/verdocs-template-fields2.js +25 -32
  50. package/dist/custom-elements.json +2147 -0
  51. package/dist/docs.json +18 -1
  52. package/dist/esm/{Types-1628dc71.js → Types-086facf7.js} +1 -1
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/esm/{utils-36f1bbdd.js → utils-a56ee5e9.js} +3 -3
  55. package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
  56. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  57. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  58. package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
  59. package/dist/esm/verdocs-field-attachment_15.entry.js +22 -22
  60. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  61. package/dist/esm/verdocs-pagination_2.entry.js +2 -2
  62. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  63. package/dist/esm/verdocs-settings-api-keys_4.entry.js +2 -2
  64. package/dist/esm/verdocs-sign.entry.js +5 -2
  65. package/dist/esm/verdocs-template-fields_4.entry.js +26 -33
  66. package/dist/esm/verdocs-view.entry.js +2 -2
  67. package/dist/esm/verdocs-web-sdk.js +1 -1
  68. package/dist/esm-es5/Types-086facf7.js +1 -0
  69. package/dist/esm-es5/loader.js +1 -1
  70. package/dist/esm-es5/{utils-36f1bbdd.js → utils-a56ee5e9.js} +2 -2
  71. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  84. package/dist/types/components/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +4 -0
  85. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -1
  86. package/dist/types/components.d.ts +8 -0
  87. package/dist/types/utils/Types.d.ts +1 -1
  88. package/dist/types/utils/utils.d.ts +1 -1
  89. package/dist/verdocs-web-sdk/{p-cacffa79.system.js → p-0cafdb16.system.js} +2 -2
  90. package/dist/verdocs-web-sdk/{p-3c59911b.system.entry.js → p-0e6b2f10.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-0b0cc39b.system.entry.js → p-15c88a05.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-d8cd6b59.system.js → p-173e86c3.system.js} +1 -1
  93. package/dist/verdocs-web-sdk/p-1b4e7078.js +1 -0
  94. package/dist/verdocs-web-sdk/{p-90539070.entry.js → p-1d5f10f4.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-e0e99a5d.system.entry.js → p-28c93a3a.system.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-356e4c15.system.entry.js → p-320a0e0c.system.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-83597b2e.system.entry.js → p-4b84b04e.system.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-e4b14b93.system.entry.js → p-5e8e5761.system.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-5c306718.entry.js → p-6ca72beb.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/p-8f36c42a.system.entry.js +1 -0
  101. package/dist/verdocs-web-sdk/{p-501d9168.entry.js → p-91e94910.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-bea26fb0.system.entry.js → p-a12b2c26.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-5ddc43f4.entry.js → p-a9da16c6.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-d315d7ca.entry.js → p-b2d3ac44.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-a3d7cdda.js → p-b72328af.js} +2 -2
  106. package/dist/verdocs-web-sdk/{p-d53aec0f.entry.js → p-bbf52926.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/p-c179b3e4.entry.js +1 -0
  108. package/dist/verdocs-web-sdk/{p-08b5e01b.entry.js → p-d0140be2.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-38ea0d20.entry.js → p-d11ffc76.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-2d47c6af.entry.js → p-d151150e.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-0e4f5403.entry.js → p-d1c52218.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-f3947f39.system.entry.js → p-d61bf72b.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-a50982c8.system.entry.js → p-de5b9b23.system.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-f0dfd635.system.entry.js → p-e7d7bcae.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-c5fd0435.system.entry.js → p-ea2211d7.system.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-3fa35da3.entry.js → p-ef99042b.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  118. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  119. package/package.json +1 -1
  120. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +0 -146
  121. package/dist/esm/verdocs-field-textbox.entry.js +0 -142
  122. package/dist/esm-es5/Types-1628dc71.js +0 -1
  123. package/dist/esm-es5/verdocs-field-textbox.entry.js +0 -1
  124. package/dist/verdocs-web-sdk/p-10310263.system.entry.js +0 -1
  125. package/dist/verdocs-web-sdk/p-839f6f0d.js +0 -1
  126. package/dist/verdocs-web-sdk/p-b252cfb6.entry.js +0 -1
  127. package/dist/verdocs-web-sdk/verdocs-field-textbox.entry.js +0 -142
  128. package/dist/verdocs-web-sdk/verdocs-field-textbox.system.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as t,a as r,b as i}from"./p-eab67c09.js";import{b as n,d as e}from"./p-dc2ad047.js";import"./p-05788c2b.js";import{a as s}from"./p-839f6f0d.js";import{f as o}from"./p-c220af42.js";function a(t,r){return t*r}var f=function(t){return new Promise((function(r,i){var n=new FileReader;n.onload=function(){return r({lastModified:t.lastModified,size:t.size,type:t.type,name:t.name,data:n.result})},n.onerror=i,t?n.readAsDataURL(t):i(new Error("Invalid file"))}))},u=function(t,r){void 0===r&&(r="file.pdf");var i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=r,document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),document.body.removeChild(n)},h=t((function(t){
1
+ import{c as t,a as r,b as i}from"./p-eab67c09.js";import{b as n,d as e}from"./p-dc2ad047.js";import"./p-05788c2b.js";import{a as s}from"./p-1b4e7078.js";import{f as o}from"./p-c220af42.js";function a(t,r){return t*r}var f=function(t){return new Promise((function(r,i){var n=new FileReader;n.onload=function(){return r({lastModified:t.lastModified,size:t.size,type:t.type,name:t.name,data:n.result})},n.onerror=i,t?n.readAsDataURL(t):i(new Error("Invalid file"))}))},u=function(t,r){void 0===r&&(r="file.pdf");var i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=r,document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),document.body.removeChild(n)},h=t((function(t){
2
2
  /*!
3
3
 
4
4
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
@@ -10,4 +10,4 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
10
10
  JSZip uses the library pako released under the MIT license :
11
11
  https://github.com/nodeca/pako/blob/main/LICENSE
12
12
  */
13
- t.exports=function t(r,n,e){function s(a,f){if(!n[a]){if(!r[a]){var u="function"==typeof i&&i;if(!f&&u)return u(a,!0);if(o)return o(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=n[a]={exports:{}};r[a][0].call(c.exports,(function(t){return s(r[a][1][t]||t)}),c,c.exports,t,r,n,e)}return n[a].exports}for(var o="function"==typeof i&&i,a=0;a<e.length;a++)s(e[a]);return s}({1:[function(t,r,i){var n=t("./utils"),e=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){for(var r,i,e,o,a,f,u=[],h=0,c=t.length,l=c,d="string"!==n.getTypeOf(t);h<t.length;)l=c-h,e=d?(r=t[h++],i=h<c?t[h++]:0,h<c?t[h++]:0):(r=t.charCodeAt(h++),i=h<c?t.charCodeAt(h++):0,h<c?t.charCodeAt(h++):0),o=(3&r)<<4|i>>4,a=1<l?(15&i)<<2|e>>6:64,f=2<l?63&e:64,u.push(s.charAt(r>>2)+s.charAt(o)+s.charAt(a)+s.charAt(f));return u.join("")},i.decode=function(t){var r,i,n,o,a,f,u=0,h=0,c="data:";if(t.substr(0,c.length)===c)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=e.uint8array?new Uint8Array(0|d):new Array(0|d);u<t.length;)r=s.indexOf(t.charAt(u++))<<2|(o=s.indexOf(t.charAt(u++)))>>4,i=(15&o)<<4|(a=s.indexOf(t.charAt(u++)))>>2,n=(3&a)<<6|(f=s.indexOf(t.charAt(u++))),l[h++]=r,64!==a&&(l[h++]=i),64!==f&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(t,r){var i=t("./external"),n=t("./stream/DataWorker"),e=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function o(t,r,i,n,e){this.compressedSize=t,this.uncompressedSize=r,this.crc32=i,this.compression=n,this.compressedContent=e}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("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)}},o.createWorkerFrom=function(t,r,i){return t.pipe(new e).pipe(new s("uncompressedSize")).pipe(r.compressWorker(i)).pipe(new s("compressedSize")).withStreamInfo("compression",r)},r.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,i){var n=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r){var i=t("./utils"),n=function(){for(var t,r=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;r[i]=t}return r}();r.exports=function(t,r){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,r,i){var e=n,s=0+i;t^=-1;for(var o=0;o<s;o++)t=t>>>8^e[255&(t^r[o])];return-1^t}(0|r,t,t.length):function(t,r,i){var e=n,s=0+i;t^=-1;for(var o=0;o<s;o++)t=t>>>8^e[255&(t^r.charCodeAt(o))];return-1^t}(0|r,t,t.length):0}},{"./utils":32}],5:[function(t,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,r){var i;i="undefined"!=typeof Promise?Promise:t("lie"),r.exports={Promise:i}},{lie:37}],7:[function(t,r,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=n?"uint8array":"array";function f(t,r){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=r,this.meta={}}i.magic="\b\0",s.inherits(f,o),f.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),!1)},f.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new e[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(r){t.push({data:r,meta:t.meta})}},i.compressWorker=function(t){return new f("Deflate",t)},i.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r){function i(t,r){var i,n="";for(i=0;i<r;i++)n+=String.fromCharCode(255&t),t>>>=8;return n}function n(t,r,n,s,u,h){var c,l,d=t.file,v=t.compression,p=h!==o.utf8encode,b=e.transformTo("string",h(d.name)),w=e.transformTo("string",o.utf8encode(d.name)),m=d.comment,y=e.transformTo("string",h(m)),k=e.transformTo("string",o.utf8encode(m)),g=w.length!==d.name.length,E=k.length!==m.length,A="",S="",z="",U=d.dir,x=d.date,j={crc32:0,compressedSize:0,uncompressedSize:0};r&&!n||(j.crc32=t.crc32,j.compressedSize=t.compressedSize,j.uncompressedSize=t.uncompressedSize);var _=0;r&&(_|=8),p||!g&&!E||(_|=2048);var O=0,R=0;U&&(O|=16),"UNIX"===u?(R=798,O|=function(t,r){var i=t;return t||(i=r?16893:33204),(65535&i)<<16}(d.unixPermissions,U)):(R=20,O|=function(t){return 63&(t||0)}(d.dosPermissions)),c=x.getUTCHours(),c<<=6,c|=x.getUTCMinutes(),c<<=5,c|=x.getUTCSeconds()/2,l=x.getUTCFullYear()-1980,l<<=4,l|=x.getUTCMonth()+1,l<<=5,l|=x.getUTCDate(),g&&(S=i(1,1)+i(a(b),4)+w,A+="up"+i(S.length,2)+S),E&&(z=i(1,1)+i(a(y),4)+k,A+="uc"+i(z.length,2)+z);var B="";return B+="\n\0",B+=i(_,2),B+=v.magic,B+=i(c,2),B+=i(l,2),B+=i(j.crc32,4),B+=i(j.compressedSize,4),B+=i(j.uncompressedSize,4),B+=i(b.length,2),B+=i(A.length,2),{fileRecord:f.LOCAL_FILE_HEADER+B+b+A,dirRecord:f.CENTRAL_FILE_HEADER+i(R,2)+B+i(y.length,2)+"\0\0\0\0"+i(O,4)+i(s,4)+b+A+y}}var e=t("../utils"),s=t("../stream/GenericWorker"),o=t("../utf8"),a=t("../crc32"),f=t("../signature");function u(t,r,i,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}e.inherits(u,s),u.prototype.push=function(t){var r=t.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(r+100*(i-n-1))/i:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var r=this.streamFiles&&!t.file.dir;if(r){var i=n(t,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var r=this.streamFiles&&!t.file.dir,e=n(t,r,!0,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},u.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 n=function(t,r,n,s,o){var a=e.transformTo("string",o(s));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(r,4)+i(n,4)+i(a.length,2)+a}(this.dirRecords.length,this.bytesWritten-t,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(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},u.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(t){var r=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var i=0;i<r.length;i++)try{r[i].error(t)}catch(t){}return!0},u.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,r=0;r<t.length;r++)t[r].lock()},r.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,i){var n=t("../compressions"),e=t("./ZipFileWorker");i.generateWorker=function(t,r,i){var s=new e(r.streamFiles,i,r.platform,r.encodeFileName),o=0;try{t.forEach((function(t,i){o++;var e=function(t,r){var i=t||r,e=n[i];if(!e)throw new Error(i+" is not a valid compression method !");return e}(i.options.compression,r.compression),a=i.dir,f=i.date;i._compressWorker(e,i.options.compressionOptions||r.compressionOptions||{}).withStreamInfo("file",{name:t,dir:a,date:f,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r){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){var i=t("./utils"),n=t("./external"),e=t("./utf8"),s=t("./zipEntries"),o=t("./stream/Crc32Probe"),a=t("./nodejsUtils");function f(t){return new n.Promise((function(r,i){var n=t.decompressed.getContentWorker().pipe(new o);n.on("error",(function(t){i(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):r()})).resume()}))}r.exports=function(t,r){var o=this;return r=i.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:e.utf8decode}),a.isNode&&a.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,!0,r.optimizedBinaryString,r.base64).then((function(t){var i=new s(r);return i.load(t),i})).then((function(t){var i=[n.Promise.resolve(t)],e=t.files;if(r.checkCRC32)for(var s=0;s<e.length;s++)i.push(f(e[s]));return n.Promise.all(i)})).then((function(t){for(var n=t.shift(),e=n.files,s=0;s<e.length;s++){var a=e[s],f=a.fileNameStr,u=i.resolve(a.fileNameStr);o.file(u,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:r.createFolders}),a.dir||(o.file(u).unsafeOriginalName=f)}return n.zipComment.length&&(o.comment=n.zipComment),o}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r){var i=t("../utils"),n=t("../stream/GenericWorker");function e(t,r){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(r)}i.inherits(e,n),e.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=!0:r.end()}))},e.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},e.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=e},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r){var i=t("readable-stream").Readable;function n(t,r,n){i.call(this,r),this._helper=t;var e=this;t.on("data",(function(t,r){e.push(t)||e._helper.pause(),n&&n(r)})).on("error",(function(t){e.emit("error",t)})).on("end",(function(){e.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){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){function i(t,r,i){var n,o=e.getTypeOf(r),h=e.extend(i||{},a);h.date=h.date||new Date,null!==h.compression&&(h.compression=h.compression.toUpperCase()),"string"==typeof h.unixPermissions&&(h.unixPermissions=parseInt(h.unixPermissions,8)),h.unixPermissions&&16384&h.unixPermissions&&(h.dir=!0),h.dosPermissions&&16&h.dosPermissions&&(h.dir=!0),h.dir&&(t=v(t)),h.createFolders&&(n=d(t))&&p.call(this,n,!0),i&&void 0!==i.binary||(h.binary=!("string"===o&&!1===h.binary&&!1===h.base64)),(r instanceof f&&0===r.uncompressedSize||h.dir||!r||0===r.length)&&(h.base64=!1,h.binary=!0,r="",h.compression="STORE",o="string");var b;b=r instanceof f||r instanceof s?r:c.isNode&&c.isStream(r)?new l(t,r):e.prepareContent(t,r,h.binary,h.optimizedBinaryString,h.base64);var w=new u(t,b,h);this.files[t]=w}var n=t("./utf8"),e=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),a=t("./defaults"),f=t("./compressedObject"),u=t("./zipObject"),h=t("./generate"),c=t("./nodejsUtils"),l=t("./nodejs/NodejsStreamInputAdapter"),d=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var r=t.lastIndexOf("/");return 0<r?t.substring(0,r):""},v=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},p=function(t,r){return r=void 0!==r?r:a.createFolders,t=v(t),this.files[t]||i.call(this,t,null,{dir:!0,createFolders:r}),this.files[t]};function b(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var r,i,n;for(r in this.files)n=this.files[r],(i=r.slice(this.root.length,r.length))&&r.slice(0,this.root.length)===this.root&&t(i,n)},filter:function(t){var r=[];return this.forEach((function(i,n){t(i,n)&&r.push(n)})),r},file:function(t,r,n){if(1!==arguments.length)return i.call(this,t=this.root+t,r,n),this;if(b(t)){var e=t;return this.filter((function(t,r){return!r.dir&&e.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(b(t))return this.filter((function(r,i){return i.dir&&t.test(r)}));var r=p.call(this,this.root+t),i=this.clone();return i.root=r.name,i},remove:function(t){var r=this.files[t=this.root+t];if(r||("/"!==t.slice(-1)&&(t+="/"),r=this.files[t]),r&&!r.dir)delete this.files[t];else for(var i=this.filter((function(r,i){return i.name.slice(0,t.length)===t})),n=0;n<i.length;n++)delete this.files[i[n].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,i={};try{if((i=e.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");e.checkSupport(i.type),"darwin"!==i.platform&&"freebsd"!==i.platform&&"linux"!==i.platform&&"sunos"!==i.platform||(i.platform="UNIX"),"win32"===i.platform&&(i.platform="DOS"),r=h.generateWorker(this,i,i.comment||this.comment||"")}catch(t){(r=new s("error")).error(t)}return new o(r,i.type||"string",i.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=w},{"./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){r.exports=t("stream")},{stream:void 0}],17:[function(t,r){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),i=t.charCodeAt(1),n=t.charCodeAt(2),e=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===r&&this.data[s+1]===i&&this.data[s+2]===n&&this.data[s+3]===e)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var r=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),e=t.charCodeAt(3),s=this.readData(4);return r===s[0]&&i===s[1]&&n===s[2]&&e===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){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,i=0;for(this.checkOffset(t),r=this.index+t-1;r>=this.index;r--)i=(i<<8)+this.byteAt(r);return this.index+=t,i},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){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){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){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){var i=t("../utils"),n=t("../support"),e=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),a=t("./Uint8ArrayReader");r.exports=function(t){var r=i.getTypeOf(t);return i.checkSupport(r),"string"!==r||n.uint8array?"nodebuffer"===r?new o(t):n.uint8array?new a(i.transformTo("uint8array",t)):new e(i.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,r){var i=t("./GenericWorker"),n=t("../utils");function e(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(e,i),e.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},r.exports=e},{"../utils":32,"./GenericWorker":28}],25:[function(t,r){var i=t("./GenericWorker"),n=t("../crc32");function e(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(e,i),e.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},r.exports=e},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r){var i=t("../utils"),n=t("./GenericWorker");function e(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(e,n),e.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),n.prototype.processChunk.call(this,t)},r.exports=e},{"../utils":32,"./GenericWorker":28}],27:[function(t,r){var i=t("../utils"),n=t("./GenericWorker");function e(t){n.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){r.dataIsReady=!0,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(e,n),e.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},e.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},e.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},e.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;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=e},{"../utils":32,"./GenericWorker":28}],28:[function(t,r){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},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 i=0;i<this._listeners[t].length;i++)this._listeners[t][i].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=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),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=!0,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){var i=t("../utils"),n=t("./ConvertWorker"),e=t("./GenericWorker"),s=t("../base64"),o=t("../support"),a=t("../external"),f=null;if(o.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,r,s){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=s,i.checkSupport(o),this._worker=t.pipe(new n(o)),t.lock()}catch(t){this._worker=new e("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,r){return new a.Promise((function(n,e){var o=[],a=t._internalType,f=t._outputType,u=t._mimeType;t.on("data",(function(t,i){o.push(t),r&&r(i)})).on("error",(function(t){o=[],e(t)})).on("end",(function(){try{var t=function(t,r,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",r),n);case"base64":return s.encode(r);default:return i.transformTo(t,r)}}(f,function(t,r){var i,n=0,e=null,s=0;for(i=0;i<r.length;i++)s+=r[i].length;switch(t){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(e=new Uint8Array(s),i=0;i<r.length;i++)e.set(r[i],n),n+=r[i].length;return e;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),u);n(t)}catch(t){e(t)}o=[]})).resume()}))}(this,t)},on:function(t,r){var n=this;return this._worker.on(t,"data"===t?function(t){r.call(n,t.data,t.meta)}:function(){i.delay(r,arguments,n)}),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=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var e=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);e.append(n),i.blob=0===e.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,i){for(var n=t("./utils"),e=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),f=0;f<256;f++)a[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;function u(){o.call(this,"utf-8 decode"),this.leftOver=null}function h(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(t){return e.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var r,i,n,s,o,a=t.length,f=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),f+=i<128?1:i<2048?2:i<65536?3:4;for(r=e.uint8array?new Uint8Array(f):new Array(f),s=o=0;o<f;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),i<128?r[o++]=i:(i<2048?r[o++]=192|i>>>6:(i<65536?r[o++]=224|i>>>12:(r[o++]=240|i>>>18,r[o++]=128|i>>>12&63),r[o++]=128|i>>>6&63),r[o++]=128|63&i);return r}(t)},i.utf8decode=function(t){return e.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var r,i,e,s,o=t.length,f=new Array(2*o);for(r=i=0;r<o;)if((e=t[r++])<128)f[i++]=e;else if(4<(s=a[e]))f[i++]=65533,r+=s-1;else{for(e&=2===s?31:3===s?15:7;1<s&&r<o;)e=e<<6|63&t[r++],s--;1<s?f[i++]=65533:e<65536?f[i++]=e:(f[i++]=55296|(e-=65536)>>10&1023,f[i++]=56320|1023&e)}return f.length!==i&&(f.subarray?f=f.subarray(0,i):f.length=i),n.applyFromCharCode(f)}(t=n.transformTo(e.uint8array?"uint8array":"array",t))},n.inherits(u,o),u.prototype.processChunk=function(t){var r=n.transformTo(e.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(e.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 i;for((r=r||t.length)>t.length&&(r=t.length),i=r-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?r:i+a[t[i]]>r?i:r}(r),f=r;o!==r.length&&(e.uint8array?(f=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(f=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:i.utf8decode(f),meta:t.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=u,n.inherits(h,o),h.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,i){var n=t("./support"),e=t("./base64"),s=t("./nodejsUtils"),o=t("./external");function a(t){return t}function f(t,r){for(var i=0;i<t.length;++i)r[i]=255&t.charCodeAt(i);return r}t("setimmediate"),i.newBlob=function(t,r){i.checkSupport("blob");try{return new Blob([t],{type:r})}catch(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(t,r,i){var n=[],e=0,s=t.length;if(s<=i)return String.fromCharCode.apply(null,t);for(;e<s;)n.push(String.fromCharCode.apply(null,"array"===r||"nodebuffer"===r?t.slice(e,Math.min(e+i,s)):t.subarray(e,Math.min(e+i,s)))),e+=i;return n.join("")},stringifyByChar:function(t){for(var r="",i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return r},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var r=65536,n=i.getTypeOf(t),e=!0;if("uint8array"===n?e=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(e=u.applyCanBeUsed.nodebuffer),e)for(;1<r;)try{return u.stringifyByChunk(t,n,r)}catch(t){r=Math.floor(r/2)}return u.stringifyByChar(t)}function c(t,r){for(var i=0;i<t.length;i++)r[i]=t[i];return r}i.applyFromCharCode=h;var l={};l.string={string:a,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return l.string.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:function(t){return f(t,s.allocBuffer(t.length))}},l.array={string:h,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 h(new Uint8Array(t))},array:function(t){return c(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:h,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:a,nodebuffer:function(t){return s.newBufferFrom(t)}},l.nodebuffer={string:h,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return l.nodebuffer.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:a},i.transformTo=function(t,r){if(r=r||"",!t)return r;i.checkSupport(t);var n=i.getTypeOf(r);return l[n][t](r)},i.resolve=function(t){for(var r=t.split("/"),i=[],n=0;n<r.length;n++){var e=r[n];"."===e||""===e&&0!==n&&n!==r.length-1||(".."===e?i.pop():i.push(e))}return i.join("/")},i.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&s.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(t){var r,i,n="";for(i=0;i<(t||"").length;i++)n+="\\x"+((r=t.charCodeAt(i))<16?"0":"")+r.toString(16).toUpperCase();return n},i.delay=function(t,r,i){setImmediate((function(){t.apply(i||null,r||[])}))},i.inherits=function(t,r){function i(){}i.prototype=r.prototype,t.prototype=new i},i.extend=function(){var t,r,i={};for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&void 0===i[r]&&(i[r]=arguments[t][r]);return i},i.prepareContent=function(t,r,s,a,u){return o.Promise.resolve(r).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise((function(r,i){var n=new FileReader;n.onload=function(t){r(t.target.result)},n.onerror=function(t){i(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(r){var h=i.getTypeOf(r);return h?("arraybuffer"===h?r=i.transformTo("uint8array",r):"string"===h&&(u?r=e.decode(r):s&&!0!==a&&(r=function(t){return f(t,n.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){var i=t("./reader/readerFor"),n=t("./utils"),e=t("./signature"),s=t("./zipEntry"),o=t("./support");function a(t){this.files=[],this.loadOptions=t}a.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 i=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===r;return this.reader.setIndex(i),n},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=n.transformTo(o.uint8array?"uint8array":"array",t);this.zipComment=this.loadOptions.decodeFileName(r)},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,i,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),r=this.reader.readInt(4),i=this.reader.readData(r),this.zip64ExtensibleData[t]={id:t,length:r,value:i}},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++)this.reader.setIndex((r=this.files[t]).localHeaderOffset),this.checkSignature(e.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(e.CENTRAL_FILE_HEADER);)(t=new s({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(e.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,e.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var r=t;if(this.checkSignature(e.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=!0,(t=this.reader.lastIndexOfSignature(e.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(e.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,e.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(e.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(e.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var s=r-i;if(0<s)this.isSignature(r,e.CENTRAL_FILE_HEADER)||(this.reader.zero=s);else if(s<0)throw new Error("Corrupted zip: missing "+Math.abs(s)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=a},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r){var i=t("./reader/readerFor"),n=t("./utils"),e=t("./compressedObject"),s=t("./crc32"),o=t("./utf8"),a=t("./compressions"),f=t("./support");function u(t,r){this.options=t,this.loadOptions=r}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var r,i;if(t.skip(22),this.fileNameLength=t.readInt(2),i=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(i),-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 a)if(Object.prototype.hasOwnProperty.call(a,r)&&a[r].magic===t)return a[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 e(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=!0)},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,i,n,e=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<e;)r=t.readInt(2),i=t.readInt(2),n=t.readData(i),this.extraFields[r]={id:r,length:i,value:n};t.setIndex(e)},handleUTF8:function(){var t=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(null!==r)this.fileNameStr=r;else{var i=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var e=this.findExtraFieldUnicodeComment();if(null!==e)this.fileCommentStr=e;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)||s(this.fileName)!==r.readInt(4)?null:o.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)||s(this.fileComment)!==r.readInt(4)?null:o.utf8decode(r.readData(t.length-5))}return null}},r.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r){function i(t,r,i){this.name=t,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=r,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}}var n=t("./stream/StreamHelper"),e=t("./stream/DataWorker"),s=t("./utf8"),o=t("./compressedObject"),a=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var r=null,i="string";try{if(!t)throw new Error("No output type specified.");var e="string"===(i=t.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),r=this._decompressWorker();var o=!this._dataBinary;o&&!e&&(r=r.pipe(new s.Utf8EncodeWorker)),!o&&e&&(r=r.pipe(new s.Utf8DecodeWorker))}catch(t){(r=new a("error")).error(t)}return new n(r,i,"")},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 o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new s.Utf8EncodeWorker)),o.createWorkerFrom(i,t,r)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof a?this._data:new e(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=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]]=u;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,i){(function(t){var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var s=0,o=new e(h),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),r=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var r=t.document.createElement("script");r.onreadystatechange=function(){h(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},t.document.documentElement.appendChild(r)}:function(){setTimeout(h,0)};else{var f=new t.MessageChannel;f.port1.onmessage=h,r=function(){f.port2.postMessage(0)}}var u=[];function h(){var t,r;n=!0;for(var i=u.length;i;){for(r=u,u=[],t=-1;++t<i;)r[t]();i=u.length}n=!1}i.exports=function(t){1!==u.push(t)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,r){var i=t("immediate");function n(){}var e={},s=["REJECTED"],o=["FULFILLED"],a=["PENDING"];function f(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,t!==n&&l(this,t)}function u(t,r,i){this.promise=t,"function"==typeof r&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function h(t,r,n){i((function(){var i;try{i=r(n)}catch(i){return e.reject(t,i)}i===t?e.reject(t,new TypeError("Cannot resolve promise with itself")):e.resolve(t,i)}))}function c(t){var r=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof r)return function(){r.apply(t,arguments)}}function l(t,r){var i=!1;function n(r){i||(i=!0,e.reject(t,r))}function s(r){i||(i=!0,e.resolve(t,r))}var o=d((function(){r(s,n)}));"error"===o.status&&n(o.value)}function d(t,r){var i={};try{i.value=t(r),i.status="success"}catch(t){i.status="error",i.value=t}return i}(r.exports=f).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then((function(i){return r.resolve(t()).then((function(){return i}))}),(function(i){return r.resolve(t()).then((function(){throw i}))}))},f.prototype.catch=function(t){return this.then(null,t)},f.prototype.then=function(t,r){if("function"!=typeof t&&this.state===o||"function"!=typeof r&&this.state===s)return this;var i=new this.constructor(n);return this.state!==a?h(i,this.state===o?t:r,this.outcome):this.queue.push(new u(i,t,r)),i},u.prototype.callFulfilled=function(t){e.resolve(this.promise,t)},u.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},u.prototype.callRejected=function(t){e.reject(this.promise,t)},u.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},e.resolve=function(t,r){var i=d(c,r);if("error"===i.status)return e.reject(t,i.value);var n=i.value;if(n)l(t,n);else{t.state=o,t.outcome=r;for(var s=-1,a=t.queue.length;++s<a;)t.queue[s].callFulfilled(r)}return t},e.reject=function(t,r){t.state=s,t.outcome=r;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(r);return t},f.resolve=function(t){return t instanceof this?t:e.resolve(new this(n),t)},f.reject=function(t){var r=new this(n);return e.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 i=t.length,s=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,f=-1,u=new this(n);++f<i;)h(t[f],f);return u;function h(t,n){r.resolve(t).then((function(t){o[n]=t,++a!==i||s||(s=!0,e.resolve(u,o))}),(function(t){s||(s=!0,e.reject(u,t))}))}},f.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var s=-1,o=new this(n);++s<r;)this.resolve(t[s]).then((function(t){i||(i=!0,e.resolve(o,t))}),(function(t){i||(i=!0,e.reject(o,t))}));return o}},{immediate:36}],38:[function(t,r){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,i){var n=t("./zlib/deflate"),e=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),f=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=e.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,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=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(0!==i)throw new Error(o[i]);if(r.header&&n.deflateSetHeader(this.strm,r.header),r.dictionary){var h;if(h="string"==typeof r.dictionary?s.string2buf(r.dictionary):"[object ArrayBuffer]"===f.call(r.dictionary)?new Uint8Array(r.dictionary):r.dictionary,0!==(i=n.deflateSetDictionary(this.strm,h)))throw new Error(o[i]);this._dict_set=!0}}function h(t,r){var i=new u(r);if(i.push(t,!0),i.err)throw i.msg||o[i.err];return i.result}u.prototype.push=function(t,r){var i,o,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=r===~~r?r:!0===r?4:0,a.input="string"==typeof t?s.string2buf(t):"[object ArrayBuffer]"===f.call(t)?new Uint8Array(t):t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new e.Buf8(u),a.next_out=0,a.avail_out=u),1!==(i=n.deflate(a,o))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||this.onData("string"===this.options.to?s.buf2binstring(e.shrinkBuf(a.output,a.next_out)):e.shrinkBuf(a.output,a.next_out))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===o?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==o||(this.onEnd(0),!(a.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Deflate=u,i.deflate=h,i.deflateRaw=function(t,r){return(r=r||{}).raw=!0,h(t,r)},i.gzip=function(t,r){return(r=r||{}).gzip=!0,h(t,r)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,i){var n=t("./zlib/inflate"),e=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),f=t("./zlib/zstream"),u=t("./zlib/gzheader"),h=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=e.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=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,r.windowBits);if(i!==o.Z_OK)throw new Error(a[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function l(t,r){var i=new c(r);if(i.push(t,!0),i.err)throw i.msg||a[i.err];return i.result}c.prototype.push=function(t,r){var i,a,f,u,c,l,d=this.strm,v=this.options.chunkSize,p=this.options.dictionary,b=!1;if(this.ended)return!1;a=r===~~r?r:!0===r?o.Z_FINISH:o.Z_NO_FLUSH,d.input="string"==typeof t?s.binstring2buf(t):"[object ArrayBuffer]"===h.call(t)?new Uint8Array(t):t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new e.Buf8(v),d.next_out=0,d.avail_out=v),(i=n.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(l="string"==typeof p?s.string2buf(p):"[object ArrayBuffer]"===h.call(p)?new Uint8Array(p):p,i=n.inflateSetDictionary(this.strm,l)),i===o.Z_BUF_ERROR&&!0===b&&(i=o.Z_OK,b=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&i!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(f=s.utf8border(d.output,d.next_out),u=d.next_out-f,c=s.buf2string(d.output,f),d.next_out=u,d.avail_out=v-u,u&&e.arraySet(d.output,d.output,f,u,0),this.onData(c)):this.onData(e.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(b=!0)}while((0<d.avail_in||0===d.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(d.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===o.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Inflate=c,i.inflate=l,i.inflateRaw=function(t,r){return(r=r||{}).raw=!0,l(t,r)},i.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,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(t){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}}return t},i.shrinkBuf=function(t,r){return t.length===r?t:t.subarray?t.subarray(0,r):(t.length=r,t)};var e={arraySet:function(t,r,i,n,e){if(r.subarray&&t.subarray)t.set(r.subarray(i,i+n),e);else for(var s=0;s<n;s++)t[e+s]=r[i+s]},flattenChunks:function(t){var r,i,n,e,s,o;for(r=n=0,i=t.length;r<i;r++)n+=t[r].length;for(o=new Uint8Array(n),r=e=0,i=t.length;r<i;r++)o.set(s=t[r],e),e+=s.length;return o}},s={arraySet:function(t,r,i,n,e){for(var s=0;s<n;s++)t[e+s]=r[i+s]},flattenChunks:function(t){return[].concat.apply([],t)}};i.setTyped=function(t){t?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,e)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(n)},{}],42:[function(t,r,i){var n=t("./common"),e=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new n.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 f(t,r){if(r<65537&&(t.subarray&&s||!t.subarray&&e))return String.fromCharCode.apply(null,n.shrinkBuf(t,r));for(var i="",o=0;o<r;o++)i+=String.fromCharCode(t[o]);return i}o[254]=o[254]=1,i.string2buf=function(t){var r,i,e,s,o,a=t.length,f=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(e=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(e-56320),s++),f+=i<128?1:i<2048?2:i<65536?3:4;for(r=new n.Buf8(f),s=o=0;o<f;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(e=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(e-56320),s++),i<128?r[o++]=i:(i<2048?r[o++]=192|i>>>6:(i<65536?r[o++]=224|i>>>12:(r[o++]=240|i>>>18,r[o++]=128|i>>>12&63),r[o++]=128|i>>>6&63),r[o++]=128|63&i);return r},i.buf2binstring=function(t){return f(t,t.length)},i.binstring2buf=function(t){for(var r=new n.Buf8(t.length),i=0,e=r.length;i<e;i++)r[i]=t.charCodeAt(i);return r},i.buf2string=function(t,r){var i,n,e,s,a=r||t.length,u=new Array(2*a);for(i=n=0;i<a;)if((e=t[i++])<128)u[n++]=e;else if(4<(s=o[e]))u[n++]=65533,i+=s-1;else{for(e&=2===s?31:3===s?15:7;1<s&&i<a;)e=e<<6|63&t[i++],s--;1<s?u[n++]=65533:e<65536?u[n++]=e:(u[n++]=55296|(e-=65536)>>10&1023,u[n++]=56320|1023&e)}return f(u,n)},i.utf8border=function(t,r){var i;for((r=r||t.length)>t.length&&(r=t.length),i=r-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?r:i+o[t[i]]>r?i:r}},{"./common":41}],43:[function(t,r){r.exports=function(t,r,i,n){for(var e=65535&t|0,s=t>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;s=s+(e=e+r[n++]|0)|0,--o;);e%=65521,s%=65521}return e|s<<16|0}},{}],44:[function(t,r){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){var i=function(){for(var t,r=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;r[i]=t}return r}();r.exports=function(t,r,n,e){var s=i,o=e+n;t^=-1;for(var a=e;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}},{}],46:[function(t,r,i){var n,e=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),f=t("./messages"),u=-2,h=258,c=262,l=113;function d(t,r){return t.msg=f[r],r}function v(t){return(t<<1)-(4<t?9:0)}function p(t){for(var r=t.length;0<=--r;)t[r]=0}function b(t){var r=t.state,i=r.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(e.arraySet(t.output,r.pending_buf,r.pending_out,i,t.next_out),t.next_out+=i,r.pending_out+=i,t.total_out+=i,t.avail_out-=i,r.pending-=i,0===r.pending&&(r.pending_out=0))}function w(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,b(t.strm)}function m(t,r){t.pending_buf[t.pending++]=r}function y(t,r){t.pending_buf[t.pending++]=r>>>8&255,t.pending_buf[t.pending++]=255&r}function k(t,r){var i,n,e=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,f=t.strstart>t.w_size-c?t.strstart-(t.w_size-c):0,u=t.window,l=t.w_mask,d=t.prev,v=t.strstart+h,p=u[s+o-1],b=u[s+o];t.prev_length>=t.good_match&&(e>>=2),a>t.lookahead&&(a=t.lookahead);do{if(u[(i=r)+o]===b&&u[i+o-1]===p&&u[i]===u[s]&&u[++i]===u[s+1]){s+=2,i++;do{}while(u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&s<v);if(n=h-(v-s),s=v-h,o<n){if(t.match_start=r,a<=(o=n))break;p=u[s+o-1],b=u[s+o]}}}while((r=d[r&l])>f&&0!=--e);return o<=t.lookahead?o:t.lookahead}function g(t){var r,i,n,s,f,u,h,l,d,v,p=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-c)){for(e.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,r=i=t.hash_size;n=t.head[--r],t.head[r]=p<=n?n-p:0,--i;);for(r=i=p;n=t.prev[--r],t.prev[r]=p<=n?n-p:0,--i;);s+=p}if(0===t.strm.avail_in)break;if(h=t.window,l=t.strstart+t.lookahead,v=void 0,(d=s)<(v=(u=t.strm).avail_in)&&(v=d),i=0===v?0:(u.avail_in-=v,e.arraySet(h,u.input,u.next_in,v,l),1===u.state.wrap?u.adler=o(u.adler,h,v,l):2===u.state.wrap&&(u.adler=a(u.adler,h,v,l)),u.next_in+=v,u.total_in+=v,v),t.lookahead+=i,t.lookahead+t.insert>=3)for(t.ins_h=t.window[f=t.strstart-t.insert],t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+3-1])&t.hash_mask,t.prev[f&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=f,f++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<c&&0!==t.strm.avail_in)}function E(t,r){for(var i,n;;){if(t.lookahead<c){if(g(t),t.lookahead<c&&0===r)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-c&&(t.match_length=k(t,i)),t.match_length>=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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 n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}function A(t,r){for(var i,n,e;;){if(t.lookahead<c){if(g(t),t.lookahead<c&&0===r)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-c&&(t.match_length=k(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(e=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=e&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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=2,t.strstart++,n&&(w(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&w(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}function S(t,r,i,n,e){this.good_length=t,this.max_lazy=r,this.nice_length=i,this.max_chain=n,this.func=e}function z(){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=8,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 e.Buf16(1146),this.dyn_dtree=new e.Buf16(122),this.bl_tree=new e.Buf16(78),p(this.dyn_ltree),p(this.dyn_dtree),p(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(16),this.heap=new e.Buf16(573),p(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(573),p(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function U(t){var r;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(r=t.state).pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?42:l,t.adler=2===r.wrap?0:1,r.last_flush=0,s._tr_init(r),0):d(t,u)}function x(t){var r=U(t);return 0===r&&function(t){t.window_size=2*t.w_size,p(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),r}function j(t,r,i,n,s,o){if(!t)return u;var a=1;if(-1===r&&(r=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||9<s||8!==i||n<8||15<n||r<0||9<r||o<0||4<o)return d(t,u);8===n&&(n=9);var f=new z;return(t.state=f).strm=t,f.wrap=a,f.gzhead=null,f.w_bits=n,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=s+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+3-1)/3),f.window=new e.Buf8(2*f.w_size),f.head=new e.Buf16(f.hash_size),f.prev=new e.Buf16(f.w_size),f.lit_bufsize=1<<s+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new e.Buf8(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=r,f.strategy=o,f.method=i,x(t)}n=[new S(0,0,0,0,(function(t,r){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(g(t),0===t.lookahead&&0===r)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,w(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-c&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&w(t,!1),1)})),new S(4,4,8,4,E),new S(4,5,16,8,E),new S(4,6,32,32,E),new S(4,4,16,16,A),new S(8,16,32,32,A),new S(8,16,128,128,A),new S(8,32,128,256,A),new S(32,128,258,1024,A),new S(32,258,258,4096,A)],i.deflateInit=function(t,r){return j(t,r,8,15,8,0)},i.deflateInit2=j,i.deflateReset=x,i.deflateResetKeep=U,i.deflateSetHeader=function(t,r){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=r,0):u},i.deflate=function(t,r){var i,e,o,f;if(!t||!t.state||5<r||r<0)return t?d(t,u):u;if(e=t.state,!t.output||!t.input&&0!==t.avail_in||666===e.status&&4!==r)return d(t,0===t.avail_out?-5:u);if(e.strm=t,i=e.last_flush,e.last_flush=r,42===e.status)if(2===e.wrap)t.adler=0,m(e,31),m(e,139),m(e,8),e.gzhead?(m(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),m(e,255&e.gzhead.time),m(e,e.gzhead.time>>8&255),m(e,e.gzhead.time>>16&255),m(e,e.gzhead.time>>24&255),m(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),m(e,255&e.gzhead.os),e.gzhead.extra&&e.gzhead.extra.length&&(m(e,255&e.gzhead.extra.length),m(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=a(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=69):(m(e,0),m(e,0),m(e,0),m(e,0),m(e,0),m(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),m(e,3),e.status=l);else{var c=8+(e.w_bits-8<<4)<<8;c|=(2<=e.strategy||e.level<2?0:e.level<6?1:6===e.level?2:3)<<6,0!==e.strstart&&(c|=32),c+=31-c%31,e.status=l,y(e,c),0!==e.strstart&&(y(e,t.adler>>>16),y(e,65535&t.adler)),t.adler=1}if(69===e.status)if(e.gzhead.extra){for(o=e.pending;e.gzindex<(65535&e.gzhead.extra.length)&&(e.pending!==e.pending_buf_size||(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending!==e.pending_buf_size));)m(e,255&e.gzhead.extra[e.gzindex]),e.gzindex++;e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),e.gzindex===e.gzhead.extra.length&&(e.gzindex=0,e.status=73)}else e.status=73;if(73===e.status)if(e.gzhead.name){o=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending===e.pending_buf_size)){f=1;break}f=e.gzindex<e.gzhead.name.length?255&e.gzhead.name.charCodeAt(e.gzindex++):0,m(e,f)}while(0!==f);e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),0===f&&(e.gzindex=0,e.status=91)}else e.status=91;if(91===e.status)if(e.gzhead.comment){o=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending===e.pending_buf_size)){f=1;break}f=e.gzindex<e.gzhead.comment.length?255&e.gzhead.comment.charCodeAt(e.gzindex++):0,m(e,f)}while(0!==f);e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),0===f&&(e.status=103)}else e.status=103;if(103===e.status&&(e.gzhead.hcrc?(e.pending+2>e.pending_buf_size&&b(t),e.pending+2<=e.pending_buf_size&&(m(e,255&t.adler),m(e,t.adler>>8&255),t.adler=0,e.status=l)):e.status=l),0!==e.pending){if(b(t),0===t.avail_out)return e.last_flush=-1,0}else if(0===t.avail_in&&v(r)<=v(i)&&4!==r)return d(t,-5);if(666===e.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==e.lookahead||0!==r&&666!==e.status){var k=2===e.strategy?function(t,r){for(var i;;){if(0===t.lookahead&&(g(t),0===t.lookahead)){if(0===r)return 1;break}if(t.match_length=0,i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}(e,r):3===e.strategy?function(t,r){for(var i,n,e,o,a=t.window;;){if(t.lookahead<=h){if(g(t),t.lookahead<=h&&0===r)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[e=t.strstart-1])===a[++e]&&n===a[++e]&&n===a[++e]){o=t.strstart+h;do{}while(n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&e<o);t.match_length=h-(o-e),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}(e,r):n[e.level].func(e,r);if(3!==k&&4!==k||(e.status=666),1===k||3===k)return 0===t.avail_out&&(e.last_flush=-1),0;if(2===k&&(1===r?s._tr_align(e):5!==r&&(s._tr_stored_block(e,0,0,!1),3===r&&(p(e.head),0===e.lookahead&&(e.strstart=0,e.block_start=0,e.insert=0))),b(t),0===t.avail_out))return e.last_flush=-1,0}return 4!==r?0:e.wrap<=0?1:(2===e.wrap?(m(e,255&t.adler),m(e,t.adler>>8&255),m(e,t.adler>>16&255),m(e,t.adler>>24&255),m(e,255&t.total_in),m(e,t.total_in>>8&255),m(e,t.total_in>>16&255),m(e,t.total_in>>24&255)):(y(e,t.adler>>>16),y(e,65535&t.adler)),b(t),0<e.wrap&&(e.wrap=-e.wrap),0!==e.pending?0:1)},i.deflateEnd=function(t){var r;return t&&t.state?42!==(r=t.state.status)&&69!==r&&73!==r&&91!==r&&103!==r&&r!==l&&666!==r?d(t,u):(t.state=null,r===l?d(t,-3):0):u},i.deflateSetDictionary=function(t,r){var i,n,s,a,f,h,c,l,d=r.length;if(!t||!t.state)return u;if(2===(a=(i=t.state).wrap)||1===a&&42!==i.status||i.lookahead)return u;for(1===a&&(t.adler=o(t.adler,r,d,0)),i.wrap=0,d>=i.w_size&&(0===a&&(p(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new e.Buf8(i.w_size),e.arraySet(l,r,d-i.w_size,i.w_size,0),r=l,d=i.w_size),f=t.avail_in,h=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=r,g(i);i.lookahead>=3;){for(n=i.strstart,s=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--s;);i.strstart=n,i.lookahead=2,g(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=h,t.input=c,t.avail_in=f,i.wrap=a,0},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r){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=!1}},{}],48:[function(t,r){r.exports=function(t,r){var i,n,e,s,o,a,f,u,h,c,l,d,v,p,b,w,m,y,k,g,E,A,S,z,U;z=t.input,e=(n=t.next_in)+(t.avail_in-5),U=t.output,o=(s=t.next_out)-(r-t.avail_out),a=s+(t.avail_out-257),f=(i=t.state).dmax,u=i.wsize,h=i.whave,c=i.wnext,l=i.window,d=i.hold,v=i.bits,p=i.lencode,b=i.distcode,w=(1<<i.lenbits)-1,m=(1<<i.distbits)-1;t:do{v<15&&(d+=z[n++]<<v,d+=z[n++]<<(v+=8),v+=8),y=p[d&w];r:for(;;){if(d>>>=k=y>>>24,v-=k,0==(k=y>>>16&255))U[s++]=65535&y;else{if(!(16&k)){if(0==(64&k)){y=p[(65535&y)+(d&(1<<k)-1)];continue r}if(32&k){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}g=65535&y,(k&=15)&&(v<k&&(d+=z[n++]<<v,v+=8),g+=d&(1<<k)-1,d>>>=k,v-=k),v<15&&(d+=z[n++]<<v,d+=z[n++]<<(v+=8),v+=8),y=b[d&m];i:for(;;){if(d>>>=k=y>>>24,v-=k,!(16&(k=y>>>16&255))){if(0==(64&k)){y=b[(65535&y)+(d&(1<<k)-1)];continue i}t.msg="invalid distance code",i.mode=30;break t}if(E=65535&y,v<(k&=15)&&(d+=z[n++]<<v,(v+=8)<k&&(d+=z[n++]<<v,v+=8)),f<(E+=d&(1<<k)-1)){t.msg="invalid distance too far back",i.mode=30;break t}if(d>>>=k,v-=k,(k=s-o)<E){if(h<(k=E-k)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(S=l,(A=0)===c){if(A+=u-k,k<g){for(g-=k;U[s++]=l[A++],--k;);A=s-E,S=U}}else if(c<k){if(A+=u+c-k,(k-=c)<g){for(g-=k;U[s++]=l[A++],--k;);if(A=0,c<g){for(g-=k=c;U[s++]=l[A++],--k;);A=s-E,S=U}}}else if(A+=c-k,k<g){for(g-=k;U[s++]=l[A++],--k;);A=s-E,S=U}for(;2<g;)U[s++]=S[A++],U[s++]=S[A++],U[s++]=S[A++],g-=3;g&&(U[s++]=S[A++],1<g&&(U[s++]=S[A++]))}else{for(A=s-E;U[s++]=U[A++],U[s++]=U[A++],U[s++]=U[A++],2<(g-=3););g&&(U[s++]=U[A++],1<g&&(U[s++]=U[A++]))}break}}break}}while(n<e&&s<a);n-=g=v>>3,d&=(1<<(v-=g<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n<e?e-n+5:5-(n-e),t.avail_out=s<a?a-s+257:257-(s-a),i.hold=d,i.bits=v}},{}],49:[function(t,r,i){var n=t("../utils/common"),e=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),f=-2;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var r;return t&&t.state?(t.total_in=t.total_out=(r=t.state).total=0,t.msg="",r.wrap&&(t.adler=1&r.wrap),r.mode=1,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new n.Buf32(852),r.distcode=r.distdyn=new n.Buf32(592),r.sane=1,r.back=-1,0):f}function l(t){var r;return t&&t.state?((r=t.state).wsize=0,r.whave=0,r.wnext=0,c(t)):f}function d(t,r){var i,n;return t&&t.state?(n=t.state,r<0?(i=0,r=-r):(i=1+(r>>4),r<48&&(r&=15)),r&&(r<8||15<r)?f:(null!==n.window&&n.wbits!==r&&(n.window=null),n.wrap=i,n.wbits=r,l(t))):f}function v(t,r){var i,n;return t?(n=new h,(t.state=n).window=null,0!==(i=d(t,r))&&(t.state=null),i):f}var p,b,w=!0;function m(t){if(w){var r;for(p=new n.Buf32(512),b=new n.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(1,t.lens,0,288,p,0,t.work,{bits:9}),r=0;r<32;)t.lens[r++]=5;a(2,t.lens,0,32,b,0,t.work,{bits:5}),w=!1}t.lencode=p,t.lenbits=9,t.distcode=b,t.distbits=5}function y(t,r,i,e){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),e>=o.wsize?(n.arraySet(o.window,r,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(e<(s=o.wsize-o.wnext)&&(s=e),n.arraySet(o.window,r,i-e,s,o.wnext),(e-=s)?(n.arraySet(o.window,r,i-e,e,0),o.wnext=e,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}i.inflateReset=l,i.inflateReset2=d,i.inflateResetKeep=c,i.inflateInit=function(t){return v(t,15)},i.inflateInit2=v,i.inflate=function(t,r){var i,h,c,l,d,v,p,b,w,k,g,E,A,S,z,U,x,j,_,O,R,B,F,C,D=0,T=new n.Buf8(4),W=[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 f;12===(i=t.state).mode&&(i.mode=13),d=t.next_out,c=t.output,l=t.next_in,h=t.input,b=i.hold,w=i.bits,k=v=t.avail_in,g=p=t.avail_out,B=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(2&i.wrap&&35615===b){T[i.check=0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0),w=b=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&b)){t.msg="unknown compression method",i.mode=30;break}if(w-=4,R=8+(15&(b>>>=4)),0===i.wbits)i.wbits=R;else if(R>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<R,t.adler=i.check=1,i.mode=512&b?10:12,w=b=0;break;case 2:for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(i.flags=b,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=b>>8&1),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0,i.mode=3;case 3:for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.head&&(i.head.time=b),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,T[2]=b>>>16&255,T[3]=b>>>24&255,i.check=s(i.check,T,4,0)),w=b=0,i.mode=4;case 4:for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.head&&(i.head.xflags=255&b,i.head.os=b>>8),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0,i.mode=5;case 5:if(1024&i.flags){for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.length=b,i.head&&(i.head.extra_len=b),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(v<(E=i.length)&&(E=v),E&&(i.head&&(R=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,h,l,E,R)),512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,i.length-=E),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===v)break t;for(E=0;R=h[l+E++],i.head&&R&&i.length<65536&&(i.head.name+=String.fromCharCode(R)),R&&E<v;);if(512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,R)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===v)break t;for(E=0;R=h[l+E++],i.head&&R&&i.length<65536&&(i.head.comment+=String.fromCharCode(R)),R&&E<v;);if(512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,R)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}w=b=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}t.adler=i.check=u(b),w=b=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,2;t.adler=i.check=1,i.mode=12;case 12:if(5===r||6===r)break t;case 13:if(i.last){b>>>=7&w,w-=7&w,i.mode=27;break}for(;w<3;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}switch(i.last=1&b,w-=1,3&(b>>>=1)){case 0:i.mode=14;break;case 1:if(m(i),i.mode=20,6!==r)break;b>>>=2,w-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}b>>>=2,w-=2;break;case 14:for(b>>>=7&w,w-=7&w;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if((65535&b)!=(b>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&b,w=b=0,i.mode=15,6===r)break t;case 15:i.mode=16;case 16:if(E=i.length){if(v<E&&(E=v),p<E&&(E=p),0===E)break t;n.arraySet(c,h,l,E,d),v-=E,l+=E,p-=E,d+=E,i.length-=E;break}i.mode=12;break;case 17:for(;w<14;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(i.nlen=257+(31&b),w-=5,i.ndist=1+(31&(b>>>=5)),w-=5,i.ncode=4+(15&(b>>>=5)),b>>>=4,w-=4,286<i.nlen||30<i.ndist){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;w<3;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.lens[W[i.have++]]=7&b,b>>>=3,w-=3}for(;i.have<19;)i.lens[W[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,B=a(0,i.lens,0,19,i.lencode,0,i.work,F={bits:i.lenbits}),i.lenbits=F.bits,B){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;U=(D=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(x<16)b>>>=z,w-=z,i.lens[i.have++]=x;else{if(16===x){for(C=z+2;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b>>>=z,w-=z,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}R=i.lens[i.have-1],E=3+(3&b),b>>>=2,w-=2}else if(17===x){for(C=z+3;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}w-=z,R=0,E=3+(7&(b>>>=z)),b>>>=3,w-=3}else{for(C=z+7;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}w-=z,R=0,E=11+(127&(b>>>=z)),b>>>=7,w-=7}if(i.have+E>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;E--;)i.lens[i.have++]=R}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,B=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,F={bits:i.lenbits}),i.lenbits=F.bits,B){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,B=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,F={bits:i.distbits}),i.distbits=F.bits,B){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===r)break t;case 20:i.mode=21;case 21:if(6<=v&&258<=p){t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,o(t,g),d=t.next_out,c=t.output,p=t.avail_out,l=t.next_in,h=t.input,v=t.avail_in,b=i.hold,w=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;U=(D=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(U&&0==(240&U)){for(j=z,_=U,O=x;U=(D=i.lencode[O+((b&(1<<j+_)-1)>>j)])>>>16&255,x=65535&D,!(j+(z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}b>>>=j,w-=j,i.back+=j}if(b>>>=z,w-=z,i.back+=z,i.length=x,0===U){i.mode=26;break}if(32&U){i.back=-1,i.mode=12;break}if(64&U){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&U,i.mode=22;case 22:if(i.extra){for(C=i.extra;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.length+=b&(1<<i.extra)-1,b>>>=i.extra,w-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;U=(D=i.distcode[b&(1<<i.distbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(0==(240&U)){for(j=z,_=U,O=x;U=(D=i.distcode[O+((b&(1<<j+_)-1)>>j)])>>>16&255,x=65535&D,!(j+(z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}b>>>=j,w-=j,i.back+=j}if(b>>>=z,w-=z,i.back+=z,64&U){t.msg="invalid distance code",i.mode=30;break}i.offset=x,i.extra=15&U,i.mode=24;case 24:if(i.extra){for(C=i.extra;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.offset+=b&(1<<i.extra)-1,b>>>=i.extra,w-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===p)break t;if(i.offset>(E=g-p)){if((E=i.offset-E)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}A=E>i.wnext?i.wsize-(E-=i.wnext):i.wnext-E,E>i.length&&(E=i.length),S=i.window}else S=c,A=d-i.offset,E=i.length;for(p<E&&(E=p),p-=E,i.length-=E;c[d++]=S[A++],--E;);0===i.length&&(i.mode=21);break;case 26:if(0===p)break t;c[d++]=i.length,p--,i.mode=21;break;case 27:if(i.wrap){for(;w<32;){if(0===v)break t;v--,b|=h[l++]<<w,w+=8}if(t.total_out+=g-=p,i.total+=g,g&&(t.adler=i.check=i.flags?s(i.check,c,g,d-g):e(i.check,c,g,d-g)),g=p,(i.flags?b:u(b))!==i.check){t.msg="incorrect data check",i.mode=30;break}w=b=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}w=b=0}i.mode=29;case 29:B=1;break t;case 30:B=-3;break t;case 31:return-4;case 32:default:return f}return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,(i.wsize||g!==t.avail_out&&i.mode<30&&(i.mode<27||4!==r))&&y(t,t.output,t.next_out,g-t.avail_out)?(i.mode=31,-4):(g-=t.avail_out,t.total_in+=k-=t.avail_in,t.total_out+=g,i.total+=g,i.wrap&&g&&(t.adler=i.check=i.flags?s(i.check,c,g,t.next_out-g):e(i.check,c,g,t.next_out-g)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==k&&0===g||4===r)&&0===B&&(B=-5),B)},i.inflateEnd=function(t){if(!t||!t.state)return f;var r=t.state;return r.window&&(r.window=null),t.state=null,0},i.inflateGetHeader=function(t,r){var i;return t&&t.state?0==(2&(i=t.state).wrap)?f:((i.head=r).done=!1,0):f},i.inflateSetDictionary=function(t,r){var i,n=r.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?f:11===i.mode&&e(1,r,n,0)!==i.check?-3:y(t,r,n,n)?(i.mode=31,-4):(i.havedict=1,0):f},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r){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],e=[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],s=[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],o=[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,a,f,u,h,c,l){var d,v,p,b,w,m,y,k,g,E=l.bits,A=0,S=0,z=0,U=0,x=0,j=0,_=0,O=0,R=0,B=0,F=null,C=0,D=new i.Buf16(16),T=new i.Buf16(16),W=null,I=0;for(A=0;A<=15;A++)D[A]=0;for(S=0;S<f;S++)D[r[a+S]]++;for(x=E,U=15;1<=U&&0===D[U];U--);if(U<x&&(x=U),0===U)return u[h++]=20971520,u[h++]=20971520,l.bits=1,0;for(z=1;z<U&&0===D[z];z++);for(x<z&&(x=z),A=O=1;A<=15;A++)if(O<<=1,(O-=D[A])<0)return-1;if(0<O&&(0===t||1!==U))return-1;for(T[1]=0,A=1;A<15;A++)T[A+1]=T[A]+D[A];for(S=0;S<f;S++)0!==r[a+S]&&(c[T[r[a+S]]++]=S);if(m=0===t?(F=W=c,19):1===t?(F=n,C-=257,W=e,I-=257,256):(F=s,W=o,-1),A=z,w=h,_=S=B=0,p=-1,b=(R=1<<(j=x))-1,1===t&&852<R||2===t&&592<R)return 1;for(;;){for(y=A-_,g=c[S]<m?(k=0,c[S]):c[S]>m?(k=W[I+c[S]],F[C+c[S]]):(k=96,0),d=1<<A-_,z=v=1<<j;u[w+(B>>_)+(v-=d)]=y<<24|k<<16|g|0,0!==v;);for(d=1<<A-1;B&d;)d>>=1;if(0!==d?(B&=d-1,B+=d):B=0,S++,0==--D[A]){if(A===U)break;A=r[a+c[S]]}if(x<A&&(B&b)!==p){for(0===_&&(_=x),w+=z,O=1<<(j=A-_);j+_<U&&!((O-=D[j+_])<=0);)j++,O<<=1;if(R+=1<<j,1===t&&852<R||2===t&&592<R)return 1;u[p=B&b]=x<<24|j<<16|w-h|0}}return 0!==B&&(u[w+B]=A-_<<24|64<<16|0),l.bits=x,0}},{"../utils/common":41}],51:[function(t,r){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,i){var n=t("../utils/common");function e(t){for(var r=t.length;0<=--r;)t[r]=0}var s=256,o=286,a=30,f=15,u=[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],h=[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],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);e(d);var v=new Array(60);e(v);var p=new Array(512);e(p);var b=new Array(256);e(b);var w=new Array(29);e(w);var m,y,k,g=new Array(a);function E(t,r,i,n,e){this.static_tree=t,this.extra_bits=r,this.extra_base=i,this.elems=n,this.max_length=e,this.has_stree=t&&t.length}function A(t,r){this.dyn_tree=t,this.max_code=0,this.stat_desc=r}function S(t){return t<256?p[t]:p[256+(t>>>7)]}function z(t,r){t.pending_buf[t.pending++]=255&r,t.pending_buf[t.pending++]=r>>>8&255}function U(t,r,i){t.bi_valid>16-i?(t.bi_buf|=r<<t.bi_valid&65535,z(t,t.bi_buf),t.bi_buf=r>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=r<<t.bi_valid&65535,t.bi_valid+=i)}function x(t,r,i){U(t,i[2*r],i[2*r+1])}function j(t,r){for(var i=0;i|=1&t,t>>>=1,i<<=1,0<--r;);return i>>>1}function _(t,r,i){var n,e,s=new Array(16),o=0;for(n=1;n<=f;n++)s[n]=o=o+i[n-1]<<1;for(e=0;e<=r;e++){var a=t[2*e+1];0!==a&&(t[2*e]=j(s[a]++,a))}}function O(t){var r;for(r=0;r<o;r++)t.dyn_ltree[2*r]=0;for(r=0;r<a;r++)t.dyn_dtree[2*r]=0;for(r=0;r<19;r++)t.bl_tree[2*r]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function R(t){8<t.bi_valid?z(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 B(t,r,i,n){var e=2*r,s=2*i;return t[e]<t[s]||t[e]===t[s]&&n[r]<=n[i]}function F(t,r,i){for(var n=t.heap[i],e=i<<1;e<=t.heap_len&&(e<t.heap_len&&B(r,t.heap[e+1],t.heap[e],t.depth)&&e++,!B(r,n,t.heap[e],t.depth));)t.heap[i]=t.heap[e],i=e,e<<=1;t.heap[i]=n}function C(t,r,i){var n,e,o,a,f=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*f]<<8|t.pending_buf[t.d_buf+2*f+1],e=t.pending_buf[t.l_buf+f],f++,0===n?x(t,e,r):(x(t,(o=b[e])+s+1,r),0!==(a=u[o])&&U(t,e-=w[o],a),x(t,o=S(--n),i),0!==(a=h[o])&&U(t,n-=g[o],a)),f<t.last_lit;);x(t,256,r)}function D(t,r){var i,n,e,s=r.dyn_tree,o=r.stat_desc.static_tree,a=r.stat_desc.has_stree,u=r.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<u;i++)0!==s[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):s[2*i+1]=0;for(;t.heap_len<2;)s[2*(e=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[e]=0,t.opt_len--,a&&(t.static_len-=o[2*e+1]);for(r.max_code=h,i=t.heap_len>>1;1<=i;i--)F(t,s,i);for(e=u;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],F(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,s[2*e]=s[2*i]+s[2*n],t.depth[e]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,s[2*i+1]=s[2*n+1]=e,t.heap[1]=e++,F(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,r){var i,n,e,s,o,a,u=r.dyn_tree,h=r.max_code,c=r.stat_desc.static_tree,l=r.stat_desc.has_stree,d=r.stat_desc.extra_bits,v=r.stat_desc.extra_base,p=r.stat_desc.max_length,b=0;for(s=0;s<=f;s++)t.bl_count[s]=0;for(u[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)p<(s=u[2*u[2*(n=t.heap[i])+1]+1]+1)&&(s=p,b++),u[2*n+1]=s,h<n||(t.bl_count[s]++,o=0,v<=n&&(o=d[n-v]),t.opt_len+=(a=u[2*n])*(s+o),l&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==b){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,b-=2}while(0<b);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)h<(e=t.heap[--i])||(u[2*e+1]!==s&&(t.opt_len+=(s-u[2*e+1])*u[2*e],u[2*e+1]=s),n--)}}(t,r),_(s,h,t.bl_count)}function T(t,r,i){var n,e,s=-1,o=r[1],a=0,f=7,u=4;for(0===o&&(f=138,u=3),r[2*(i+1)+1]=65535,n=0;n<=i;n++)e=o,o=r[2*(n+1)+1],++a<f&&e===o||(a<u?t.bl_tree[2*e]+=a:0!==e?(e!==s&&t.bl_tree[2*e]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=e,u=(a=0)===o?(f=138,3):e===o?(f=6,3):(f=7,4))}function W(t,r,i){var n,e,s=-1,o=r[1],a=0,f=7,u=4;for(0===o&&(f=138,u=3),n=0;n<=i;n++)if(e=o,o=r[2*(n+1)+1],!(++a<f&&e===o)){if(a<u)for(;x(t,e,t.bl_tree),0!=--a;);else 0!==e?(e!==s&&(x(t,e,t.bl_tree),a--),x(t,16,t.bl_tree),U(t,a-3,2)):a<=10?(x(t,17,t.bl_tree),U(t,a-3,3)):(x(t,18,t.bl_tree),U(t,a-11,7));s=e,u=(a=0)===o?(f=138,3):e===o?(f=6,3):(f=7,4)}}e(g);var I=!1;function Z(t,r,i,e){U(t,0+(e?1:0),3),function(t,r,i){R(t),z(t,i),z(t,~i),n.arraySet(t.pending_buf,t.window,r,i,t.pending),t.pending+=i}(t,r,i)}i._tr_init=function(t){I||(function(){var t,r,i,n,e,s=new Array(16);for(n=i=0;n<28;n++)for(w[n]=i,t=0;t<1<<u[n];t++)b[i++]=n;for(b[i-1]=n,n=e=0;n<16;n++)for(g[n]=e,t=0;t<1<<h[n];t++)p[e++]=n;for(e>>=7;n<a;n++)for(g[n]=e<<7,t=0;t<1<<h[n]-7;t++)p[256+e++]=n;for(r=0;r<=f;r++)s[r]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,s[8]++;for(;t<=255;)d[2*t+1]=9,t++,s[9]++;for(;t<=279;)d[2*t+1]=7,t++,s[7]++;for(;t<=287;)d[2*t+1]=8,t++,s[8]++;for(_(d,287,s),t=0;t<a;t++)v[2*t+1]=5,v[2*t]=j(t,5);m=new E(d,u,257,o,f),y=new E(v,h,0,a,f),k=new E(new Array(0),c,0,19,7)}(),I=!0),t.l_desc=new A(t.dyn_ltree,m),t.d_desc=new A(t.dyn_dtree,y),t.bl_desc=new A(t.bl_tree,k),t.bi_buf=0,t.bi_valid=0,O(t)},i._tr_stored_block=Z,i._tr_flush_block=function(t,r,i,n){var e,o,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var r,i=4093624447;for(r=0;r<=31;r++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<s;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0}(t)),D(t,t.l_desc),D(t,t.d_desc),a=function(t){var r;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),r=18;3<=r&&0===t.bl_tree[2*l[r]+1];r--);return t.opt_len+=3*(r+1)+5+5+4,r}(t),(o=t.static_len+3+7>>>3)<=(e=t.opt_len+3+7>>>3)&&(e=o)):e=o=i+5,i+4<=e&&-1!==r?Z(t,r,i,n):4===t.strategy||o===e?(U(t,2+(n?1:0),3),C(t,d,v)):(U(t,4+(n?1:0),3),function(t,r,i,n){var e;for(U(t,r-257,5),U(t,i-1,5),U(t,n-4,4),e=0;e<n;e++)U(t,t.bl_tree[2*l[e]+1],3);W(t,t.dyn_ltree,r-1),W(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),C(t,t.dyn_ltree,t.dyn_dtree)),O(t),n&&R(t)},i._tr_tally=function(t,r,i){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&i,t.last_lit++,0===r?t.dyn_ltree[2*i]++:(t.matches++,r--,t.dyn_ltree[2*(b[i]+s+1)]++,t.dyn_dtree[2*S(r)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){U(t,2,3),x(t,256,d),function(t){16===t.bi_valid?(z(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){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(){(function(t){!function(t){if(!t.setImmediate){var r,i,n,e,s=1,o={},a=!1,f=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,r="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){c(t)}))}:function(){if(t.postMessage&&!t.importScripts){var r=!0,i=t.onmessage;return t.onmessage=function(){r=!1},t.postMessage("","*"),t.onmessage=i,r}}()?(e="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),function(r){t.postMessage(e+r,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){c(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(){c(t),r.onreadystatechange=null,i.removeChild(r),r=null},i.appendChild(r)}):function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var i=new Array(arguments.length-1),n=0;n<i.length;n++)i[n]=arguments[n+1];return o[s]={callback:t,args:i},r(s),s++},u.clearImmediate=h}function h(t){delete o[t]}function c(t){if(a)setTimeout(c,0,t);else{var r=o[t];if(r){a=!0;try{!function(t){var r=t.callback,i=t.args;switch(i.length){case 0:r();break;case 1:r(i[0]);break;case 2:r(i[0],i[1]);break;case 3:r(i[0],i[1],i[2]);break;default:r.apply(undefined,i)}}(r)}finally{h(t),a=!1}}}}function l(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}));const c=t=>{switch(t){case"textarea":case"textbox":return 150;case"timestamp":return 130;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 71}return 150},l=t=>{switch(t){case"textarea":return 41;case"textbox":case"timestamp":case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 36}return 50},d=(t,r,i,n,e)=>{var s,o,f,u;const h=r.setting||r.settings;let{x:d=0,y:v=0,width:p=c(r.type),height:b=l(r.type)}=h;const w=h.options&&void 0!==e&&h.options[e]?h.options[e]:null;w&&(d=null!==(s=w.x)&&void 0!==s?s:d,v=null!==(o=w.y)&&void 0!==o?o:v,p=null!==(f=w.width)&&void 0!==f?f:p,b=null!==(u=w.height)&&void 0!==u?u:b),t.style.width=`${p}px`,t.style.height=`${b}px`,t.style.position="absolute",t.style.left=`${a(i,d)}px`,t.style.bottom=`${a(n,v)}px`,t.style.transform=`scale(${i}, ${n})`},v=(t,r,i,n)=>{var e,s,o,f;const u=t.setting||t.settings;let{x:h=0,y:d=0,width:v=c(t.type),height:p=l(t.type)}=u;const b=u.options&&void 0!==n&&u.options[n]?u.options[n]:null;return b&&(h=null!==(e=b.x)&&void 0!==e?e:h,d=null!==(s=b.y)&&void 0!==s?s:d,v=null!==(o=b.width)&&void 0!==o?o:v,p=null!==(f=b.height)&&void 0!==f?f:p),{width:`${v}px`,height:`${p}px`,position:"absolute",left:`${a(r,h)}px`,bottom:`${a(i,d)}px`,transform:`scale(${r}, ${i})`}},p=t=>`verdocs-doc-fld-${t.name}`,b=(t,r)=>`verdocs-doc-fld-${t.name}-${r}`,w=t=>{const r=p(t),i=document.getElementById(r);i&&(i.field=t,i.setAttribute("id",r),i.setAttribute("disabled",!0),i.setAttribute("disabled",!1))},m=(t,r,i)=>{var n,e;const{disabled:s=!1,editable:o=!1,draggable:a=!1,done:f=!1}=i,u=document.getElementById(r.containerId+"-controls");if(u)switch(t.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{const i=p(t),h=document.getElementById(i);if(h)return d(h,t,r.xScale,r.yScale),h;let{type:c}=t;"textbox"===c&&((null===(n=t.setting)||void 0===n?void 0:n.leading)>0||(null===(e=t.settings)||void 0===e?void 0:e.leading)>0)&&(c="textarea");const l=document.createElement(`verdocs-field-${c}`);return l.field=t,l.setAttribute("id",i),l.setAttribute("fieldname",t.name),l.setAttribute("templateid","template_id"in t?t.template_id:"PREVIEW"),s?(l.setAttribute("tabindex",-1),l.setAttribute("disabled",!0)):l.setAttribute("tabIndex",1),o&&l.setAttribute("editable",!0),a&&l.setAttribute("draggable",!0),f&&l.setAttribute("done",!0),d(l,t,r.xScale,r.yScale),u.appendChild(l),l}case"checkbox":const i=b(t,0),h=document.getElementById(i);if(h)return d(h,t,r.xScale,r.yScale,0),h;const c=document.createElement("verdocs-field-checkbox");return c.field=t,c.setAttribute("id",i),c.setAttribute("option",0),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,0),u.appendChild(c),c;case"checkbox_group":return(t.settings||t.setting||{}).options.map(((i,n)=>{const e=b(t,n),h=document.getElementById(e);if(h)return d(h,t,r.xScale,r.yScale,n),h;const c=document.createElement("verdocs-field-checkbox");return c.field=t,c.setAttribute("id",e),c.setAttribute("option",n),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,n),u.appendChild(c),c}));case"radio_button_group":return(t.settings||t.setting||{}).options.map(((i,n)=>{const e=b(t,n),h=document.getElementById(e);if(h)return d(h,t,r.xScale,r.yScale,n),h;const c=document.createElement("verdocs-field-radio-button");return c.field=t,c.setAttribute("id",e),c.setAttribute("option",n),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,n),u.appendChild(c),c}));default:return console.log("[PREVIEW] Skipping unsupported field type",t),null}else console.log("[renderDocumentField] No controls DIV found",r.containerId+"-controls",r)},y=t=>t&&t.setting?t.setting:t&&t.settings?t.settings:{x:0,y:0,required:!1,disabled:!1,result:"",value:""},k=(t,r,i)=>{const n=t.style.transform||"",e=`${r}(${i})`;t.style.transform=n.includes(r)?n.replace(new RegExp(`${r}\\(.+?\\)`),e):n+" "+e},g=t=>{t.style.transform=t.style.transform.split(")")[0]+")"},E=async(t,r,i)=>{const e=o(new Date(r.updated_at),s),a=`${r.name} - ${e}.pdf`,f=await n(t,r.id,i);u(f,a)},A=async(t,r)=>{var i;const a=new h;for await(let f of r){const u=o(new Date(f.updated_at),s),h=r.length>0?a.folder(`${f.id} - ${f.name} - ${u}`):null;for await(let r of f.documents){const s="certificate"===r.type?`${f.name}_certificate.pdf`:`${r.name}.pdf`,o=await n(t,f.id,r.id);h?h.file(s,o,{compression:"DEFLATE"}):a.file(s,o,{compression:"DEFLATE"});const u=(null===(i=f.fields)||void 0===i?void 0:i.filter((t=>"attachment"===t.type&&t.settings.name)))||[];if(u.length>0){const r=h?h.folder("attachments"):a.folder("attachments");for await(let i of u){const n=await e(t,f.id,i.name);r.file(i.settings.name,n,{compression:"DEFLATE"})}}}}const f=o(1===r.length?new Date(r[0].updated_at):new Date,s),c=1===r.length?`${r[0].name} - ${f}.zip`:`Verdocs-Envelopes-${f}`,l=await a.generateAsync({type:"blob",compression:"DEFLATE"});u(l,c)},S=(t,r)=>{let i=0;return function(...n){clearTimeout(i),i=setTimeout((()=>t.apply(this,n)),r)}},z=(t,r="16px Arial")=>{const i=document.createElement("canvas").getContext("2d");return i.font=r,i.measureText(t).width},U=t=>{let r=(t||"").trim();return!r||r.startsWith("+")?r:(r=r.replace(/[^0-9]/g,""),r=r.replace(/^0/g,""),`+1${r}`)};export{E as a,p as b,U as c,z as d,k as e,g as f,y as g,c as h,l as i,v as j,b as k,f as l,m as r,A as s,S as t,w as u}
13
+ t.exports=function t(r,n,e){function s(a,f){if(!n[a]){if(!r[a]){var u="function"==typeof i&&i;if(!f&&u)return u(a,!0);if(o)return o(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=n[a]={exports:{}};r[a][0].call(c.exports,(function(t){return s(r[a][1][t]||t)}),c,c.exports,t,r,n,e)}return n[a].exports}for(var o="function"==typeof i&&i,a=0;a<e.length;a++)s(e[a]);return s}({1:[function(t,r,i){var n=t("./utils"),e=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(t){for(var r,i,e,o,a,f,u=[],h=0,c=t.length,l=c,d="string"!==n.getTypeOf(t);h<t.length;)l=c-h,e=d?(r=t[h++],i=h<c?t[h++]:0,h<c?t[h++]:0):(r=t.charCodeAt(h++),i=h<c?t.charCodeAt(h++):0,h<c?t.charCodeAt(h++):0),o=(3&r)<<4|i>>4,a=1<l?(15&i)<<2|e>>6:64,f=2<l?63&e:64,u.push(s.charAt(r>>2)+s.charAt(o)+s.charAt(a)+s.charAt(f));return u.join("")},i.decode=function(t){var r,i,n,o,a,f,u=0,h=0,c="data:";if(t.substr(0,c.length)===c)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=e.uint8array?new Uint8Array(0|d):new Array(0|d);u<t.length;)r=s.indexOf(t.charAt(u++))<<2|(o=s.indexOf(t.charAt(u++)))>>4,i=(15&o)<<4|(a=s.indexOf(t.charAt(u++)))>>2,n=(3&a)<<6|(f=s.indexOf(t.charAt(u++))),l[h++]=r,64!==a&&(l[h++]=i),64!==f&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(t,r){var i=t("./external"),n=t("./stream/DataWorker"),e=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function o(t,r,i,n,e){this.compressedSize=t,this.uncompressedSize=r,this.crc32=i,this.compression=n,this.compressedContent=e}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("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)}},o.createWorkerFrom=function(t,r,i){return t.pipe(new e).pipe(new s("uncompressedSize")).pipe(r.compressWorker(i)).pipe(new s("compressedSize")).withStreamInfo("compression",r)},r.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,i){var n=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r){var i=t("./utils"),n=function(){for(var t,r=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;r[i]=t}return r}();r.exports=function(t,r){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,r,i){var e=n,s=0+i;t^=-1;for(var o=0;o<s;o++)t=t>>>8^e[255&(t^r[o])];return-1^t}(0|r,t,t.length):function(t,r,i){var e=n,s=0+i;t^=-1;for(var o=0;o<s;o++)t=t>>>8^e[255&(t^r.charCodeAt(o))];return-1^t}(0|r,t,t.length):0}},{"./utils":32}],5:[function(t,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,r){var i;i="undefined"!=typeof Promise?Promise:t("lie"),r.exports={Promise:i}},{lie:37}],7:[function(t,r,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),a=n?"uint8array":"array";function f(t,r){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=r,this.meta={}}i.magic="\b\0",s.inherits(f,o),f.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(a,t.data),!1)},f.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new e[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(r){t.push({data:r,meta:t.meta})}},i.compressWorker=function(t){return new f("Deflate",t)},i.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r){function i(t,r){var i,n="";for(i=0;i<r;i++)n+=String.fromCharCode(255&t),t>>>=8;return n}function n(t,r,n,s,u,h){var c,l,d=t.file,v=t.compression,p=h!==o.utf8encode,b=e.transformTo("string",h(d.name)),w=e.transformTo("string",o.utf8encode(d.name)),m=d.comment,y=e.transformTo("string",h(m)),k=e.transformTo("string",o.utf8encode(m)),g=w.length!==d.name.length,E=k.length!==m.length,A="",S="",z="",U=d.dir,x=d.date,j={crc32:0,compressedSize:0,uncompressedSize:0};r&&!n||(j.crc32=t.crc32,j.compressedSize=t.compressedSize,j.uncompressedSize=t.uncompressedSize);var _=0;r&&(_|=8),p||!g&&!E||(_|=2048);var O=0,R=0;U&&(O|=16),"UNIX"===u?(R=798,O|=function(t,r){var i=t;return t||(i=r?16893:33204),(65535&i)<<16}(d.unixPermissions,U)):(R=20,O|=function(t){return 63&(t||0)}(d.dosPermissions)),c=x.getUTCHours(),c<<=6,c|=x.getUTCMinutes(),c<<=5,c|=x.getUTCSeconds()/2,l=x.getUTCFullYear()-1980,l<<=4,l|=x.getUTCMonth()+1,l<<=5,l|=x.getUTCDate(),g&&(S=i(1,1)+i(a(b),4)+w,A+="up"+i(S.length,2)+S),E&&(z=i(1,1)+i(a(y),4)+k,A+="uc"+i(z.length,2)+z);var B="";return B+="\n\0",B+=i(_,2),B+=v.magic,B+=i(c,2),B+=i(l,2),B+=i(j.crc32,4),B+=i(j.compressedSize,4),B+=i(j.uncompressedSize,4),B+=i(b.length,2),B+=i(A.length,2),{fileRecord:f.LOCAL_FILE_HEADER+B+b+A,dirRecord:f.CENTRAL_FILE_HEADER+i(R,2)+B+i(y.length,2)+"\0\0\0\0"+i(O,4)+i(s,4)+b+A+y}}var e=t("../utils"),s=t("../stream/GenericWorker"),o=t("../utf8"),a=t("../crc32"),f=t("../signature");function u(t,r,i,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=i,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}e.inherits(u,s),u.prototype.push=function(t){var r=t.meta.percent||0,i=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(r+100*(i-n-1))/i:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var r=this.streamFiles&&!t.file.dir;if(r){var i=n(t,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var r=this.streamFiles&&!t.file.dir,e=n(t,r,!0,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},u.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 n=function(t,r,n,s,o){var a=e.transformTo("string",o(s));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(r,4)+i(n,4)+i(a.length,2)+a}(this.dirRecords.length,this.bytesWritten-t,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(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},u.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(t){var r=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var i=0;i<r.length;i++)try{r[i].error(t)}catch(t){}return!0},u.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,r=0;r<t.length;r++)t[r].lock()},r.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,i){var n=t("../compressions"),e=t("./ZipFileWorker");i.generateWorker=function(t,r,i){var s=new e(r.streamFiles,i,r.platform,r.encodeFileName),o=0;try{t.forEach((function(t,i){o++;var e=function(t,r){var i=t||r,e=n[i];if(!e)throw new Error(i+" is not a valid compression method !");return e}(i.options.compression,r.compression),a=i.dir,f=i.date;i._compressWorker(e,i.options.compressionOptions||r.compressionOptions||{}).withStreamInfo("file",{name:t,dir:a,date:f,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(s)})),s.entriesCount=o}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r){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){var i=t("./utils"),n=t("./external"),e=t("./utf8"),s=t("./zipEntries"),o=t("./stream/Crc32Probe"),a=t("./nodejsUtils");function f(t){return new n.Promise((function(r,i){var n=t.decompressed.getContentWorker().pipe(new o);n.on("error",(function(t){i(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?i(new Error("Corrupted zip : CRC32 mismatch")):r()})).resume()}))}r.exports=function(t,r){var o=this;return r=i.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:e.utf8decode}),a.isNode&&a.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,!0,r.optimizedBinaryString,r.base64).then((function(t){var i=new s(r);return i.load(t),i})).then((function(t){var i=[n.Promise.resolve(t)],e=t.files;if(r.checkCRC32)for(var s=0;s<e.length;s++)i.push(f(e[s]));return n.Promise.all(i)})).then((function(t){for(var n=t.shift(),e=n.files,s=0;s<e.length;s++){var a=e[s],f=a.fileNameStr,u=i.resolve(a.fileNameStr);o.file(u,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:r.createFolders}),a.dir||(o.file(u).unsafeOriginalName=f)}return n.zipComment.length&&(o.comment=n.zipComment),o}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r){var i=t("../utils"),n=t("../stream/GenericWorker");function e(t,r){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(r)}i.inherits(e,n),e.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=!0:r.end()}))},e.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},e.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=e},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r){var i=t("readable-stream").Readable;function n(t,r,n){i.call(this,r),this._helper=t;var e=this;t.on("data",(function(t,r){e.push(t)||e._helper.pause(),n&&n(r)})).on("error",(function(t){e.emit("error",t)})).on("end",(function(){e.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){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){function i(t,r,i){var n,o=e.getTypeOf(r),h=e.extend(i||{},a);h.date=h.date||new Date,null!==h.compression&&(h.compression=h.compression.toUpperCase()),"string"==typeof h.unixPermissions&&(h.unixPermissions=parseInt(h.unixPermissions,8)),h.unixPermissions&&16384&h.unixPermissions&&(h.dir=!0),h.dosPermissions&&16&h.dosPermissions&&(h.dir=!0),h.dir&&(t=v(t)),h.createFolders&&(n=d(t))&&p.call(this,n,!0),i&&void 0!==i.binary||(h.binary=!("string"===o&&!1===h.binary&&!1===h.base64)),(r instanceof f&&0===r.uncompressedSize||h.dir||!r||0===r.length)&&(h.base64=!1,h.binary=!0,r="",h.compression="STORE",o="string");var b;b=r instanceof f||r instanceof s?r:c.isNode&&c.isStream(r)?new l(t,r):e.prepareContent(t,r,h.binary,h.optimizedBinaryString,h.base64);var w=new u(t,b,h);this.files[t]=w}var n=t("./utf8"),e=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),a=t("./defaults"),f=t("./compressedObject"),u=t("./zipObject"),h=t("./generate"),c=t("./nodejsUtils"),l=t("./nodejs/NodejsStreamInputAdapter"),d=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var r=t.lastIndexOf("/");return 0<r?t.substring(0,r):""},v=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},p=function(t,r){return r=void 0!==r?r:a.createFolders,t=v(t),this.files[t]||i.call(this,t,null,{dir:!0,createFolders:r}),this.files[t]};function b(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var r,i,n;for(r in this.files)n=this.files[r],(i=r.slice(this.root.length,r.length))&&r.slice(0,this.root.length)===this.root&&t(i,n)},filter:function(t){var r=[];return this.forEach((function(i,n){t(i,n)&&r.push(n)})),r},file:function(t,r,n){if(1!==arguments.length)return i.call(this,t=this.root+t,r,n),this;if(b(t)){var e=t;return this.filter((function(t,r){return!r.dir&&e.test(t)}))}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(b(t))return this.filter((function(r,i){return i.dir&&t.test(r)}));var r=p.call(this,this.root+t),i=this.clone();return i.root=r.name,i},remove:function(t){var r=this.files[t=this.root+t];if(r||("/"!==t.slice(-1)&&(t+="/"),r=this.files[t]),r&&!r.dir)delete this.files[t];else for(var i=this.filter((function(r,i){return i.name.slice(0,t.length)===t})),n=0;n<i.length;n++)delete this.files[i[n].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,i={};try{if((i=e.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=i.type.toLowerCase(),i.compression=i.compression.toUpperCase(),"binarystring"===i.type&&(i.type="string"),!i.type)throw new Error("No output type specified.");e.checkSupport(i.type),"darwin"!==i.platform&&"freebsd"!==i.platform&&"linux"!==i.platform&&"sunos"!==i.platform||(i.platform="UNIX"),"win32"===i.platform&&(i.platform="DOS"),r=h.generateWorker(this,i,i.comment||this.comment||"")}catch(t){(r=new s("error")).error(t)}return new o(r,i.type||"string",i.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=w},{"./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){r.exports=t("stream")},{stream:void 0}],17:[function(t,r){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),i=t.charCodeAt(1),n=t.charCodeAt(2),e=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===r&&this.data[s+1]===i&&this.data[s+2]===n&&this.data[s+3]===e)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var r=t.charCodeAt(0),i=t.charCodeAt(1),n=t.charCodeAt(2),e=t.charCodeAt(3),s=this.readData(4);return r===s[0]&&i===s[1]&&n===s[2]&&e===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){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,i=0;for(this.checkOffset(t),r=this.index+t-1;r>=this.index;r--)i=(i<<8)+this.byteAt(r);return this.index+=t,i},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){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){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){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){var i=t("../utils"),n=t("../support"),e=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),a=t("./Uint8ArrayReader");r.exports=function(t){var r=i.getTypeOf(t);return i.checkSupport(r),"string"!==r||n.uint8array?"nodebuffer"===r?new o(t):n.uint8array?new a(i.transformTo("uint8array",t)):new e(i.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,r){var i=t("./GenericWorker"),n=t("../utils");function e(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(e,i),e.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},r.exports=e},{"../utils":32,"./GenericWorker":28}],25:[function(t,r){var i=t("./GenericWorker"),n=t("../crc32");function e(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(e,i),e.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},r.exports=e},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r){var i=t("../utils"),n=t("./GenericWorker");function e(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(e,n),e.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),n.prototype.processChunk.call(this,t)},r.exports=e},{"../utils":32,"./GenericWorker":28}],27:[function(t,r){var i=t("../utils"),n=t("./GenericWorker");function e(t){n.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){r.dataIsReady=!0,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(e,n),e.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},e.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},e.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},e.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;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=e},{"../utils":32,"./GenericWorker":28}],28:[function(t,r){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},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 i=0;i<this._listeners[t].length;i++)this._listeners[t][i].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=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),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=!0,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){var i=t("../utils"),n=t("./ConvertWorker"),e=t("./GenericWorker"),s=t("../base64"),o=t("../support"),a=t("../external"),f=null;if(o.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,r,s){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=s,i.checkSupport(o),this._worker=t.pipe(new n(o)),t.lock()}catch(t){this._worker=new e("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,r){return new a.Promise((function(n,e){var o=[],a=t._internalType,f=t._outputType,u=t._mimeType;t.on("data",(function(t,i){o.push(t),r&&r(i)})).on("error",(function(t){o=[],e(t)})).on("end",(function(){try{var t=function(t,r,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",r),n);case"base64":return s.encode(r);default:return i.transformTo(t,r)}}(f,function(t,r){var i,n=0,e=null,s=0;for(i=0;i<r.length;i++)s+=r[i].length;switch(t){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(e=new Uint8Array(s),i=0;i<r.length;i++)e.set(r[i],n),n+=r[i].length;return e;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),u);n(t)}catch(t){e(t)}o=[]})).resume()}))}(this,t)},on:function(t,r){var n=this;return this._worker.on(t,"data"===t?function(t){r.call(n,t.data,t.meta)}:function(){i.delay(r,arguments,n)}),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=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer="undefined"!=typeof Buffer,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var n=new ArrayBuffer(0);try{i.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var e=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);e.append(n),i.blob=0===e.getBlob("application/zip").size}catch(t){i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch(t){i.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,i){for(var n=t("./utils"),e=t("./support"),s=t("./nodejsUtils"),o=t("./stream/GenericWorker"),a=new Array(256),f=0;f<256;f++)a[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;function u(){o.call(this,"utf-8 decode"),this.leftOver=null}function h(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,i.utf8encode=function(t){return e.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var r,i,n,s,o,a=t.length,f=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),f+=i<128?1:i<2048?2:i<65536?3:4;for(r=e.uint8array?new Uint8Array(f):new Array(f),s=o=0;o<f;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(n-56320),s++),i<128?r[o++]=i:(i<2048?r[o++]=192|i>>>6:(i<65536?r[o++]=224|i>>>12:(r[o++]=240|i>>>18,r[o++]=128|i>>>12&63),r[o++]=128|i>>>6&63),r[o++]=128|63&i);return r}(t)},i.utf8decode=function(t){return e.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var r,i,e,s,o=t.length,f=new Array(2*o);for(r=i=0;r<o;)if((e=t[r++])<128)f[i++]=e;else if(4<(s=a[e]))f[i++]=65533,r+=s-1;else{for(e&=2===s?31:3===s?15:7;1<s&&r<o;)e=e<<6|63&t[r++],s--;1<s?f[i++]=65533:e<65536?f[i++]=e:(f[i++]=55296|(e-=65536)>>10&1023,f[i++]=56320|1023&e)}return f.length!==i&&(f.subarray?f=f.subarray(0,i):f.length=i),n.applyFromCharCode(f)}(t=n.transformTo(e.uint8array?"uint8array":"array",t))},n.inherits(u,o),u.prototype.processChunk=function(t){var r=n.transformTo(e.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(e.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 i;for((r=r||t.length)>t.length&&(r=t.length),i=r-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?r:i+a[t[i]]>r?i:r}(r),f=r;o!==r.length&&(e.uint8array?(f=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(f=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:i.utf8decode(f),meta:t.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=u,n.inherits(h,o),h.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,i){var n=t("./support"),e=t("./base64"),s=t("./nodejsUtils"),o=t("./external");function a(t){return t}function f(t,r){for(var i=0;i<t.length;++i)r[i]=255&t.charCodeAt(i);return r}t("setimmediate"),i.newBlob=function(t,r){i.checkSupport("blob");try{return new Blob([t],{type:r})}catch(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(t,r,i){var n=[],e=0,s=t.length;if(s<=i)return String.fromCharCode.apply(null,t);for(;e<s;)n.push(String.fromCharCode.apply(null,"array"===r||"nodebuffer"===r?t.slice(e,Math.min(e+i,s)):t.subarray(e,Math.min(e+i,s)))),e+=i;return n.join("")},stringifyByChar:function(t){for(var r="",i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return r},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var r=65536,n=i.getTypeOf(t),e=!0;if("uint8array"===n?e=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(e=u.applyCanBeUsed.nodebuffer),e)for(;1<r;)try{return u.stringifyByChunk(t,n,r)}catch(t){r=Math.floor(r/2)}return u.stringifyByChar(t)}function c(t,r){for(var i=0;i<t.length;i++)r[i]=t[i];return r}i.applyFromCharCode=h;var l={};l.string={string:a,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return l.string.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:function(t){return f(t,s.allocBuffer(t.length))}},l.array={string:h,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 h(new Uint8Array(t))},array:function(t){return c(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:h,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:a,nodebuffer:function(t){return s.newBufferFrom(t)}},l.nodebuffer={string:h,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return l.nodebuffer.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:a},i.transformTo=function(t,r){if(r=r||"",!t)return r;i.checkSupport(t);var n=i.getTypeOf(r);return l[n][t](r)},i.resolve=function(t){for(var r=t.split("/"),i=[],n=0;n<r.length;n++){var e=r[n];"."===e||""===e&&0!==n&&n!==r.length-1||(".."===e?i.pop():i.push(e))}return i.join("/")},i.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&s.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(t){var r,i,n="";for(i=0;i<(t||"").length;i++)n+="\\x"+((r=t.charCodeAt(i))<16?"0":"")+r.toString(16).toUpperCase();return n},i.delay=function(t,r,i){setImmediate((function(){t.apply(i||null,r||[])}))},i.inherits=function(t,r){function i(){}i.prototype=r.prototype,t.prototype=new i},i.extend=function(){var t,r,i={};for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&void 0===i[r]&&(i[r]=arguments[t][r]);return i},i.prepareContent=function(t,r,s,a,u){return o.Promise.resolve(r).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise((function(r,i){var n=new FileReader;n.onload=function(t){r(t.target.result)},n.onerror=function(t){i(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(r){var h=i.getTypeOf(r);return h?("arraybuffer"===h?r=i.transformTo("uint8array",r):"string"===h&&(u?r=e.decode(r):s&&!0!==a&&(r=function(t){return f(t,n.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){var i=t("./reader/readerFor"),n=t("./utils"),e=t("./signature"),s=t("./zipEntry"),o=t("./support");function a(t){this.files=[],this.loadOptions=t}a.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 i=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===r;return this.reader.setIndex(i),n},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=n.transformTo(o.uint8array?"uint8array":"array",t);this.zipComment=this.loadOptions.decodeFileName(r)},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,i,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),r=this.reader.readInt(4),i=this.reader.readData(r),this.zip64ExtensibleData[t]={id:t,length:r,value:i}},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++)this.reader.setIndex((r=this.files[t]).localHeaderOffset),this.checkSignature(e.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(e.CENTRAL_FILE_HEADER);)(t=new s({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(e.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,e.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var r=t;if(this.checkSignature(e.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=!0,(t=this.reader.lastIndexOfSignature(e.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(e.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,e.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(e.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(e.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var s=r-i;if(0<s)this.isSignature(r,e.CENTRAL_FILE_HEADER)||(this.reader.zero=s);else if(s<0)throw new Error("Corrupted zip: missing "+Math.abs(s)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=a},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r){var i=t("./reader/readerFor"),n=t("./utils"),e=t("./compressedObject"),s=t("./crc32"),o=t("./utf8"),a=t("./compressions"),f=t("./support");function u(t,r){this.options=t,this.loadOptions=r}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var r,i;if(t.skip(22),this.fileNameLength=t.readInt(2),i=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(i),-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 a)if(Object.prototype.hasOwnProperty.call(a,r)&&a[r].magic===t)return a[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 e(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=!0)},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,i,n,e=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<e;)r=t.readInt(2),i=t.readInt(2),n=t.readData(i),this.extraFields[r]={id:r,length:i,value:n};t.setIndex(e)},handleUTF8:function(){var t=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(null!==r)this.fileNameStr=r;else{var i=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(i)}var e=this.findExtraFieldUnicodeComment();if(null!==e)this.fileCommentStr=e;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)||s(this.fileName)!==r.readInt(4)?null:o.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)||s(this.fileComment)!==r.readInt(4)?null:o.utf8decode(r.readData(t.length-5))}return null}},r.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r){function i(t,r,i){this.name=t,this.dir=i.dir,this.date=i.date,this.comment=i.comment,this.unixPermissions=i.unixPermissions,this.dosPermissions=i.dosPermissions,this._data=r,this._dataBinary=i.binary,this.options={compression:i.compression,compressionOptions:i.compressionOptions}}var n=t("./stream/StreamHelper"),e=t("./stream/DataWorker"),s=t("./utf8"),o=t("./compressedObject"),a=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var r=null,i="string";try{if(!t)throw new Error("No output type specified.");var e="string"===(i=t.toLowerCase())||"text"===i;"binarystring"!==i&&"text"!==i||(i="string"),r=this._decompressWorker();var o=!this._dataBinary;o&&!e&&(r=r.pipe(new s.Utf8EncodeWorker)),!o&&e&&(r=r.pipe(new s.Utf8DecodeWorker))}catch(t){(r=new a("error")).error(t)}return new n(r,i,"")},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 o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var i=this._decompressWorker();return this._dataBinary||(i=i.pipe(new s.Utf8EncodeWorker)),o.createWorkerFrom(i,t,r)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof a?this._data:new e(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=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]]=u;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,i){(function(t){var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var s=0,o=new e(h),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),r=function(){a.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var r=t.document.createElement("script");r.onreadystatechange=function(){h(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},t.document.documentElement.appendChild(r)}:function(){setTimeout(h,0)};else{var f=new t.MessageChannel;f.port1.onmessage=h,r=function(){f.port2.postMessage(0)}}var u=[];function h(){var t,r;n=!0;for(var i=u.length;i;){for(r=u,u=[],t=-1;++t<i;)r[t]();i=u.length}n=!1}i.exports=function(t){1!==u.push(t)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,r){var i=t("immediate");function n(){}var e={},s=["REJECTED"],o=["FULFILLED"],a=["PENDING"];function f(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,t!==n&&l(this,t)}function u(t,r,i){this.promise=t,"function"==typeof r&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function h(t,r,n){i((function(){var i;try{i=r(n)}catch(i){return e.reject(t,i)}i===t?e.reject(t,new TypeError("Cannot resolve promise with itself")):e.resolve(t,i)}))}function c(t){var r=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof r)return function(){r.apply(t,arguments)}}function l(t,r){var i=!1;function n(r){i||(i=!0,e.reject(t,r))}function s(r){i||(i=!0,e.resolve(t,r))}var o=d((function(){r(s,n)}));"error"===o.status&&n(o.value)}function d(t,r){var i={};try{i.value=t(r),i.status="success"}catch(t){i.status="error",i.value=t}return i}(r.exports=f).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then((function(i){return r.resolve(t()).then((function(){return i}))}),(function(i){return r.resolve(t()).then((function(){throw i}))}))},f.prototype.catch=function(t){return this.then(null,t)},f.prototype.then=function(t,r){if("function"!=typeof t&&this.state===o||"function"!=typeof r&&this.state===s)return this;var i=new this.constructor(n);return this.state!==a?h(i,this.state===o?t:r,this.outcome):this.queue.push(new u(i,t,r)),i},u.prototype.callFulfilled=function(t){e.resolve(this.promise,t)},u.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},u.prototype.callRejected=function(t){e.reject(this.promise,t)},u.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},e.resolve=function(t,r){var i=d(c,r);if("error"===i.status)return e.reject(t,i.value);var n=i.value;if(n)l(t,n);else{t.state=o,t.outcome=r;for(var s=-1,a=t.queue.length;++s<a;)t.queue[s].callFulfilled(r)}return t},e.reject=function(t,r){t.state=s,t.outcome=r;for(var i=-1,n=t.queue.length;++i<n;)t.queue[i].callRejected(r);return t},f.resolve=function(t){return t instanceof this?t:e.resolve(new this(n),t)},f.reject=function(t){var r=new this(n);return e.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 i=t.length,s=!1;if(!i)return this.resolve([]);for(var o=new Array(i),a=0,f=-1,u=new this(n);++f<i;)h(t[f],f);return u;function h(t,n){r.resolve(t).then((function(t){o[n]=t,++a!==i||s||(s=!0,e.resolve(u,o))}),(function(t){s||(s=!0,e.reject(u,t))}))}},f.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var s=-1,o=new this(n);++s<r;)this.resolve(t[s]).then((function(t){i||(i=!0,e.resolve(o,t))}),(function(t){i||(i=!0,e.reject(o,t))}));return o}},{immediate:36}],38:[function(t,r){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,i){var n=t("./zlib/deflate"),e=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/messages"),a=t("./zlib/zstream"),f=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=e.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,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=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var i=n.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(0!==i)throw new Error(o[i]);if(r.header&&n.deflateSetHeader(this.strm,r.header),r.dictionary){var h;if(h="string"==typeof r.dictionary?s.string2buf(r.dictionary):"[object ArrayBuffer]"===f.call(r.dictionary)?new Uint8Array(r.dictionary):r.dictionary,0!==(i=n.deflateSetDictionary(this.strm,h)))throw new Error(o[i]);this._dict_set=!0}}function h(t,r){var i=new u(r);if(i.push(t,!0),i.err)throw i.msg||o[i.err];return i.result}u.prototype.push=function(t,r){var i,o,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=r===~~r?r:!0===r?4:0,a.input="string"==typeof t?s.string2buf(t):"[object ArrayBuffer]"===f.call(t)?new Uint8Array(t):t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new e.Buf8(u),a.next_out=0,a.avail_out=u),1!==(i=n.deflate(a,o))&&0!==i)return this.onEnd(i),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||this.onData("string"===this.options.to?s.buf2binstring(e.shrinkBuf(a.output,a.next_out)):e.shrinkBuf(a.output,a.next_out))}while((0<a.avail_in||0===a.avail_out)&&1!==i);return 4===o?(i=n.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,0===i):2!==o||(this.onEnd(0),!(a.avail_out=0))},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Deflate=u,i.deflate=h,i.deflateRaw=function(t,r){return(r=r||{}).raw=!0,h(t,r)},i.gzip=function(t,r){return(r=r||{}).gzip=!0,h(t,r)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,i){var n=t("./zlib/inflate"),e=t("./utils/common"),s=t("./utils/strings"),o=t("./zlib/constants"),a=t("./zlib/messages"),f=t("./zlib/zstream"),u=t("./zlib/gzheader"),h=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=e.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=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var i=n.inflateInit2(this.strm,r.windowBits);if(i!==o.Z_OK)throw new Error(a[i]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function l(t,r){var i=new c(r);if(i.push(t,!0),i.err)throw i.msg||a[i.err];return i.result}c.prototype.push=function(t,r){var i,a,f,u,c,l,d=this.strm,v=this.options.chunkSize,p=this.options.dictionary,b=!1;if(this.ended)return!1;a=r===~~r?r:!0===r?o.Z_FINISH:o.Z_NO_FLUSH,d.input="string"==typeof t?s.binstring2buf(t):"[object ArrayBuffer]"===h.call(t)?new Uint8Array(t):t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new e.Buf8(v),d.next_out=0,d.avail_out=v),(i=n.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(l="string"==typeof p?s.string2buf(p):"[object ArrayBuffer]"===h.call(p)?new Uint8Array(p):p,i=n.inflateSetDictionary(this.strm,l)),i===o.Z_BUF_ERROR&&!0===b&&(i=o.Z_OK,b=!1),i!==o.Z_STREAM_END&&i!==o.Z_OK)return this.onEnd(i),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&i!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(f=s.utf8border(d.output,d.next_out),u=d.next_out-f,c=s.buf2string(d.output,f),d.next_out=u,d.avail_out=v-u,u&&e.arraySet(d.output,d.output,f,u,0),this.onData(c)):this.onData(e.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(b=!0)}while((0<d.avail_in||0===d.avail_out)&&i!==o.Z_STREAM_END);return i===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(i=n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(d.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===o.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.Inflate=c,i.inflate=l,i.inflateRaw=function(t,r){return(r=r||{}).raw=!0,l(t,r)},i.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,i){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(t){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}}return t},i.shrinkBuf=function(t,r){return t.length===r?t:t.subarray?t.subarray(0,r):(t.length=r,t)};var e={arraySet:function(t,r,i,n,e){if(r.subarray&&t.subarray)t.set(r.subarray(i,i+n),e);else for(var s=0;s<n;s++)t[e+s]=r[i+s]},flattenChunks:function(t){var r,i,n,e,s,o;for(r=n=0,i=t.length;r<i;r++)n+=t[r].length;for(o=new Uint8Array(n),r=e=0,i=t.length;r<i;r++)o.set(s=t[r],e),e+=s.length;return o}},s={arraySet:function(t,r,i,n,e){for(var s=0;s<n;s++)t[e+s]=r[i+s]},flattenChunks:function(t){return[].concat.apply([],t)}};i.setTyped=function(t){t?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,e)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(n)},{}],42:[function(t,r,i){var n=t("./common"),e=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new n.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 f(t,r){if(r<65537&&(t.subarray&&s||!t.subarray&&e))return String.fromCharCode.apply(null,n.shrinkBuf(t,r));for(var i="",o=0;o<r;o++)i+=String.fromCharCode(t[o]);return i}o[254]=o[254]=1,i.string2buf=function(t){var r,i,e,s,o,a=t.length,f=0;for(s=0;s<a;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(e=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(e-56320),s++),f+=i<128?1:i<2048?2:i<65536?3:4;for(r=new n.Buf8(f),s=o=0;o<f;s++)55296==(64512&(i=t.charCodeAt(s)))&&s+1<a&&56320==(64512&(e=t.charCodeAt(s+1)))&&(i=65536+(i-55296<<10)+(e-56320),s++),i<128?r[o++]=i:(i<2048?r[o++]=192|i>>>6:(i<65536?r[o++]=224|i>>>12:(r[o++]=240|i>>>18,r[o++]=128|i>>>12&63),r[o++]=128|i>>>6&63),r[o++]=128|63&i);return r},i.buf2binstring=function(t){return f(t,t.length)},i.binstring2buf=function(t){for(var r=new n.Buf8(t.length),i=0,e=r.length;i<e;i++)r[i]=t.charCodeAt(i);return r},i.buf2string=function(t,r){var i,n,e,s,a=r||t.length,u=new Array(2*a);for(i=n=0;i<a;)if((e=t[i++])<128)u[n++]=e;else if(4<(s=o[e]))u[n++]=65533,i+=s-1;else{for(e&=2===s?31:3===s?15:7;1<s&&i<a;)e=e<<6|63&t[i++],s--;1<s?u[n++]=65533:e<65536?u[n++]=e:(u[n++]=55296|(e-=65536)>>10&1023,u[n++]=56320|1023&e)}return f(u,n)},i.utf8border=function(t,r){var i;for((r=r||t.length)>t.length&&(r=t.length),i=r-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?r:i+o[t[i]]>r?i:r}},{"./common":41}],43:[function(t,r){r.exports=function(t,r,i,n){for(var e=65535&t|0,s=t>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3<i?2e3:i;s=s+(e=e+r[n++]|0)|0,--o;);e%=65521,s%=65521}return e|s<<16|0}},{}],44:[function(t,r){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){var i=function(){for(var t,r=[],i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;r[i]=t}return r}();r.exports=function(t,r,n,e){var s=i,o=e+n;t^=-1;for(var a=e;a<o;a++)t=t>>>8^s[255&(t^r[a])];return-1^t}},{}],46:[function(t,r,i){var n,e=t("../utils/common"),s=t("./trees"),o=t("./adler32"),a=t("./crc32"),f=t("./messages"),u=-2,h=258,c=262,l=113;function d(t,r){return t.msg=f[r],r}function v(t){return(t<<1)-(4<t?9:0)}function p(t){for(var r=t.length;0<=--r;)t[r]=0}function b(t){var r=t.state,i=r.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(e.arraySet(t.output,r.pending_buf,r.pending_out,i,t.next_out),t.next_out+=i,r.pending_out+=i,t.total_out+=i,t.avail_out-=i,r.pending-=i,0===r.pending&&(r.pending_out=0))}function w(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,b(t.strm)}function m(t,r){t.pending_buf[t.pending++]=r}function y(t,r){t.pending_buf[t.pending++]=r>>>8&255,t.pending_buf[t.pending++]=255&r}function k(t,r){var i,n,e=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,f=t.strstart>t.w_size-c?t.strstart-(t.w_size-c):0,u=t.window,l=t.w_mask,d=t.prev,v=t.strstart+h,p=u[s+o-1],b=u[s+o];t.prev_length>=t.good_match&&(e>>=2),a>t.lookahead&&(a=t.lookahead);do{if(u[(i=r)+o]===b&&u[i+o-1]===p&&u[i]===u[s]&&u[++i]===u[s+1]){s+=2,i++;do{}while(u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&s<v);if(n=h-(v-s),s=v-h,o<n){if(t.match_start=r,a<=(o=n))break;p=u[s+o-1],b=u[s+o]}}}while((r=d[r&l])>f&&0!=--e);return o<=t.lookahead?o:t.lookahead}function g(t){var r,i,n,s,f,u,h,l,d,v,p=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-c)){for(e.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,r=i=t.hash_size;n=t.head[--r],t.head[r]=p<=n?n-p:0,--i;);for(r=i=p;n=t.prev[--r],t.prev[r]=p<=n?n-p:0,--i;);s+=p}if(0===t.strm.avail_in)break;if(h=t.window,l=t.strstart+t.lookahead,v=void 0,(d=s)<(v=(u=t.strm).avail_in)&&(v=d),i=0===v?0:(u.avail_in-=v,e.arraySet(h,u.input,u.next_in,v,l),1===u.state.wrap?u.adler=o(u.adler,h,v,l):2===u.state.wrap&&(u.adler=a(u.adler,h,v,l)),u.next_in+=v,u.total_in+=v,v),t.lookahead+=i,t.lookahead+t.insert>=3)for(t.ins_h=t.window[f=t.strstart-t.insert],t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+3-1])&t.hash_mask,t.prev[f&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=f,f++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<c&&0!==t.strm.avail_in)}function E(t,r){for(var i,n;;){if(t.lookahead<c){if(g(t),t.lookahead<c&&0===r)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-c&&(t.match_length=k(t,i)),t.match_length>=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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 n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}function A(t,r){for(var i,n,e;;){if(t.lookahead<c){if(g(t),t.lookahead<c&&0===r)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-c&&(t.match_length=k(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(e=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=e&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=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=2,t.strstart++,n&&(w(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=s._tr_tally(t,0,t.window[t.strstart-1]))&&w(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}function S(t,r,i,n,e){this.good_length=t,this.max_lazy=r,this.nice_length=i,this.max_chain=n,this.func=e}function z(){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=8,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 e.Buf16(1146),this.dyn_dtree=new e.Buf16(122),this.bl_tree=new e.Buf16(78),p(this.dyn_ltree),p(this.dyn_dtree),p(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(16),this.heap=new e.Buf16(573),p(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(573),p(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function U(t){var r;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(r=t.state).pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?42:l,t.adler=2===r.wrap?0:1,r.last_flush=0,s._tr_init(r),0):d(t,u)}function x(t){var r=U(t);return 0===r&&function(t){t.window_size=2*t.w_size,p(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),r}function j(t,r,i,n,s,o){if(!t)return u;var a=1;if(-1===r&&(r=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),s<1||9<s||8!==i||n<8||15<n||r<0||9<r||o<0||4<o)return d(t,u);8===n&&(n=9);var f=new z;return(t.state=f).strm=t,f.wrap=a,f.gzhead=null,f.w_bits=n,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=s+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+3-1)/3),f.window=new e.Buf8(2*f.w_size),f.head=new e.Buf16(f.hash_size),f.prev=new e.Buf16(f.w_size),f.lit_bufsize=1<<s+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new e.Buf8(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=r,f.strategy=o,f.method=i,x(t)}n=[new S(0,0,0,0,(function(t,r){var i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(g(t),0===t.lookahead&&0===r)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,w(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-c&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&w(t,!1),1)})),new S(4,4,8,4,E),new S(4,5,16,8,E),new S(4,6,32,32,E),new S(4,4,16,16,A),new S(8,16,32,32,A),new S(8,16,128,128,A),new S(8,32,128,256,A),new S(32,128,258,1024,A),new S(32,258,258,4096,A)],i.deflateInit=function(t,r){return j(t,r,8,15,8,0)},i.deflateInit2=j,i.deflateReset=x,i.deflateResetKeep=U,i.deflateSetHeader=function(t,r){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=r,0):u},i.deflate=function(t,r){var i,e,o,f;if(!t||!t.state||5<r||r<0)return t?d(t,u):u;if(e=t.state,!t.output||!t.input&&0!==t.avail_in||666===e.status&&4!==r)return d(t,0===t.avail_out?-5:u);if(e.strm=t,i=e.last_flush,e.last_flush=r,42===e.status)if(2===e.wrap)t.adler=0,m(e,31),m(e,139),m(e,8),e.gzhead?(m(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),m(e,255&e.gzhead.time),m(e,e.gzhead.time>>8&255),m(e,e.gzhead.time>>16&255),m(e,e.gzhead.time>>24&255),m(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),m(e,255&e.gzhead.os),e.gzhead.extra&&e.gzhead.extra.length&&(m(e,255&e.gzhead.extra.length),m(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=a(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=69):(m(e,0),m(e,0),m(e,0),m(e,0),m(e,0),m(e,9===e.level?2:2<=e.strategy||e.level<2?4:0),m(e,3),e.status=l);else{var c=8+(e.w_bits-8<<4)<<8;c|=(2<=e.strategy||e.level<2?0:e.level<6?1:6===e.level?2:3)<<6,0!==e.strstart&&(c|=32),c+=31-c%31,e.status=l,y(e,c),0!==e.strstart&&(y(e,t.adler>>>16),y(e,65535&t.adler)),t.adler=1}if(69===e.status)if(e.gzhead.extra){for(o=e.pending;e.gzindex<(65535&e.gzhead.extra.length)&&(e.pending!==e.pending_buf_size||(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending!==e.pending_buf_size));)m(e,255&e.gzhead.extra[e.gzindex]),e.gzindex++;e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),e.gzindex===e.gzhead.extra.length&&(e.gzindex=0,e.status=73)}else e.status=73;if(73===e.status)if(e.gzhead.name){o=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending===e.pending_buf_size)){f=1;break}f=e.gzindex<e.gzhead.name.length?255&e.gzhead.name.charCodeAt(e.gzindex++):0,m(e,f)}while(0!==f);e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),0===f&&(e.gzindex=0,e.status=91)}else e.status=91;if(91===e.status)if(e.gzhead.comment){o=e.pending;do{if(e.pending===e.pending_buf_size&&(e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),b(t),o=e.pending,e.pending===e.pending_buf_size)){f=1;break}f=e.gzindex<e.gzhead.comment.length?255&e.gzhead.comment.charCodeAt(e.gzindex++):0,m(e,f)}while(0!==f);e.gzhead.hcrc&&e.pending>o&&(t.adler=a(t.adler,e.pending_buf,e.pending-o,o)),0===f&&(e.status=103)}else e.status=103;if(103===e.status&&(e.gzhead.hcrc?(e.pending+2>e.pending_buf_size&&b(t),e.pending+2<=e.pending_buf_size&&(m(e,255&t.adler),m(e,t.adler>>8&255),t.adler=0,e.status=l)):e.status=l),0!==e.pending){if(b(t),0===t.avail_out)return e.last_flush=-1,0}else if(0===t.avail_in&&v(r)<=v(i)&&4!==r)return d(t,-5);if(666===e.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==e.lookahead||0!==r&&666!==e.status){var k=2===e.strategy?function(t,r){for(var i;;){if(0===t.lookahead&&(g(t),0===t.lookahead)){if(0===r)return 1;break}if(t.match_length=0,i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}(e,r):3===e.strategy?function(t,r){for(var i,n,e,o,a=t.window;;){if(t.lookahead<=h){if(g(t),t.lookahead<=h&&0===r)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[e=t.strstart-1])===a[++e]&&n===a[++e]&&n===a[++e]){o=t.strstart+h;do{}while(n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&n===a[++e]&&e<o);t.match_length=h-(o-e),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(w(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===r?(w(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(w(t,!1),0===t.strm.avail_out)?1:2}(e,r):n[e.level].func(e,r);if(3!==k&&4!==k||(e.status=666),1===k||3===k)return 0===t.avail_out&&(e.last_flush=-1),0;if(2===k&&(1===r?s._tr_align(e):5!==r&&(s._tr_stored_block(e,0,0,!1),3===r&&(p(e.head),0===e.lookahead&&(e.strstart=0,e.block_start=0,e.insert=0))),b(t),0===t.avail_out))return e.last_flush=-1,0}return 4!==r?0:e.wrap<=0?1:(2===e.wrap?(m(e,255&t.adler),m(e,t.adler>>8&255),m(e,t.adler>>16&255),m(e,t.adler>>24&255),m(e,255&t.total_in),m(e,t.total_in>>8&255),m(e,t.total_in>>16&255),m(e,t.total_in>>24&255)):(y(e,t.adler>>>16),y(e,65535&t.adler)),b(t),0<e.wrap&&(e.wrap=-e.wrap),0!==e.pending?0:1)},i.deflateEnd=function(t){var r;return t&&t.state?42!==(r=t.state.status)&&69!==r&&73!==r&&91!==r&&103!==r&&r!==l&&666!==r?d(t,u):(t.state=null,r===l?d(t,-3):0):u},i.deflateSetDictionary=function(t,r){var i,n,s,a,f,h,c,l,d=r.length;if(!t||!t.state)return u;if(2===(a=(i=t.state).wrap)||1===a&&42!==i.status||i.lookahead)return u;for(1===a&&(t.adler=o(t.adler,r,d,0)),i.wrap=0,d>=i.w_size&&(0===a&&(p(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new e.Buf8(i.w_size),e.arraySet(l,r,d-i.w_size,i.w_size,0),r=l,d=i.w_size),f=t.avail_in,h=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=r,g(i);i.lookahead>=3;){for(n=i.strstart,s=i.lookahead-2;i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+3-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++,--s;);i.strstart=n,i.lookahead=2,g(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=h,t.input=c,t.avail_in=f,i.wrap=a,0},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r){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=!1}},{}],48:[function(t,r){r.exports=function(t,r){var i,n,e,s,o,a,f,u,h,c,l,d,v,p,b,w,m,y,k,g,E,A,S,z,U;z=t.input,e=(n=t.next_in)+(t.avail_in-5),U=t.output,o=(s=t.next_out)-(r-t.avail_out),a=s+(t.avail_out-257),f=(i=t.state).dmax,u=i.wsize,h=i.whave,c=i.wnext,l=i.window,d=i.hold,v=i.bits,p=i.lencode,b=i.distcode,w=(1<<i.lenbits)-1,m=(1<<i.distbits)-1;t:do{v<15&&(d+=z[n++]<<v,d+=z[n++]<<(v+=8),v+=8),y=p[d&w];r:for(;;){if(d>>>=k=y>>>24,v-=k,0==(k=y>>>16&255))U[s++]=65535&y;else{if(!(16&k)){if(0==(64&k)){y=p[(65535&y)+(d&(1<<k)-1)];continue r}if(32&k){i.mode=12;break t}t.msg="invalid literal/length code",i.mode=30;break t}g=65535&y,(k&=15)&&(v<k&&(d+=z[n++]<<v,v+=8),g+=d&(1<<k)-1,d>>>=k,v-=k),v<15&&(d+=z[n++]<<v,d+=z[n++]<<(v+=8),v+=8),y=b[d&m];i:for(;;){if(d>>>=k=y>>>24,v-=k,!(16&(k=y>>>16&255))){if(0==(64&k)){y=b[(65535&y)+(d&(1<<k)-1)];continue i}t.msg="invalid distance code",i.mode=30;break t}if(E=65535&y,v<(k&=15)&&(d+=z[n++]<<v,(v+=8)<k&&(d+=z[n++]<<v,v+=8)),f<(E+=d&(1<<k)-1)){t.msg="invalid distance too far back",i.mode=30;break t}if(d>>>=k,v-=k,(k=s-o)<E){if(h<(k=E-k)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(S=l,(A=0)===c){if(A+=u-k,k<g){for(g-=k;U[s++]=l[A++],--k;);A=s-E,S=U}}else if(c<k){if(A+=u+c-k,(k-=c)<g){for(g-=k;U[s++]=l[A++],--k;);if(A=0,c<g){for(g-=k=c;U[s++]=l[A++],--k;);A=s-E,S=U}}}else if(A+=c-k,k<g){for(g-=k;U[s++]=l[A++],--k;);A=s-E,S=U}for(;2<g;)U[s++]=S[A++],U[s++]=S[A++],U[s++]=S[A++],g-=3;g&&(U[s++]=S[A++],1<g&&(U[s++]=S[A++]))}else{for(A=s-E;U[s++]=U[A++],U[s++]=U[A++],U[s++]=U[A++],2<(g-=3););g&&(U[s++]=U[A++],1<g&&(U[s++]=U[A++]))}break}}break}}while(n<e&&s<a);n-=g=v>>3,d&=(1<<(v-=g<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n<e?e-n+5:5-(n-e),t.avail_out=s<a?a-s+257:257-(s-a),i.hold=d,i.bits=v}},{}],49:[function(t,r,i){var n=t("../utils/common"),e=t("./adler32"),s=t("./crc32"),o=t("./inffast"),a=t("./inftrees"),f=-2;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var r;return t&&t.state?(t.total_in=t.total_out=(r=t.state).total=0,t.msg="",r.wrap&&(t.adler=1&r.wrap),r.mode=1,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new n.Buf32(852),r.distcode=r.distdyn=new n.Buf32(592),r.sane=1,r.back=-1,0):f}function l(t){var r;return t&&t.state?((r=t.state).wsize=0,r.whave=0,r.wnext=0,c(t)):f}function d(t,r){var i,n;return t&&t.state?(n=t.state,r<0?(i=0,r=-r):(i=1+(r>>4),r<48&&(r&=15)),r&&(r<8||15<r)?f:(null!==n.window&&n.wbits!==r&&(n.window=null),n.wrap=i,n.wbits=r,l(t))):f}function v(t,r){var i,n;return t?(n=new h,(t.state=n).window=null,0!==(i=d(t,r))&&(t.state=null),i):f}var p,b,w=!0;function m(t){if(w){var r;for(p=new n.Buf32(512),b=new n.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(1,t.lens,0,288,p,0,t.work,{bits:9}),r=0;r<32;)t.lens[r++]=5;a(2,t.lens,0,32,b,0,t.work,{bits:5}),w=!1}t.lencode=p,t.lenbits=9,t.distcode=b,t.distbits=5}function y(t,r,i,e){var s,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),e>=o.wsize?(n.arraySet(o.window,r,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(e<(s=o.wsize-o.wnext)&&(s=e),n.arraySet(o.window,r,i-e,s,o.wnext),(e-=s)?(n.arraySet(o.window,r,i-e,e,0),o.wnext=e,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}i.inflateReset=l,i.inflateReset2=d,i.inflateResetKeep=c,i.inflateInit=function(t){return v(t,15)},i.inflateInit2=v,i.inflate=function(t,r){var i,h,c,l,d,v,p,b,w,k,g,E,A,S,z,U,x,j,_,O,R,B,F,C,D=0,T=new n.Buf8(4),W=[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 f;12===(i=t.state).mode&&(i.mode=13),d=t.next_out,c=t.output,l=t.next_in,h=t.input,b=i.hold,w=i.bits,k=v=t.avail_in,g=p=t.avail_out,B=0;t:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(2&i.wrap&&35615===b){T[i.check=0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0),w=b=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&b)<<8)+(b>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&b)){t.msg="unknown compression method",i.mode=30;break}if(w-=4,R=8+(15&(b>>>=4)),0===i.wbits)i.wbits=R;else if(R>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<R,t.adler=i.check=1,i.mode=512&b?10:12,w=b=0;break;case 2:for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(i.flags=b,8!=(255&i.flags)){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=b>>8&1),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0,i.mode=3;case 3:for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.head&&(i.head.time=b),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,T[2]=b>>>16&255,T[3]=b>>>24&255,i.check=s(i.check,T,4,0)),w=b=0,i.mode=4;case 4:for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.head&&(i.head.xflags=255&b,i.head.os=b>>8),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0,i.mode=5;case 5:if(1024&i.flags){for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.length=b,i.head&&(i.head.extra_len=b),512&i.flags&&(T[0]=255&b,T[1]=b>>>8&255,i.check=s(i.check,T,2,0)),w=b=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(v<(E=i.length)&&(E=v),E&&(i.head&&(R=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,h,l,E,R)),512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,i.length-=E),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===v)break t;for(E=0;R=h[l+E++],i.head&&R&&i.length<65536&&(i.head.name+=String.fromCharCode(R)),R&&E<v;);if(512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,R)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===v)break t;for(E=0;R=h[l+E++],i.head&&R&&i.length<65536&&(i.head.comment+=String.fromCharCode(R)),R&&E<v;);if(512&i.flags&&(i.check=s(i.check,h,E,l)),v-=E,l+=E,R)break t}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;w<16;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}w=b=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}t.adler=i.check=u(b),w=b=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,2;t.adler=i.check=1,i.mode=12;case 12:if(5===r||6===r)break t;case 13:if(i.last){b>>>=7&w,w-=7&w,i.mode=27;break}for(;w<3;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}switch(i.last=1&b,w-=1,3&(b>>>=1)){case 0:i.mode=14;break;case 1:if(m(i),i.mode=20,6!==r)break;b>>>=2,w-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}b>>>=2,w-=2;break;case 14:for(b>>>=7&w,w-=7&w;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if((65535&b)!=(b>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&b,w=b=0,i.mode=15,6===r)break t;case 15:i.mode=16;case 16:if(E=i.length){if(v<E&&(E=v),p<E&&(E=p),0===E)break t;n.arraySet(c,h,l,E,d),v-=E,l+=E,p-=E,d+=E,i.length-=E;break}i.mode=12;break;case 17:for(;w<14;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(i.nlen=257+(31&b),w-=5,i.ndist=1+(31&(b>>>=5)),w-=5,i.ncode=4+(15&(b>>>=5)),b>>>=4,w-=4,286<i.nlen||30<i.ndist){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;w<3;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.lens[W[i.have++]]=7&b,b>>>=3,w-=3}for(;i.have<19;)i.lens[W[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,B=a(0,i.lens,0,19,i.lencode,0,i.work,F={bits:i.lenbits}),i.lenbits=F.bits,B){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;U=(D=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(x<16)b>>>=z,w-=z,i.lens[i.have++]=x;else{if(16===x){for(C=z+2;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b>>>=z,w-=z,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}R=i.lens[i.have-1],E=3+(3&b),b>>>=2,w-=2}else if(17===x){for(C=z+3;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}w-=z,R=0,E=3+(7&(b>>>=z)),b>>>=3,w-=3}else{for(C=z+7;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}w-=z,R=0,E=11+(127&(b>>>=z)),b>>>=7,w-=7}if(i.have+E>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;E--;)i.lens[i.have++]=R}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,B=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,F={bits:i.lenbits}),i.lenbits=F.bits,B){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,B=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,F={bits:i.distbits}),i.distbits=F.bits,B){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===r)break t;case 20:i.mode=21;case 21:if(6<=v&&258<=p){t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,o(t,g),d=t.next_out,c=t.output,p=t.avail_out,l=t.next_in,h=t.input,v=t.avail_in,b=i.hold,w=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;U=(D=i.lencode[b&(1<<i.lenbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(U&&0==(240&U)){for(j=z,_=U,O=x;U=(D=i.lencode[O+((b&(1<<j+_)-1)>>j)])>>>16&255,x=65535&D,!(j+(z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}b>>>=j,w-=j,i.back+=j}if(b>>>=z,w-=z,i.back+=z,i.length=x,0===U){i.mode=26;break}if(32&U){i.back=-1,i.mode=12;break}if(64&U){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&U,i.mode=22;case 22:if(i.extra){for(C=i.extra;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.length+=b&(1<<i.extra)-1,b>>>=i.extra,w-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;U=(D=i.distcode[b&(1<<i.distbits)-1])>>>16&255,x=65535&D,!((z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(0==(240&U)){for(j=z,_=U,O=x;U=(D=i.distcode[O+((b&(1<<j+_)-1)>>j)])>>>16&255,x=65535&D,!(j+(z=D>>>24)<=w);){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}b>>>=j,w-=j,i.back+=j}if(b>>>=z,w-=z,i.back+=z,64&U){t.msg="invalid distance code",i.mode=30;break}i.offset=x,i.extra=15&U,i.mode=24;case 24:if(i.extra){for(C=i.extra;w<C;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}i.offset+=b&(1<<i.extra)-1,b>>>=i.extra,w-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===p)break t;if(i.offset>(E=g-p)){if((E=i.offset-E)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}A=E>i.wnext?i.wsize-(E-=i.wnext):i.wnext-E,E>i.length&&(E=i.length),S=i.window}else S=c,A=d-i.offset,E=i.length;for(p<E&&(E=p),p-=E,i.length-=E;c[d++]=S[A++],--E;);0===i.length&&(i.mode=21);break;case 26:if(0===p)break t;c[d++]=i.length,p--,i.mode=21;break;case 27:if(i.wrap){for(;w<32;){if(0===v)break t;v--,b|=h[l++]<<w,w+=8}if(t.total_out+=g-=p,i.total+=g,g&&(t.adler=i.check=i.flags?s(i.check,c,g,d-g):e(i.check,c,g,d-g)),g=p,(i.flags?b:u(b))!==i.check){t.msg="incorrect data check",i.mode=30;break}w=b=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;w<32;){if(0===v)break t;v--,b+=h[l++]<<w,w+=8}if(b!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}w=b=0}i.mode=29;case 29:B=1;break t;case 30:B=-3;break t;case 31:return-4;case 32:default:return f}return t.next_out=d,t.avail_out=p,t.next_in=l,t.avail_in=v,i.hold=b,i.bits=w,(i.wsize||g!==t.avail_out&&i.mode<30&&(i.mode<27||4!==r))&&y(t,t.output,t.next_out,g-t.avail_out)?(i.mode=31,-4):(g-=t.avail_out,t.total_in+=k-=t.avail_in,t.total_out+=g,i.total+=g,i.wrap&&g&&(t.adler=i.check=i.flags?s(i.check,c,g,t.next_out-g):e(i.check,c,g,t.next_out-g)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0==k&&0===g||4===r)&&0===B&&(B=-5),B)},i.inflateEnd=function(t){if(!t||!t.state)return f;var r=t.state;return r.window&&(r.window=null),t.state=null,0},i.inflateGetHeader=function(t,r){var i;return t&&t.state?0==(2&(i=t.state).wrap)?f:((i.head=r).done=!1,0):f},i.inflateSetDictionary=function(t,r){var i,n=r.length;return t&&t.state?0!==(i=t.state).wrap&&11!==i.mode?f:11===i.mode&&e(1,r,n,0)!==i.check?-3:y(t,r,n,n)?(i.mode=31,-4):(i.havedict=1,0):f},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r){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],e=[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],s=[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],o=[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,a,f,u,h,c,l){var d,v,p,b,w,m,y,k,g,E=l.bits,A=0,S=0,z=0,U=0,x=0,j=0,_=0,O=0,R=0,B=0,F=null,C=0,D=new i.Buf16(16),T=new i.Buf16(16),W=null,I=0;for(A=0;A<=15;A++)D[A]=0;for(S=0;S<f;S++)D[r[a+S]]++;for(x=E,U=15;1<=U&&0===D[U];U--);if(U<x&&(x=U),0===U)return u[h++]=20971520,u[h++]=20971520,l.bits=1,0;for(z=1;z<U&&0===D[z];z++);for(x<z&&(x=z),A=O=1;A<=15;A++)if(O<<=1,(O-=D[A])<0)return-1;if(0<O&&(0===t||1!==U))return-1;for(T[1]=0,A=1;A<15;A++)T[A+1]=T[A]+D[A];for(S=0;S<f;S++)0!==r[a+S]&&(c[T[r[a+S]]++]=S);if(m=0===t?(F=W=c,19):1===t?(F=n,C-=257,W=e,I-=257,256):(F=s,W=o,-1),A=z,w=h,_=S=B=0,p=-1,b=(R=1<<(j=x))-1,1===t&&852<R||2===t&&592<R)return 1;for(;;){for(y=A-_,g=c[S]<m?(k=0,c[S]):c[S]>m?(k=W[I+c[S]],F[C+c[S]]):(k=96,0),d=1<<A-_,z=v=1<<j;u[w+(B>>_)+(v-=d)]=y<<24|k<<16|g|0,0!==v;);for(d=1<<A-1;B&d;)d>>=1;if(0!==d?(B&=d-1,B+=d):B=0,S++,0==--D[A]){if(A===U)break;A=r[a+c[S]]}if(x<A&&(B&b)!==p){for(0===_&&(_=x),w+=z,O=1<<(j=A-_);j+_<U&&!((O-=D[j+_])<=0);)j++,O<<=1;if(R+=1<<j,1===t&&852<R||2===t&&592<R)return 1;u[p=B&b]=x<<24|j<<16|w-h|0}}return 0!==B&&(u[w+B]=A-_<<24|64<<16|0),l.bits=x,0}},{"../utils/common":41}],51:[function(t,r){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,i){var n=t("../utils/common");function e(t){for(var r=t.length;0<=--r;)t[r]=0}var s=256,o=286,a=30,f=15,u=[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],h=[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],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);e(d);var v=new Array(60);e(v);var p=new Array(512);e(p);var b=new Array(256);e(b);var w=new Array(29);e(w);var m,y,k,g=new Array(a);function E(t,r,i,n,e){this.static_tree=t,this.extra_bits=r,this.extra_base=i,this.elems=n,this.max_length=e,this.has_stree=t&&t.length}function A(t,r){this.dyn_tree=t,this.max_code=0,this.stat_desc=r}function S(t){return t<256?p[t]:p[256+(t>>>7)]}function z(t,r){t.pending_buf[t.pending++]=255&r,t.pending_buf[t.pending++]=r>>>8&255}function U(t,r,i){t.bi_valid>16-i?(t.bi_buf|=r<<t.bi_valid&65535,z(t,t.bi_buf),t.bi_buf=r>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=r<<t.bi_valid&65535,t.bi_valid+=i)}function x(t,r,i){U(t,i[2*r],i[2*r+1])}function j(t,r){for(var i=0;i|=1&t,t>>>=1,i<<=1,0<--r;);return i>>>1}function _(t,r,i){var n,e,s=new Array(16),o=0;for(n=1;n<=f;n++)s[n]=o=o+i[n-1]<<1;for(e=0;e<=r;e++){var a=t[2*e+1];0!==a&&(t[2*e]=j(s[a]++,a))}}function O(t){var r;for(r=0;r<o;r++)t.dyn_ltree[2*r]=0;for(r=0;r<a;r++)t.dyn_dtree[2*r]=0;for(r=0;r<19;r++)t.bl_tree[2*r]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function R(t){8<t.bi_valid?z(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 B(t,r,i,n){var e=2*r,s=2*i;return t[e]<t[s]||t[e]===t[s]&&n[r]<=n[i]}function F(t,r,i){for(var n=t.heap[i],e=i<<1;e<=t.heap_len&&(e<t.heap_len&&B(r,t.heap[e+1],t.heap[e],t.depth)&&e++,!B(r,n,t.heap[e],t.depth));)t.heap[i]=t.heap[e],i=e,e<<=1;t.heap[i]=n}function C(t,r,i){var n,e,o,a,f=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*f]<<8|t.pending_buf[t.d_buf+2*f+1],e=t.pending_buf[t.l_buf+f],f++,0===n?x(t,e,r):(x(t,(o=b[e])+s+1,r),0!==(a=u[o])&&U(t,e-=w[o],a),x(t,o=S(--n),i),0!==(a=h[o])&&U(t,n-=g[o],a)),f<t.last_lit;);x(t,256,r)}function D(t,r){var i,n,e,s=r.dyn_tree,o=r.stat_desc.static_tree,a=r.stat_desc.has_stree,u=r.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<u;i++)0!==s[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):s[2*i+1]=0;for(;t.heap_len<2;)s[2*(e=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[e]=0,t.opt_len--,a&&(t.static_len-=o[2*e+1]);for(r.max_code=h,i=t.heap_len>>1;1<=i;i--)F(t,s,i);for(e=u;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],F(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=n,s[2*e]=s[2*i]+s[2*n],t.depth[e]=(t.depth[i]>=t.depth[n]?t.depth[i]:t.depth[n])+1,s[2*i+1]=s[2*n+1]=e,t.heap[1]=e++,F(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,r){var i,n,e,s,o,a,u=r.dyn_tree,h=r.max_code,c=r.stat_desc.static_tree,l=r.stat_desc.has_stree,d=r.stat_desc.extra_bits,v=r.stat_desc.extra_base,p=r.stat_desc.max_length,b=0;for(s=0;s<=f;s++)t.bl_count[s]=0;for(u[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)p<(s=u[2*u[2*(n=t.heap[i])+1]+1]+1)&&(s=p,b++),u[2*n+1]=s,h<n||(t.bl_count[s]++,o=0,v<=n&&(o=d[n-v]),t.opt_len+=(a=u[2*n])*(s+o),l&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==b){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,b-=2}while(0<b);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)h<(e=t.heap[--i])||(u[2*e+1]!==s&&(t.opt_len+=(s-u[2*e+1])*u[2*e],u[2*e+1]=s),n--)}}(t,r),_(s,h,t.bl_count)}function T(t,r,i){var n,e,s=-1,o=r[1],a=0,f=7,u=4;for(0===o&&(f=138,u=3),r[2*(i+1)+1]=65535,n=0;n<=i;n++)e=o,o=r[2*(n+1)+1],++a<f&&e===o||(a<u?t.bl_tree[2*e]+=a:0!==e?(e!==s&&t.bl_tree[2*e]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=e,u=(a=0)===o?(f=138,3):e===o?(f=6,3):(f=7,4))}function W(t,r,i){var n,e,s=-1,o=r[1],a=0,f=7,u=4;for(0===o&&(f=138,u=3),n=0;n<=i;n++)if(e=o,o=r[2*(n+1)+1],!(++a<f&&e===o)){if(a<u)for(;x(t,e,t.bl_tree),0!=--a;);else 0!==e?(e!==s&&(x(t,e,t.bl_tree),a--),x(t,16,t.bl_tree),U(t,a-3,2)):a<=10?(x(t,17,t.bl_tree),U(t,a-3,3)):(x(t,18,t.bl_tree),U(t,a-11,7));s=e,u=(a=0)===o?(f=138,3):e===o?(f=6,3):(f=7,4)}}e(g);var I=!1;function Z(t,r,i,e){U(t,0+(e?1:0),3),function(t,r,i){R(t),z(t,i),z(t,~i),n.arraySet(t.pending_buf,t.window,r,i,t.pending),t.pending+=i}(t,r,i)}i._tr_init=function(t){I||(function(){var t,r,i,n,e,s=new Array(16);for(n=i=0;n<28;n++)for(w[n]=i,t=0;t<1<<u[n];t++)b[i++]=n;for(b[i-1]=n,n=e=0;n<16;n++)for(g[n]=e,t=0;t<1<<h[n];t++)p[e++]=n;for(e>>=7;n<a;n++)for(g[n]=e<<7,t=0;t<1<<h[n]-7;t++)p[256+e++]=n;for(r=0;r<=f;r++)s[r]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,s[8]++;for(;t<=255;)d[2*t+1]=9,t++,s[9]++;for(;t<=279;)d[2*t+1]=7,t++,s[7]++;for(;t<=287;)d[2*t+1]=8,t++,s[8]++;for(_(d,287,s),t=0;t<a;t++)v[2*t+1]=5,v[2*t]=j(t,5);m=new E(d,u,257,o,f),y=new E(v,h,0,a,f),k=new E(new Array(0),c,0,19,7)}(),I=!0),t.l_desc=new A(t.dyn_ltree,m),t.d_desc=new A(t.dyn_dtree,y),t.bl_desc=new A(t.bl_tree,k),t.bi_buf=0,t.bi_valid=0,O(t)},i._tr_stored_block=Z,i._tr_flush_block=function(t,r,i,n){var e,o,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var r,i=4093624447;for(r=0;r<=31;r++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<s;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0}(t)),D(t,t.l_desc),D(t,t.d_desc),a=function(t){var r;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),r=18;3<=r&&0===t.bl_tree[2*l[r]+1];r--);return t.opt_len+=3*(r+1)+5+5+4,r}(t),(o=t.static_len+3+7>>>3)<=(e=t.opt_len+3+7>>>3)&&(e=o)):e=o=i+5,i+4<=e&&-1!==r?Z(t,r,i,n):4===t.strategy||o===e?(U(t,2+(n?1:0),3),C(t,d,v)):(U(t,4+(n?1:0),3),function(t,r,i,n){var e;for(U(t,r-257,5),U(t,i-1,5),U(t,n-4,4),e=0;e<n;e++)U(t,t.bl_tree[2*l[e]+1],3);W(t,t.dyn_ltree,r-1),W(t,t.dyn_dtree,i-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),C(t,t.dyn_ltree,t.dyn_dtree)),O(t),n&&R(t)},i._tr_tally=function(t,r,i){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&i,t.last_lit++,0===r?t.dyn_ltree[2*i]++:(t.matches++,r--,t.dyn_ltree[2*(b[i]+s+1)]++,t.dyn_dtree[2*S(r)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){U(t,2,3),x(t,256,d),function(t){16===t.bi_valid?(z(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){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(){(function(t){!function(t){if(!t.setImmediate){var r,i,n,e,s=1,o={},a=!1,f=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,r="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){c(t)}))}:function(){if(t.postMessage&&!t.importScripts){var r=!0,i=t.onmessage;return t.onmessage=function(){r=!1},t.postMessage("","*"),t.onmessage=i,r}}()?(e="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),function(r){t.postMessage(e+r,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){c(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(){c(t),r.onreadystatechange=null,i.removeChild(r),r=null},i.appendChild(r)}):function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var i=new Array(arguments.length-1),n=0;n<i.length;n++)i[n]=arguments[n+1];return o[s]={callback:t,args:i},r(s),s++},u.clearImmediate=h}function h(t){delete o[t]}function c(t){if(a)setTimeout(c,0,t);else{var r=o[t];if(r){a=!0;try{!function(t){var r=t.callback,i=t.args;switch(i.length){case 0:r();break;case 1:r(i[0]);break;case 2:r(i[0],i[1]);break;case 3:r(i[0],i[1],i[2]);break;default:r.apply(undefined,i)}}(r)}finally{h(t),a=!1}}}}function l(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}));const c=t=>{switch(t){case"textarea":case"textbox":return 150;case"timestamp":return 105;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 71}return 150},l=t=>{switch(t){case"textarea":return 41;case"textbox":case"timestamp":case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 36}return 50},d=(t,r,i,n,e)=>{var s,o,f,u;const h=r.setting||r.settings;let{x:d=0,y:v=0,width:p=c(r.type),height:b=l(r.type)}=h;const w=h.options&&void 0!==e&&h.options[e]?h.options[e]:null;w&&(d=null!==(s=w.x)&&void 0!==s?s:d,v=null!==(o=w.y)&&void 0!==o?o:v,p=null!==(f=w.width)&&void 0!==f?f:p,b=null!==(u=w.height)&&void 0!==u?u:b),t.style.width=`${p}px`,t.style.height=`${b}px`,t.style.position="absolute",t.style.left=`${a(i,d)}px`,t.style.bottom=`${a(n,v)}px`,t.style.transform=`scale(${i}, ${n})`},v=(t,r,i,n)=>{var e,s,o,f;const u=t.setting||t.settings;let{x:h=0,y:d=0,width:v=c(t.type),height:p=l(t.type)}=u;const b=u.options&&void 0!==n&&u.options[n]?u.options[n]:null;return b&&(h=null!==(e=b.x)&&void 0!==e?e:h,d=null!==(s=b.y)&&void 0!==s?s:d,v=null!==(o=b.width)&&void 0!==o?o:v,p=null!==(f=b.height)&&void 0!==f?f:p),{width:`${v}px`,height:`${p}px`,position:"absolute",left:`${a(r,h)}px`,bottom:`${a(i,d)}px`,transform:`scale(${r}, ${i})`}},p=t=>`verdocs-doc-fld-${t.name}`,b=(t,r)=>`verdocs-doc-fld-${t.name}-${r}`,w=t=>{const r=p(t),i=document.getElementById(r);i&&(i.field=t,i.setAttribute("id",r),i.setAttribute("disabled",!0),i.setAttribute("disabled",!1))},m=(t,r,i)=>{var n,e;const{disabled:s=!1,editable:o=!1,draggable:a=!1,done:f=!1}=i,u=document.getElementById(r.containerId+"-controls");if(u)switch(t.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{const i=p(t),h=document.getElementById(i);if(h)return d(h,t,r.xScale,r.yScale),h;let{type:c}=t;"textbox"===c&&((null===(n=t.setting)||void 0===n?void 0:n.leading)>0||(null===(e=t.settings)||void 0===e?void 0:e.leading)>0)&&(c="textarea");const l=document.createElement(`verdocs-field-${c}`);return l.field=t,l.setAttribute("id",i),l.setAttribute("fieldname",t.name),l.setAttribute("templateid","template_id"in t?t.template_id:"PREVIEW"),s?(l.setAttribute("tabindex",-1),l.setAttribute("disabled",!0)):l.setAttribute("tabIndex",1),o&&l.setAttribute("editable",!0),a&&l.setAttribute("draggable",!0),f&&l.setAttribute("done",!0),d(l,t,r.xScale,r.yScale),u.appendChild(l),l}case"checkbox":const i=b(t,0),h=document.getElementById(i);if(h)return d(h,t,r.xScale,r.yScale,0),h;const c=document.createElement("verdocs-field-checkbox");return c.field=t,c.setAttribute("id",i),c.setAttribute("option",0),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,0),u.appendChild(c),c;case"checkbox_group":return(t.settings||t.setting||{}).options.map(((i,n)=>{const e=b(t,n),h=document.getElementById(e);if(h)return d(h,t,r.xScale,r.yScale,n),h;const c=document.createElement("verdocs-field-checkbox");return c.field=t,c.setAttribute("id",e),c.setAttribute("option",n),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,n),u.appendChild(c),c}));case"radio_button_group":return(t.settings||t.setting||{}).options.map(((i,n)=>{const e=b(t,n),h=document.getElementById(e);if(h)return d(h,t,r.xScale,r.yScale,n),h;const c=document.createElement("verdocs-field-radio-button");return c.field=t,c.setAttribute("id",e),c.setAttribute("option",n),s&&c.setAttribute("disabled",!0),f&&c.setAttribute("done",!0),o&&c.setAttribute("editable",!0),a&&c.setAttribute("draggable",!0),d(c,t,r.xScale,r.yScale,n),u.appendChild(c),c}));default:return console.log("[PREVIEW] Skipping unsupported field type",t),null}else console.log("[renderDocumentField] No controls DIV found",r.containerId+"-controls",r)},y=t=>t&&t.setting?t.setting:t&&t.settings?t.settings:{x:0,y:0,required:!1,disabled:!1,result:"",value:""},k=(t,r,i)=>{const n=t.style.transform||"",e=`${r}(${i})`;t.style.transform=n.includes(r)?n.replace(new RegExp(`${r}\\(.+?\\)`),e):n+" "+e},g=t=>{t.style.transform=t.style.transform.split(")")[0]+")"},E=async(t,r,i)=>{const e=o(new Date(r.updated_at),s),a=`${r.name} - ${e}.pdf`,f=await n(t,r.id,i);u(f,a)},A=async(t,r)=>{var i;const a=new h;for await(let f of r){const u=o(new Date(f.updated_at),s),h=r.length>0?a.folder(`${f.id} - ${f.name} - ${u}`):null;for await(let r of f.documents){const s="certificate"===r.type?`${f.name}_certificate.pdf`:`${r.name}.pdf`,o=await n(t,f.id,r.id);h?h.file(s,o,{compression:"DEFLATE"}):a.file(s,o,{compression:"DEFLATE"});const u=(null===(i=f.fields)||void 0===i?void 0:i.filter((t=>"attachment"===t.type&&t.settings.name)))||[];if(u.length>0){const r=h?h.folder("attachments"):a.folder("attachments");for await(let i of u){const n=await e(t,f.id,i.name);r.file(i.settings.name,n,{compression:"DEFLATE"})}}}}const f=o(1===r.length?new Date(r[0].updated_at):new Date,s),c=1===r.length?`${r[0].name} - ${f}.zip`:`Verdocs-Envelopes-${f}`,l=await a.generateAsync({type:"blob",compression:"DEFLATE"});u(l,c)},S=(t,r)=>{let i=0;return function(...n){clearTimeout(i),i=setTimeout((()=>t.apply(this,n)),r)}},z=(t,r="16px Arial")=>{const i=document.createElement("canvas").getContext("2d");return i.font=r,i.measureText(t).width},U=t=>{let r=(t||"").trim();return!r||r.startsWith("+")?r:(r=r.replace(/[^0-9]/g,""),r=r.replace(/^0/g,""),`+1${r}`)};export{E as a,p as b,U as c,z as d,k as e,g as f,y as g,b as h,c as i,l as j,v as k,f as l,m as r,A as s,S as t,w as u}