=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),i=this.lineWidth,this.lineWidth=i*t.scale);var R="text"!==this.autoPaging;if(R||E.y+E.h<=C){if(R||E.y>=F&&E.x<=O){var D=R?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||O-E.x)[0],T=N([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-M+F+this.ctx.prevPageLastElemOffset)[0],z=R&&(k>x||k=.01&&(this.pdf.setFontSize(n),this.lineWidth=i)}}else t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),i=this.lineWidth,this.lineWidth=i*t.scale),this.pdf.text(t.text,h.x+this.posX,h.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=i)},j=function(t,e,r,a){r=r||0,a=a||0,this.pdf.internal.out(n(t+r)+" "+i(e+a)+" l")},O=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},B=function(t,e,n,i,o,u,c,l){this.pdf.internal.out([r(a(n+t)),r(s(i+e)),r(a(o+t)),r(s(u+e)),r(a(c+t)),r(s(l+e)),"c"].join(" "))},M=function(t,e,r,n){for(var i=2*Math.PI,a=Math.PI/2;e>r;)e-=i;var o=Math.abs(r-e);o1e-5;){var l=c+u*Math.min(o,a);s.push(q.call(this,t,c,l)),o-=Math.abs(l-c),c=l}return s},q=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=i,s=-a,u=o*o+s*s,c=u+o*i+s*a,l=4/3*(Math.sqrt(2*u*c)-c)/(o*a-s*i),h=o-l*s,f=s+l*o,d=h,p=-f,g=n+e,m=Math.cos(g),v=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:h*m-f*v,y2:h*v+f*m,x3:d*m-p*v,y3:d*v+p*m,x4:t*Math.cos(r),y4:t*Math.sin(r)}},E=function(t){return 180*t/Math.PI},R=function(t,e,r,n,i,a){var o=t+.5*(r-t),s=e+.5*(n-e),u=i+.5*(r-i),l=a+.5*(n-a),h=Math.min(t,i,o,u),f=Math.max(t,i,o,u),d=Math.min(e,a,s,l),p=Math.max(e,a,s,l);return new c(h,d,f-h,p-d)},D=function(t,e,r,n,i,a,o,s){var u,l,h,f,d,p,g,m,v,b,y,w,N,L,x=r-t,A=n-e,S=i-r,_=a-n,P=o-i,k=s-a;for(l=0;l<41;l++)v=(g=(h=t+(u=l/40)*x)+u*((d=r+u*S)-h))+u*(d+u*(i+u*P-d)-g),b=(m=(f=e+u*A)+u*((p=n+u*_)-f))+u*(p+u*(a+u*k-p)-m),0==l?(y=v,w=b,N=v,L=b):(y=Math.min(y,v),w=Math.min(w,b),N=Math.max(N,v),L=Math.max(L,b));return new c(Math.round(y),Math.round(w),Math.round(N-y),Math.round(L-w))},T=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t,e,r=(t=this.ctx.lineDash,e=this.ctx.lineDashOffset,JSON.stringify({lineDash:t,lineDashOffset:e}));this.prevLineDash!==r&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=r)}}}(E.API),
+/**
+ * @license
+ * jsPDF filters PlugIn
+ * Copyright (c) 2014 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var r=function(t){var e,r,n,i,a,o,s,u,c,l;for(/[^\x00-\xFF]/.test(t),r=[],n=0,i=(t+=e="\0\0\0\0".slice(t.length%4||4)).length;i>n;n+=4)0!==(a=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(o=(a=((a=((a=((a=(a-(l=a%85))/85)-(c=a%85))/85)-(u=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,u+33,c+33,l+33)):r.push(122);return function(t,e){for(var r=e;r>0;r--)t.pop()}(r,e.length),String.fromCharCode.apply(String,r)+"~>"},n=function(t){var e,r,n,i,a,o=String,s="length",u=255,c="charCodeAt",l="slice",h="replace";for(t[l](-2),t=t[l](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[l](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[c](i)-33)+614125*(t[c](i+1)-33)+7225*(t[c](i+2)-33)+85*(t[c](i+3)-33)+(t[c](i+4)-33),n.push(u&r>>24,u&r>>16,u&r>>8,u&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),o.fromCharCode.apply(o,n)},i=function(t){return t.split("").map(function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var r="",n=0;nc&&(u=l,l=c,c=u);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",c>l&&(u=l,l=c,c=u)}return{width:l,height:c,unit:r,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Ot):null;var r=new u(e);return e.worker?r:r.from(t).doCallback()}}(E.API),E.API.addJS=function(t){var e,r,n=function(t){for(var e="",r=0;r=0&&"\\"===t[a];a--)i++;e+=i%2==0?"\\"+n:n}else e+=n}return e}(t);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==e&&void 0!==r&&this.internal.out("/Names <>")}),this},
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e;t.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),i=0;i> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,r){var n={title:e,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var r=0;r0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(e){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line("/Count "+a),i.options&&i.options.pageNumber){var o=t.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var s=0;s> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var r=0;r1){s=!0,c=void 0;var y=e*n;l=new Uint8Array(y);for(var w=new DataView(i.buffer),N=0;N536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[t]()}catch(r){o.log("bit decode error:"+r)}},se.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i>7-s&1];this.data[o+4*s]=u.blue,this.data[o+4*s+1]=u.green,this.data[o+4*s+2]=u.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},se.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>4,u=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*i+1>=this.width)break;c=this.palette[u],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},se.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i>5&e)/e*255|0,u=(a>>10&e)/e*255|0,c=a>>15?255:0,l=n*this.width*4+4*i;this.data[l]=u,this.data[l+1]=s,this.data[l+2]=o,this.data[l+3]=c}this.pos+=t}},se.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a>5&r)/r*255|0,c=(o>>11)/e*255|0,l=i*this.width*4+4*a;this.data[l]=c,this.data[l+1]=u,this.data[l+2]=s,this.data[l+3]=255}this.pos+=t}},se.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;rn&&(i.push(t.slice(u,a)),s=0,u=a),s+=e[a],a++;return u!==a&&i.push(t.slice(u,a)),i},Vt=function(t,e,r){r||(r={});var n,i,a,o,s,u,c,l=[],h=[l],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=Ut.apply(this,[" ",r])[0];if(u=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(u).join(" "),b=[];g.map(function(t){(t=t.split(/\s*\n/)).length>1?b=b.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):b.push(t[0])}),g=b,u=Ht.apply(this,[v,r])}for(a=0,o=g.length;ae||y){if(p>e){for(s=Wt.apply(this,[n,i,e-(f+d),e]),l.push(s.shift()),l=[s.pop()];s.length;)h.push([s.shift()]);p=i.slice(n.length-(l[0]?l[0].length:0)).reduce(function(t,e){return t+e},0)}else l=[n];h.push(l),f=p+u,d=m}else l.push(n),f+=d+p,d=m}return c=u?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},h.map(c)},zt.splitTextToSize=function(t,e,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle),r="Unicode";return e.metadata[r]?{widths:e.metadata[r].widths||{0:1},kerning:e.metadata[r].kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var s,u,c=[];for(s=0,u=n.length;s1){for(h=0;h>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},E.API.addMetadata=function(t,e){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceUri:null!=e?e:"http://jspdf.default.namespaceuri/",rawXml:"boolean"==typeof e&&e},this.internal.events.subscribe("putCatalog",le),this.internal.events.subscribe("postPutResources",ce)),this},function(t){var e=t.API,r=e.pdfEscape16=function(t,e){for(var r,n=e.metadata.Unicode.widths,i=["","0","00","000","0000"],a=[""],o=0,s=t.length;o> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange",n=[],o=0,s=(r=Object.keys(t).sort(function(t,e){return t-e})).length;o=100&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(i=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+i+">"));return n.length&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),a+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,a=e.newObject,o=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"Identity-H"===r.encoding){for(var s=r.metadata.Unicode.widths,u=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),c="",l=0;l>"),i("endobj");var p=a();i("<<"),i("/Type /Font"),i("/BaseFont /"+C(r.fontName)),i("/FontDescriptor "+d+" 0 R"),i("/W "+t.API.PDFObject.convert(s)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+r.encoding+")"),i(">>"),i(">>"),i("endobj"),r.objectNumber=a(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+f+" 0 R"),i("/BaseFont /"+C(r.fontName)),i("/Encoding /"+r.encoding),i("/DescendantFonts ["+p+" 0 R]"),i(">>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]),e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,a=e.newObject,o=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===r.encoding){for(var s=r.metadata.rawData,u="",c=0;c>"),i("endobj"),r.objectNumber=a();for(var d=0;d>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]);var i=function(t){var e,n=t.text||"",i=t.x,a=t.y,o=t.options||{},s=t.mutex||{},u=s.pdfEscape,c=s.activeFontKey,l=s.fonts,h=c,f="",d=0,p="",g=l[h].encoding;if("Identity-H"!==l[h].encoding)return{text:n,x:i,y:a,options:o,mutex:s};for(p=n,h=c,Array.isArray(n)&&(p=n[0]),d=0;d","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,v=0;this.__bidiEngine__={};var b=function(t){var e=t.charCodeAt(),r=e>>8,n=d[r];return void 0!==n?c[256*n+(255&e)]:252===r||253===r?"AL":g.test(r)?"L":8===r?"R":"N"},y=function(t){for(var e,r=0;r=e.length||"EN"!==(u=o[s-1])&&"AN"!==u||"EN"!==(c=e[s+1])&&"AN"!==c?f="N":m&&(c="AN"),f=c===u?c:"N";break;case"ES":f="EN"===(u=s>0?o[s-1]:"B")&&s+10&&"EN"===o[s-1]){f="EN";break}if(m){f="N";break}for(l=s+1,h=e.length;l=1425&&d<=2303||64286===d;if(u=e[l],p&&("R"===u||"AL"===u)){f="R";break}}}f=s<1||"B"===(u=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N"}return f},N=function(t,e,r){var n=t.split("");return r&&L(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},L=function(t,e,i){var a,o,s,u,c,d=-1,p=t.length,g=0,y=[],N=v?h:l,L=[];for(m=!1,r=!1,n=!1,o=0;o0)if(16===a){for(o=d;o-1){for(o=d;o=0&&"WS"===t[i];i--)e[i]=v}}(L,e,p)},x=function(t,e,n,i,a){if(!(a.hiLevel=t){for(u=h+1;u=t;)u++;for(c=h,s=u-1;c=0&&(t[i]=p[n+1])}(n,r,i),x(2,n,e,r,i),x(1,n,e,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,r){var n,i,a,o;for(a=0,i=0,o=(t=""+t).length;0<=o?io;i=0<=o?++i:--i)n=t.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return a*(e/1e3)},t.prototype.lineHeight=function(t,e){var r;return null==e&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},t}();var he,fe=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?et;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(t){var e,r,n;for(n=[],e=0,r=t.length;0<=r?er;e=0<=r?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,r,n,i,a,o,s;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*i+65536*a+256*o+s},t.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?rt;r=0<=t?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;rn;r=0<=n?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var r,n,i,a,o,s,u,c,l,h,f,d,p;for(p in f=Object.keys(e).length,s=Math.log(2),l=16*Math.floor(Math.log(f)/s),a=Math.floor(l/s),c=16*f-l,(n=new fe).writeInt(this.scalarType),n.writeShort(f),n.writeShort(l),n.writeShort(a),n.writeShort(c),i=16*f,u=n.pos+i,o=null,d=[],e)for(h=e[p],n.writeString(p),n.writeInt(t(h)),n.writeInt(u),n.writeInt(h.length),d=d.concat(h),"head"===p&&(o=u),u+=h.length;u%4;)d.push(0),u++;return n.write(d),r=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(r),n.data},t=function(t){var e,r,n,i;for(t=_e.call(t);t.length%4;)t.push(0);for(n=new fe(t),r=0,e=0,i=t.length;eh;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,p=function(){var e,r;for(r=[],s=e=0;0<=h?eh;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=h?eh;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),c=function(){var e,r;for(r=[],s=e=0;0<=h?eh;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),n=(this.length-t.pos+this.offset)/2,o=function(){var e,r;for(r=[],s=e=0;0<=n?en;s=0<=n?++e:--e)r.push(t.readUInt16());return r}(),s=m=0,b=i.length;m=g;r=d<=g?++v:--v)0===c[s]?a=r+u[s]:0!==(a=o[c[s]/2+(r-d)-(h-s)]||0)&&(a+=u[s]),this.codeMap[r]=65535&a}t.pos=l}return t.encode=function(t,e){var r,n,i,a,o,s,u,c,l,h,f,d,p,g,m,v,b,y,w,N,L,x,A,S,_,P,k,F,I,C,j,O,B,M,q,E,R,D,T,z,U,H,W,V,G,Y;switch(F=new fe,a=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(p=0,g=function(){var t=[];for(d=0;d<256;++d)t.push(0);return t}(),v={0:0},i={},I=0,B=a.length;I=32768)for(s.push(0),N.push(2*(f.length+A-d)),n=O=_;_<=c?O<=c:O>=c;n=_<=c?++O:--O)f.push(r[n].new);else s.push(k-_),N.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*f.length),F.writeUInt16(0),F.writeUInt16(S),F.writeUInt16(x),F.writeUInt16(h),F.writeUInt16(L),U=0,E=l.length;Un;r=0<=n?++r:--r)e=new ve(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},t.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=ve.encode(t,e),(n=new fe).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},t}(),ye=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ge(t,he),t.prototype.tag="hhea",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},t}(),we=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ge(t,he),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),Ne=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ge(t,he),t.prototype.tag="post",t.prototype.parse=function(t){var e,r,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(r=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?ir;i=0<=r?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.posr;i=0<=r?++e:--e)n.push(t.readUInt32());return n}.call(this)}},t}(),Le=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},xe=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ge(t,he),t.prototype.tag="name",t.prototype.parse=function(t){var e,r,n,i,a,o,s,u,c,l,h;for(t.pos=this.offset,t.readShort(),e=t.readShort(),o=t.readShort(),r=[],i=0;0<=e?ie;i=0<=e?++i:--i)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(s={},i=c=0,l=r.length;co;e=0<=o?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,i;for(i=[],e=r=0;0<=n?rn;e=0<=n?++r:--r)i.push(t.readInt16());return i}(),this.widths=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.metrics).length;tn;e=0<=n?++a:--a)s.push(this.widths.push(r));return s},t.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},t}(),_e=[].slice,Pe=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return ge(t,he),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,u,c,l;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+r,a=(o=new fe(e.read(n))).readShort(),u=o.readShort(),l=o.readShort(),s=o.readShort(),c=o.readShort(),this.cache[t]=-1===a?new Fe(o,u,l,s,c):new ke(o,a,u,l,s,c),this.cache[t]))},t.prototype.encode=function(t,e,r){var n,i,a,o,s;for(a=[],i=[],o=0,s=e.length;o0&&(n+=s)}for(var u=new Array(4*r.length),c=0;c>8,u[4*c+1]=(16711680&r[c])>>16,u[4*c]=(4278190080&r[c])>>24;return u},t}(),Ce=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,r,n,i;for(e in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=n[r];return t},t.prototype.glyphsFor=function(t){var e,r,n,i,a,o,s;for(n={},a=0,o=t.length;a0)for(i in s=this.glyphsFor(e))r=s[i],n[i]=r;return n},t.prototype.encode=function(t,e){var r,n,i,a,o,s,u,c,l,h,f,d,p,g,m;for(n in r=be.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),f={0:0},m=r.charMap)f[(s=m[n]).old]=s.new;for(d in h=r.maxGlyphID,a)d in f||(f[d]=h++);return c=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),l=Object.keys(c).sort(function(t,e){return t-e}),p=function(){var t,e,r;for(r=[],t=0,e=l.length;t>"),a.join("\n")}return""+r},e}();
+//# sourceMappingURL=jspdf.es.min.js.map
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css":
+/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css ***!
+ \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.admin-data-table__toolbar[data-v-5dc641a8] {\n\tmargin-bottom: 12px;\n}\n.admin-data-table[data-v-5dc641a8] {\n\t--adt-header-bg: #1976d2;\n\t--adt-header-color: #fff;\n\t--adt-radius: 12px;\n\t--adt-border: 1px solid #e0e0e0;\n\t--adt-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n\t--adt-row-hover: #e3f2fd;\n\t--adt-footer-bg: #fafafa;\n\t--adt-text-muted: #757575;\n\t--adt-font-size: 16px;\n\t--adt-header-font-size: 16px;\n}\n.admin-data-table__shell[data-v-5dc641a8] {\n\tborder-radius: var(--adt-radius);\n\tborder: var(--adt-border);\n\tbox-shadow: var(--adt-shadow);\n\toverflow: hidden;\n\tbackground: #fff;\n}\n.admin-data-table__scroll[data-v-5dc641a8] {\n\toverflow-x: auto;\n\t-webkit-overflow-scrolling: touch;\n}\n.admin-data-table__table[data-v-5dc641a8] {\n\twidth: 100%;\n\tmargin-bottom: 0;\n\tborder-collapse: separate;\n\tborder-spacing: 0;\n}\n.admin-data-table__table thead tr:first-child th[data-v-5dc641a8]:first-child {\n\tborder-top-left-radius: var(--adt-radius);\n}\n.admin-data-table__table thead tr:first-child th[data-v-5dc641a8]:last-child {\n\tborder-top-right-radius: var(--adt-radius);\n}\n.admin-data-table__table thead th[data-v-5dc641a8] {\n\tbackground-color: var(--adt-header-bg);\n\tcolor: var(--adt-header-color);\n\tfont-weight: 600;\n\tfont-size: var(--adt-header-font-size);\n\ttext-transform: none;\n\tletter-spacing: 0.02em;\n\tborder: none !important;\n\tpadding: 14px 16px;\n\tvertical-align: middle;\n}\n.admin-data-table__table thead th.is-sortable[data-v-5dc641a8] {\n\tcursor: pointer;\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n}\n.admin-data-table__table thead th.is-sortable[data-v-5dc641a8]:hover {\n\tfilter: brightness(1.06);\n}\n.admin-data-table__table thead th.admin-data-table__col-index[data-v-5dc641a8],\n.admin-data-table__table tbody td.admin-data-table__col-index[data-v-5dc641a8] {\n\twidth: 3.25rem;\n\tmax-width: 4rem;\n\ttext-align: center;\n\tfont-variant-numeric: tabular-nums;\n\tvertical-align: middle !important;\n}\n.admin-data-table__th-inner[data-v-5dc641a8] {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tgap: 8px;\n\tmin-height: 20px;\n}\n.admin-data-table__th-title[data-v-5dc641a8] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.admin-data-table__sort[data-v-5dc641a8] {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tflex-shrink: 0;\n\topacity: 0.95;\n}\n.admin-data-table__sort-hint[data-v-5dc641a8] {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tline-height: 1;\n\topacity: 0.45;\n\tmargin-top: 1px;\n}\n.admin-data-table__sort-icon[data-v-5dc641a8] {\n\tdisplay: block;\n\tflex-shrink: 0;\n}\n.admin-data-table__sort-icon--faint[data-v-5dc641a8] {\n\tmargin-top: -3px;\n}\n.admin-data-table__sort-hint .admin-data-table__sort-icon--faint[data-v-5dc641a8]:first-child {\n\tmargin-top: 0;\n}\n.admin-data-table__table tbody td[data-v-5dc641a8] {\n\tpadding: 12px 16px;\n\tvertical-align: middle;\n\tborder-top: 1px solid #eee;\n\tfont-size: var(--adt-font-size);\n}\n.admin-data-table__table tbody tr:first-child:not(.admin-data-table__state-row) td[data-v-5dc641a8] {\n\tborder-top: 1px solid #e0e0e0;\n}\n.admin-data-table__table tbody tr.admin-data-table__state-row td[data-v-5dc641a8] {\n\tborder-top: none;\n\tpadding: 0;\n}\n.admin-data-table__table tbody tr:not(.admin-data-table__state-row):hover td[data-v-5dc641a8] {\n\tbackground-color: var(--adt-row-hover);\n}\n.admin-data-table__state[data-v-5dc641a8] {\n\ttext-align: center;\n\tpadding: 40px 24px;\n\tcolor: var(--adt-text-muted);\n}\n.admin-data-table__state-icon[data-v-5dc641a8] {\n\tfont-size: 40px;\n\topacity: 0.45;\n\tmargin-bottom: 12px;\n\tdisplay: block;\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n.admin-data-table__state-title[data-v-5dc641a8] {\n\tfont-size: 16px;\n\tfont-weight: 600;\n\tcolor: #424242;\n\tmargin-bottom: 4px;\n}\n.admin-data-table__state-hint[data-v-5dc641a8] {\n\tfont-size: 13px;\n\tcolor: var(--adt-text-muted);\n}\n.admin-data-table__footer[data-v-5dc641a8] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px 16px;\n\tpadding: 12px 16px;\n\tborder-top: var(--adt-border);\n\tbackground: var(--adt-footer-bg);\n}\n.admin-data-table__footer-left[data-v-5dc641a8] {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n.admin-data-table__footer-label[data-v-5dc641a8] {\n\tmargin: 0;\n\tfont-size: 12px;\n\tfont-weight: normal;\n\tcolor: var(--adt-text-muted);\n}\n.admin-data-table__page-size[data-v-5dc641a8] {\n\twidth: auto;\n\tmin-width: 64px;\n\tdisplay: inline-block;\n\theight: 30px;\n\tpadding: 4px 8px;\n\tfont-size: 12px;\n}\n.admin-data-table__footer-mid[data-v-5dc641a8] {\n\tfont-size: 13px;\n\tfont-weight: 500;\n\tcolor: #616161;\n}\n.admin-data-table__footer-right[data-v-5dc641a8] {\n\tflex-shrink: 0;\n}\n.admin-data-table__pagination[data-v-5dc641a8] {\n\tmargin: 0;\n}\n.admin-data-table__pagination>li>a[data-v-5dc641a8] {\n\tpadding: 5px 12px;\n\tfont-size: 12px;\n\tcolor: var(--adt-header-bg);\n}\n.admin-data-table__pagination>li.disabled>a[data-v-5dc641a8] {\n\tcolor: #bbb;\n\tpointer-events: none;\n\tcursor: default;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css":
+/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css ***!
+ \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.roulette-elimination[data-v-1369a02f] {\n\tmax-width: 980px;\n\tmargin: 0 auto;\n\ttext-align: center;\n}\n.roulette-elimination--full-width[data-v-1369a02f] {\n\tmax-width: none;\n\twidth: 100%;\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n.roulette-elimination--full-width .wheel-stage[data-v-1369a02f] {\n\tmax-width: min(100%, 880px);\n}\n.roulette-main-row[data-v-1369a02f] {\n\talign-items: flex-start;\n}\n.roulette-wheel-col[data-v-1369a02f] {\n\ttext-align: center;\n}\n.roulette-side-col[data-v-1369a02f] {\n\ttext-align: left;\n\tmargin-top: 1.25rem;\n}\n@media (min-width: 992px) {\n.roulette-side-col[data-v-1369a02f] {\n\t\tmargin-top: 0;\n\t\tpadding-left: 8px;\n}\n}\n.wheel-stage[data-v-1369a02f] {\n\tposition: relative;\n\twidth: 100%;\n\tmax-width: 600px;\n\tmargin: 0 auto 1rem;\n\toutline: none;\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n}\n.wheel-stage--can-spin[data-v-1369a02f] {\n\tcursor: pointer;\n}\n.wheel-stage--can-spin[data-v-1369a02f]:focus {\n\tbox-shadow: 0 0 0 3px rgba(51, 122, 183, 0.45);\n\tborder-radius: 4px;\n}\n.wheel-stage[data-v-1369a02f]:not(.wheel-stage--can-spin) {\n\tcursor: not-allowed;\n}\n.pointer[data-v-1369a02f] {\n\tposition: absolute;\n\ttop: -8px;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\twidth: 0;\n\theight: 0;\n\tborder-left: 17px solid transparent;\n\tborder-right: 17px solid transparent;\n\tborder-top: 26px solid #222;\n\tz-index: 2;\n\tfilter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));\n}\n.wheel-wrap[data-v-1369a02f] {\n\tposition: relative;\n\tz-index: 1;\n\twidth: 100%;\n\tborder-radius: 50%;\n\tbox-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n\ttransition-property: transform;\n\twill-change: transform;\n}\n.wheel-center-logo[data-v-1369a02f] {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n\tz-index: 3;\n\twidth: 22%;\n\tmin-width: 72px;\n\tmax-width: 150px;\n\tpadding: 6px;\n\tborder: 3px solid rgba(255, 255, 255, 0.95);\n\tborder-radius: 50%;\n\tbackground: #fff;\n\tbox-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);\n\tpointer-events: none;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttransition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;\n}\n.wheel-stage--can-spin:hover .wheel-center-logo[data-v-1369a02f] {\n\ttransform: translate(-50%, -50%) scale(1.06);\n\tbox-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);\n}\n.wheel-stage--can-spin:active .wheel-center-logo[data-v-1369a02f] {\n\ttransform: translate(-50%, -50%) scale(0.97);\n}\n.wheel-stage:not(.wheel-stage--can-spin) .wheel-center-logo[data-v-1369a02f] {\n\topacity: 0.5;\n}\n.wheel-center-logo-img[data-v-1369a02f] {\n\twidth: 100%;\n\theight: auto;\n\tmax-height: 100%;\n\t-o-object-fit: contain;\n\t object-fit: contain;\n\tborder-radius: 50%;\n\tpointer-events: none;\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n}\n.wheel-canvas[data-v-1369a02f] {\n\tdisplay: block;\n\twidth: 100%;\n\theight: auto;\n\tborder-radius: 50%;\n}\n.roulette-click-hint[data-v-1369a02f] {\n\tmargin-top: 0.35rem;\n\tmargin-bottom: 0;\n}\n.roulette-space-hint[data-v-1369a02f] {\n\tmargin-top: 0.25rem;\n\tmargin-bottom: 0;\n}\n.roulette-space-hint kbd[data-v-1369a02f] {\n\tdisplay: inline-block;\n\tpadding: 1px 6px;\n\tfont-size: 11px;\n\tline-height: 1.4;\n\tcolor: #333;\n\tbackground-color: #f7f7f7;\n\tborder: 1px solid #ccc;\n\tborder-radius: 3px;\n\tbox-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);\n}\n.roulette-persist-clear[data-v-1369a02f] {\n\tmargin-top: 0.35rem;\n\tmargin-bottom: 0;\n}\n.hint[data-v-1369a02f] {\n\tfont-size: 0.9rem;\n\tmargin-top: 0.5rem;\n}\n.last-winner[data-v-1369a02f] {\n\tmargin-top: 0.5rem;\n}\n.remaining-count[data-v-1369a02f] {\n\tfont-size: 20px;\n\tcolor: #666;\n\tmargin-top: 0.25rem;\n}\n.roulette-side-col .roulette-panel[data-v-1369a02f] {\n\tmargin-bottom: 15px;\n}\n.roulette-side-col .roulette-panel[data-v-1369a02f]:last-child {\n\tmargin-bottom: 0;\n}\n.participant-list--scroll[data-v-1369a02f] {\n\tmax-height: min(42vh, 340px);\n\toverflow-y: auto;\n}\n.winner-ol--scroll[data-v-1369a02f] {\n\tmax-height: min(28vh, 220px);\n\toverflow-y: auto;\n}\n.roulette-panel .panel-heading[data-v-1369a02f] {\n\tfont-size: 14px;\n\tfont-weight: 600;\n}\n.participant-list[data-v-1369a02f] {\n\tmargin-bottom: 0;\n}\n.participant-row[data-v-1369a02f] {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 0.5rem;\n\tfont-size: 13px;\n}\n.participant-row--active[data-v-1369a02f] {\n\tbackground-color: #f0fdf4;\n\tborder-left: 3px solid #22c55e;\n}\n.participant-row--won[data-v-1369a02f] {\n\tcolor: #6b7280;\n\tbackground-color: #f9fafb;\n}\n.participant-row--absent[data-v-1369a02f] {\n\tcolor: #92400e;\n\tbackground-color: #fffbeb;\n\tborder-left: 3px solid #f59e0b;\n}\n.participant-name[data-v-1369a02f] {\n\tflex: 1;\n\tmin-width: 0;\n\tword-break: break-word;\n}\n.participant-badge[data-v-1369a02f] {\n\tfont-size: 11px;\n\twhite-space: nowrap;\n\tcolor: #6b7280;\n}\n.participant-row--active .participant-badge[data-v-1369a02f] {\n\tcolor: #15803d;\n\tfont-weight: 600;\n}\n.winner-ol[data-v-1369a02f] {\n\tmargin: 0;\n\tpadding: 10px 15px 10px 28px;\n\tfont-size: 13px;\n}\n.winner-li[data-v-1369a02f] {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 6px;\n\tmargin-bottom: 8px;\n}\n.winner-li-main[data-v-1369a02f] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.winner-absent-btn[data-v-1369a02f] {\n\twhite-space: nowrap;\n\tpadding: 0 4px;\n\tflex-shrink: 0;\n}\n.winner-label[data-v-1369a02f] {\n\tfont-weight: 600;\n}\n.winner-meta[data-v-1369a02f] {\n\tmargin-left: 8px;\n\tfont-size: 12px;\n}\n.winner-empty[data-v-1369a02f] {\n\tmargin: 0;\n\tfont-size: 13px;\n}\n.roulette-winner-modal .modal-title[data-v-1369a02f] {\n\tfont-weight: 700;\n}\n.roulette-winner-modal-round[data-v-1369a02f] {\n\tfont-size: 14px;\n\tmargin-bottom: 8px;\n}\n.roulette-winner-modal-name[data-v-1369a02f] {\n\tfont-size: 1.75rem;\n\tfont-weight: 700;\n\tline-height: 1.3;\n\tmargin: 0;\n\tword-break: break-word;\n}\n.roulette-winner-absent-hint[data-v-1369a02f] {\n\tmargin-top: 12px;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css":
+/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css ***!
+ \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.roulette-demo-page[data-v-653cb532] {\n\tpadding-top: 2rem;\n\tpadding-bottom: 3rem;\n\twidth: 100%;\n\tmax-width: none;\n}\n.roulette-page-header[data-v-653cb532] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tmargin-bottom: 1rem;\n\tpadding-bottom: 0.75rem;\n\tborder-bottom: 1px solid #e7e7e7;\n}\n.roulette-page-header-inner[data-v-653cb532] {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-wrap: wrap;\n\tgap: 14px 18px;\n\ttext-align: left;\n}\n.roulette-page-header-logo[data-v-653cb532] {\n\tdisplay: block;\n\theight: 52px;\n\twidth: auto;\n\tmax-width: 140px;\n\t-o-object-fit: contain;\n\t object-fit: contain;\n\tflex-shrink: 0;\n}\n.roulette-demo-title[data-v-653cb532] {\n\tfont-size: 1.65rem;\n\tfont-weight: 600;\n\tmargin: 0;\n\tline-height: 1.3;\n\tmax-width: min(100%, 36rem);\n}\n.roulette-bg-music-btn[data-v-653cb532] {\n\tflex-shrink: 0;\n\twhite-space: nowrap;\n}\n.roulette-demo-path[data-v-653cb532] {\n\tmargin-bottom: 1.25rem;\n\tfont-size: 0.9rem;\n\tword-break: break-all;\n}\n.roulette-poll-help[data-v-653cb532] {\n\tmargin-bottom: 0.75rem;\n\tline-height: 1.45;\n}\n.roulette-demo-loading[data-v-653cb532] {\n\tmargin-bottom: 1rem;\n}\n.roulette-sync-bar[data-v-653cb532] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 10px 16px;\n\tmargin-bottom: 14px;\n\tfont-size: 13px;\n}\n.roulette-sync-refreshing[data-v-653cb532] {\n\tfont-style: italic;\n}\n.roulette-sync-poll-error[data-v-653cb532] {\n\tfont-size: 12px;\n}\n.roulette-sync-btn[data-v-653cb532] {\n\tflex-shrink: 0;\n}\n.roulette-demo-layout[data-v-653cb532] {\n\talign-items: flex-start;\n}\n.roulette-pending-sidebar[data-v-653cb532] {\n\tmargin-bottom: 16px;\n}\n@media (min-width: 992px) {\n.roulette-pending-sidebar[data-v-653cb532] {\n\t\tmargin-bottom: 0;\n}\n.roulette-pending-panel[data-v-653cb532] {\n\t\tposition: sticky;\n\t\ttop: 12px;\n}\n}\n.roulette-main-column[data-v-653cb532] {\n\tmin-width: 0;\n}\n.roulette-pending-panel[data-v-653cb532] {\n\tmargin-bottom: 0;\n}\n.roulette-pending-list[data-v-653cb532] {\n\tmargin-bottom: 0;\n}\n.roulette-pending-row[data-v-653cb532] {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 10px;\n\tfont-size: 13px;\n}\n.roulette-pending-name[data-v-653cb532] {\n\tflex: 1;\n\tmin-width: 0;\n\tword-break: break-word;\n}\n.roulette-pending-import[data-v-653cb532] {\n\tflex-shrink: 0;\n}\n.roulette-cabutan-hint[data-v-653cb532] {\n\tmargin-bottom: 16px;\n\tline-height: 1.45;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
/***/ }),
/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/admin/beliankomoditi.vue?vue&type=style&index=0&id=77f51ad2&scoped=true&lang=css":
@@ -18922,7 +29841,31 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.center-header {\n text-align: center;\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.center-header {\n\ttext-align: center;\n}\n\n/* Ensure Bootstrap modals appear above the admin floating header (z-index: 2000). */\n.modal {\n\tz-index: 2200;\n}\n.modal-backdrop {\n\tz-index: 2190 !important;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css":
+/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css ***!
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.result-page[data-v-eb124490] {\n\tmargin-top: 12px;\n}\n.result-header[data-v-eb124490] {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 16px;\n\tmargin-bottom: 12px;\n}\n.result-kicker[data-v-eb124490] {\n\tcolor: #2f80ed;\n\tfont-size: 12px;\n\tfont-weight: 800;\n\tletter-spacing: 0.08em;\n\ttext-transform: uppercase;\n\tmargin-bottom: 6px;\n}\n.result-title[data-v-eb124490] {\n\tmargin: 0 0 6px;\n\tfont-weight: 800;\n\tcolor: #17324d;\n}\n.result-subtitle[data-v-eb124490] {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n}\n.result-actions[data-v-eb124490] {\n\tflex-shrink: 0;\n}\n.result-stats[data-v-eb124490] {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(3, minmax(0, 1fr));\n\tgap: 10px;\n\tmargin: 10px 0 14px;\n}\n.result-stat[data-v-eb124490] {\n\tborder: 1px solid #e6edf5;\n\tborder-radius: 16px;\n\tbackground: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);\n\tpadding: 12px 14px;\n\tbox-shadow: 0 10px 22px rgba(35, 64, 97, 0.06);\n}\n.result-stat__label[data-v-eb124490] {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n\tfont-weight: 800;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.06em;\n\tmargin-bottom: 6px;\n}\n.result-stat__value[data-v-eb124490] {\n\tfont-size: 22px;\n\tfont-weight: 900;\n\tcolor: #17324d;\n}\n.result-stat__value--text[data-v-eb124490] {\n\tfont-size: 14px;\n\tline-height: 1.25;\n}\n.result-stat__hint[data-v-eb124490] {\n\tmargin-top: 6px;\n\tfont-size: 12px;\n\tcolor: #6b7280;\n\tfont-weight: 700;\n}\n.result-filters[data-v-eb124490] {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin: 10px 0 16px;\n}\n.result-filters__label[data-v-eb124490] {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n\tfont-weight: 700;\n\tmargin-right: 4px;\n}\n.result-chip[data-v-eb124490] {\n\tborder: 1px solid #d1d5db;\n\tbackground: #fff;\n\tcolor: #374151;\n\tpadding: 6px 12px;\n\tborder-radius: 999px;\n\tfont-size: 12px;\n\tfont-weight: 800;\n\tline-height: 1;\n}\n.result-chip[data-v-eb124490]:hover {\n\tbackground: #f3f4f6;\n}\n.result-chip.is-active[data-v-eb124490] {\n\tbackground: #1976d2;\n\tborder-color: #1976d2;\n\tcolor: #fff;\n}\n.result-card[data-v-eb124490] {\n\tborder: 0;\n\tborder-radius: 16px;\n\toverflow: hidden;\n\tbox-shadow: 0 12px 28px rgba(35, 64, 97, 0.08);\n}\n.result-card__heading[data-v-eb124490] {\n\tdisplay: flex;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tbackground: linear-gradient(135deg, #1d4e89, #2f80ed);\n\tcolor: #fff;\n\tborder: 0 !important;\n}\n.result-card__title[data-v-eb124490] {\n\tfont-weight: 800;\n}\n.result-card__meta[data-v-eb124490] {\n\topacity: 0.95;\n\tfont-size: 12px;\n}\n.result-card__body[data-v-eb124490] {\n\tbackground: #fff;\n}\n.result-top-chart[data-v-eb124490] {\n\twidth: 100%;\n\theight: 280px;\n}\n.result-mini-title[data-v-eb124490] {\n\tfont-size: 12px;\n\tfont-weight: 900;\n\tletter-spacing: 0.04em;\n\ttext-transform: uppercase;\n\tcolor: #17324d;\n\tmargin-bottom: 8px;\n}\n.result-empty[data-v-eb124490] {\n\tmargin-top: 10px;\n\ttext-align: center;\n\tcolor: #6b7280;\n\tfont-style: italic;\n}\n.result-leaders[data-v-eb124490] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n.result-leader[data-v-eb124490] {\n\tpadding: 12px 12px;\n\tborder: 1px solid #eef2f7;\n\tborder-radius: 14px;\n\tbackground: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);\n}\n.result-leader__top[data-v-eb124490] {\n\tdisplay: flex;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 10px;\n\tmargin-bottom: 6px;\n}\n.result-leader__position[data-v-eb124490] {\n\tfont-weight: 900;\n\tcolor: #17324d;\n}\n.result-leader__meta[data-v-eb124490] {\n\tdisplay: flex;\n\tgap: 10px;\n\tfont-size: 12px;\n\tcolor: #17324d;\n\twhite-space: nowrap;\n}\n.result-leader__delta[data-v-eb124490] {\n\tcolor: #2f80ed;\n}\n.result-leader__name[data-v-eb124490] {\n\tfont-weight: 800;\n\tcolor: #17324d;\n\tmargin-bottom: 8px;\n}\n.result-leader__bar[data-v-eb124490] {\n\theight: 10px;\n\tborder-radius: 999px;\n\tbackground: #e8f0fb;\n\toverflow: hidden;\n}\n.result-leader__bar-fill[data-v-eb124490] {\n\theight: 100%;\n\tborder-radius: 999px;\n\tbackground: linear-gradient(90deg, #2f80ed, #1d4e89);\n}\n.result-leader__sub[data-v-eb124490] {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tmargin-top: 8px;\n\tfont-size: 12px;\n\tcolor: #6b7280;\n}\n.result-rank[data-v-eb124490] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n.result-rank__row[data-v-eb124490] {\n\tpadding: 12px 12px;\n\tborder: 1px solid #eef2f7;\n\tborder-radius: 14px;\n\tbackground: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);\n}\n.result-rank__top[data-v-eb124490] {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 10px;\n\tmargin-bottom: 8px;\n}\n.result-rank__name[data-v-eb124490] {\n\tfont-weight: 800;\n\tcolor: #17324d;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n.result-rank__votes[data-v-eb124490] {\n\tcolor: #17324d;\n\tfont-size: 12px;\n\twhite-space: nowrap;\n}\n.result-rank__bar[data-v-eb124490] {\n\theight: 10px;\n\tborder-radius: 999px;\n\tbackground: #e8f0fb;\n\toverflow: hidden;\n}\n.result-rank__bar-fill[data-v-eb124490] {\n\theight: 100%;\n\tborder-radius: 999px;\n\tbackground: linear-gradient(90deg, #2f80ed, #1d4e89);\n}\n.result-rank__meta[data-v-eb124490] {\n\tmargin-top: 6px;\n\tfont-size: 12px;\n\tcolor: #6b7280;\n\ttext-align: right;\n}\n@media (max-width: 991px) {\n.result-header[data-v-eb124490] {\n\t\tflex-direction: column;\n}\n.result-stats[data-v-eb124490] {\n\t\tgrid-template-columns: 1fr;\n}\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -18994,7 +29937,7 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n#imagePreview[data-v-389a664e] {\n width: 200px;\n height: 200px;\n border: 1px solid #ccc;\n margin-bottom: 10px;\n display: none; /* Initially hide the div */\n}\n#imagePreview img[data-v-389a664e] {\n max-width: 100%;\n max-height: 100%;\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.nominee-add-page__header[data-v-389a664e] {\n\tmargin-bottom: 12px;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid #eee;\n}\n.nominee-add-page__title[data-v-389a664e] {\n\tmargin-top: 0;\n\tmargin-bottom: 0;\n\tfont-weight: 600;\n}\n.nominee-add-page__title .fa[data-v-389a664e] {\n\tmargin-right: 6px;\n}\n.nominee-add-page__intro[data-v-389a664e] {\n\tmargin-bottom: 18px;\n}\n.nominee-add-photo .panel-heading[data-v-389a664e] {\n\tdisplay: flex;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n.nominee-add-photo__hint[data-v-389a664e] {\n\tfont-weight: normal;\n}\n.nominee-add-photo__preview[data-v-389a664e] {\n\twidth: 100%;\n\taspect-ratio: 1;\n\tmax-height: 240px;\n\tborder-radius: 4px;\n\toverflow: hidden;\n\tbackground: #f9f9f9;\n\tborder: 1px dashed #ccc;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-bottom: 12px;\n}\n.nominee-add-photo__preview--empty[data-v-389a664e] {\n\tmin-height: 180px;\n}\n.nominee-add-photo__preview img[data-v-389a664e] {\n\twidth: 100%;\n\theight: 100%;\n\t-o-object-fit: cover;\n\t object-fit: cover;\n\tdisplay: block;\n}\n.nominee-add-photo__placeholder[data-v-389a664e] {\n\ttext-align: center;\n\tcolor: #999;\n\tpadding: 16px;\n}\n.nominee-add-photo__placeholder .fa[data-v-389a664e] {\n\tfont-size: 36px;\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\topacity: 0.65;\n}\n.nominee-add-photo__placeholder span[data-v-389a664e] {\n\tdisplay: block;\n\tfont-size: 12px;\n}\n.nominee-add-photo__input[data-v-389a664e] {\n\tposition: absolute;\n\twidth: 0.1px;\n\theight: 0.1px;\n\topacity: 0;\n\toverflow: hidden;\n\tz-index: -1;\n}\n.nominee-add-photo__browse[data-v-389a664e] {\n\tmargin-bottom: 0;\n}\n.nominee-add-photo__formats[data-v-389a664e] {\n\tmargin: 8px 0 0;\n\ttext-align: center;\n}\n.nominee-add-form__rule[data-v-389a664e] {\n\tmargin-top: 8px;\n\tmargin-bottom: 16px;\n\tborder-top-color: #eee;\n}\n.nominee-add-form__actions[data-v-389a664e] {\n\ttext-align: right;\n}\n.nominee-add-form__actions .btn + .btn[data-v-389a664e] {\n\tmargin-left: 8px;\n}\n@media (max-width: 991px) {\n.nominee-add-photo[data-v-389a664e] {\n\t\tmargin-top: 8px;\n}\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19018,7 +29961,79 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n#imagePreview[data-v-f30deaa6] {\n width: 200px;\n height: 200px;\n border: 1px solid #ccc;\n margin-bottom: 10px;\n display: none; /* Initially hide the div */\n}\n#imagePreview img[data-v-f30deaa6] {\n max-width: 100%;\n max-height: 100%;\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.nominee-add-page__header[data-v-f30deaa6] {\n\tmargin-bottom: 12px;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid #eee;\n}\n.nominee-add-page__title[data-v-f30deaa6] {\n\tmargin-top: 0;\n\tmargin-bottom: 0;\n\tfont-weight: 600;\n}\n.nominee-add-page__title .fa[data-v-f30deaa6] {\n\tmargin-right: 6px;\n}\n.nominee-add-page__intro[data-v-f30deaa6] {\n\tmargin-bottom: 18px;\n}\n.nominee-add-photo .panel-heading[data-v-f30deaa6] {\n\tdisplay: flex;\n\talign-items: baseline;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n.nominee-add-photo__hint[data-v-f30deaa6] {\n\tfont-weight: normal;\n}\n.nominee-add-photo__preview[data-v-f30deaa6] {\n\twidth: 100%;\n\taspect-ratio: 1;\n\tmax-height: 240px;\n\tborder-radius: 4px;\n\toverflow: hidden;\n\tbackground: #f9f9f9;\n\tborder: 1px dashed #ccc;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-bottom: 12px;\n}\n.nominee-add-photo__preview--empty[data-v-f30deaa6] {\n\tmin-height: 180px;\n}\n.nominee-add-photo__preview img[data-v-f30deaa6] {\n\twidth: 100%;\n\theight: 100%;\n\t-o-object-fit: cover;\n\t object-fit: cover;\n\tdisplay: block;\n}\n.nominee-add-photo__placeholder[data-v-f30deaa6] {\n\ttext-align: center;\n\tcolor: #999;\n\tpadding: 16px;\n}\n.nominee-add-photo__placeholder .fa[data-v-f30deaa6] {\n\tfont-size: 36px;\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\topacity: 0.65;\n}\n.nominee-add-photo__placeholder span[data-v-f30deaa6] {\n\tdisplay: block;\n\tfont-size: 12px;\n}\n.nominee-add-photo__input[data-v-f30deaa6] {\n\tposition: absolute;\n\twidth: 0.1px;\n\theight: 0.1px;\n\topacity: 0;\n\toverflow: hidden;\n\tz-index: -1;\n}\n.nominee-add-photo__browse[data-v-f30deaa6] {\n\tmargin-bottom: 0;\n}\n.nominee-add-photo__formats[data-v-f30deaa6] {\n\tmargin: 8px 0 0;\n\ttext-align: center;\n}\n.nominee-add-form__rule[data-v-f30deaa6] {\n\tmargin-top: 8px;\n\tmargin-bottom: 16px;\n\tborder-top-color: #eee;\n}\n.nominee-add-form__actions[data-v-f30deaa6] {\n\ttext-align: right;\n}\n.nominee-add-form__actions .btn + .btn[data-v-f30deaa6] {\n\tmargin-left: 8px;\n}\n@media (max-width: 991px) {\n.nominee-add-photo[data-v-f30deaa6] {\n\t\tmargin-top: 8px;\n}\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css":
+/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css ***!
+ \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.nominee-filter-chips {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-bottom: 12px;\n}\n.nominee-chip {\n\tborder-radius: 999px;\n\tpadding: 6px 10px;\n\tline-height: 1.1;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css":
+/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css ***!
+ \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.voter-add-page__header {\n\tmargin-bottom: 12px;\n}\n.voter-add-page__header h4 {\n\tmargin-top: 0;\n}\n.voter-add-page__header-actions .btn {\n\tmargin-left: 6px;\n}\n.voter-add-page__intro {\n\tmargin-bottom: 16px;\n}\n.voter-add-split__col {\n\tmargin-bottom: 16px;\n}\n.voter-add-split__panel {\n\tmargin-bottom: 0;\n}\n.voter-batch-toolbar .form-control {\n\tmin-width: 180px;\n\tmargin-right: 8px;\n\tmargin-bottom: 8px;\n}\n.voter-batch-toolbar .btn {\n\tmargin-right: 6px;\n\tmargin-bottom: 8px;\n}\n.voter-add-table-wrap {\n\tmax-height: min(520px, calc(100vh - 280px));\n\toverflow: auto;\n\tmargin-top: 10px;\n}\n.voter-add-table-wrap--selected {\n\tmin-height: 120px;\n}\n.voter-add-empty-selected {\n\tmargin: 16px 0 0;\n}\n.voter-add-heading__loading {\n\tmargin-left: 8px;\n\tmargin-top: 3px;\n}\n.voter-add-heading__filter-hint {\n\tmargin-right: 8px;\n\tmargin-top: 4px;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css":
+/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css ***!
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.kehadiran-search {\n\tmargin: 10px 0 12px;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n.kehadiran-search__label {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n.kehadiran-search__input {\n\tmax-width: 220px;\n\theight: 34px;\n}\n.kehadiran-search__input--name {\n\tmax-width: 260px;\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19042,7 +30057,55 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.pdf-button-container {\n\ttext-align: right;\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.kehadiran-actions {\n\tmargin-bottom: 10px;\n}\n.kehadiran-search {\n\tmargin: 10px 0 12px;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n.kehadiran-search__label {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n\tfont-weight: 700;\n}\n.kehadiran-search__input {\n\tmax-width: 220px;\n\theight: 34px;\n}\n.kehadiran-filters {\n\tmargin: 6px 0 14px;\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n.kehadiran-filters--secondary {\n\tmargin-top: 0;\n}\n.kehadiran-filters__label {\n\tcolor: #6b7280;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tmargin-right: 4px;\n}\n.kehadiran-chip {\n\tborder: 1px solid #d1d5db;\n\tbackground: #fff;\n\tcolor: #374151;\n\tpadding: 6px 12px;\n\tborder-radius: 999px;\n\tfont-size: 12px;\n\tfont-weight: 700;\n\tline-height: 1;\n}\n.kehadiran-chip:hover {\n\tbackground: #f3f4f6;\n}\n.kehadiran-chip.is-active {\n\tbackground: #1976d2;\n\tborder-color: #1976d2;\n\tcolor: #fff;\n}\n.kehadiran-action-cell {\n\tdisplay: inline-flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 6px;\n}\n.kehadiran-action-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tfont-weight: 700;\n}\n.kehadiran-action-btn>i {\n\tline-height: 1;\n}\n.kehadiran-verify-lead {\n\tmargin-bottom: 12px;\n\tcolor: #374151;\n\tline-height: 1.5;\n}\n.kehadiran-verify-summary {\n\tmargin-bottom: 0;\n}\n.kehadiran-tunai-readonly {\n\tbackground-color: #f3f4f6 !important;\n\tcursor: not-allowed;\n\tcolor: #1f2937;\n}\n.kehadiran-pill {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 3px 10px;\n\tborder-radius: 999px;\n\tfont-size: 12px;\n\tfont-weight: 800;\n\tline-height: 1.4;\n\tborder: 1px solid transparent;\n\twhite-space: nowrap;\n}\n.kehadiran-pill>i {\n\tline-height: 1;\n}\n.kehadiran-pill--success {\n\tcolor: #0f5132;\n\tbackground: #d1e7dd;\n\tborder-color: #badbcc;\n}\n.kehadiran-pill--warn {\n\tcolor: #664d03;\n\tbackground: #fff3cd;\n\tborder-color: #ffecb5;\n}\n.kehadiran-pill--muted {\n\tcolor: #374151;\n\tbackground: #f3f4f6;\n\tborder-color: #e5e7eb;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css":
+/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css ***!
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n/* Boxed card-style wrapper for all voter admin pages */\n.voter-admin-wrap--boxed {\n\tbackground: #fff;\n\tborder: 1px solid #e6e6e6;\n\tborder-radius: 12px;\n\tbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n\tpadding: 16px;\n\tmargin-top: 12px;\n\tmargin-bottom: 24px;\n}\n\n/* Wide pages: not full screen, but wider than centered 8-col layout */\n.voter-admin-wrap--wide {\n\tmax-width: 1400px;\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css":
+/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css ***!
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.physical-gate-page[data-v-41674414] {\n min-height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 45%, #0f172a 100%);\n color: #e2e8f0;\n}\n.physical-gate-setup[data-v-41674414],\n.physical-gate-error[data-v-41674414] {\n max-width: 520px;\n width: 100%;\n}\n.physical-gate-title[data-v-41674414] {\n font-size: 2rem;\n font-weight: 800;\n margin-bottom: 16px;\n color: #f8fafc;\n}\n.physical-gate-hint[data-v-41674414] {\n font-size: 1.05rem;\n line-height: 1.5;\n margin-bottom: 20px;\n color: #94a3b8;\n}\n.physical-gate-key-form .btn[data-v-41674414] {\n margin-top: 12px;\n}\n.physical-gate-active[data-v-41674414] {\n text-align: center;\n width: 100%;\n max-width: 920px;\n}\n.physical-gate-label[data-v-41674414] {\n font-size: 1.4rem;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: #94a3b8;\n margin-bottom: 20px;\n}\n.physical-gate-code[data-v-41674414] {\n font-size: clamp(3.5rem, 14vw, 8rem);\n font-weight: 900;\n letter-spacing: 0.12em;\n font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;\n color: #fbbf24;\n text-shadow: 0 0 40px rgba(251, 191, 36, 0.35);\n margin-bottom: 28px;\n word-break: break-all;\n}\n.physical-gate-countdown[data-v-41674414] {\n height: 12px;\n border-radius: 999px;\n background: rgba(148, 163, 184, 0.25);\n overflow: hidden;\n margin: 0 auto 20px;\n max-width: 560px;\n}\n.physical-gate-countdown-bar[data-v-41674414] {\n display: block;\n height: 100%;\n border-radius: 999px;\n background: linear-gradient(90deg, #38bdf8, #22d3ee);\n transition: width 0.3s ease;\n}\n.physical-gate-sub[data-v-41674414] {\n font-size: 1.1rem;\n color: #94a3b8;\n margin: 0;\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19066,7 +30129,7 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.attendance-page {\n margin-top: 18px;\n margin-bottom: 36px;\n}\n.attendance-hero {\n margin-bottom: 22px;\n padding: 26px 28px;\n border-radius: 22px;\n background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);\n border: 1px solid #e2ebf5;\n box-shadow: 0 16px 34px rgba(35, 64, 97, 0.08);\n text-align: center;\n}\n.attendance-section-kicker {\n margin-bottom: 8px;\n color: #2f80ed;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.attendance-page-title,\n.attendance-card-title {\n margin: 0 0 8px;\n color: #17324d;\n font-weight: 700;\n}\n.attendance-page-subtitle {\n max-width: 700px;\n margin: 0 auto 18px;\n color: #5f7388;\n line-height: 1.6;\n}\n.attendance-download-button {\n display: inline-block;\n padding: 12px 20px;\n border-radius: 999px;\n border: 1px solid #cfe2ff;\n background: #fff;\n color: #0d6efd;\n font-weight: 700;\n text-decoration: none !important;\n box-shadow: 0 10px 24px rgba(13, 110, 253, 0.12);\n}\n.attendance-card {\n padding: 24px;\n border-radius: 20px;\n background: #fff;\n border: 1px solid #e2ebf5;\n box-shadow: 0 16px 34px rgba(35, 64, 97, 0.08);\n}\n.attendance-card-header {\n margin-bottom: 18px;\n}\n.attendance-info-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n}\n.attendance-field {\n margin-bottom: 0;\n}\n.attendance-field label,\n.attendance-choice-box label {\n display: block;\n margin-bottom: 8px;\n color: #45617b;\n font-weight: 700;\n}\n.attendance-input,\n.attendance-select {\n height: 46px;\n border-radius: 12px;\n border: 1px solid #d8e3f0;\n box-shadow: none;\n}\n.attendance-input[readonly] {\n background: #f8fbff;\n color: #1f2937;\n}\n.attendance-choice-box {\n margin-top: 20px;\n padding: 18px;\n border-radius: 16px;\n border: 1px solid #ffd9a8;\n background: linear-gradient(180deg, #fffaf2 0%, #fff4df 100%);\n box-shadow: 0 10px 24px rgba(255, 193, 7, 0.08);\n}\n.attendance-helper-text {\n display: block;\n margin-top: 10px;\n}\n.attendance-info-notice {\n margin-bottom: 0;\n padding: 16px 18px;\n border-radius: 16px;\n border: 1px solid #cde3ff;\n box-shadow: 0 10px 24px rgba(13, 110, 253, 0.08);\n}\n.attendance-info-notice p:last-child {\n margin-bottom: 0;\n}\n.attendance-action-area {\n margin-top: 26px;\n}\n.attendance-success-card {\n padding: 24px;\n border-radius: 18px;\n background: linear-gradient(135deg, #effaf2 0%, #ffffff 100%);\n border: 1px solid #ccebd7;\n box-shadow: 0 14px 28px rgba(40, 167, 69, 0.12);\n}\n.attendance-success-kicker {\n margin-bottom: 8px;\n color: #1f8b47;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.attendance-success-text {\n margin-bottom: 8px;\n color: #43617a;\n}\n.attendance-success-mode {\n margin: 0 0 18px;\n color: #0f5132;\n font-size: 2.2rem;\n font-weight: 800;\n letter-spacing: 0.05em;\n}\n.attendance-submit-button,\n.attendance-vote-button {\n min-width: 220px;\n padding: 12px 24px;\n border-radius: 999px;\n font-weight: 700;\n letter-spacing: 0.04em;\n box-shadow: 0 12px 24px rgba(35, 64, 97, 0.14);\n}\n@media (max-width: 767px) {\n.attendance-hero,\n .attendance-card {\n padding: 18px;\n border-radius: 16px;\n}\n.attendance-info-grid {\n grid-template-columns: 1fr;\n}\n.attendance-submit-button,\n .attendance-vote-button {\n width: 100%;\n min-width: 0;\n}\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.attendance-page {\n margin-top: 18px;\n margin-bottom: 36px;\n}\n.attendance-hero {\n margin-bottom: 22px;\n padding: 26px 28px;\n border-radius: 22px;\n background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);\n border: 1px solid #e2ebf5;\n box-shadow: 0 16px 34px rgba(35, 64, 97, 0.08);\n text-align: center;\n}\n.attendance-section-kicker {\n margin-bottom: 8px;\n color: #2f80ed;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.attendance-page-title,\n.attendance-card-title {\n margin: 0 0 8px;\n color: #17324d;\n font-weight: 700;\n}\n.attendance-page-subtitle {\n max-width: 700px;\n margin: 0 auto 18px;\n color: #5f7388;\n line-height: 1.6;\n}\n.attendance-download-button {\n display: inline-block;\n padding: 12px 20px;\n border-radius: 999px;\n border: 1px solid #cfe2ff;\n background: #fff;\n color: #0d6efd;\n font-weight: 700;\n text-decoration: none !important;\n box-shadow: 0 10px 24px rgba(13, 110, 253, 0.12);\n}\n.attendance-card {\n padding: 24px;\n border-radius: 20px;\n background: #fff;\n border: 1px solid #e2ebf5;\n box-shadow: 0 16px 34px rgba(35, 64, 97, 0.08);\n}\n.attendance-card-header {\n margin-bottom: 18px;\n}\n.attendance-info-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n}\n.attendance-field {\n margin-bottom: 0;\n}\n.attendance-field label,\n.attendance-choice-box label {\n display: block;\n margin-bottom: 8px;\n color: #45617b;\n font-weight: 700;\n}\n.attendance-input,\n.attendance-select {\n height: 46px;\n border-radius: 12px;\n border: 1px solid #d8e3f0;\n box-shadow: none;\n}\n.attendance-input[readonly] {\n background: #f8fbff;\n color: #1f2937;\n}\n.attendance-choice-box {\n margin-top: 20px;\n padding: 18px;\n border-radius: 16px;\n border: 1px solid #ffd9a8;\n background: linear-gradient(180deg, #fffaf2 0%, #fff4df 100%);\n box-shadow: 0 10px 24px rgba(255, 193, 7, 0.08);\n}\n.attendance-helper-text {\n display: block;\n margin-top: 10px;\n}\n.attendance-info-notice {\n margin-bottom: 0;\n padding: 16px 18px;\n border-radius: 16px;\n border: 1px solid #cde3ff;\n box-shadow: 0 10px 24px rgba(13, 110, 253, 0.08);\n}\n.attendance-info-notice p:last-child {\n margin-bottom: 0;\n}\n.attendance-action-area {\n margin-top: 26px;\n}\n.attendance-success-card {\n padding: 24px;\n border-radius: 18px;\n background: linear-gradient(135deg, #effaf2 0%, #ffffff 100%);\n border: 1px solid #ccebd7;\n box-shadow: 0 14px 28px rgba(40, 167, 69, 0.12);\n}\n.attendance-success-kicker {\n margin-bottom: 8px;\n color: #1f8b47;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.attendance-success-text {\n margin-bottom: 8px;\n color: #43617a;\n}\n.attendance-success-mode {\n margin: 0 0 18px;\n color: #0f5132;\n font-size: 2.2rem;\n font-weight: 800;\n letter-spacing: 0.05em;\n}\n.attendance-pending-card {\n padding: 24px;\n border-radius: 18px;\n background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);\n border: 1px solid #fde68a;\n box-shadow: 0 14px 28px rgba(180, 83, 9, 0.1);\n}\n.attendance-pending-kicker {\n margin-bottom: 10px;\n color: #b45309;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.attendance-pending-text {\n margin-bottom: 10px;\n color: #43617a;\n line-height: 1.55;\n}\n.attendance-pending-hint {\n margin-bottom: 18px;\n color: #6b7280;\n font-size: 0.95rem;\n line-height: 1.5;\n}\n.attendance-refresh-button {\n min-width: 180px;\n padding: 10px 20px;\n border-radius: 999px;\n font-weight: 700;\n}\n.attendance-submit-button,\n.attendance-vote-button {\n min-width: 220px;\n padding: 12px 24px;\n border-radius: 999px;\n font-weight: 700;\n letter-spacing: 0.04em;\n box-shadow: 0 12px 24px rgba(35, 64, 97, 0.14);\n}\n.attendance-voting-notice {\n max-width: 520px;\n margin: 0 auto;\n border-radius: 14px;\n}\n.attendance-voting-notice__title {\n margin: 0 0 8px;\n}\n.attendance-voting-notice__body {\n margin: 0 0 10px;\n line-height: 1.55;\n}\n@media (max-width: 767px) {\n.attendance-hero,\n .attendance-card {\n padding: 18px;\n border-radius: 16px;\n}\n.attendance-info-grid {\n grid-template-columns: 1fr;\n}\n.attendance-submit-button,\n .attendance-vote-button,\n .attendance-refresh-button {\n width: 100%;\n min-width: 0;\n}\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19090,7 +30153,7 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.voter-home-page {\n margin-top: 24px;\n margin-bottom: 40px;\n}\n.page-column {\n margin-bottom: 24px;\n}\n.hero-banner {\n position: relative;\n margin-bottom: 28px;\n border-radius: 24px;\n overflow: hidden;\n box-shadow: 0 18px 40px rgba(11, 39, 79, 0.18);\n background: #f4f8fd;\n}\n.hero-banner-image {\n width: 100%;\n max-height: 360px;\n -o-object-fit: contain;\n object-fit: contain;\n -o-object-position: center;\n object-position: center;\n display: block;\n}\n.hero-banner-caption {\n margin-top: 14px;\n margin-bottom: 6px;\n padding: 18px 20px;\n border-radius: 18px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 12px 26px rgba(35, 64, 97, 0.08);\n}\n.hero-banner-kicker {\n margin-bottom: 8px;\n color: #2f80ed;\n font-size: 1.2rem;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.hero-banner-title {\n margin: 0 0 8px;\n color: #17324d;\n font-size: 3rem;\n font-weight: 700;\n line-height: 1.2;\n}\n.hero-banner-subtitle {\n max-width: 680px;\n margin: 0;\n color: #4f6479;\n font-size: 1.5rem;\n line-height: 1.6;\n}\n.page-section-heading {\n margin-bottom: 14px;\n padding: 14px 18px;\n border-radius: 14px;\n background: linear-gradient(135deg, #0d6efd, #2f80ed);\n color: #fff;\n font-size: 1.8rem;\n font-weight: 700;\n text-align: center;\n box-shadow: 0 12px 28px rgba(13, 110, 253, 0.2);\n}\n.member-info-card {\n margin-bottom: 18px;\n padding: 6px;\n border-radius: 18px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 12px 26px rgba(35, 64, 97, 0.08);\n}\n.member-info-list {\n margin-bottom: 0;\n font-weight: bold;\n}\n.member-info-item {\n border: 0;\n border-bottom: 1px solid #edf2f7;\n padding: 14px 16px;\n}\n.member-info-item:last-child {\n border-bottom: 0;\n}\n.nominee-page-intro {\n margin-bottom: 18px;\n padding: 12px 16px;\n border-radius: 12px;\n background: #eef5ff;\n border: 1px solid #dbe8ff;\n color: #36506b;\n font-size: 1.4rem;\n}\n.nominee-panel {\n margin-bottom: 20px;\n border: 0;\n border-radius: 18px;\n overflow: hidden;\n box-shadow: 0 14px 28px rgba(35, 64, 97, 0.1);\n}\n.nominee-panel-heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: linear-gradient(135deg, #1d4e89, #2563eb);\n color: #fff;\n font-size: 1.7rem;\n font-weight: 700;\n}\n.nominee-panel-badge {\n padding: 6px 10px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.18);\n font-size: 1.2rem;\n font-weight: 600;\n}\n.nominee-panel-body {\n padding: 0;\n background: #fff;\n}\n.nominee-table {\n margin-bottom: 0;\n}\n.nominee-table thead {\n background: #f4f8fd;\n}\n.nominee-table thead th {\n border-bottom: 1px solid #dce7f5;\n color: #48627e;\n font-size: 1.25rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n.nominee-table tbody td {\n vertical-align: middle;\n border-top: 1px solid #edf2f7;\n color: #22384f;\n}\n.nominee-row {\n cursor: pointer;\n transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;\n}\n.nominee-row:hover {\n background: #f8fbff;\n box-shadow: inset 4px 0 0 #2f80ed;\n}\n.nominee-thumb {\n width: 64px;\n height: 64px;\n margin-bottom: 0;\n border: 2px solid #dbe8ff;\n border-radius: 16px;\n -o-object-fit: cover;\n object-fit: cover;\n box-shadow: 0 8px 18px rgba(47, 128, 237, 0.12);\n}\n.nominee-empty-state {\n padding: 18px !important;\n text-align: center;\n color: #6f8193;\n}\n.nominee-modal-backdrop {\n position: fixed;\n inset: 0;\n z-index: 1050;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px 16px;\n background: rgba(7, 25, 48, 0.72);\n -webkit-backdrop-filter: blur(3px);\n backdrop-filter: blur(3px);\n}\n#view-nominee-modal.modal-dialog {\n width: 100%;\n max-width: 960px;\n margin: 0;\n}\n.nominee-modal-content {\n border: 0;\n border-radius: 20px;\n overflow: hidden;\n box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);\n}\n.nominee-modal-content .modal-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 20px 24px 16px;\n border-bottom: 1px solid #e7edf5;\n background: linear-gradient(135deg, #0d6efd, #2f80ed);\n color: #fff;\n}\n.nominee-modal-content .modal-title {\n margin: 4px 0 0;\n font-size: 2.2rem;\n font-weight: 700;\n}\n.nominee-modal-content .modal-header .close {\n margin-top: -4px;\n color: #fff;\n opacity: 0.9;\n text-shadow: none;\n}\n.nominee-modal-kicker {\n font-size: 1.2rem;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n opacity: 0.85;\n}\n.nominee-modal-body {\n display: flex;\n gap: 24px;\n padding: 24px;\n background: #f5f8fc;\n}\n.photo-section {\n flex: 0 0 300px;\n}\n.nominee-photo-card {\n padding: 18px;\n border-radius: 18px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 10px 24px rgba(35, 64, 97, 0.08);\n}\n.nominee-viewed-photo {\n width: 100%;\n height: 320px;\n -o-object-fit: cover;\n object-fit: cover;\n border: 0;\n border-radius: 14px;\n margin: 0 0 16px;\n background: #eef3f8;\n}\n.nominee-photo-meta {\n text-align: center;\n}\n.nominee-name {\n font-size: 2rem;\n font-weight: 700;\n color: #17324d;\n}\n.nominee-subtitle {\n margin-top: 4px;\n font-size: 1.4rem;\n color: #5f7388;\n}\n.detail-section {\n flex: 1;\n min-width: 0;\n}\n.nominee-summary-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 14px;\n margin-bottom: 18px;\n}\n.summary-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 14px 16px;\n border-radius: 14px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 8px 22px rgba(35, 64, 97, 0.06);\n}\n.summary-label {\n font-size: 1.2rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: #6f8193;\n}\n.summary-value {\n font-size: 1.6rem;\n font-weight: 600;\n line-height: 1.4;\n color: #17324d;\n}\n.nominee-section-card {\n margin-bottom: 16px;\n padding: 18px 20px;\n border-radius: 16px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 8px 22px rgba(35, 64, 97, 0.06);\n}\n.section-title {\n margin-bottom: 12px;\n font-size: 1.5rem;\n font-weight: 700;\n color: #17324d;\n}\n.detail-list {\n margin: 0;\n padding-left: 20px;\n color: #30475f;\n}\n.detail-list li {\n margin-bottom: 8px;\n line-height: 1.6;\n}\n.detail-empty {\n margin: 0;\n color: #6f8193;\n}\n.nominee-modal-content .modal-footer {\n padding: 16px 24px 22px;\n border-top: 1px solid #e7edf5;\n background: #fff;\n}\n@media (max-width: 767px) {\n.nominee-modal-backdrop {\n align-items: flex-start;\n overflow-y: auto;\n padding: 16px 10px;\n}\n.nominee-modal-body {\n flex-direction: column;\n padding: 18px;\n}\n.photo-section {\n flex: 1 1 auto;\n}\n.nominee-viewed-photo {\n height: 260px;\n}\n.nominee-summary-grid {\n grid-template-columns: 1fr;\n}\n}\n.info-label {\n display: inline-block;\n width: 100px;\n}\n.info-separator {\n display: inline-block;\n width: 5px;\n}\n.info-value {\n display: inline-block;\n}\n.small-text {\n font-size: 1.0rem;\n}\n.watermark {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60mm;\n /* adjust size */\n opacity: 0.09;\n transform: translate(-50%, -50%);\n z-index: 5;\n}\n.kad-keahlian {\n width: 100%;\n /* responsive width */\n max-width: 400px;\n /* limit for desktop */\n aspect-ratio: 1.30 / 1;\n /* maintain card ratio */\n max-height: 200px;\n /* anda boleh cuba 220px atau 200px */\n overflow: hidden;\n /* pastikan isi tidak meletup keluar */\n\n padding: 18px;\n /* kurangkan padding supaya content muat */\n font-size: 0.8rem;\n border-radius: 12px;\n border: 3px solid #0d0d0e;\n box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);\n background: #F2F3F4;\n position: relative;\n overflow: hidden;\n font-family: Arial, sans-serif;\n padding: 20px;\n box-sizing: border-box;\n font-weight: bold;\n font-size: 0.8rem;\n /* responsive text */\n color: whitesmoke;\n cursor: pointer;\n transition: transform 0.25s ease, box-shadow 0.25s ease;\n background-image: url('/images/kad_bg.png');\n background-size: 60%;\n background-size: cover;\n background-position: center;\n}\n@media (max-height: 600px) {\n.kad-keahlian {\n max-height: 200px;\n padding: 12px;\n font-size: 0.75rem;\n}\n}\n.kad-logo {\n position: absolute;\n /* place inside kad-anggota */\n top: 10px;\n /* distance from top */\n right: 10px;\n /* distance from right */\n}\n.member-card-vertical {\n position: absolute;\n top: 20px;\n left: 0;\n writing-mode: vertical-rl;\n /* makes text vertical from top to bottom */\n text-orientation: mixed;\n /* normal letters upright */\n font-weight: bold;\n font-size: 1.5rem;\n letter-spacing: 2px;\n /* space between letters */\n padding: 5px;\n color: white;\n text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);\n}\n.kad-keahlian::before {\n content: \"\";\n position: absolute;\n /* ❗ fixed */\n background-size: 100%;\n opacity: 0.08;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.kad-keahlian:hover {\n transform: scale(1.03);\n}\n\n\n/* .kad-title {\n text-align: center;\n font-size: 1.1rem;\n font-weight: bold;\n color: white;\n text-shadow: 3px 3px 4px rgb(244, 241, 241);\n position: relative;\n z-index: 5;\n} */\n.member-details {\n font-family: Arial, sans-serif;\n font-weight: normal;\n font-size: 1.1rem;\n line-height: 1.3;\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-left: 40px;\n}\n.kad-content {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 5px;\n position: relative;\n z-index: 5;\n /* optional: rounded corners */\n}\n.kad-details {\n font-size: 0.75rem;\n font-weight: normal;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.kad-details .row {\n display: flex;\n justify-content: space-between;\n width: 100%;\n}\n.detail-item {\n position: relative;\n top: 5px;\n right: 5px;\n text-align: left;\n}\n#barcode {\n transform: scaleX(1.5);\n transform-origin: left;\n max-width: 100%;\n}\n.detail-label {\n\n text-align: left;\n /* display: inline-block; */\n}\n.detail-value {\n text-align: right;\n}\n.no-anggota {\n position: absolute;\n top: 5px;\n right: 8px;\n text-align: right;\n z-index: 10;\n /* keeps text above watermark */\n}\n.contact-info {\n text-align: right;\n /* aligns everything inside to right */\n font-size: 9px;\n /* small text for card */\n line-height: 1.2;\n color: rgb(12, 12, 12);\n}\n.contact-info i {\n margin-right: 3px;\n /* spacing between icon & text */\n font-size: 8px;\n /* icon size */\n font-weight: normal;\n}\n@media (max-width: 991px) {\n.voter-home-page {\n margin-top: 16px;\n}\n.hero-banner-image {\n max-height: 300px;\n}\n.hero-banner-title {\n font-size: 2.4rem;\n}\n}\n@media (max-width: 767px) {\n.hero-banner {\n border-radius: 18px;\n}\n.hero-banner-image {\n max-height: 240px;\n}\n.hero-banner-caption {\n padding: 16px;\n border-radius: 14px;\n}\n.hero-banner-title {\n font-size: 2rem;\n}\n.hero-banner-subtitle {\n font-size: 1.3rem;\n}\n.page-section-heading {\n font-size: 1.6rem;\n}\n.nominee-panel-heading {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n}\n.nominee-table thead th:nth-child(4),\n .nominee-table tbody td:nth-child(4),\n .nominee-table thead th:nth-child(5),\n .nominee-table tbody td:nth-child(5) {\n display: none;\n}\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.voter-home-page {\n margin-top: 16px;\n margin-bottom: 48px;\n padding-left: 0;\n padding-right: 0;\n}\n.home-hero-row {\n margin-left: 0;\n margin-right: 0;\n}\n.home-content-row {\n margin-top: 8px;\n margin-left: 0;\n margin-right: 0;\n}\n.home-column--primary {\n padding-top: 4px;\n}\n.home-column--secondary {\n padding-top: 4px;\n}\n@media (max-width: 767px) {\n.home-column--secondary {\n margin-top: 8px;\n padding-top: 0;\n}\n}\n@media (min-width: 992px) {\n.home-column--primary {\n padding-right: 20px;\n}\n.home-column--secondary {\n padding-left: 20px;\n}\n}\n\n/* —— Hero —— */\n.home-hero-wrap {\n margin-bottom: 0;\n}\n.home-hero-section {\n padding: 16px 18px 20px;\n}\n.home-hero-section .hero-banner {\n margin-bottom: 16px;\n border-radius: 18px;\n}\n.home-hero-section .hero-banner-caption {\n box-shadow: 0 8px 28px rgba(35, 64, 97, 0.08);\n}\n.hero-banner {\n position: relative;\n margin-bottom: 20px;\n border-radius: 24px;\n overflow: hidden;\n box-shadow:\n 0 20px 50px rgba(11, 39, 79, 0.2),\n 0 0 0 1px rgba(255, 255, 255, 0.06) inset;\n background: linear-gradient(145deg, #e8f0ff 0%, #f4f8fd 50%, #eef5ff 100%);\n}\n.home-hero-banner-shine {\n pointer-events: none;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 42%;\n background: linear-gradient(to top,\n rgba(13, 110, 253, 0.07) 0%,\n transparent 100%);\n}\n.hero-banner-image {\n width: 100%;\n max-height: 360px;\n -o-object-fit: contain;\n object-fit: contain;\n -o-object-position: center;\n object-position: center;\n display: block;\n}\n.hero-banner-caption {\n margin-top: 0;\n margin-bottom: 6px;\n padding: 22px 24px;\n border-radius: 20px;\n background: #fff;\n border: 1px solid rgba(13, 110, 253, 0.12);\n box-shadow:\n 0 16px 40px rgba(35, 64, 97, 0.1),\n 0 1px 0 rgba(255, 255, 255, 0.8) inset;\n}\n.hero-banner-kicker {\n margin-bottom: 10px;\n color: #2563eb;\n font-size: 1.15rem;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n.hero-banner-title {\n margin: 0 0 10px;\n color: #0f172a;\n font-size: 2.85rem;\n font-weight: 800;\n line-height: 1.15;\n letter-spacing: -0.02em;\n}\n.hero-banner-subtitle {\n max-width: 720px;\n margin: 0 0 16px;\n color: #475569;\n font-size: 1.45rem;\n line-height: 1.65;\n}\n.home-hero-strong {\n color: #1d4ed8;\n font-weight: 700;\n}\n.home-hero-badges {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 4px;\n}\n.home-badge {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 8px 14px;\n border-radius: 999px;\n font-size: 1.25rem;\n font-weight: 600;\n border: 1px solid transparent;\n}\n.home-badge .fa {\n opacity: 0.9;\n}\n.home-badge--location {\n background: #f1f5f9;\n color: #334155;\n border-color: #e2e8f0;\n}\n.home-badge--ok {\n background: linear-gradient(135deg, #ecfdf5, #d1fae5);\n color: #047857;\n border-color: rgba(16, 185, 129, 0.35);\n}\n.home-badge--pending {\n background: linear-gradient(135deg, #fffbeb, #fef3c7);\n color: #b45309;\n border-color: rgba(245, 158, 11, 0.4);\n}\n\n/* —— Section containers (hero, quick links, panels) —— */\n.home-section-container {\n background: #fff;\n border: 1px solid #e5ebf3;\n border-radius: 18px;\n box-shadow: 0 12px 32px rgba(35, 64, 97, 0.08);\n padding: 20px 22px 24px;\n margin-bottom: 28px;\n}\n.home-content-row .home-section-container {\n margin-bottom: 0;\n}\n.home-column--secondary .home-section-container:not(:last-child) {\n margin-bottom: 24px;\n}\n.home-section-heading {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 0 0 18px;\n padding-bottom: 16px;\n border-bottom: 1px solid #eef2f7;\n font-size: 1.75rem;\n font-weight: 800;\n color: #0f172a;\n letter-spacing: -0.02em;\n}\n.home-section-heading-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 12px;\n background: linear-gradient(135deg, #0d6efd, #3b82f6);\n color: #fff;\n font-size: 1.65rem;\n box-shadow: 0 8px 20px rgba(13, 110, 253, 0.28);\n flex-shrink: 0;\n}\n.home-section-heading-icon--teal {\n background: linear-gradient(135deg, #0f766e, #14b8a6);\n box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);\n}\n.home-member-card--in-section {\n background: #f8fafc;\n border: 1px solid #eef2f7;\n box-shadow: none;\n border-radius: 14px;\n}\n.home-section-container--kad .home-kad-wrap {\n padding-top: 4px;\n}\n.home-quick-links-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 16px;\n margin-bottom: 0;\n}\n.home-quick-link-wrap {\n min-width: 0;\n display: flex;\n}\n.home-quick-link-wrap .home-cta-link {\n flex: 1;\n width: 100%;\n min-height: 100%;\n margin-bottom: 0;\n}\n\n/* —— CTA tiles —— */\n.home-cta-link {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 18px 20px;\n border-radius: 16px;\n text-decoration: none !important;\n color: #fff !important;\n border: 1px solid rgba(255, 255, 255, 0.2);\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n}\n.home-cta-link:hover {\n transform: translateY(-2px);\n color: #fff !important;\n}\n.home-cta-link--indigo {\n background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 48%, #1d4ed8 100%);\n box-shadow: 0 14px 36px rgba(37, 99, 235, 0.35);\n}\n.home-cta-link--indigo:hover {\n box-shadow: 0 18px 44px rgba(37, 99, 235, 0.45);\n}\n.home-cta-link--violet {\n background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #6d28d9 100%);\n box-shadow: 0 14px 36px rgba(124, 58, 237, 0.35);\n}\n.home-cta-link--violet:hover {\n box-shadow: 0 18px 44px rgba(124, 58, 237, 0.48);\n}\n.home-cta-link--teal {\n background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #0d9488 100%);\n box-shadow: 0 14px 36px rgba(20, 184, 166, 0.32);\n}\n.home-cta-link--teal:hover {\n box-shadow: 0 18px 44px rgba(20, 184, 166, 0.45);\n}\n.home-cta-link--rose {\n background: linear-gradient(135deg, #9f1239 0%, #e11d48 50%, #be123c 100%);\n box-shadow: 0 14px 36px rgba(225, 29, 72, 0.32);\n}\n.home-cta-link--rose:hover {\n box-shadow: 0 18px 44px rgba(225, 29, 72, 0.45);\n}\n.home-cta-link--cyan {\n background: linear-gradient(135deg, #0e7490 0%, #06b6d4 50%, #0891b2 100%);\n box-shadow: 0 14px 36px rgba(6, 182, 212, 0.3);\n}\n.home-cta-link--cyan:hover {\n box-shadow: 0 18px 44px rgba(6, 182, 212, 0.42);\n}\n.home-cta-link--amber {\n background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #d97706 100%);\n box-shadow: 0 14px 36px rgba(245, 158, 11, 0.32);\n}\n.home-cta-link--amber:hover {\n box-shadow: 0 18px 44px rgba(245, 158, 11, 0.45);\n}\n.home-cta-icon {\n flex-shrink: 0;\n width: 52px;\n height: 52px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 14px;\n background: rgba(255, 255, 255, 0.15);\n font-size: 2.2rem;\n}\n.home-cta-body {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.home-cta-title {\n font-size: 1.65rem;\n font-weight: 800;\n letter-spacing: 0.02em;\n}\n.home-cta-desc {\n font-size: 1.25rem;\n opacity: 0.92;\n line-height: 1.4;\n}\n.home-cta-chevron {\n flex-shrink: 0;\n font-size: 2.4rem;\n opacity: 0.85;\n}\n.member-info-card {\n margin-bottom: 0;\n padding: 0;\n border-radius: 18px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 12px 32px rgba(35, 64, 97, 0.08);\n overflow: hidden;\n}\n.home-member-card {\n padding: 6px 0;\n}\n.member-field {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 14px 16px;\n border-bottom: 1px solid #eef2f7;\n transition: background 0.15s ease;\n}\n.member-field:last-child {\n border-bottom: 0;\n}\n.member-field:hover {\n background: #f8fafc;\n}\n.member-field-icon {\n flex-shrink: 0;\n width: 36px;\n height: 36px;\n margin-top: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n background: #eff6ff;\n color: #2563eb;\n font-size: 1.45rem;\n}\n.member-field-body {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px 18px;\n}\n.member-field-label {\n flex: 0 0 38%;\n max-width: 200px;\n font-size: 1.2rem;\n font-weight: 700;\n color: #64748b;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n padding-top: 4px;\n line-height: 1.35;\n}\n.member-field-value {\n flex: 1;\n text-align: right;\n font-size: 1.45rem;\n font-weight: 700;\n color: #0f172a;\n line-height: 1.4;\n word-break: break-word;\n}\n\n/* —— Claim —— */\n.home-claim-card {\n padding: 20px 22px;\n}\n.home-claim-locked {\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n.home-claim-locked-icon {\n flex-shrink: 0;\n width: 48px;\n height: 48px;\n border-radius: 12px;\n background: #f1f5f9;\n color: #64748b;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 2rem;\n}\n.home-claim-locked-text {\n margin: 0;\n font-size: 1.35rem;\n line-height: 1.55;\n color: #64748b;\n}\n.home-claim-hint {\n margin: 0 0 14px;\n font-size: 1.3rem;\n line-height: 1.5;\n color: #475569;\n}\n.home-claim-alert {\n margin-bottom: 12px;\n border-radius: 12px;\n font-size: 1.25rem;\n}\n.home-claim-code-box {\n margin-bottom: 16px;\n padding: 18px 16px;\n border-radius: 14px;\n background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);\n border: 2px dashed rgba(16, 185, 129, 0.45);\n text-align: center;\n}\n.home-claim-code {\n font-weight: 800;\n font-size: 2.8rem;\n letter-spacing: 0.22em;\n color: #047857;\n font-family: ui-monospace, \"Cascadia Code\", Menlo, monospace;\n line-height: 1.2;\n}\n.home-claim-expiry {\n margin-top: 10px;\n font-size: 1.2rem;\n color: #64748b;\n}\n.home-claim-btn {\n padding-top: 12px;\n padding-bottom: 12px;\n font-size: 1.35rem;\n font-weight: 700;\n border-radius: 12px;\n border: 0;\n box-shadow: 0 8px 24px rgba(13, 110, 253, 0.35);\n}\n.home-claim-btn .fa {\n margin-right: 4px;\n}\n\n/* —— Kad —— */\n.home-kad-wrap {\n display: flex;\n justify-content: center;\n padding: 8px 0 12px;\n}\n.watermark {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60mm;\n opacity: 0.09;\n transform: translate(-50%, -50%);\n z-index: 5;\n}\n.kad-keahlian {\n width: 100%;\n max-width: 420px;\n aspect-ratio: 1.3 / 1;\n max-height: 220px;\n overflow: hidden;\n padding: 20px;\n font-size: 0.8rem;\n border-radius: 16px;\n border: 1px solid rgba(255, 255, 255, 0.12);\n box-shadow:\n 0 20px 50px rgba(0, 0, 0, 0.25),\n 0 0 0 1px rgba(0, 0, 0, 0.06);\n background: #2d3748;\n position: relative;\n font-family: Arial, sans-serif;\n box-sizing: border-box;\n font-weight: bold;\n color: #f8fafc;\n cursor: default;\n transition: transform 0.25s ease, box-shadow 0.25s ease;\n background-image: url(\"/images/kad_bg.png\");\n background-size: cover;\n background-position: center;\n}\n.kad-keahlian:hover {\n transform: translateY(-3px) scale(1.01);\n box-shadow:\n 0 24px 56px rgba(0, 0, 0, 0.3),\n 0 0 0 1px rgba(255, 255, 255, 0.08);\n}\n@media (max-height: 600px) {\n.kad-keahlian {\n max-height: 200px;\n padding: 12px;\n font-size: 0.75rem;\n}\n}\n.kad-logo {\n position: absolute;\n top: 10px;\n right: 10px;\n text-align: right;\n}\n.kad-logo-img {\n width: 124px;\n height: auto;\n filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\n}\n.member-card-vertical {\n position: absolute;\n top: 18px;\n left: 0;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n font-weight: bold;\n font-size: 1.4rem;\n letter-spacing: 2px;\n padding: 5px;\n color: #fff;\n text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);\n}\n.kad-keahlian::before {\n content: \"\";\n position: absolute;\n background-size: 100%;\n opacity: 0.06;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #000;\n pointer-events: none;\n}\n.member-details {\n font-family: Arial, sans-serif;\n font-weight: normal;\n font-size: 1.05rem;\n line-height: 1.3;\n display: flex;\n flex-direction: column;\n gap: 5px;\n margin-left: 38px;\n}\n.kad-content {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 8px;\n position: relative;\n z-index: 5;\n}\n.detail-item {\n position: relative;\n text-align: left;\n}\n.detail-item--barcode {\n margin-top: 4px;\n}\n#barcode {\n transform: scaleX(1.45);\n transform-origin: left;\n max-width: 100%;\n}\n.detail-label {\n text-align: left;\n}\n.detail-value {\n text-align: right;\n}\n.no-anggota {\n position: absolute;\n top: 5px;\n right: 8px;\n text-align: right;\n z-index: 10;\n}\n.contact-info {\n text-align: right;\n font-size: 9px;\n line-height: 1.2;\n color: rgb(12, 12, 12);\n}\n.contact-info i {\n margin-right: 3px;\n font-size: 8px;\n font-weight: normal;\n}\n@media (max-width: 991px) {\n.voter-home-page {\n margin-top: 16px;\n}\n.hero-banner-image {\n max-height: 300px;\n}\n.hero-banner-title {\n font-size: 2.35rem;\n}\n.member-field-label {\n flex: 0 0 42%;\n max-width: 220px;\n}\n}\n@media (max-width: 767px) {\n.hero-banner {\n border-radius: 18px;\n}\n.hero-banner-image {\n max-height: 240px;\n}\n.hero-banner-caption {\n padding: 18px;\n border-radius: 16px;\n}\n.hero-banner-title {\n font-size: 1.95rem;\n}\n.hero-banner-subtitle {\n font-size: 1.25rem;\n}\n.home-section-container {\n padding: 16px 14px 18px;\n border-radius: 16px;\n}\n.home-hero-section {\n padding: 12px 12px 16px;\n}\n.home-section-heading {\n font-size: 1.45rem;\n gap: 10px;\n padding-bottom: 14px;\n margin-bottom: 14px;\n}\n.home-section-heading-icon {\n width: 40px;\n height: 40px;\n font-size: 1.45rem;\n}\n.home-cta-link {\n flex-wrap: wrap;\n padding: 16px;\n}\n.home-cta-title {\n font-size: 1.45rem;\n}\n.home-cta-desc {\n font-size: 1.15rem;\n}\n\n /* Butiran Keahlian: icon + stacked label/value — shorter rows, full width text */\n.home-member-card--in-section {\n border-radius: 12px;\n}\n.home-member-card--in-section .member-field {\n padding: 12px 12px;\n gap: 10px;\n align-items: flex-start;\n}\n.home-member-card--in-section .member-field-icon {\n width: 40px;\n height: 40px;\n margin-top: 0;\n font-size: 1.35rem;\n border-radius: 11px;\n}\n.home-member-card--in-section .member-field-body {\n flex-direction: column;\n align-items: stretch;\n gap: 5px;\n justify-content: flex-start;\n}\n.home-member-card--in-section .member-field-label {\n flex: none;\n max-width: none;\n width: 100%;\n padding-top: 0;\n margin: 0;\n font-size: 1.15rem;\n font-weight: 700;\n letter-spacing: 0.06em;\n color: #475569;\n text-transform: uppercase;\n line-height: 1.25;\n}\n.home-member-card--in-section .member-field-value {\n flex: none;\n width: 100%;\n text-align: left;\n font-size: 1.42rem;\n font-weight: 700;\n color: #0f172a;\n line-height: 1.35;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n.home-claim-code {\n font-size: 2.2rem;\n letter-spacing: 0.14em;\n}\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19119,6 +30182,30 @@ ___CSS_LOADER_EXPORT___.push([module.id, "\n.background-img {\n /* Styles for
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+/***/ }),
+
+/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css":
+/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css ***!
+ \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */ "./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js");
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
+// Imports
+
+var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
+// Module
+___CSS_LOADER_EXPORT___.push([module.id, "\n.voter-nominees-page {\n margin-top: 24px;\n margin-bottom: 40px;\n}\n.page-column {\n margin-bottom: 24px;\n}\n.page-section-heading {\n margin-bottom: 14px;\n padding: 14px 18px;\n border-radius: 14px;\n background: linear-gradient(135deg, #0d6efd, #2f80ed);\n color: #fff;\n font-size: 1.8rem;\n font-weight: 700;\n text-align: center;\n box-shadow: 0 12px 28px rgba(13, 110, 253, 0.2);\n}\n.nominee-page-intro {\n margin-bottom: 18px;\n padding: 12px 16px;\n border-radius: 12px;\n background: #eef5ff;\n border: 1px solid #dbe8ff;\n color: #36506b;\n font-size: 1.4rem;\n}\n.nominee-panel {\n margin-bottom: 20px;\n border: 0;\n border-radius: 18px;\n overflow: hidden;\n box-shadow: 0 14px 28px rgba(35, 64, 97, 0.1);\n}\n.nominee-panel-heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: linear-gradient(135deg, #1d4e89, #2563eb);\n color: #fff;\n font-size: 1.7rem;\n font-weight: 700;\n}\n.nominee-panel-badge {\n padding: 6px 10px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.18);\n font-size: 1.2rem;\n font-weight: 600;\n}\n.nominee-panel-body {\n padding: 0;\n background: #fff;\n}\n.nominee-table {\n margin-bottom: 0;\n}\n.nominee-table thead {\n background: #f4f8fd;\n}\n.nominee-table thead th {\n border-bottom: 1px solid #dce7f5;\n color: #48627e;\n font-size: 1.25rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n}\n.nominee-table tbody td {\n vertical-align: middle;\n border-top: 1px solid #edf2f7;\n color: #22384f;\n}\n.nominee-row {\n cursor: pointer;\n transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;\n}\n.nominee-row:hover {\n background: #f8fbff;\n box-shadow: inset 4px 0 0 #2f80ed;\n}\n.nominee-thumb {\n width: 64px;\n height: 64px;\n margin-bottom: 0;\n border: 2px solid #dbe8ff;\n border-radius: 16px;\n -o-object-fit: cover;\n object-fit: cover;\n box-shadow: 0 8px 18px rgba(47, 128, 237, 0.12);\n}\n.nominee-empty-state {\n padding: 18px !important;\n text-align: center;\n color: #6f8193;\n}\n.nominee-modal-backdrop {\n position: fixed;\n inset: 0;\n z-index: 1050;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px 16px;\n background: rgba(7, 25, 48, 0.72);\n -webkit-backdrop-filter: blur(3px);\n backdrop-filter: blur(3px);\n}\n#view-nominee-modal.modal-dialog {\n width: 100%;\n max-width: 960px;\n margin: 0;\n}\n.nominee-modal-content {\n border: 0;\n border-radius: 20px;\n overflow: hidden;\n box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);\n}\n.nominee-modal-content .modal-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding: 20px 24px 16px;\n border-bottom: 1px solid #e7edf5;\n background: linear-gradient(135deg, #0d6efd, #2f80ed);\n color: #fff;\n}\n.nominee-modal-content .modal-title {\n margin: 4px 0 0;\n font-size: 2.2rem;\n font-weight: 700;\n}\n.nominee-modal-content .modal-header .close {\n margin-top: -4px;\n color: #fff;\n opacity: 0.9;\n text-shadow: none;\n}\n.nominee-modal-kicker {\n font-size: 1.2rem;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n opacity: 0.85;\n}\n.nominee-modal-body {\n display: flex;\n gap: 24px;\n padding: 24px;\n background: #f5f8fc;\n}\n.photo-section {\n flex: 0 0 300px;\n}\n.nominee-photo-card {\n padding: 18px;\n border-radius: 18px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 10px 24px rgba(35, 64, 97, 0.08);\n}\n.nominee-viewed-photo {\n width: 100%;\n height: 320px;\n -o-object-fit: cover;\n object-fit: cover;\n border: 0;\n border-radius: 14px;\n margin: 0 0 16px;\n background: #eef3f8;\n}\n.nominee-photo-meta {\n text-align: center;\n}\n.nominee-name {\n font-size: 2rem;\n font-weight: 700;\n color: #17324d;\n}\n.nominee-subtitle {\n margin-top: 4px;\n font-size: 1.4rem;\n color: #5f7388;\n}\n.detail-section {\n flex: 1;\n min-width: 0;\n}\n.nominee-summary-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 14px;\n margin-bottom: 18px;\n}\n.summary-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 14px 16px;\n border-radius: 14px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 8px 22px rgba(35, 64, 97, 0.06);\n}\n.summary-label {\n font-size: 1.2rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: #6f8193;\n}\n.summary-value {\n font-size: 1.6rem;\n font-weight: 600;\n line-height: 1.4;\n color: #17324d;\n}\n.nominee-section-card {\n margin-bottom: 16px;\n padding: 18px 20px;\n border-radius: 16px;\n background: #fff;\n border: 1px solid #e5ebf3;\n box-shadow: 0 8px 22px rgba(35, 64, 97, 0.06);\n}\n.section-title {\n margin-bottom: 12px;\n font-size: 1.5rem;\n font-weight: 700;\n color: #17324d;\n}\n.detail-list {\n margin: 0;\n padding-left: 20px;\n color: #30475f;\n}\n.detail-list li {\n margin-bottom: 8px;\n line-height: 1.6;\n}\n.detail-empty {\n margin: 0;\n color: #6f8193;\n}\n.nominee-modal-content .modal-footer {\n padding: 16px 24px 22px;\n border-top: 1px solid #e7edf5;\n background: #fff;\n}\n@media (max-width: 767px) {\n.nominee-modal-backdrop {\n align-items: flex-start;\n overflow-y: auto;\n padding: 16px 10px;\n}\n.nominee-modal-body {\n flex-direction: column;\n padding: 18px;\n}\n.photo-section {\n flex: 1 1 auto;\n}\n.nominee-viewed-photo {\n height: 260px;\n}\n.nominee-summary-grid {\n grid-template-columns: 1fr;\n}\n.page-section-heading {\n font-size: 1.6rem;\n}\n.nominee-panel-heading {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n}\n.nominee-table thead th:nth-child(4),\n .nominee-table tbody td:nth-child(4),\n .nominee-table thead th:nth-child(5),\n .nominee-table tbody td:nth-child(5) {\n display: none;\n}\n}\n@media (max-width: 991px) {\n.voter-nominees-page {\n margin-top: 16px;\n}\n}\n", ""]);
+// Exports
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
+
+
/***/ }),
/***/ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=style&index=0&id=53adb7ac&scoped=true&lang=css":
@@ -19210,7 +30297,7 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.floating-header[data-v-bfe9a194] {\n\tposition: fixed !important;\n\ttop: 16px !important;\n\tleft: 16px !important;\n\tright: 16px !important;\n\twidth: calc(100% - 32px) !important;\n\tmargin: 0;\n\tborder-radius: 16px !important;\n\tz-index: 2000 !important;\n\ttransition: all 0.3s ease !important;\n}\n.logo-header[data-v-bfe9a194] {\n\tbackground: linear-gradient(135deg,\n\t\t\trgba(255, 255, 255, 0.96) 0%,\n\t\t\trgb(8, 0, 126) 48%,\n\t\t\trgb(255, 0, 0) 100%) !important;\n\tborder: 1px solid rgba(255, 255, 255, 0.25) !important;\n\tbox-shadow:\n\t\t0 8px 32px rgba(33, 150, 243, 0.35),\n\t\t0 4px 16px rgba(2, 19, 36, 0.28) !important;\n\t-webkit-backdrop-filter: blur(12px) !important;\n\t backdrop-filter: blur(12px) !important;\n\tposition: fixed;\n\toverflow: visible;\n}\n.logo-header[data-v-bfe9a194]::before {\n\tcontent: '';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tbackground: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);\n\tpointer-events: none;\n\tz-index: 0;\n}\n.logo-header>*[data-v-bfe9a194] {\n\tposition: relative;\n\tz-index: 1;\n}\n.logo-section[data-v-bfe9a194] {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 24px;\n\tmargin-left: 24px;\n\tflex-shrink: 0;\n}\n#nav.navbar[data-v-bfe9a194] {\n\tborder: none;\n\tmin-height: 78px;\n}\n#nav .container[data-v-bfe9a194] {\n\twidth: 100%;\n\tpadding-left: 12px;\n\tpadding-right: 12px;\n\toverflow: visible;\n}\n#nav .navbar-brand[data-v-bfe9a194] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\theight: auto;\n\tpadding: 14px 0;\n\tcolor: #1f2937;\n\tfont-weight: 700;\n\ttext-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);\n}\n.logo-title[data-v-bfe9a194] {\n\tdisplay: inline-block;\n\tcolor: #1f2937 !important;\n\tfont-size: 1.8rem;\n\tfont-weight: 700;\n\ttext-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);\n}\n#nav .nav>li>a[data-v-bfe9a194],\n#nav .navbar-toggle[data-v-bfe9a194] {\n\tcolor: #f8fbff;\n\tfont-weight: 700;\n\tletter-spacing: 0.02em;\n}\n#nav .nav>li>a[data-v-bfe9a194]:hover,\n#nav .nav>li.active>a[data-v-bfe9a194],\n#nav .nav>li.active>a[data-v-bfe9a194]:hover,\n#nav .nav>li.active>a[data-v-bfe9a194]:focus,\n#nav .navbar-brand[data-v-bfe9a194]:hover {\n\tcolor: #fff;\n\tbackground: rgba(204, 0, 0, 0.833);\n}\n#nav .nav>li>a[data-v-bfe9a194] {\n\tborder-radius: 10px;\n\tmargin-top: 18px;\n\tmargin-bottom: 18px;\n\tpadding-top: 12px;\n\tpadding-bottom: 12px;\n}\n#nav .navbar-right[data-v-bfe9a194] {\n\tmargin-right: 8px;\n}\n#nav .navbar-nav>li[data-v-bfe9a194],\n#nav .dropdown[data-v-bfe9a194] {\n\tposition: relative;\n}\n#nav .dropdown-menu[data-v-bfe9a194] {\n\tmargin-top: 6px;\n\tborder: 0;\n\tborder-radius: 12px;\n\tbox-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);\n\tz-index: 2101;\n}\n#nav .dropdown-menu>li>a[data-v-bfe9a194] {\n\tcolor: #2c3e50;\n}\n#nav .dropdown-menu>li>a[data-v-bfe9a194]:hover {\n\tbackground-color: #f39c12;\n\tcolor: white;\n}\n#nav .navbar-toggle[data-v-bfe9a194] {\n\tmargin-top: 20px;\n\tmargin-right: 18px;\n\tborder-color: rgba(255, 255, 255, 0.35);\n\tbackground: rgba(255, 255, 255, 0.08);\n}\n#nav .navbar-toggle .icon-bar[data-v-bfe9a194] {\n\tbackground-color: #fff;\n}\n.navbar-brand img[data-v-bfe9a194] {\n\tbackground: transparent !important;\n\tbox-shadow: none;\n}\n.voter-main[data-v-bfe9a194] {\n\tpadding-top: 112px;\n}\n@media (max-width: 767px) {\n.floating-header[data-v-bfe9a194] {\n\t\ttop: 10px !important;\n\t\tleft: 10px !important;\n\t\tright: 10px !important;\n\t\twidth: calc(100% - 20px) !important;\n\t\tborder-radius: 14px !important;\n}\n.logo-section[data-v-bfe9a194] {\n\t\tmargin-left: 16px;\n\t\tmargin-right: 8px;\n}\n.logo-title[data-v-bfe9a194] {\n\t\tfont-size: 1.4rem;\n}\n#nav .navbar-brand img[data-v-bfe9a194] {\n\t\twidth: 120px;\n}\n#nav .navbar-collapse[data-v-bfe9a194] {\n\t\tborder-top: 0;\n\t\tbox-shadow: none;\n\t\tpadding-bottom: 12px;\n\t\toverflow: visible;\n}\n#nav .nav>li>a[data-v-bfe9a194] {\n\t\tmargin: 4px 10px;\n}\n.voter-main[data-v-bfe9a194] {\n\t\tpadding-top: 102px;\n}\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.floating-header[data-v-bfe9a194] {\n\tposition: fixed !important;\n\ttop: 16px !important;\n\tleft: 16px !important;\n\tright: 16px !important;\n\twidth: calc(100% - 32px) !important;\n\tmargin: 0;\n\tborder-radius: 16px !important;\n\tz-index: 2000 !important;\n\ttransition: all 0.3s ease !important;\n}\n.logo-header[data-v-bfe9a194] {\n\tbackground: linear-gradient(135deg,\n\t\t\trgba(255, 255, 255, 0.96) 0%,\n\t\t\trgb(8, 0, 126) 48%,\n\t\t\trgb(255, 0, 0) 100%) !important;\n\tborder: 1px solid rgba(255, 255, 255, 0.25) !important;\n\tbox-shadow:\n\t\t0 8px 32px rgba(33, 150, 243, 0.35),\n\t\t0 4px 16px rgba(2, 19, 36, 0.28) !important;\n\t-webkit-backdrop-filter: blur(12px) !important;\n\t backdrop-filter: blur(12px) !important;\n\tposition: fixed;\n\toverflow: visible;\n}\n.logo-header[data-v-bfe9a194]::before {\n\tcontent: '';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tbackground: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);\n\tpointer-events: none;\n\tz-index: 0;\n}\n.logo-header>*[data-v-bfe9a194] {\n\tposition: relative;\n\tz-index: 1;\n}\n.logo-section[data-v-bfe9a194] {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 24px;\n\tmargin-left: 24px;\n\tflex-shrink: 0;\n}\n#nav.navbar[data-v-bfe9a194] {\n\tborder: none;\n\tmin-height: 78px;\n}\n#nav .container[data-v-bfe9a194] {\n\twidth: 100%;\n\tpadding-left: 12px;\n\tpadding-right: 12px;\n\toverflow: visible;\n}\n#nav .navbar-brand[data-v-bfe9a194] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\theight: auto;\n\tpadding: 14px 0;\n\tcolor: #1f2937;\n\tfont-weight: 700;\n\ttext-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);\n}\n.logo-title[data-v-bfe9a194] {\n\tdisplay: inline-block;\n\tcolor: #1f2937 !important;\n\tfont-size: 1.8rem;\n\tfont-weight: 700;\n\ttext-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);\n}\n#nav .nav>li>a[data-v-bfe9a194],\n#nav .navbar-toggle[data-v-bfe9a194] {\n\tcolor: #f8fbff;\n\tfont-weight: 700;\n\tletter-spacing: 0.02em;\n}\n#nav .nav>li>a[data-v-bfe9a194]:hover,\n#nav .nav>li.active>a[data-v-bfe9a194],\n#nav .nav>li.active>a[data-v-bfe9a194]:hover,\n#nav .nav>li.active>a[data-v-bfe9a194]:focus,\n#nav .navbar-brand[data-v-bfe9a194]:hover {\n\tcolor: #fff;\n\tbackground: rgba(204, 0, 0, 0.833);\n}\n#nav .nav>li>a[data-v-bfe9a194] {\n\tborder-radius: 10px;\n\tmargin-top: 18px;\n\tmargin-bottom: 18px;\n\tpadding-top: 12px;\n\tpadding-bottom: 12px;\n}\n#nav .navbar-right[data-v-bfe9a194] {\n\tmargin-right: 8px;\n}\n#nav .navbar-nav>li[data-v-bfe9a194],\n#nav .dropdown[data-v-bfe9a194] {\n\tposition: relative;\n}\n#nav .dropdown-menu[data-v-bfe9a194] {\n\tmargin-top: 6px;\n\tborder: 0;\n\tborder-radius: 12px;\n\tbox-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);\n\tz-index: 2101;\n}\n#nav .dropdown-menu>li>a[data-v-bfe9a194] {\n\tcolor: #2c3e50;\n}\n#nav .dropdown-menu>li>a[data-v-bfe9a194]:hover {\n\tbackground-color: #f39c12;\n\tcolor: white;\n}\n#nav .navbar-toggle[data-v-bfe9a194] {\n\tmargin-top: 20px;\n\tmargin-right: 18px;\n\tborder-color: rgba(255, 255, 255, 0.35);\n\tbackground: rgba(255, 255, 255, 0.08);\n}\n#nav .navbar-toggle .icon-bar[data-v-bfe9a194] {\n\tbackground-color: #fff;\n}\n.navbar-brand img[data-v-bfe9a194] {\n\tbackground: transparent !important;\n\tbox-shadow: none;\n}\n.voter-main[data-v-bfe9a194] {\n\tpadding-top: 112px;\n}\n.voter-breadcrumb-wrap[data-v-bfe9a194] {\n\tmargin: 0 16px 8px;\n\tpadding: 0;\n\tposition: relative;\n\tz-index: 5;\n}\n.voter-breadcrumb-wrap .container-fluid[data-v-bfe9a194] {\n\tpadding-left: 15px;\n\tpadding-right: 15px;\n}\n.voter-breadcrumb[data-v-bfe9a194] {\n\tmargin-bottom: 16px;\n\tpadding: 14px 20px;\n\tborder-radius: 14px;\n\tbackground: rgba(255, 255, 255, 0.92);\n\tborder: 1px solid #e5ebf3;\n\tbox-shadow: 0 8px 22px rgba(35, 64, 97, 0.1);\n\tfont-size: 1.7rem;\n\tline-height: 1.45;\n}\n.voter-breadcrumb>li[data-v-bfe9a194] {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n.voter-breadcrumb>li+li[data-v-bfe9a194]:before {\n\tcolor: #94a3b8;\n\tpadding: 0 12px;\n\tfont-size: 1.35rem;\n\tfont-weight: 600;\n}\n.voter-breadcrumb>li>a[data-v-bfe9a194] {\n\tcolor: #2563eb;\n\tfont-weight: 600;\n}\n.voter-breadcrumb>li>a[data-v-bfe9a194]:hover {\n\tcolor: #1d4ed8;\n\ttext-decoration: underline;\n}\n.voter-breadcrumb>li.active[data-v-bfe9a194] {\n\tcolor: #17324d;\n\tfont-weight: 700;\n\tfont-size: 1.7rem;\n}\n@media (max-width: 767px) {\n.floating-header[data-v-bfe9a194] {\n\t\ttop: 10px !important;\n\t\tleft: 10px !important;\n\t\tright: 10px !important;\n\t\twidth: calc(100% - 20px) !important;\n\t\tborder-radius: 14px !important;\n}\n.logo-section[data-v-bfe9a194] {\n\t\tmargin-left: 16px;\n\t\tmargin-right: 8px;\n}\n.logo-title[data-v-bfe9a194] {\n\t\tfont-size: 1.4rem;\n}\n#nav .navbar-brand img[data-v-bfe9a194] {\n\t\twidth: 120px;\n}\n#nav .navbar-collapse[data-v-bfe9a194] {\n\t\tborder-top: 0;\n\t\tbox-shadow: none;\n\t\tpadding-bottom: 12px;\n\t\toverflow: visible;\n}\n#nav .nav>li>a[data-v-bfe9a194] {\n\t\tmargin: 4px 10px;\n}\n.voter-main[data-v-bfe9a194] {\n\t\tpadding-top: 102px;\n}\n.voter-breadcrumb-wrap[data-v-bfe9a194] {\n\t\tmargin-left: 10px;\n\t\tmargin-right: 10px;\n}\n.voter-breadcrumb[data-v-bfe9a194] {\n\t\tfont-size: 1.4rem;\n\t\tline-height: 1.4;\n\t\tpadding: 12px 16px;\n\t\tborder-radius: 12px;\n}\n.voter-breadcrumb>li.active[data-v-bfe9a194] {\n\t\tfont-size: 1.4rem;\n}\n.voter-breadcrumb>li+li[data-v-bfe9a194]:before {\n\t\tpadding: 0 8px;\n\t\tfont-size: 1.2rem;\n}\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19258,7 +30345,7 @@ __webpack_require__.r(__webpack_exports__);
var ___CSS_LOADER_EXPORT___ = _node_modules_laravel_mix_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
// Module
-___CSS_LOADER_EXPORT___.push([module.id, "\n.otp-input {\n width: 40px;\n height: 40px;\n padding: 5px;\n margin: 0 10px;\n font-size: 20px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.3);\n text-align: center;\n&.error {\n border: 1px solid red !important;\n}\n}\n.otp-input::-webkit-inner-spin-button,\n.otp-input::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n", ""]);
+___CSS_LOADER_EXPORT___.push([module.id, "\n.otp-input {\n width: 40px;\n height: 40px;\n padding: 5px;\n margin: 0 10px;\n font-size: 20px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.3);\n text-align: center;\n}\n.otp-input.error {\n border: 1px solid red !important;\n}\n.otp-input::-webkit-inner-spin-button,\n.otp-input::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n", ""]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
@@ -19594,6 +30681,96 @@ process.chdir = function (dir) {
process.umask = function() { return 0; };
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css":
+/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css ***!
+ \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_style_index_0_id_5dc641a8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_style_index_0_id_5dc641a8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_style_index_0_id_5dc641a8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css":
+/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css ***!
+ \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_style_index_0_id_1369a02f_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_style_index_0_id_1369a02f_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_style_index_0_id_1369a02f_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css":
+/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css ***!
+ \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_style_index_0_id_653cb532_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_style_index_0_id_653cb532_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_style_index_0_id_653cb532_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
/***/ }),
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/admin/beliankomoditi.vue?vue&type=style&index=0&id=77f51ad2&scoped=true&lang=css":
@@ -19716,6 +30893,36 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/***/ }),
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css":
+/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css ***!
+ \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_style_index_0_id_eb124490_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_style_index_0_id_eb124490_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_style_index_0_id_eb124490_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/index.vue?vue&type=style&index=0&id=5bbb2a06&scoped=true&lang=css":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/index.vue?vue&type=style&index=0&id=5bbb2a06&scoped=true&lang=css ***!
@@ -19836,6 +31043,96 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/***/ }),
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css":
+/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css ***!
+ \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_eb3ff682_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=eb3ff682&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_eb3ff682_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_eb3ff682_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css":
+/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css ***!
+ \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_add_vue_vue_type_style_index_0_id_7c4e8cf6_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_add_vue_vue_type_style_index_0_id_7c4e8cf6_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_add_vue_vue_type_style_index_0_id_7c4e8cf6_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css":
+/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css ***!
+ \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_85533394_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=85533394&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_85533394_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_85533394_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/kehadiran.vue?vue&type=style&index=0&id=4348f66b&lang=css":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/kehadiran.vue?vue&type=style&index=0&id=4348f66b&lang=css ***!
@@ -19866,6 +31163,66 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/***/ }),
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css":
+/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css ***!
+ \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_voter_vue_vue_type_style_index_0_id_0a7f45a8_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_voter_vue_vue_type_style_index_0_id_0a7f45a8_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_voter_vue_vue_type_style_index_0_id_0a7f45a8_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css":
+/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css ***!
+ \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_style_index_0_id_41674414_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_style_index_0_id_41674414_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_style_index_0_id_41674414_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=style&index=0&id=b9806c06&lang=css":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=style&index=0&id=b9806c06&lang=css ***!
@@ -19956,6 +31313,36 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
/***/ }),
+/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css":
+/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css ***!
+ \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
+/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_style_index_0_id_a130fa54_lang_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css */ "./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css");
+
+
+
+var options = {};
+
+options.insert = "head";
+options.singleton = false;
+
+var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_style_index_0_id_a130fa54_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"], options);
+
+
+
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_style_index_0_id_a130fa54_lang_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {});
+
+/***/ }),
+
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=style&index=0&id=53adb7ac&scoped=true&lang=css":
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=style&index=0&id=53adb7ac&scoped=true&lang=css ***!
@@ -20475,6 +31862,168 @@ module.exports = function (list, options) {
/***/ }),
+/***/ "./resources/assets/js/components/AdminDataTable.vue":
+/*!***********************************************************!*\
+ !*** ./resources/assets/js/components/AdminDataTable.vue ***!
+ \***********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true */ "./resources/assets/js/components/AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true");
+/* harmony import */ var _AdminDataTable_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AdminDataTable.vue?vue&type=script&lang=js */ "./resources/assets/js/components/AdminDataTable.vue?vue&type=script&lang=js");
+/* harmony import */ var _AdminDataTable_vue_vue_type_style_index_0_id_5dc641a8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css */ "./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+;
+
+
+/* normalize component */
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ _AdminDataTable_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
+ _AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ "5dc641a8",
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/AdminDataTable.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue":
+/*!**************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheel.vue ***!
+ \**************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true */ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true");
+/* harmony import */ var _RouletteEliminationWheel_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RouletteEliminationWheel.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=script&lang=js");
+/* harmony import */ var _RouletteEliminationWheel_vue_vue_type_style_index_0_id_1369a02f_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css */ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+;
+
+
+/* normalize component */
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ _RouletteEliminationWheel_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
+ _RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ "1369a02f",
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/demo/RouletteEliminationWheel.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue":
+/*!******************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue ***!
+ \******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true */ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true");
+/* harmony import */ var _RouletteEliminationWheelDemo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RouletteEliminationWheelDemo.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=script&lang=js");
+/* harmony import */ var _RouletteEliminationWheelDemo_vue_vue_type_style_index_0_id_653cb532_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css */ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+;
+
+
+/* normalize component */
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ _RouletteEliminationWheelDemo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
+ _RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ "653cb532",
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/activitylog/index.vue":
+/*!*************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/activitylog/index.vue ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=5113f27a */ "./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=template&id=5113f27a");
+/* harmony import */ var _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=script&lang=js");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+
+
+/* normalize component */
+;
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+ _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__.render,
+ _index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ null,
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/demo/admin/activitylog/index.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/admin/admin/add.vue":
/*!*****************************************************************!*\
!*** ./resources/assets/js/components/demo/admin/admin/add.vue ***!
@@ -21001,23 +32550,25 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
-/* harmony import */ var _result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./result.vue?vue&type=template&id=eb124490 */ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490");
+/* harmony import */ var _result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./result.vue?vue&type=template&id=eb124490&scoped=true */ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490&scoped=true");
/* harmony import */ var _result_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./result.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+/* harmony import */ var _result_vue_vue_type_style_index_0_id_eb124490_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css */ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+;
/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_result_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
- _result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__.render,
- _result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ _result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
+ _result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
false,
null,
- null,
+ "eb124490",
null
)
@@ -21206,15 +32757,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _index_vue_vue_type_template_id_eb3ff682__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=eb3ff682 */ "./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=template&id=eb3ff682");
/* harmony import */ var _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+/* harmony import */ var _index_vue_vue_type_style_index_0_id_eb3ff682_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&id=eb3ff682&lang=css */ "./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+;
/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
_index_vue_vue_type_template_id_eb3ff682__WEBPACK_IMPORTED_MODULE_0__.render,
_index_vue_vue_type_template_id_eb3ff682__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
@@ -21596,15 +33149,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _add_vue_vue_type_template_id_7c4e8cf6__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.vue?vue&type=template&id=7c4e8cf6 */ "./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=template&id=7c4e8cf6");
/* harmony import */ var _add_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./add.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+/* harmony import */ var _add_vue_vue_type_style_index_0_id_7c4e8cf6_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css */ "./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+;
/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_add_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
_add_vue_vue_type_template_id_7c4e8cf6__WEBPACK_IMPORTED_MODULE_0__.render,
_add_vue_vue_type_template_id_7c4e8cf6__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
@@ -21713,15 +33268,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _index_vue_vue_type_template_id_85533394__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=85533394 */ "./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=template&id=85533394");
/* harmony import */ var _index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+/* harmony import */ var _index_vue_vue_type_style_index_0_id_85533394_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.vue?vue&type=style&index=0&id=85533394&lang=css */ "./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+;
/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
_index_vue_vue_type_template_id_85533394__WEBPACK_IMPORTED_MODULE_0__.render,
_index_vue_vue_type_template_id_85533394__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
@@ -21871,15 +33428,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _voter_vue_vue_type_template_id_0a7f45a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./voter.vue?vue&type=template&id=0a7f45a8 */ "./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=template&id=0a7f45a8");
/* harmony import */ var _voter_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./voter.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+/* harmony import */ var _voter_vue_vue_type_style_index_0_id_0a7f45a8_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css */ "./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+;
/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_voter_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
_voter_vue_vue_type_template_id_0a7f45a8__WEBPACK_IMPORTED_MODULE_0__.render,
_voter_vue_vue_type_template_id_0a7f45a8__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
@@ -21897,6 +33456,47 @@ component.options.__file = "resources/assets/js/components/demo/admin/voter/vote
/***/ }),
+/***/ "./resources/assets/js/components/demo/display/physical-gate-display.vue":
+/*!*******************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/display/physical-gate-display.vue ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./physical-gate-display.vue?vue&type=template&id=41674414&scoped=true */ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=template&id=41674414&scoped=true");
+/* harmony import */ var _physical_gate_display_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./physical-gate-display.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=script&lang=js");
+/* harmony import */ var _physical_gate_display_vue_vue_type_style_index_0_id_41674414_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css */ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+;
+
+
+/* normalize component */
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ _physical_gate_display_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
+ _physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ "41674414",
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/demo/display/physical-gate-display.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/voter/home/attendance.vue":
/*!***********************************************************************!*\
!*** ./resources/assets/js/components/demo/voter/home/attendance.vue ***!
@@ -22020,6 +33620,47 @@ component.options.__file = "resources/assets/js/components/demo/voter/home/mat.v
/***/ }),
+/***/ "./resources/assets/js/components/demo/voter/home/nominees.vue":
+/*!*********************************************************************!*\
+ !*** ./resources/assets/js/components/demo/voter/home/nominees.vue ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nominees.vue?vue&type=template&id=a130fa54 */ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=template&id=a130fa54");
+/* harmony import */ var _nominees_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nominees.vue?vue&type=script&lang=js */ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=script&lang=js");
+/* harmony import */ var _nominees_vue_vue_type_style_index_0_id_a130fa54_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css */ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css");
+/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
+
+
+
+;
+
+
+/* normalize component */
+
+var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
+ _nominees_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
+ _nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__.render,
+ _nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
+ false,
+ null,
+ null,
+ null
+
+)
+
+/* hot reload */
+if (false) { var api; }
+component.options.__file = "resources/assets/js/components/demo/voter/home/nominees.vue"
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/voter/home/penyata.vue":
/*!********************************************************************!*\
!*** ./resources/assets/js/components/demo/voter/home/penyata.vue ***!
@@ -22305,45 +33946,6 @@ component.options.__file = "resources/assets/js/components/demo/voter/verificati
/***/ }),
-/***/ "./resources/assets/js/components/mycomponents/countdown.vue":
-/*!*******************************************************************!*\
- !*** ./resources/assets/js/components/mycomponents/countdown.vue ***!
- \*******************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
-/* harmony export */ });
-/* harmony import */ var _countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./countdown.vue?vue&type=template&id=ce413a0a */ "./resources/assets/js/components/mycomponents/countdown.vue?vue&type=template&id=ce413a0a");
-/* harmony import */ var _countdown_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./countdown.vue?vue&type=script&lang=js */ "./resources/assets/js/components/mycomponents/countdown.vue?vue&type=script&lang=js");
-/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
-
-
-
-
-
-/* normalize component */
-;
-var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
- _countdown_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
- _countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__.render,
- _countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
- false,
- null,
- null,
- null
-
-)
-
-/* hot reload */
-if (false) { var api; }
-component.options.__file = "resources/assets/js/components/mycomponents/countdown.vue"
-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
-
-/***/ }),
-
/***/ "./resources/assets/js/components/mycomponents/modal/body.vue":
/*!********************************************************************!*\
!*** ./resources/assets/js/components/mycomponents/modal/body.vue ***!
@@ -22537,6 +34139,70 @@ component.options.__file = "resources/assets/js/components/mycomponents/uploader
/***/ }),
+/***/ "./resources/assets/js/components/AdminDataTable.vue?vue&type=script&lang=js":
+/*!***********************************************************************************!*\
+ !*** ./resources/assets/js/components/AdminDataTable.vue?vue&type=script&lang=js ***!
+ \***********************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminDataTable.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=script&lang=js":
+/*!**************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=script&lang=js ***!
+ \**************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheel.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=script&lang=js":
+/*!******************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=script&lang=js ***!
+ \******************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheelDemo.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=script&lang=js":
+/*!*************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=script&lang=js ***!
+ \*************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/admin/admin/add.vue?vue&type=script&lang=js":
/*!*****************************************************************************************!*\
!*** ./resources/assets/js/components/demo/admin/admin/add.vue?vue&type=script&lang=js ***!
@@ -23113,6 +34779,22 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
+/***/ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=script&lang=js":
+/*!*******************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=script&lang=js ***!
+ \*******************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./physical-gate-display.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=script&lang=js":
/*!***********************************************************************************************!*\
!*** ./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=script&lang=js ***!
@@ -23161,6 +34843,22 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
+/***/ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=script&lang=js":
+/*!*********************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=script&lang=js ***!
+ \*********************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./nominees.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=script&lang=js");
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+
+/***/ }),
+
/***/ "./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=script&lang=js":
/*!********************************************************************************************!*\
!*** ./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=script&lang=js ***!
@@ -23273,22 +34971,6 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/***/ "./resources/assets/js/components/mycomponents/countdown.vue?vue&type=script&lang=js":
-/*!*******************************************************************************************!*\
- !*** ./resources/assets/js/components/mycomponents/countdown.vue?vue&type=script&lang=js ***!
- \*******************************************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
-/* harmony export */ });
-/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_countdown_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./countdown.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/mycomponents/countdown.vue?vue&type=script&lang=js");
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_countdown_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
-
-/***/ }),
-
/***/ "./resources/assets/js/components/mycomponents/modal/modal.vue?vue&type=script&lang=js":
/*!*********************************************************************************************!*\
!*** ./resources/assets/js/components/mycomponents/modal/modal.vue?vue&type=script&lang=js ***!
@@ -23319,6 +35001,74 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_uploader_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./uploader.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/mycomponents/uploader.vue?vue&type=script&lang=js");
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_uploader_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
+/***/ }),
+
+/***/ "./resources/assets/js/components/AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true":
+/*!*****************************************************************************************************!*\
+ !*** ./resources/assets/js/components/AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true ***!
+ \*****************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_template_id_5dc641a8_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=template&id=5dc641a8&scoped=true");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true":
+/*!********************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true ***!
+ \********************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_template_id_1369a02f_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=template&id=1369a02f&scoped=true");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true":
+/*!************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true ***!
+ \************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_template_id_653cb532_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=template&id=653cb532&scoped=true");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=template&id=5113f27a":
+/*!*******************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=template&id=5113f27a ***!
+ \*******************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_5113f27a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=template&id=5113f27a */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/activitylog/index.vue?vue&type=template&id=5113f27a");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/admin/admin/add.vue?vue&type=template&id=4a4a3b0c":
@@ -23542,19 +35292,19 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/***/ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490":
-/*!*************************************************************************************************!*\
- !*** ./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490 ***!
- \*************************************************************************************************/
+/***/ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490&scoped=true":
+/*!*************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490&scoped=true ***!
+ \*************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__.render),
-/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
/* harmony export */ });
-/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./result.vue?vue&type=template&id=eb124490 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490");
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_template_id_eb124490_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./result.vue?vue&type=template&id=eb124490&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=template&id=eb124490&scoped=true");
/***/ }),
@@ -23931,6 +35681,23 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_voter_vue_vue_type_template_id_0a7f45a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./voter.vue?vue&type=template&id=0a7f45a8 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=template&id=0a7f45a8");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=template&id=41674414&scoped=true":
+/*!*************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=template&id=41674414&scoped=true ***!
+ \*************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_template_id_41674414_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./physical-gate-display.vue?vue&type=template&id=41674414&scoped=true */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=template&id=41674414&scoped=true");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=template&id=b9806c06":
@@ -23982,6 +35749,23 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_mat_vue_vue_type_template_id_4a6a8b08__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./mat.vue?vue&type=template&id=4a6a8b08 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/mat.vue?vue&type=template&id=4a6a8b08");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=template&id=a130fa54":
+/*!***************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=template&id=a130fa54 ***!
+ \***************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__.render),
+/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
+/* harmony export */ });
+/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_template_id_a130fa54__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./nominees.vue?vue&type=template&id=a130fa54 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=template&id=a130fa54");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=template&id=53adb7ac&scoped=true":
@@ -24101,23 +35885,6 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_verification_vue_vue_type_template_id_ec6b8e32__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./verification.vue?vue&type=template&id=ec6b8e32 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/verification.vue?vue&type=template&id=ec6b8e32");
-/***/ }),
-
-/***/ "./resources/assets/js/components/mycomponents/countdown.vue?vue&type=template&id=ce413a0a":
-/*!*************************************************************************************************!*\
- !*** ./resources/assets/js/components/mycomponents/countdown.vue?vue&type=template&id=ce413a0a ***!
- \*************************************************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__.render),
-/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
-/* harmony export */ });
-/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_countdown_vue_vue_type_template_id_ce413a0a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./countdown.vue?vue&type=template&id=ce413a0a */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/mycomponents/countdown.vue?vue&type=template&id=ce413a0a");
-
-
/***/ }),
/***/ "./resources/assets/js/components/mycomponents/modal/body.vue?vue&type=template&id=17b4402c":
@@ -24203,6 +35970,45 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_lib_index_js_vue_loader_options_uploader_vue_vue_type_template_id_c6311dd8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./uploader.vue?vue&type=template&id=c6311dd8 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/mycomponents/uploader.vue?vue&type=template&id=c6311dd8");
+/***/ }),
+
+/***/ "./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css":
+/*!*******************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css ***!
+ \*******************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AdminDataTable_vue_vue_type_style_index_0_id_5dc641a8_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/AdminDataTable.vue?vue&type=style&index=0&id=5dc641a8&scoped=true&lang=css");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css":
+/*!**********************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css ***!
+ \**********************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheel_vue_vue_type_style_index_0_id_1369a02f_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/style-loader/dist/cjs.js!../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheel.vue?vue&type=style&index=0&id=1369a02f&scoped=true&lang=css");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css":
+/*!**************************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css ***!
+ \**************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_RouletteEliminationWheelDemo_vue_vue_type_style_index_0_id_653cb532_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/style-loader/dist/cjs.js!../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/RouletteEliminationWheelDemo.vue?vue&type=style&index=0&id=653cb532&scoped=true&lang=css");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/admin/admin/beliankomoditi.vue?vue&type=style&index=0&id=77f51ad2&scoped=true&lang=css":
@@ -24255,6 +36061,19 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_44bea6f2_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=44bea6f2&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/index.vue?vue&type=style&index=0&id=44bea6f2&lang=css");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css":
+/*!***************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css ***!
+ \***************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_result_vue_vue_type_style_index_0_id_eb124490_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/home/result.vue?vue&type=style&index=0&id=eb124490&scoped=true&lang=css");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/admin/index.vue?vue&type=style&index=0&id=5bbb2a06&scoped=true&lang=css":
@@ -24307,6 +36126,45 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_edit_vue_vue_type_style_index_0_id_f30deaa6_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./edit.vue?vue&type=style&index=0&id=f30deaa6&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/edit.vue?vue&type=style&index=0&id=f30deaa6&scoped=true&lang=css");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css":
+/*!*****************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css ***!
+ \*****************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_eb3ff682_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=eb3ff682&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/nominee/index.vue?vue&type=style&index=0&id=eb3ff682&lang=css");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css":
+/*!*************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css ***!
+ \*************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_add_vue_vue_type_style_index_0_id_7c4e8cf6_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/add.vue?vue&type=style&index=0&id=7c4e8cf6&lang=css");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css":
+/*!***************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css ***!
+ \***************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_85533394_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=85533394&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/index.vue?vue&type=style&index=0&id=85533394&lang=css");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/admin/voter/kehadiran.vue?vue&type=style&index=0&id=4348f66b&lang=css":
@@ -24320,6 +36178,32 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_kehadiran_vue_vue_type_style_index_0_id_4348f66b_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./kehadiran.vue?vue&type=style&index=0&id=4348f66b&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/kehadiran.vue?vue&type=style&index=0&id=4348f66b&lang=css");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css":
+/*!***************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css ***!
+ \***************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_voter_vue_vue_type_style_index_0_id_0a7f45a8_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/admin/voter/voter.vue?vue&type=style&index=0&id=0a7f45a8&lang=css");
+
+
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css":
+/*!***************************************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css ***!
+ \***************************************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_physical_gate_display_vue_vue_type_style_index_0_id_41674414_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/display/physical-gate-display.vue?vue&type=style&index=0&id=41674414&scoped=true&lang=css");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/voter/home/attendance.vue?vue&type=style&index=0&id=b9806c06&lang=css":
@@ -24359,6 +36243,19 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_mat_vue_vue_type_style_index_0_id_4a6a8b08_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./mat.vue?vue&type=style&index=0&id=4a6a8b08&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/mat.vue?vue&type=style&index=0&id=4a6a8b08&lang=css");
+/***/ }),
+
+/***/ "./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css":
+/*!*****************************************************************************************************************!*\
+ !*** ./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css ***!
+ \*****************************************************************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_laravel_mix_node_modules_css_loader_dist_cjs_js_clonedRuleSet_9_use_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_9_use_2_node_modules_vue_loader_lib_index_js_vue_loader_options_nominees_vue_vue_type_style_index_0_id_a130fa54_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/style-loader/dist/cjs.js!../../../../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-9.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-9.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/demo/voter/home/nominees.vue?vue&type=style&index=0&id=a130fa54&lang=css");
+
+
/***/ }),
/***/ "./resources/assets/js/components/demo/voter/home/penyata.vue?vue&type=style&index=0&id=53adb7ac&scoped=true&lang=css":
@@ -24574,6 +36471,188 @@ function normalizeComponent(
}
+/***/ }),
+
+/***/ "?1bda":
+/*!************************!*\
+ !*** buffer (ignored) ***!
+ \************************/
+/***/ (() => {
+
+/* (ignored) */
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
+/*!*********************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
+ \*********************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
+/* harmony export */ });
+function _arrayLikeToArray(r, a) {
+ (null == a || a > r.length) && (a = r.length);
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
+ return n;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
+/*!*******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
+/* harmony export */ });
+function _arrayWithHoles(r) {
+ if (Array.isArray(r)) return r;
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
+/*!*************************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
+ \*************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
+/* harmony export */ });
+function _iterableToArrayLimit(r, l) {
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
+ if (null != t) {
+ var e,
+ n,
+ i,
+ u,
+ a = [],
+ f = !0,
+ o = !1;
+ try {
+ if (i = (t = t.call(r)).next, 0 === l) {
+ if (Object(t) !== t) return;
+ f = !1;
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
+ } catch (r) {
+ o = !0, n = r;
+ } finally {
+ try {
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
+ } finally {
+ if (o) throw n;
+ }
+ }
+ return a;
+ }
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
+/*!********************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
+ \********************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _nonIterableRest)
+/* harmony export */ });
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
+/*!******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
+ \******************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _slicedToArray)
+/* harmony export */ });
+/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
+/* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
+/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
+/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
+
+
+
+
+function _slicedToArray(r, e) {
+ return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(r, e) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(r, e) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
+/*!***********************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
+ \***********************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _typeof)
+/* harmony export */ });
+function _typeof(o) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
+ return typeof o;
+ } : function (o) {
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
+ }, _typeof(o);
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
+ \*******************************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
+/* harmony export */ });
+/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
+
+function _unsupportedIterableToArray(r, a) {
+ if (r) {
+ if ("string" == typeof r) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a);
+ var t = {}.toString.call(r).slice(8, -1);
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r, a) : void 0;
+ }
+}
+
+
/***/ }),
/***/ "./node_modules/axios/lib/adapters/adapters.js":
@@ -29520,6 +41599,33628 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
});
+/***/ }),
+
+/***/ "./node_modules/fast-png/node_modules/pako/dist/pako.esm.mjs":
+/*!*******************************************************************!*\
+ !*** ./node_modules/fast-png/node_modules/pako/dist/pako.esm.mjs ***!
+ \*******************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Deflate: () => (/* binding */ Deflate_1),
+/* harmony export */ Inflate: () => (/* binding */ Inflate_1),
+/* harmony export */ constants: () => (/* binding */ constants_1),
+/* harmony export */ "default": () => (/* binding */ pako),
+/* harmony export */ deflate: () => (/* binding */ deflate_1),
+/* harmony export */ deflateRaw: () => (/* binding */ deflateRaw_1),
+/* harmony export */ gzip: () => (/* binding */ gzip_1),
+/* harmony export */ inflate: () => (/* binding */ inflate_1),
+/* harmony export */ inflateRaw: () => (/* binding */ inflateRaw_1),
+/* harmony export */ ungzip: () => (/* binding */ ungzip_1)
+/* harmony export */ });
+
+/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+/* eslint-disable space-unary-ops */
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+//const Z_FILTERED = 1;
+//const Z_HUFFMAN_ONLY = 2;
+//const Z_RLE = 3;
+const Z_FIXED$1 = 4;
+//const Z_DEFAULT_STRATEGY = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+const Z_BINARY = 0;
+const Z_TEXT = 1;
+//const Z_ASCII = 1; // = Z_TEXT
+const Z_UNKNOWN$1 = 2;
+
+/*============================================================================*/
+
+
+function zero$1(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+// From zutil.h
+
+const STORED_BLOCK = 0;
+const STATIC_TREES = 1;
+const DYN_TREES = 2;
+/* The three kinds of block type */
+
+const MIN_MATCH$1 = 3;
+const MAX_MATCH$1 = 258;
+/* The minimum and maximum match lengths */
+
+// From deflate.h
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+const LENGTH_CODES$1 = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+
+const LITERALS$1 = 256;
+/* number of literal bytes 0..255 */
+
+const L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+const D_CODES$1 = 30;
+/* number of distance codes */
+
+const BL_CODES$1 = 19;
+/* number of codes used to transfer the bit lengths */
+
+const HEAP_SIZE$1 = 2 * L_CODES$1 + 1;
+/* maximum heap size */
+
+const MAX_BITS$1 = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+const Buf_size = 16;
+/* size of bit buffer in bi_buf */
+
+
+/* ===========================================================================
+ * Constants
+ */
+
+const MAX_BL_BITS = 7;
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+const END_BLOCK = 256;
+/* end of block literal code */
+
+const REP_3_6 = 16;
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+const REPZ_3_10 = 17;
+/* repeat a zero length 3-10 times (3 bits of repeat count) */
+
+const REPZ_11_138 = 18;
+/* repeat a zero length 11-138 times (7 bits of repeat count) */
+
+/* eslint-disable comma-spacing,array-bracket-spacing */
+const extra_lbits = /* extra bits for each length code */
+ new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);
+
+const extra_dbits = /* extra bits for each distance code */
+ new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);
+
+const extra_blbits = /* extra bits for each bit length code */
+ new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);
+
+const bl_order =
+ new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);
+/* eslint-enable comma-spacing,array-bracket-spacing */
+
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+// We pre-fill arrays with 0 to avoid uninitialized gaps
+
+const DIST_CODE_LEN = 512; /* see definition of array dist_code below */
+
+// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
+const static_ltree = new Array((L_CODES$1 + 2) * 2);
+zero$1(static_ltree);
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+const static_dtree = new Array(D_CODES$1 * 2);
+zero$1(static_dtree);
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+const _dist_code = new Array(DIST_CODE_LEN);
+zero$1(_dist_code);
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+const _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1);
+zero$1(_length_code);
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+const base_length = new Array(LENGTH_CODES$1);
+zero$1(base_length);
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+const base_dist = new Array(D_CODES$1);
+zero$1(base_dist);
+/* First normalized distance for each code (0 = distance of 1) */
+
+
+function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
+
+ this.static_tree = static_tree; /* static tree or NULL */
+ this.extra_bits = extra_bits; /* extra bits for each code or NULL */
+ this.extra_base = extra_base; /* base index for extra_bits */
+ this.elems = elems; /* max number of elements in the tree */
+ this.max_length = max_length; /* max bit length for the codes */
+
+ // show if `static_tree` has data or dummy - needed for monomorphic objects
+ this.has_stree = static_tree && static_tree.length;
+}
+
+
+let static_l_desc;
+let static_d_desc;
+let static_bl_desc;
+
+
+function TreeDesc(dyn_tree, stat_desc) {
+ this.dyn_tree = dyn_tree; /* the dynamic tree */
+ this.max_code = 0; /* largest code with non zero frequency */
+ this.stat_desc = stat_desc; /* the corresponding static tree */
+}
+
+
+
+const d_code = (dist) => {
+
+ return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
+};
+
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+const put_short = (s, w) => {
+// put_byte(s, (uch)((w) & 0xff));
+// put_byte(s, (uch)((ush)(w) >> 8));
+ s.pending_buf[s.pending++] = (w) & 0xff;
+ s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
+};
+
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+const send_bits = (s, value, length) => {
+
+ if (s.bi_valid > (Buf_size - length)) {
+ s.bi_buf |= (value << s.bi_valid) & 0xffff;
+ put_short(s, s.bi_buf);
+ s.bi_buf = value >> (Buf_size - s.bi_valid);
+ s.bi_valid += length - Buf_size;
+ } else {
+ s.bi_buf |= (value << s.bi_valid) & 0xffff;
+ s.bi_valid += length;
+ }
+};
+
+
+const send_code = (s, c, tree) => {
+
+ send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
+};
+
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+const bi_reverse = (code, len) => {
+
+ let res = 0;
+ do {
+ res |= code & 1;
+ code >>>= 1;
+ res <<= 1;
+ } while (--len > 0);
+ return res >>> 1;
+};
+
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+const bi_flush = (s) => {
+
+ if (s.bi_valid === 16) {
+ put_short(s, s.bi_buf);
+ s.bi_buf = 0;
+ s.bi_valid = 0;
+
+ } else if (s.bi_valid >= 8) {
+ s.pending_buf[s.pending++] = s.bi_buf & 0xff;
+ s.bi_buf >>= 8;
+ s.bi_valid -= 8;
+ }
+};
+
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ * above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ * array bl_count contains the frequencies for each bit length.
+ * The length opt_len is updated; static_len is also updated if stree is
+ * not null.
+ */
+const gen_bitlen = (s, desc) => {
+// deflate_state *s;
+// tree_desc *desc; /* the tree descriptor */
+
+ const tree = desc.dyn_tree;
+ const max_code = desc.max_code;
+ const stree = desc.stat_desc.static_tree;
+ const has_stree = desc.stat_desc.has_stree;
+ const extra = desc.stat_desc.extra_bits;
+ const base = desc.stat_desc.extra_base;
+ const max_length = desc.stat_desc.max_length;
+ let h; /* heap index */
+ let n, m; /* iterate over the tree elements */
+ let bits; /* bit length */
+ let xbits; /* extra bits */
+ let f; /* frequency */
+ let overflow = 0; /* number of elements with bit length too large */
+
+ for (bits = 0; bits <= MAX_BITS$1; bits++) {
+ s.bl_count[bits] = 0;
+ }
+
+ /* In a first pass, compute the optimal bit lengths (which may
+ * overflow in the case of the bit length tree).
+ */
+ tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */
+
+ for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) {
+ n = s.heap[h];
+ bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
+ if (bits > max_length) {
+ bits = max_length;
+ overflow++;
+ }
+ tree[n * 2 + 1]/*.Len*/ = bits;
+ /* We overwrite tree[n].Dad which is no longer needed */
+
+ if (n > max_code) { continue; } /* not a leaf node */
+
+ s.bl_count[bits]++;
+ xbits = 0;
+ if (n >= base) {
+ xbits = extra[n - base];
+ }
+ f = tree[n * 2]/*.Freq*/;
+ s.opt_len += f * (bits + xbits);
+ if (has_stree) {
+ s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
+ }
+ }
+ if (overflow === 0) { return; }
+
+ // Tracev((stderr,"\nbit length overflow\n"));
+ /* This happens for example on obj2 and pic of the Calgary corpus */
+
+ /* Find the first bit length which could increase: */
+ do {
+ bits = max_length - 1;
+ while (s.bl_count[bits] === 0) { bits--; }
+ s.bl_count[bits]--; /* move one leaf down the tree */
+ s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
+ s.bl_count[max_length]--;
+ /* The brother of the overflow item also moves one step up,
+ * but this does not affect bl_count[max_length]
+ */
+ overflow -= 2;
+ } while (overflow > 0);
+
+ /* Now recompute all bit lengths, scanning in increasing frequency.
+ * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+ * lengths instead of fixing only the wrong ones. This idea is taken
+ * from 'ar' written by Haruhiko Okumura.)
+ */
+ for (bits = max_length; bits !== 0; bits--) {
+ n = s.bl_count[bits];
+ while (n !== 0) {
+ m = s.heap[--h];
+ if (m > max_code) { continue; }
+ if (tree[m * 2 + 1]/*.Len*/ !== bits) {
+ // Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+ s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
+ tree[m * 2 + 1]/*.Len*/ = bits;
+ }
+ n--;
+ }
+ }
+};
+
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ * zero code length.
+ */
+const gen_codes = (tree, max_code, bl_count) => {
+// ct_data *tree; /* the tree to decorate */
+// int max_code; /* largest code with non zero frequency */
+// ushf *bl_count; /* number of codes at each bit length */
+
+ const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */
+ let code = 0; /* running code value */
+ let bits; /* bit index */
+ let n; /* code index */
+
+ /* The distribution counts are first used to generate the code values
+ * without bit reversal.
+ */
+ for (bits = 1; bits <= MAX_BITS$1; bits++) {
+ code = (code + bl_count[bits - 1]) << 1;
+ next_code[bits] = code;
+ }
+ /* Check that the bit counts in bl_count are consistent. The last code
+ * must be all ones.
+ */
+ //Assert (code + bl_count[MAX_BITS]-1 == (1< {
+
+ let n; /* iterates over tree elements */
+ let bits; /* bit counter */
+ let length; /* length value */
+ let code; /* code value */
+ let dist; /* distance index */
+ const bl_count = new Array(MAX_BITS$1 + 1);
+ /* number of codes at each bit length for an optimal tree */
+
+ // do check in _tr_init()
+ //if (static_init_done) return;
+
+ /* For some embedded targets, global variables are not initialized: */
+/*#ifdef NO_INIT_GLOBAL_POINTERS
+ static_l_desc.static_tree = static_ltree;
+ static_l_desc.extra_bits = extra_lbits;
+ static_d_desc.static_tree = static_dtree;
+ static_d_desc.extra_bits = extra_dbits;
+ static_bl_desc.extra_bits = extra_blbits;
+#endif*/
+
+ /* Initialize the mapping length (0..255) -> length code (0..28) */
+ length = 0;
+ for (code = 0; code < LENGTH_CODES$1 - 1; code++) {
+ base_length[code] = length;
+ for (n = 0; n < (1 << extra_lbits[code]); n++) {
+ _length_code[length++] = code;
+ }
+ }
+ //Assert (length == 256, "tr_static_init: length != 256");
+ /* Note that the length 255 (match length 258) can be represented
+ * in two different ways: code 284 + 5 bits or code 285, so we
+ * overwrite length_code[255] to use the best encoding:
+ */
+ _length_code[length - 1] = code;
+
+ /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+ dist = 0;
+ for (code = 0; code < 16; code++) {
+ base_dist[code] = dist;
+ for (n = 0; n < (1 << extra_dbits[code]); n++) {
+ _dist_code[dist++] = code;
+ }
+ }
+ //Assert (dist == 256, "tr_static_init: dist != 256");
+ dist >>= 7; /* from now on, all distances are divided by 128 */
+ for (; code < D_CODES$1; code++) {
+ base_dist[code] = dist << 7;
+ for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
+ _dist_code[256 + dist++] = code;
+ }
+ }
+ //Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+ /* Construct the codes of the static literal tree */
+ for (bits = 0; bits <= MAX_BITS$1; bits++) {
+ bl_count[bits] = 0;
+ }
+
+ n = 0;
+ while (n <= 143) {
+ static_ltree[n * 2 + 1]/*.Len*/ = 8;
+ n++;
+ bl_count[8]++;
+ }
+ while (n <= 255) {
+ static_ltree[n * 2 + 1]/*.Len*/ = 9;
+ n++;
+ bl_count[9]++;
+ }
+ while (n <= 279) {
+ static_ltree[n * 2 + 1]/*.Len*/ = 7;
+ n++;
+ bl_count[7]++;
+ }
+ while (n <= 287) {
+ static_ltree[n * 2 + 1]/*.Len*/ = 8;
+ n++;
+ bl_count[8]++;
+ }
+ /* Codes 286 and 287 do not exist, but we must include them in the
+ * tree construction to get a canonical Huffman tree (longest code
+ * all ones)
+ */
+ gen_codes(static_ltree, L_CODES$1 + 1, bl_count);
+
+ /* The static distance tree is trivial: */
+ for (n = 0; n < D_CODES$1; n++) {
+ static_dtree[n * 2 + 1]/*.Len*/ = 5;
+ static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
+ }
+
+ // Now data ready and we can init static trees
+ static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1);
+ static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1);
+ static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS);
+
+ //static_init_done = true;
+};
+
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+const init_block = (s) => {
+
+ let n; /* iterates over tree elements */
+
+ /* Initialize the trees. */
+ for (n = 0; n < L_CODES$1; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
+ for (n = 0; n < D_CODES$1; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
+ for (n = 0; n < BL_CODES$1; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
+
+ s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
+ s.opt_len = s.static_len = 0;
+ s.sym_next = s.matches = 0;
+};
+
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+const bi_windup = (s) =>
+{
+ if (s.bi_valid > 8) {
+ put_short(s, s.bi_buf);
+ } else if (s.bi_valid > 0) {
+ //put_byte(s, (Byte)s->bi_buf);
+ s.pending_buf[s.pending++] = s.bi_buf;
+ }
+ s.bi_buf = 0;
+ s.bi_valid = 0;
+};
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+const smaller = (tree, n, m, depth) => {
+
+ const _n2 = n * 2;
+ const _m2 = m * 2;
+ return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
+ (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
+};
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+const pqdownheap = (s, tree, k) => {
+// deflate_state *s;
+// ct_data *tree; /* the tree to restore */
+// int k; /* node to move down */
+
+ const v = s.heap[k];
+ let j = k << 1; /* left son of k */
+ while (j <= s.heap_len) {
+ /* Set j to the smallest of the two sons: */
+ if (j < s.heap_len &&
+ smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
+ j++;
+ }
+ /* Exit if v is smaller than both sons */
+ if (smaller(tree, v, s.heap[j], s.depth)) { break; }
+
+ /* Exchange v with the smallest son */
+ s.heap[k] = s.heap[j];
+ k = j;
+
+ /* And continue down the tree, setting j to the left son of k */
+ j <<= 1;
+ }
+ s.heap[k] = v;
+};
+
+
+// inlined manually
+// const SMALLEST = 1;
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+const compress_block = (s, ltree, dtree) => {
+// deflate_state *s;
+// const ct_data *ltree; /* literal tree */
+// const ct_data *dtree; /* distance tree */
+
+ let dist; /* distance of matched string */
+ let lc; /* match length or unmatched char (if dist == 0) */
+ let sx = 0; /* running index in sym_buf */
+ let code; /* the code to send */
+ let extra; /* number of extra bits to send */
+
+ if (s.sym_next !== 0) {
+ do {
+ dist = s.pending_buf[s.sym_buf + sx++] & 0xff;
+ dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8;
+ lc = s.pending_buf[s.sym_buf + sx++];
+ if (dist === 0) {
+ send_code(s, lc, ltree); /* send a literal byte */
+ //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+ } else {
+ /* Here, lc is the match length - MIN_MATCH */
+ code = _length_code[lc];
+ send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */
+ extra = extra_lbits[code];
+ if (extra !== 0) {
+ lc -= base_length[code];
+ send_bits(s, lc, extra); /* send the extra length bits */
+ }
+ dist--; /* dist is now the match distance - 1 */
+ code = d_code(dist);
+ //Assert (code < D_CODES, "bad d_code");
+
+ send_code(s, code, dtree); /* send the distance code */
+ extra = extra_dbits[code];
+ if (extra !== 0) {
+ dist -= base_dist[code];
+ send_bits(s, dist, extra); /* send the extra distance bits */
+ }
+ } /* literal or match pair ? */
+
+ /* Check that the overlay between pending_buf and sym_buf is ok: */
+ //Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
+
+ } while (sx < s.sym_next);
+ }
+
+ send_code(s, END_BLOCK, ltree);
+};
+
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ * and corresponding code. The length opt_len is updated; static_len is
+ * also updated if stree is not null. The field max_code is set.
+ */
+const build_tree = (s, desc) => {
+// deflate_state *s;
+// tree_desc *desc; /* the tree descriptor */
+
+ const tree = desc.dyn_tree;
+ const stree = desc.stat_desc.static_tree;
+ const has_stree = desc.stat_desc.has_stree;
+ const elems = desc.stat_desc.elems;
+ let n, m; /* iterate over heap elements */
+ let max_code = -1; /* largest code with non zero frequency */
+ let node; /* new node being created */
+
+ /* Construct the initial heap, with least frequent element in
+ * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+ * heap[0] is not used.
+ */
+ s.heap_len = 0;
+ s.heap_max = HEAP_SIZE$1;
+
+ for (n = 0; n < elems; n++) {
+ if (tree[n * 2]/*.Freq*/ !== 0) {
+ s.heap[++s.heap_len] = max_code = n;
+ s.depth[n] = 0;
+
+ } else {
+ tree[n * 2 + 1]/*.Len*/ = 0;
+ }
+ }
+
+ /* The pkzip format requires that at least one distance code exists,
+ * and that at least one bit should be sent even if there is only one
+ * possible code. So to avoid special checks later on we force at least
+ * two codes of non zero frequency.
+ */
+ while (s.heap_len < 2) {
+ node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
+ tree[node * 2]/*.Freq*/ = 1;
+ s.depth[node] = 0;
+ s.opt_len--;
+
+ if (has_stree) {
+ s.static_len -= stree[node * 2 + 1]/*.Len*/;
+ }
+ /* node is 0 or 1 so it does not have extra bits */
+ }
+ desc.max_code = max_code;
+
+ /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+ * establish sub-heaps of increasing lengths:
+ */
+ for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
+
+ /* Construct the Huffman tree by repeatedly combining the least two
+ * frequent nodes.
+ */
+ node = elems; /* next internal node of the tree */
+ do {
+ //pqremove(s, tree, n); /* n = node of least frequency */
+ /*** pqremove ***/
+ n = s.heap[1/*SMALLEST*/];
+ s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
+ pqdownheap(s, tree, 1/*SMALLEST*/);
+ /***/
+
+ m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
+
+ s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
+ s.heap[--s.heap_max] = m;
+
+ /* Create a new node father of n and m */
+ tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
+ s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
+ tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;
+
+ /* and insert the new node in the heap */
+ s.heap[1/*SMALLEST*/] = node++;
+ pqdownheap(s, tree, 1/*SMALLEST*/);
+
+ } while (s.heap_len >= 2);
+
+ s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
+
+ /* At this point, the fields freq and dad are set. We can now
+ * generate the bit lengths.
+ */
+ gen_bitlen(s, desc);
+
+ /* The field len is now set, we can generate the bit codes */
+ gen_codes(tree, max_code, s.bl_count);
+};
+
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+const scan_tree = (s, tree, max_code) => {
+// deflate_state *s;
+// ct_data *tree; /* the tree to be scanned */
+// int max_code; /* and its largest code of non zero frequency */
+
+ let n; /* iterates over all tree elements */
+ let prevlen = -1; /* last emitted length */
+ let curlen; /* length of current code */
+
+ let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
+
+ let count = 0; /* repeat count of the current code */
+ let max_count = 7; /* max repeat count */
+ let min_count = 4; /* min repeat count */
+
+ if (nextlen === 0) {
+ max_count = 138;
+ min_count = 3;
+ }
+ tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen;
+ nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
+
+ if (++count < max_count && curlen === nextlen) {
+ continue;
+
+ } else if (count < min_count) {
+ s.bl_tree[curlen * 2]/*.Freq*/ += count;
+
+ } else if (curlen !== 0) {
+
+ if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
+ s.bl_tree[REP_3_6 * 2]/*.Freq*/++;
+
+ } else if (count <= 10) {
+ s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;
+
+ } else {
+ s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
+ }
+
+ count = 0;
+ prevlen = curlen;
+
+ if (nextlen === 0) {
+ max_count = 138;
+ min_count = 3;
+
+ } else if (curlen === nextlen) {
+ max_count = 6;
+ min_count = 3;
+
+ } else {
+ max_count = 7;
+ min_count = 4;
+ }
+ }
+};
+
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+const send_tree = (s, tree, max_code) => {
+// deflate_state *s;
+// ct_data *tree; /* the tree to be scanned */
+// int max_code; /* and its largest code of non zero frequency */
+
+ let n; /* iterates over all tree elements */
+ let prevlen = -1; /* last emitted length */
+ let curlen; /* length of current code */
+
+ let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
+
+ let count = 0; /* repeat count of the current code */
+ let max_count = 7; /* max repeat count */
+ let min_count = 4; /* min repeat count */
+
+ /* tree[max_code+1].Len = -1; */ /* guard already set */
+ if (nextlen === 0) {
+ max_count = 138;
+ min_count = 3;
+ }
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen;
+ nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
+
+ if (++count < max_count && curlen === nextlen) {
+ continue;
+
+ } else if (count < min_count) {
+ do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
+
+ } else if (curlen !== 0) {
+ if (curlen !== prevlen) {
+ send_code(s, curlen, s.bl_tree);
+ count--;
+ }
+ //Assert(count >= 3 && count <= 6, " 3_6?");
+ send_code(s, REP_3_6, s.bl_tree);
+ send_bits(s, count - 3, 2);
+
+ } else if (count <= 10) {
+ send_code(s, REPZ_3_10, s.bl_tree);
+ send_bits(s, count - 3, 3);
+
+ } else {
+ send_code(s, REPZ_11_138, s.bl_tree);
+ send_bits(s, count - 11, 7);
+ }
+
+ count = 0;
+ prevlen = curlen;
+ if (nextlen === 0) {
+ max_count = 138;
+ min_count = 3;
+
+ } else if (curlen === nextlen) {
+ max_count = 6;
+ min_count = 3;
+
+ } else {
+ max_count = 7;
+ min_count = 4;
+ }
+ }
+};
+
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+const build_bl_tree = (s) => {
+
+ let max_blindex; /* index of last bit length code of non zero freq */
+
+ /* Determine the bit length frequencies for literal and distance trees */
+ scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
+ scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
+
+ /* Build the bit length tree: */
+ build_tree(s, s.bl_desc);
+ /* opt_len now includes the length of the tree representations, except
+ * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+ */
+
+ /* Determine the number of bit length codes to send. The pkzip format
+ * requires that at least 4 bit length codes be sent. (appnote.txt says
+ * 3 but the actual value used is 4.)
+ */
+ for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) {
+ if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
+ break;
+ }
+ }
+ /* Update opt_len to include the bit length tree and counts */
+ s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
+ //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+ // s->opt_len, s->static_len));
+
+ return max_blindex;
+};
+
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+const send_all_trees = (s, lcodes, dcodes, blcodes) => {
+// deflate_state *s;
+// int lcodes, dcodes, blcodes; /* number of codes for each tree */
+
+ let rank; /* index in bl_order */
+
+ //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+ //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+ // "too many codes");
+ //Tracev((stderr, "\nbl counts: "));
+ send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
+ send_bits(s, dcodes - 1, 5);
+ send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */
+ for (rank = 0; rank < blcodes; rank++) {
+ //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+ send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
+ }
+ //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+ send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
+ //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+ send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
+ //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+};
+
+
+/* ===========================================================================
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ * a) There are no non-portable control characters belonging to the
+ * "block list" (0..6, 14..25, 28..31).
+ * b) There is at least one printable character belonging to the
+ * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ * "gray list" that is ignored in this detection algorithm:
+ * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
+ * IN assertion: the fields Freq of dyn_ltree are set.
+ */
+const detect_data_type = (s) => {
+ /* block_mask is the bit mask of block-listed bytes
+ * set bits 0..6, 14..25, and 28..31
+ * 0xf3ffc07f = binary 11110011111111111100000001111111
+ */
+ let block_mask = 0xf3ffc07f;
+ let n;
+
+ /* Check for non-textual ("block-listed") bytes. */
+ for (n = 0; n <= 31; n++, block_mask >>>= 1) {
+ if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
+ return Z_BINARY;
+ }
+ }
+
+ /* Check for textual ("allow-listed") bytes. */
+ if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
+ s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
+ return Z_TEXT;
+ }
+ for (n = 32; n < LITERALS$1; n++) {
+ if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
+ return Z_TEXT;
+ }
+ }
+
+ /* There are no "block-listed" or "allow-listed" bytes:
+ * this stream either is empty or has tolerated ("gray-listed") bytes only.
+ */
+ return Z_BINARY;
+};
+
+
+let static_init_done = false;
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+const _tr_init$1 = (s) =>
+{
+
+ if (!static_init_done) {
+ tr_static_init();
+ static_init_done = true;
+ }
+
+ s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);
+ s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);
+ s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
+
+ s.bi_buf = 0;
+ s.bi_valid = 0;
+
+ /* Initialize the first block of the first file: */
+ init_block(s);
+};
+
+
+/* ===========================================================================
+ * Send a stored block
+ */
+const _tr_stored_block$1 = (s, buf, stored_len, last) => {
+//DeflateState *s;
+//charf *buf; /* input block */
+//ulg stored_len; /* length of input block */
+//int last; /* one if this is the last block for a file */
+
+ send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */
+ bi_windup(s); /* align on byte boundary */
+ put_short(s, stored_len);
+ put_short(s, ~stored_len);
+ if (stored_len) {
+ s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending);
+ }
+ s.pending += stored_len;
+};
+
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ */
+const _tr_align$1 = (s) => {
+ send_bits(s, STATIC_TREES << 1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+ bi_flush(s);
+};
+
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and write out the encoded block.
+ */
+const _tr_flush_block$1 = (s, buf, stored_len, last) => {
+//DeflateState *s;
+//charf *buf; /* input block, or NULL if too old */
+//ulg stored_len; /* length of input block */
+//int last; /* one if this is the last block for a file */
+
+ let opt_lenb, static_lenb; /* opt_len and static_len in bytes */
+ let max_blindex = 0; /* index of last bit length code of non zero freq */
+
+ /* Build the Huffman trees unless a stored block is forced */
+ if (s.level > 0) {
+
+ /* Check if the file is binary or text */
+ if (s.strm.data_type === Z_UNKNOWN$1) {
+ s.strm.data_type = detect_data_type(s);
+ }
+
+ /* Construct the literal and distance trees */
+ build_tree(s, s.l_desc);
+ // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+ // s->static_len));
+
+ build_tree(s, s.d_desc);
+ // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+ // s->static_len));
+ /* At this point, opt_len and static_len are the total bit lengths of
+ * the compressed block data, excluding the tree representations.
+ */
+
+ /* Build the bit length tree for the above two trees, and get the index
+ * in bl_order of the last bit length code to send.
+ */
+ max_blindex = build_bl_tree(s);
+
+ /* Determine the best encoding. Compute the block lengths in bytes. */
+ opt_lenb = (s.opt_len + 3 + 7) >>> 3;
+ static_lenb = (s.static_len + 3 + 7) >>> 3;
+
+ // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+ // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+ // s->sym_next / 3));
+
+ if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
+
+ } else {
+ // Assert(buf != (char*)0, "lost buf");
+ opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+ }
+
+ if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
+ /* 4: two words for the lengths */
+
+ /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+ * Otherwise we can't have processed more than WSIZE input bytes since
+ * the last block flush, because compression would have been
+ * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+ * transform a block into a stored block.
+ */
+ _tr_stored_block$1(s, buf, stored_len, last);
+
+ } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) {
+
+ send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
+ compress_block(s, static_ltree, static_dtree);
+
+ } else {
+ send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
+ send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
+ compress_block(s, s.dyn_ltree, s.dyn_dtree);
+ }
+ // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+ /* The above check is made mod 2^32, for files larger than 512 MB
+ * and uLong implemented on 32 bits.
+ */
+ init_block(s);
+
+ if (last) {
+ bi_windup(s);
+ }
+ // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+ // s->compressed_len-7*last));
+};
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+const _tr_tally$1 = (s, dist, lc) => {
+// deflate_state *s;
+// unsigned dist; /* distance of matched string */
+// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+
+ s.pending_buf[s.sym_buf + s.sym_next++] = dist;
+ s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8;
+ s.pending_buf[s.sym_buf + s.sym_next++] = lc;
+ if (dist === 0) {
+ /* lc is the unmatched char */
+ s.dyn_ltree[lc * 2]/*.Freq*/++;
+ } else {
+ s.matches++;
+ /* Here, lc is the match length - MIN_MATCH */
+ dist--; /* dist = match distance - 1 */
+ //Assert((ush)dist < (ush)MAX_DIST(s) &&
+ // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+ // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
+
+ s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;
+ s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
+ }
+
+ return (s.sym_next === s.sym_end);
+};
+
+var _tr_init_1 = _tr_init$1;
+var _tr_stored_block_1 = _tr_stored_block$1;
+var _tr_flush_block_1 = _tr_flush_block$1;
+var _tr_tally_1 = _tr_tally$1;
+var _tr_align_1 = _tr_align$1;
+
+var trees = {
+ _tr_init: _tr_init_1,
+ _tr_stored_block: _tr_stored_block_1,
+ _tr_flush_block: _tr_flush_block_1,
+ _tr_tally: _tr_tally_1,
+ _tr_align: _tr_align_1
+};
+
+// Note: adler32 takes 12% for level 0 and 2% for level 6.
+// It isn't worth it to make additional optimizations as in original.
+// Small size is preferable.
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+const adler32 = (adler, buf, len, pos) => {
+ let s1 = (adler & 0xffff) |0,
+ s2 = ((adler >>> 16) & 0xffff) |0,
+ n = 0;
+
+ while (len !== 0) {
+ // Set limit ~ twice less than 5552, to keep
+ // s2 in 31-bits, because we force signed ints.
+ // in other case %= will fail.
+ n = len > 2000 ? 2000 : len;
+ len -= n;
+
+ do {
+ s1 = (s1 + buf[pos++]) |0;
+ s2 = (s2 + s1) |0;
+ } while (--n);
+
+ s1 %= 65521;
+ s2 %= 65521;
+ }
+
+ return (s1 | (s2 << 16)) |0;
+};
+
+
+var adler32_1 = adler32;
+
+// Note: we can't get significant speed boost here.
+// So write code to minimize size - no pregenerated tables
+// and array tools dependencies.
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+// Use ordinary array, since untyped makes no boost here
+const makeTable = () => {
+ let c, table = [];
+
+ for (var n = 0; n < 256; n++) {
+ c = n;
+ for (var k = 0; k < 8; k++) {
+ c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+ }
+ table[n] = c;
+ }
+
+ return table;
+};
+
+// Create table on load. Just 255 signed longs. Not a problem.
+const crcTable = new Uint32Array(makeTable());
+
+
+const crc32 = (crc, buf, len, pos) => {
+ const t = crcTable;
+ const end = pos + len;
+
+ crc ^= -1;
+
+ for (let i = pos; i < end; i++) {
+ crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
+ }
+
+ return (crc ^ (-1)); // >>> 0;
+};
+
+
+var crc32_1 = crc32;
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var messages = {
+ 2: 'need dictionary', /* Z_NEED_DICT 2 */
+ 1: 'stream end', /* Z_STREAM_END 1 */
+ 0: '', /* Z_OK 0 */
+ '-1': 'file error', /* Z_ERRNO (-1) */
+ '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
+ '-3': 'data error', /* Z_DATA_ERROR (-3) */
+ '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
+ '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
+ '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+var constants$2 = {
+
+ /* Allowed flush values; see deflate() and inflate() below for details */
+ 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,
+
+ /* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+ Z_OK: 0,
+ Z_STREAM_END: 1,
+ Z_NEED_DICT: 2,
+ Z_ERRNO: -1,
+ Z_STREAM_ERROR: -2,
+ Z_DATA_ERROR: -3,
+ Z_MEM_ERROR: -4,
+ Z_BUF_ERROR: -5,
+ //Z_VERSION_ERROR: -6,
+
+ /* compression levels */
+ 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,
+
+ /* Possible values of the data_type field (though see inflate()) */
+ Z_BINARY: 0,
+ Z_TEXT: 1,
+ //Z_ASCII: 1, // = Z_TEXT (deprecated)
+ Z_UNKNOWN: 2,
+
+ /* The deflate compression method */
+ Z_DEFLATED: 8
+ //Z_NULL: null // Use -1 or null inline, depending on var type
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+const { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;
+
+
+
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+const {
+ Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,
+ Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,
+ Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,
+ Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,
+ Z_UNKNOWN,
+ Z_DEFLATED: Z_DEFLATED$2
+} = constants$2;
+
+/*============================================================================*/
+
+
+const MAX_MEM_LEVEL = 9;
+/* Maximum value for memLevel in deflateInit2 */
+const MAX_WBITS$1 = 15;
+/* 32K LZ77 window */
+const DEF_MEM_LEVEL = 8;
+
+
+const LENGTH_CODES = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+const LITERALS = 256;
+/* number of literal bytes 0..255 */
+const L_CODES = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+const D_CODES = 30;
+/* number of distance codes */
+const BL_CODES = 19;
+/* number of codes used to transfer the bit lengths */
+const HEAP_SIZE = 2 * L_CODES + 1;
+/* maximum heap size */
+const MAX_BITS = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+const MIN_MATCH = 3;
+const MAX_MATCH = 258;
+const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
+
+const PRESET_DICT = 0x20;
+
+const INIT_STATE = 42; /* zlib header -> BUSY_STATE */
+//#ifdef GZIP
+const GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */
+//#endif
+const EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */
+const NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */
+const COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */
+const HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */
+const BUSY_STATE = 113; /* deflate -> FINISH_STATE */
+const FINISH_STATE = 666; /* stream complete */
+
+const BS_NEED_MORE = 1; /* block not completed, need more input or more output */
+const BS_BLOCK_DONE = 2; /* block flush performed */
+const BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
+const BS_FINISH_DONE = 4; /* finish done, accept no more input or output */
+
+const OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
+
+const err = (strm, errorCode) => {
+ strm.msg = messages[errorCode];
+ return errorCode;
+};
+
+const rank = (f) => {
+ return ((f) * 2) - ((f) > 4 ? 9 : 0);
+};
+
+const zero = (buf) => {
+ let len = buf.length; while (--len >= 0) { buf[len] = 0; }
+};
+
+/* ===========================================================================
+ * Slide the hash table when sliding the window down (could be avoided with 32
+ * bit values at the expense of memory usage). We slide even when level == 0 to
+ * keep the hash table consistent if we switch back to level > 0 later.
+ */
+const slide_hash = (s) => {
+ let n, m;
+ let p;
+ let wsize = s.w_size;
+
+ n = s.hash_size;
+ p = n;
+ do {
+ m = s.head[--p];
+ s.head[p] = (m >= wsize ? m - wsize : 0);
+ } while (--n);
+ n = wsize;
+//#ifndef FASTEST
+ p = n;
+ do {
+ m = s.prev[--p];
+ s.prev[p] = (m >= wsize ? m - wsize : 0);
+ /* If n is not on any hash chain, prev[n] is garbage but
+ * its value will never be used.
+ */
+ } while (--n);
+//#endif
+};
+
+/* eslint-disable new-cap */
+let HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;
+// This hash causes less collisions, https://github.com/nodeca/pako/issues/135
+// But breaks binary compatibility
+//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;
+let HASH = HASH_ZLIB;
+
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output, except for
+ * some deflate_stored() output, goes through this function so some
+ * applications may wish to modify it to avoid allocating a large
+ * strm->next_out buffer and copying into it. (See also read_buf()).
+ */
+const flush_pending = (strm) => {
+ const s = strm.state;
+
+ //_tr_flush_bits(s);
+ let len = s.pending;
+ if (len > strm.avail_out) {
+ len = strm.avail_out;
+ }
+ if (len === 0) { return; }
+
+ strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);
+ strm.next_out += len;
+ s.pending_out += len;
+ strm.total_out += len;
+ strm.avail_out -= len;
+ s.pending -= len;
+ if (s.pending === 0) {
+ s.pending_out = 0;
+ }
+};
+
+
+const flush_block_only = (s, last) => {
+ _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
+ s.block_start = s.strstart;
+ flush_pending(s.strm);
+};
+
+
+const put_byte = (s, b) => {
+ s.pending_buf[s.pending++] = b;
+};
+
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+const putShortMSB = (s, b) => {
+
+ // put_byte(s, (Byte)(b >> 8));
+// put_byte(s, (Byte)(b & 0xff));
+ s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
+ s.pending_buf[s.pending++] = b & 0xff;
+};
+
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read. All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->input buffer and copying from it.
+ * (See also flush_pending()).
+ */
+const read_buf = (strm, buf, start, size) => {
+
+ let len = strm.avail_in;
+
+ if (len > size) { len = size; }
+ if (len === 0) { return 0; }
+
+ strm.avail_in -= len;
+
+ // zmemcpy(buf, strm->next_in, len);
+ buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);
+ if (strm.state.wrap === 1) {
+ strm.adler = adler32_1(strm.adler, buf, len, start);
+ }
+
+ else if (strm.state.wrap === 2) {
+ strm.adler = crc32_1(strm.adler, buf, len, start);
+ }
+
+ strm.next_in += len;
+ strm.total_in += len;
+
+ return len;
+};
+
+
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+const longest_match = (s, cur_match) => {
+
+ let chain_length = s.max_chain_length; /* max hash chain length */
+ let scan = s.strstart; /* current string */
+ let match; /* matched string */
+ let len; /* length of current match */
+ let best_len = s.prev_length; /* best match length so far */
+ let nice_match = s.nice_match; /* stop if match long enough */
+ const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
+ s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
+
+ const _win = s.window; // shortcut
+
+ const wmask = s.w_mask;
+ const prev = s.prev;
+
+ /* Stop when cur_match becomes <= limit. To simplify the code,
+ * we prevent matches with the string of window index 0.
+ */
+
+ const strend = s.strstart + MAX_MATCH;
+ let scan_end1 = _win[scan + best_len - 1];
+ let scan_end = _win[scan + best_len];
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ /* Do not waste too much time if we already have a good match: */
+ if (s.prev_length >= s.good_match) {
+ chain_length >>= 2;
+ }
+ /* Do not look for matches beyond the end of the input. This is necessary
+ * to make deflate deterministic.
+ */
+ if (nice_match > s.lookahead) { nice_match = s.lookahead; }
+
+ // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ do {
+ // Assert(cur_match < s->strstart, "no future");
+ match = cur_match;
+
+ /* Skip to next match if the match length cannot increase
+ * or if the match length is less than 2. Note that the checks below
+ * for insufficient lookahead only occur occasionally for performance
+ * reasons. Therefore uninitialized memory will be accessed, and
+ * conditional jumps will be made that depend on those values.
+ * However the length of the match is limited to the lookahead, so
+ * the output of deflate is not affected by the uninitialized values.
+ */
+
+ if (_win[match + best_len] !== scan_end ||
+ _win[match + best_len - 1] !== scan_end1 ||
+ _win[match] !== _win[scan] ||
+ _win[++match] !== _win[scan + 1]) {
+ continue;
+ }
+
+ /* The check at best_len-1 can be removed because it will be made
+ * again later. (This heuristic is not always a win.)
+ * It is not necessary to compare scan[2] and match[2] since they
+ * are always equal when the other bytes match, given that
+ * the hash keys are equal and that HASH_BITS >= 8.
+ */
+ scan += 2;
+ match++;
+ // Assert(*scan == *match, "match[2]?");
+
+ /* We check for insufficient lookahead only every 8th comparison;
+ * the 256th check will be made at strstart+258.
+ */
+ do {
+ /*jshint noempty:false*/
+ } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+ _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+ _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+ _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+ scan < strend);
+
+ // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (strend - scan);
+ scan = strend - MAX_MATCH;
+
+ if (len > best_len) {
+ s.match_start = cur_match;
+ best_len = len;
+ if (len >= nice_match) {
+ break;
+ }
+ scan_end1 = _win[scan + best_len - 1];
+ scan_end = _win[scan + best_len];
+ }
+ } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
+
+ if (best_len <= s.lookahead) {
+ return best_len;
+ }
+ return s.lookahead;
+};
+
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ * At least one byte has been read, or avail_in == 0; reads are
+ * performed for at least two bytes (required for the zip translate_eol
+ * option -- not supported here).
+ */
+const fill_window = (s) => {
+
+ const _w_size = s.w_size;
+ let n, more, str;
+
+ //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
+ do {
+ more = s.window_size - s.lookahead - s.strstart;
+
+ // JS ints have 32 bit, block below not needed
+ /* Deal with !@#$% 64K limit: */
+ //if (sizeof(int) <= 2) {
+ // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+ // more = wsize;
+ //
+ // } else if (more == (unsigned)(-1)) {
+ // /* Very unlikely, but possible on 16 bit machine if
+ // * strstart == 0 && lookahead == 1 (input done a byte at time)
+ // */
+ // more--;
+ // }
+ //}
+
+
+ /* If the window is almost full and there is insufficient lookahead,
+ * move the upper half to the lower one to make room in the upper half.
+ */
+ if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
+
+ s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);
+ s.match_start -= _w_size;
+ s.strstart -= _w_size;
+ /* we now have strstart >= MAX_DIST */
+ s.block_start -= _w_size;
+ if (s.insert > s.strstart) {
+ s.insert = s.strstart;
+ }
+ slide_hash(s);
+ more += _w_size;
+ }
+ if (s.strm.avail_in === 0) {
+ break;
+ }
+
+ /* If there was no sliding:
+ * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+ * more == window_size - lookahead - strstart
+ * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+ * => more >= window_size - 2*WSIZE + 2
+ * In the BIG_MEM or MMAP case (not yet supported),
+ * window_size == input_size + MIN_LOOKAHEAD &&
+ * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+ * Otherwise, window_size == 2*WSIZE so more >= 2.
+ * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+ */
+ //Assert(more >= 2, "more < 2");
+ n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
+ s.lookahead += n;
+
+ /* Initialize the hash value now that we have some input: */
+ if (s.lookahead + s.insert >= MIN_MATCH) {
+ str = s.strstart - s.insert;
+ s.ins_h = s.window[str];
+
+ /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
+ s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);
+//#if MIN_MATCH != 3
+// Call update_hash() MIN_MATCH-3 more times
+//#endif
+ while (s.insert) {
+ /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+ s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
+
+ s.prev[str & s.w_mask] = s.head[s.ins_h];
+ s.head[s.ins_h] = str;
+ str++;
+ s.insert--;
+ if (s.lookahead + s.insert < MIN_MATCH) {
+ break;
+ }
+ }
+ }
+ /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+ * but this is not important since only literal bytes will be emitted.
+ */
+
+ } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
+
+ /* If the WIN_INIT bytes after the end of the current data have never been
+ * written, then zero those bytes in order to avoid memory check reports of
+ * the use of uninitialized (or uninitialised as Julian writes) bytes by
+ * the longest match routines. Update the high water mark for the next
+ * time through here. WIN_INIT is set to MAX_MATCH since the longest match
+ * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+ */
+// if (s.high_water < s.window_size) {
+// const curr = s.strstart + s.lookahead;
+// let init = 0;
+//
+// if (s.high_water < curr) {
+// /* Previous high water mark below current data -- zero WIN_INIT
+// * bytes or up to end of window, whichever is less.
+// */
+// init = s.window_size - curr;
+// if (init > WIN_INIT)
+// init = WIN_INIT;
+// zmemzero(s->window + curr, (unsigned)init);
+// s->high_water = curr + init;
+// }
+// else if (s->high_water < (ulg)curr + WIN_INIT) {
+// /* High water mark at or above current data, but below current data
+// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+// * to end of window, whichever is less.
+// */
+// init = (ulg)curr + WIN_INIT - s->high_water;
+// if (init > s->window_size - s->high_water)
+// init = s->window_size - s->high_water;
+// zmemzero(s->window + s->high_water, (unsigned)init);
+// s->high_water += init;
+// }
+// }
+//
+// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+// "not enough room for search");
+};
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ *
+ * In case deflateParams() is used to later switch to a non-zero compression
+ * level, s->matches (otherwise unused when storing) keeps track of the number
+ * of hash table slides to perform. If s->matches is 1, then one hash table
+ * slide will be done when switching. If s->matches is 2, the maximum value
+ * allowed here, then the hash table will be cleared, since two or more slides
+ * is the same as a clear.
+ *
+ * deflate_stored() is written to minimize the number of times an input byte is
+ * copied. It is most efficient with large input and output buffers, which
+ * maximizes the opportunites to have a single copy from next_in to next_out.
+ */
+const deflate_stored = (s, flush) => {
+
+ /* Smallest worthy block size when not flushing or finishing. By default
+ * this is 32K. This can be as small as 507 bytes for memLevel == 1. For
+ * large input and output buffers, the stored block size will be larger.
+ */
+ let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5;
+
+ /* Copy as many min_block or larger stored blocks directly to next_out as
+ * possible. If flushing, copy the remaining available input to next_out as
+ * stored blocks, if there is enough space.
+ */
+ let len, left, have, last = 0;
+ let used = s.strm.avail_in;
+ do {
+ /* Set len to the maximum size block that we can copy directly with the
+ * available input data and output space. Set left to how much of that
+ * would be copied from what's left in the window.
+ */
+ len = 65535/* MAX_STORED */; /* maximum deflate stored block length */
+ have = (s.bi_valid + 42) >> 3; /* number of header bytes */
+ if (s.strm.avail_out < have) { /* need room for header */
+ break;
+ }
+ /* maximum stored block length that will fit in avail_out: */
+ have = s.strm.avail_out - have;
+ left = s.strstart - s.block_start; /* bytes left in window */
+ if (len > left + s.strm.avail_in) {
+ len = left + s.strm.avail_in; /* limit len to the input */
+ }
+ if (len > have) {
+ len = have; /* limit len to the output */
+ }
+
+ /* If the stored block would be less than min_block in length, or if
+ * unable to copy all of the available input when flushing, then try
+ * copying to the window and the pending buffer instead. Also don't
+ * write an empty block when flushing -- deflate() does that.
+ */
+ if (len < min_block && ((len === 0 && flush !== Z_FINISH$3) ||
+ flush === Z_NO_FLUSH$2 ||
+ len !== left + s.strm.avail_in)) {
+ break;
+ }
+
+ /* Make a dummy stored block in pending to get the header bytes,
+ * including any pending bits. This also updates the debugging counts.
+ */
+ last = flush === Z_FINISH$3 && len === left + s.strm.avail_in ? 1 : 0;
+ _tr_stored_block(s, 0, 0, last);
+
+ /* Replace the lengths in the dummy stored block with len. */
+ s.pending_buf[s.pending - 4] = len;
+ s.pending_buf[s.pending - 3] = len >> 8;
+ s.pending_buf[s.pending - 2] = ~len;
+ s.pending_buf[s.pending - 1] = ~len >> 8;
+
+ /* Write the stored block header bytes. */
+ flush_pending(s.strm);
+
+//#ifdef ZLIB_DEBUG
+// /* Update debugging counts for the data about to be copied. */
+// s->compressed_len += len << 3;
+// s->bits_sent += len << 3;
+//#endif
+
+ /* Copy uncompressed bytes from the window to next_out. */
+ if (left) {
+ if (left > len) {
+ left = len;
+ }
+ //zmemcpy(s->strm->next_out, s->window + s->block_start, left);
+ s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out);
+ s.strm.next_out += left;
+ s.strm.avail_out -= left;
+ s.strm.total_out += left;
+ s.block_start += left;
+ len -= left;
+ }
+
+ /* Copy uncompressed bytes directly from next_in to next_out, updating
+ * the check value.
+ */
+ if (len) {
+ read_buf(s.strm, s.strm.output, s.strm.next_out, len);
+ s.strm.next_out += len;
+ s.strm.avail_out -= len;
+ s.strm.total_out += len;
+ }
+ } while (last === 0);
+
+ /* Update the sliding window with the last s->w_size bytes of the copied
+ * data, or append all of the copied data to the existing window if less
+ * than s->w_size bytes were copied. Also update the number of bytes to
+ * insert in the hash tables, in the event that deflateParams() switches to
+ * a non-zero compression level.
+ */
+ used -= s.strm.avail_in; /* number of input bytes directly copied */
+ if (used) {
+ /* If any input was used, then no unused input remains in the window,
+ * therefore s->block_start == s->strstart.
+ */
+ if (used >= s.w_size) { /* supplant the previous history */
+ s.matches = 2; /* clear hash */
+ //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);
+ s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0);
+ s.strstart = s.w_size;
+ s.insert = s.strstart;
+ }
+ else {
+ if (s.window_size - s.strstart <= used) {
+ /* Slide the window down. */
+ s.strstart -= s.w_size;
+ //zmemcpy(s->window, s->window + s->w_size, s->strstart);
+ s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);
+ if (s.matches < 2) {
+ s.matches++; /* add a pending slide_hash() */
+ }
+ if (s.insert > s.strstart) {
+ s.insert = s.strstart;
+ }
+ }
+ //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);
+ s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart);
+ s.strstart += used;
+ s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;
+ }
+ s.block_start = s.strstart;
+ }
+ if (s.high_water < s.strstart) {
+ s.high_water = s.strstart;
+ }
+
+ /* If the last block was written to next_out, then done. */
+ if (last) {
+ return BS_FINISH_DONE;
+ }
+
+ /* If flushing and all input has been consumed, then done. */
+ if (flush !== Z_NO_FLUSH$2 && flush !== Z_FINISH$3 &&
+ s.strm.avail_in === 0 && s.strstart === s.block_start) {
+ return BS_BLOCK_DONE;
+ }
+
+ /* Fill the window with any remaining input. */
+ have = s.window_size - s.strstart;
+ if (s.strm.avail_in > have && s.block_start >= s.w_size) {
+ /* Slide the window down. */
+ s.block_start -= s.w_size;
+ s.strstart -= s.w_size;
+ //zmemcpy(s->window, s->window + s->w_size, s->strstart);
+ s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);
+ if (s.matches < 2) {
+ s.matches++; /* add a pending slide_hash() */
+ }
+ have += s.w_size; /* more space now */
+ if (s.insert > s.strstart) {
+ s.insert = s.strstart;
+ }
+ }
+ if (have > s.strm.avail_in) {
+ have = s.strm.avail_in;
+ }
+ if (have) {
+ read_buf(s.strm, s.window, s.strstart, have);
+ s.strstart += have;
+ s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;
+ }
+ if (s.high_water < s.strstart) {
+ s.high_water = s.strstart;
+ }
+
+ /* There was not enough avail_out to write a complete worthy or flushed
+ * stored block to next_out. Write a stored block to pending instead, if we
+ * have enough input for a worthy block, or if flushing and there is enough
+ * room for the remaining input as a stored block in the pending buffer.
+ */
+ have = (s.bi_valid + 42) >> 3; /* number of header bytes */
+ /* maximum stored block length that will fit in pending: */
+ have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have;
+ min_block = have > s.w_size ? s.w_size : have;
+ left = s.strstart - s.block_start;
+ if (left >= min_block ||
+ ((left || flush === Z_FINISH$3) && flush !== Z_NO_FLUSH$2 &&
+ s.strm.avail_in === 0 && left <= have)) {
+ len = left > have ? have : left;
+ last = flush === Z_FINISH$3 && s.strm.avail_in === 0 &&
+ len === left ? 1 : 0;
+ _tr_stored_block(s, s.block_start, len, last);
+ s.block_start += len;
+ flush_pending(s.strm);
+ }
+
+ /* We've done all we can with the available input and output. */
+ return last ? BS_FINISH_STARTED : BS_NEED_MORE;
+};
+
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+const deflate_fast = (s, flush) => {
+
+ let hash_head; /* head of the hash chain */
+ let bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s.lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {
+ return BS_NEED_MORE;
+ }
+ if (s.lookahead === 0) {
+ break; /* flush the current block */
+ }
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ hash_head = 0/*NIL*/;
+ if (s.lookahead >= MIN_MATCH) {
+ /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
+ hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+ s.head[s.ins_h] = s.strstart;
+ /***/
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ * At this point we have always match_length < MIN_MATCH
+ */
+ if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+ s.match_length = longest_match(s, hash_head);
+ /* longest_match() sets match_start */
+ }
+ if (s.match_length >= MIN_MATCH) {
+ // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
+
+ /*** _tr_tally_dist(s, s.strstart - s.match_start,
+ s.match_length - MIN_MATCH, bflush); ***/
+ bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
+
+ s.lookahead -= s.match_length;
+
+ /* Insert new strings in the hash table only if the match length
+ * is not too large. This saves time but degrades compression.
+ */
+ if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
+ s.match_length--; /* string at strstart already in table */
+ do {
+ s.strstart++;
+ /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
+ hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+ s.head[s.ins_h] = s.strstart;
+ /***/
+ /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+ * always MIN_MATCH bytes ahead.
+ */
+ } while (--s.match_length !== 0);
+ s.strstart++;
+ } else
+ {
+ s.strstart += s.match_length;
+ s.match_length = 0;
+ s.ins_h = s.window[s.strstart];
+ /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);
+
+//#if MIN_MATCH != 3
+// Call UPDATE_HASH() MIN_MATCH-3 more times
+//#endif
+ /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+ * matter since it will be recomputed at next deflate call.
+ */
+ }
+ } else {
+ /* No match, output a literal byte */
+ //Tracevv((stderr,"%c", s.window[s.strstart]));
+ /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+ bflush = _tr_tally(s, 0, s.window[s.strstart]);
+
+ s.lookahead--;
+ s.strstart++;
+ }
+ if (bflush) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ }
+ s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
+ if (flush === Z_FINISH$3) {
+ /*** FLUSH_BLOCK(s, 1); ***/
+ flush_block_only(s, true);
+ if (s.strm.avail_out === 0) {
+ return BS_FINISH_STARTED;
+ }
+ /***/
+ return BS_FINISH_DONE;
+ }
+ if (s.sym_next) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ return BS_BLOCK_DONE;
+};
+
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+const deflate_slow = (s, flush) => {
+
+ let hash_head; /* head of hash chain */
+ let bflush; /* set if current block must be flushed */
+
+ let max_insert;
+
+ /* Process the input block. */
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the next match, plus MIN_MATCH bytes to insert the
+ * string following the next match.
+ */
+ if (s.lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {
+ return BS_NEED_MORE;
+ }
+ if (s.lookahead === 0) { break; } /* flush the current block */
+ }
+
+ /* Insert the string window[strstart .. strstart+2] in the
+ * dictionary, and set hash_head to the head of the hash chain:
+ */
+ hash_head = 0/*NIL*/;
+ if (s.lookahead >= MIN_MATCH) {
+ /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
+ hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+ s.head[s.ins_h] = s.strstart;
+ /***/
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ */
+ s.prev_length = s.match_length;
+ s.prev_match = s.match_start;
+ s.match_length = MIN_MATCH - 1;
+
+ if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
+ s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
+ /* To simplify the code, we prevent matches with the string
+ * of window index 0 (in particular we have to avoid a match
+ * of the string with itself at the start of the input file).
+ */
+ s.match_length = longest_match(s, hash_head);
+ /* longest_match() sets match_start */
+
+ if (s.match_length <= 5 &&
+ (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
+
+ /* If prev_match is also MIN_MATCH, match_start is garbage
+ * but we will ignore the current match anyway.
+ */
+ s.match_length = MIN_MATCH - 1;
+ }
+ }
+ /* If there was a match at the previous step and the current
+ * match is not better, output the previous match:
+ */
+ if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
+ max_insert = s.strstart + s.lookahead - MIN_MATCH;
+ /* Do not insert strings in hash table beyond this. */
+
+ //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
+
+ /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
+ s.prev_length - MIN_MATCH, bflush);***/
+ bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
+ /* Insert in hash table all strings up to the end of the match.
+ * strstart-1 and strstart are already inserted. If there is not
+ * enough lookahead, the last two strings are not inserted in
+ * the hash table.
+ */
+ s.lookahead -= s.prev_length - 1;
+ s.prev_length -= 2;
+ do {
+ if (++s.strstart <= max_insert) {
+ /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+ s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);
+ hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+ s.head[s.ins_h] = s.strstart;
+ /***/
+ }
+ } while (--s.prev_length !== 0);
+ s.match_available = 0;
+ s.match_length = MIN_MATCH - 1;
+ s.strstart++;
+
+ if (bflush) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+
+ } else if (s.match_available) {
+ /* If there was no match at the previous position, output a
+ * single literal. If there was a match but the current match
+ * is longer, truncate the previous match to a single literal.
+ */
+ //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+ bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);
+
+ if (bflush) {
+ /*** FLUSH_BLOCK_ONLY(s, 0) ***/
+ flush_block_only(s, false);
+ /***/
+ }
+ s.strstart++;
+ s.lookahead--;
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ } else {
+ /* There is no previous match to compare with, wait for
+ * the next step to decide.
+ */
+ s.match_available = 1;
+ s.strstart++;
+ s.lookahead--;
+ }
+ }
+ //Assert (flush != Z_NO_FLUSH, "no flush?");
+ if (s.match_available) {
+ //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+ bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);
+
+ s.match_available = 0;
+ }
+ s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
+ if (flush === Z_FINISH$3) {
+ /*** FLUSH_BLOCK(s, 1); ***/
+ flush_block_only(s, true);
+ if (s.strm.avail_out === 0) {
+ return BS_FINISH_STARTED;
+ }
+ /***/
+ return BS_FINISH_DONE;
+ }
+ if (s.sym_next) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+
+ return BS_BLOCK_DONE;
+};
+
+
+/* ===========================================================================
+ * For Z_RLE, simply look for runs of bytes, generate matches only of distance
+ * one. Do not maintain a hash table. (It will be regenerated if this run of
+ * deflate switches away from Z_RLE.)
+ */
+const deflate_rle = (s, flush) => {
+
+ let bflush; /* set if current block must be flushed */
+ let prev; /* byte at distance one to match */
+ let scan, strend; /* scan goes up to strend for length of run */
+
+ const _win = s.window;
+
+ for (;;) {
+ /* Make sure that we always have enough lookahead, except
+ * at the end of the input file. We need MAX_MATCH bytes
+ * for the longest run, plus one for the unrolled loop.
+ */
+ if (s.lookahead <= MAX_MATCH) {
+ fill_window(s);
+ if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) {
+ return BS_NEED_MORE;
+ }
+ if (s.lookahead === 0) { break; } /* flush the current block */
+ }
+
+ /* See how many times the previous byte repeats */
+ s.match_length = 0;
+ if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
+ scan = s.strstart - 1;
+ prev = _win[scan];
+ if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
+ strend = s.strstart + MAX_MATCH;
+ do {
+ /*jshint noempty:false*/
+ } while (prev === _win[++scan] && prev === _win[++scan] &&
+ prev === _win[++scan] && prev === _win[++scan] &&
+ prev === _win[++scan] && prev === _win[++scan] &&
+ prev === _win[++scan] && prev === _win[++scan] &&
+ scan < strend);
+ s.match_length = MAX_MATCH - (strend - scan);
+ if (s.match_length > s.lookahead) {
+ s.match_length = s.lookahead;
+ }
+ }
+ //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
+ }
+
+ /* Emit match if have run of MIN_MATCH or longer, else emit literal */
+ if (s.match_length >= MIN_MATCH) {
+ //check_match(s, s.strstart, s.strstart - 1, s.match_length);
+
+ /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
+ bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);
+
+ s.lookahead -= s.match_length;
+ s.strstart += s.match_length;
+ s.match_length = 0;
+ } else {
+ /* No match, output a literal byte */
+ //Tracevv((stderr,"%c", s->window[s->strstart]));
+ /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+ bflush = _tr_tally(s, 0, s.window[s.strstart]);
+
+ s.lookahead--;
+ s.strstart++;
+ }
+ if (bflush) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ }
+ s.insert = 0;
+ if (flush === Z_FINISH$3) {
+ /*** FLUSH_BLOCK(s, 1); ***/
+ flush_block_only(s, true);
+ if (s.strm.avail_out === 0) {
+ return BS_FINISH_STARTED;
+ }
+ /***/
+ return BS_FINISH_DONE;
+ }
+ if (s.sym_next) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ return BS_BLOCK_DONE;
+};
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+const deflate_huff = (s, flush) => {
+
+ let bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we have a literal to write. */
+ if (s.lookahead === 0) {
+ fill_window(s);
+ if (s.lookahead === 0) {
+ if (flush === Z_NO_FLUSH$2) {
+ return BS_NEED_MORE;
+ }
+ break; /* flush the current block */
+ }
+ }
+
+ /* Output a literal byte */
+ s.match_length = 0;
+ //Tracevv((stderr,"%c", s->window[s->strstart]));
+ /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+ bflush = _tr_tally(s, 0, s.window[s.strstart]);
+ s.lookahead--;
+ s.strstart++;
+ if (bflush) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ }
+ s.insert = 0;
+ if (flush === Z_FINISH$3) {
+ /*** FLUSH_BLOCK(s, 1); ***/
+ flush_block_only(s, true);
+ if (s.strm.avail_out === 0) {
+ return BS_FINISH_STARTED;
+ }
+ /***/
+ return BS_FINISH_DONE;
+ }
+ if (s.sym_next) {
+ /*** FLUSH_BLOCK(s, 0); ***/
+ flush_block_only(s, false);
+ if (s.strm.avail_out === 0) {
+ return BS_NEED_MORE;
+ }
+ /***/
+ }
+ return BS_BLOCK_DONE;
+};
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+function Config(good_length, max_lazy, nice_length, max_chain, func) {
+
+ this.good_length = good_length;
+ this.max_lazy = max_lazy;
+ this.nice_length = nice_length;
+ this.max_chain = max_chain;
+ this.func = func;
+}
+
+const configuration_table = [
+ /* good lazy nice chain */
+ new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */
+ new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */
+ new Config(4, 5, 16, 8, deflate_fast), /* 2 */
+ new Config(4, 6, 32, 32, deflate_fast), /* 3 */
+
+ new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */
+ new Config(8, 16, 32, 32, deflate_slow), /* 5 */
+ new Config(8, 16, 128, 128, deflate_slow), /* 6 */
+ new Config(8, 32, 128, 256, deflate_slow), /* 7 */
+ new Config(32, 128, 258, 1024, deflate_slow), /* 8 */
+ new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */
+];
+
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+const lm_init = (s) => {
+
+ s.window_size = 2 * s.w_size;
+
+ /*** CLEAR_HASH(s); ***/
+ zero(s.head); // Fill with NIL (= 0);
+
+ /* Set the default configuration parameters:
+ */
+ s.max_lazy_match = configuration_table[s.level].max_lazy;
+ s.good_match = configuration_table[s.level].good_length;
+ s.nice_match = configuration_table[s.level].nice_length;
+ s.max_chain_length = configuration_table[s.level].max_chain;
+
+ s.strstart = 0;
+ s.block_start = 0;
+ s.lookahead = 0;
+ s.insert = 0;
+ s.match_length = s.prev_length = MIN_MATCH - 1;
+ s.match_available = 0;
+ s.ins_h = 0;
+};
+
+
+function DeflateState() {
+ this.strm = null; /* pointer back to this zlib stream */
+ this.status = 0; /* as the name implies */
+ this.pending_buf = null; /* output still pending */
+ this.pending_buf_size = 0; /* size of pending_buf */
+ this.pending_out = 0; /* next pending byte to output to the stream */
+ this.pending = 0; /* nb of bytes in the pending buffer */
+ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
+ this.gzhead = null; /* gzip header information to write */
+ this.gzindex = 0; /* where in extra, name, or comment */
+ this.method = Z_DEFLATED$2; /* can only be DEFLATED */
+ this.last_flush = -1; /* value of flush param for previous deflate call */
+
+ this.w_size = 0; /* LZ77 window size (32K by default) */
+ this.w_bits = 0; /* log2(w_size) (8..16) */
+ this.w_mask = 0; /* w_size - 1 */
+
+ this.window = null;
+ /* Sliding window. Input bytes are read into the second half of the window,
+ * and move to the first half later to keep a dictionary of at least wSize
+ * bytes. With this organization, matches are limited to a distance of
+ * wSize-MAX_MATCH bytes, but this ensures that IO is always
+ * performed with a length multiple of the block size.
+ */
+
+ this.window_size = 0;
+ /* Actual size of window: 2*wSize, except when the user input buffer
+ * is directly used as sliding window.
+ */
+
+ this.prev = null;
+ /* Link to older string with same hash index. To limit the size of this
+ * array to 64K, this link is maintained only for the last 32K strings.
+ * An index in this array is thus a window index modulo 32K.
+ */
+
+ this.head = null; /* Heads of the hash chains or NIL. */
+
+ this.ins_h = 0; /* hash index of string to be inserted */
+ this.hash_size = 0; /* number of elements in hash table */
+ this.hash_bits = 0; /* log2(hash_size) */
+ this.hash_mask = 0; /* hash_size-1 */
+
+ this.hash_shift = 0;
+ /* Number of bits by which ins_h must be shifted at each input
+ * step. It must be such that after MIN_MATCH steps, the oldest
+ * byte no longer takes part in the hash key, that is:
+ * hash_shift * MIN_MATCH >= hash_bits
+ */
+
+ this.block_start = 0;
+ /* Window position at the beginning of the current output block. Gets
+ * negative when the window is moved backwards.
+ */
+
+ this.match_length = 0; /* length of best match */
+ this.prev_match = 0; /* previous match */
+ this.match_available = 0; /* set if previous match exists */
+ this.strstart = 0; /* start of string to insert */
+ this.match_start = 0; /* start of matching string */
+ this.lookahead = 0; /* number of valid bytes ahead in window */
+
+ this.prev_length = 0;
+ /* Length of the best match at previous step. Matches not greater than this
+ * are discarded. This is used in the lazy match evaluation.
+ */
+
+ this.max_chain_length = 0;
+ /* To speed up deflation, hash chains are never searched beyond this
+ * length. A higher limit improves compression ratio but degrades the
+ * speed.
+ */
+
+ this.max_lazy_match = 0;
+ /* Attempt to find a better match only when the current match is strictly
+ * smaller than this value. This mechanism is used only for compression
+ * levels >= 4.
+ */
+ // That's alias to max_lazy_match, don't use directly
+ //this.max_insert_length = 0;
+ /* Insert new strings in the hash table only if the match length is not
+ * greater than this length. This saves time but degrades compression.
+ * max_insert_length is used only for compression levels <= 3.
+ */
+
+ this.level = 0; /* compression level (1..9) */
+ this.strategy = 0; /* favor or force Huffman coding*/
+
+ this.good_match = 0;
+ /* Use a faster search when the previous match is longer than this */
+
+ this.nice_match = 0; /* Stop searching when current match exceeds this */
+
+ /* used by trees.c: */
+
+ /* Didn't use ct_data typedef below to suppress compiler warning */
+
+ // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
+ // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+ // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
+
+ // Use flat array of DOUBLE size, with interleaved fata,
+ // because JS does not support effective
+ this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);
+ this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);
+ this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);
+ zero(this.dyn_ltree);
+ zero(this.dyn_dtree);
+ zero(this.bl_tree);
+
+ this.l_desc = null; /* desc. for literal tree */
+ this.d_desc = null; /* desc. for distance tree */
+ this.bl_desc = null; /* desc. for bit length tree */
+
+ //ush bl_count[MAX_BITS+1];
+ this.bl_count = new Uint16Array(MAX_BITS + 1);
+ /* number of codes at each bit length for an optimal tree */
+
+ //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
+ this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */
+ zero(this.heap);
+
+ this.heap_len = 0; /* number of elements in the heap */
+ this.heap_max = 0; /* element of largest frequency */
+ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+ * The same heap array is used to build all trees.
+ */
+
+ this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
+ zero(this.depth);
+ /* Depth of each subtree used as tie breaker for trees of equal frequency
+ */
+
+ this.sym_buf = 0; /* buffer for distances and literals/lengths */
+
+ this.lit_bufsize = 0;
+ /* Size of match buffer for literals/lengths. There are 4 reasons for
+ * limiting lit_bufsize to 64K:
+ * - frequencies can be kept in 16 bit counters
+ * - if compression is not successful for the first block, all input
+ * data is still in the window so we can still emit a stored block even
+ * when input comes from standard input. (This can also be done for
+ * all blocks if lit_bufsize is not greater than 32K.)
+ * - if compression is not successful for a file smaller than 64K, we can
+ * even emit a stored file instead of a stored block (saving 5 bytes).
+ * This is applicable only for zip (not gzip or zlib).
+ * - creating new Huffman trees less frequently may not provide fast
+ * adaptation to changes in the input data statistics. (Take for
+ * example a binary file with poorly compressible code followed by
+ * a highly compressible string table.) Smaller buffer sizes give
+ * fast adaptation but have of course the overhead of transmitting
+ * trees more frequently.
+ * - I can't count above 4
+ */
+
+ this.sym_next = 0; /* running index in sym_buf */
+ this.sym_end = 0; /* symbol table full when sym_next reaches this */
+
+ this.opt_len = 0; /* bit length of current block with optimal trees */
+ this.static_len = 0; /* bit length of current block with static trees */
+ this.matches = 0; /* number of string matches in current block */
+ this.insert = 0; /* bytes at end of window left to insert */
+
+
+ this.bi_buf = 0;
+ /* Output buffer. bits are inserted starting at the bottom (least
+ * significant bits).
+ */
+ this.bi_valid = 0;
+ /* Number of valid bits in bi_buf. All bits above the last valid bit
+ * are always zero.
+ */
+
+ // Used for window memory init. We safely ignore it for JS. That makes
+ // sense only for pointers and memory check tools.
+ //this.high_water = 0;
+ /* High water mark offset in window for initialized bytes -- bytes above
+ * this are set to zero in order to avoid memory check warnings when
+ * longest match routines access bytes past the input. This is then
+ * updated to the new high water mark.
+ */
+}
+
+
+/* =========================================================================
+ * Check for a valid deflate stream state. Return 0 if ok, 1 if not.
+ */
+const deflateStateCheck = (strm) => {
+
+ if (!strm) {
+ return 1;
+ }
+ const s = strm.state;
+ if (!s || s.strm !== strm || (s.status !== INIT_STATE &&
+//#ifdef GZIP
+ s.status !== GZIP_STATE &&
+//#endif
+ s.status !== EXTRA_STATE &&
+ s.status !== NAME_STATE &&
+ s.status !== COMMENT_STATE &&
+ s.status !== HCRC_STATE &&
+ s.status !== BUSY_STATE &&
+ s.status !== FINISH_STATE)) {
+ return 1;
+ }
+ return 0;
+};
+
+
+const deflateResetKeep = (strm) => {
+
+ if (deflateStateCheck(strm)) {
+ return err(strm, Z_STREAM_ERROR$2);
+ }
+
+ strm.total_in = strm.total_out = 0;
+ strm.data_type = Z_UNKNOWN;
+
+ const s = strm.state;
+ s.pending = 0;
+ s.pending_out = 0;
+
+ if (s.wrap < 0) {
+ s.wrap = -s.wrap;
+ /* was made negative by deflate(..., Z_FINISH); */
+ }
+ s.status =
+//#ifdef GZIP
+ s.wrap === 2 ? GZIP_STATE :
+//#endif
+ s.wrap ? INIT_STATE : BUSY_STATE;
+ strm.adler = (s.wrap === 2) ?
+ 0 // crc32(0, Z_NULL, 0)
+ :
+ 1; // adler32(0, Z_NULL, 0)
+ s.last_flush = -2;
+ _tr_init(s);
+ return Z_OK$3;
+};
+
+
+const deflateReset = (strm) => {
+
+ const ret = deflateResetKeep(strm);
+ if (ret === Z_OK$3) {
+ lm_init(strm.state);
+ }
+ return ret;
+};
+
+
+const deflateSetHeader = (strm, head) => {
+
+ if (deflateStateCheck(strm) || strm.state.wrap !== 2) {
+ return Z_STREAM_ERROR$2;
+ }
+ strm.state.gzhead = head;
+ return Z_OK$3;
+};
+
+
+const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {
+
+ if (!strm) { // === Z_NULL
+ return Z_STREAM_ERROR$2;
+ }
+ let wrap = 1;
+
+ if (level === Z_DEFAULT_COMPRESSION$1) {
+ level = 6;
+ }
+
+ if (windowBits < 0) { /* suppress zlib wrapper */
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+
+ else if (windowBits > 15) {
+ wrap = 2; /* write gzip wrapper instead */
+ windowBits -= 16;
+ }
+
+
+ if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 ||
+ windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {
+ return err(strm, Z_STREAM_ERROR$2);
+ }
+
+
+ if (windowBits === 8) {
+ windowBits = 9;
+ }
+ /* until 256-byte window bug fixed */
+
+ const s = new DeflateState();
+
+ strm.state = s;
+ s.strm = strm;
+ s.status = INIT_STATE; /* to pass state test in deflateReset() */
+
+ s.wrap = wrap;
+ s.gzhead = null;
+ s.w_bits = windowBits;
+ s.w_size = 1 << s.w_bits;
+ s.w_mask = s.w_size - 1;
+
+ s.hash_bits = memLevel + 7;
+ s.hash_size = 1 << s.hash_bits;
+ s.hash_mask = s.hash_size - 1;
+ s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
+
+ s.window = new Uint8Array(s.w_size * 2);
+ s.head = new Uint16Array(s.hash_size);
+ s.prev = new Uint16Array(s.w_size);
+
+ // Don't need mem init magic for JS.
+ //s.high_water = 0; /* nothing written to s->window yet */
+
+ s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+ /* We overlay pending_buf and sym_buf. This works since the average size
+ * for length/distance pairs over any compressed block is assured to be 31
+ * bits or less.
+ *
+ * Analysis: The longest fixed codes are a length code of 8 bits plus 5
+ * extra bits, for lengths 131 to 257. The longest fixed distance codes are
+ * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
+ * possible fixed-codes length/distance pair is then 31 bits total.
+ *
+ * sym_buf starts one-fourth of the way into pending_buf. So there are
+ * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
+ * in sym_buf is three bytes -- two for the distance and one for the
+ * literal/length. As each symbol is consumed, the pointer to the next
+ * sym_buf value to read moves forward three bytes. From that symbol, up to
+ * 31 bits are written to pending_buf. The closest the written pending_buf
+ * bits gets to the next sym_buf symbol to read is just before the last
+ * code is written. At that time, 31*(n-2) bits have been written, just
+ * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at
+ * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1
+ * symbols are written.) The closest the writing gets to what is unread is
+ * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and
+ * can range from 128 to 32768.
+ *
+ * Therefore, at a minimum, there are 142 bits of space between what is
+ * written and what is read in the overlain buffers, so the symbols cannot
+ * be overwritten by the compressed data. That space is actually 139 bits,
+ * due to the three-bit fixed-code block header.
+ *
+ * That covers the case where either Z_FIXED is specified, forcing fixed
+ * codes, or when the use of fixed codes is chosen, because that choice
+ * results in a smaller compressed block than dynamic codes. That latter
+ * condition then assures that the above analysis also covers all dynamic
+ * blocks. A dynamic-code block will only be chosen to be emitted if it has
+ * fewer bits than a fixed-code block would for the same set of symbols.
+ * Therefore its average symbol length is assured to be less than 31. So
+ * the compressed data for a dynamic block also cannot overwrite the
+ * symbols from which it is being constructed.
+ */
+
+ s.pending_buf_size = s.lit_bufsize * 4;
+ s.pending_buf = new Uint8Array(s.pending_buf_size);
+
+ // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
+ //s->sym_buf = s->pending_buf + s->lit_bufsize;
+ s.sym_buf = s.lit_bufsize;
+
+ //s->sym_end = (s->lit_bufsize - 1) * 3;
+ s.sym_end = (s.lit_bufsize - 1) * 3;
+ /* We avoid equality with lit_bufsize*3 because of wraparound at 64K
+ * on 16 bit machines and because stored blocks are restricted to
+ * 64K-1 bytes.
+ */
+
+ s.level = level;
+ s.strategy = strategy;
+ s.method = method;
+
+ return deflateReset(strm);
+};
+
+const deflateInit = (strm, level) => {
+
+ return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1);
+};
+
+
+/* ========================================================================= */
+const deflate$2 = (strm, flush) => {
+
+ if (deflateStateCheck(strm) || flush > Z_BLOCK$1 || flush < 0) {
+ return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2;
+ }
+
+ const s = strm.state;
+
+ if (!strm.output ||
+ (strm.avail_in !== 0 && !strm.input) ||
+ (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {
+ return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);
+ }
+
+ const old_flush = s.last_flush;
+ s.last_flush = flush;
+
+ /* Flush as much pending output as possible */
+ if (s.pending !== 0) {
+ flush_pending(strm);
+ if (strm.avail_out === 0) {
+ /* Since avail_out is 0, deflate will be called again with
+ * more output space, but possibly with both pending and
+ * avail_in equal to zero. There won't be anything to do,
+ * but this is not an error situation so make sure we
+ * return OK instead of BUF_ERROR at next call of deflate:
+ */
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+
+ /* Make sure there is something to do and avoid duplicate consecutive
+ * flushes. For repeated and useless calls with Z_FINISH, we keep
+ * returning Z_STREAM_END instead of Z_BUF_ERROR.
+ */
+ } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
+ flush !== Z_FINISH$3) {
+ return err(strm, Z_BUF_ERROR$1);
+ }
+
+ /* User must not provide more input after the first FINISH: */
+ if (s.status === FINISH_STATE && strm.avail_in !== 0) {
+ return err(strm, Z_BUF_ERROR$1);
+ }
+
+ /* Write the header */
+ if (s.status === INIT_STATE && s.wrap === 0) {
+ s.status = BUSY_STATE;
+ }
+ if (s.status === INIT_STATE) {
+ /* zlib header */
+ let header = (Z_DEFLATED$2 + ((s.w_bits - 8) << 4)) << 8;
+ let level_flags = -1;
+
+ if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
+ level_flags = 0;
+ } else if (s.level < 6) {
+ level_flags = 1;
+ } else if (s.level === 6) {
+ level_flags = 2;
+ } else {
+ level_flags = 3;
+ }
+ header |= (level_flags << 6);
+ if (s.strstart !== 0) { header |= PRESET_DICT; }
+ header += 31 - (header % 31);
+
+ putShortMSB(s, header);
+
+ /* Save the adler32 of the preset dictionary: */
+ if (s.strstart !== 0) {
+ putShortMSB(s, strm.adler >>> 16);
+ putShortMSB(s, strm.adler & 0xffff);
+ }
+ strm.adler = 1; // adler32(0L, Z_NULL, 0);
+ s.status = BUSY_STATE;
+
+ /* Compression must start with an empty pending buffer */
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ }
+//#ifdef GZIP
+ if (s.status === GZIP_STATE) {
+ /* gzip header */
+ strm.adler = 0; //crc32(0L, Z_NULL, 0);
+ put_byte(s, 31);
+ put_byte(s, 139);
+ put_byte(s, 8);
+ if (!s.gzhead) { // s->gzhead == Z_NULL
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, 0);
+ put_byte(s, s.level === 9 ? 2 :
+ (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+ 4 : 0));
+ put_byte(s, OS_CODE);
+ s.status = BUSY_STATE;
+
+ /* Compression must start with an empty pending buffer */
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ }
+ else {
+ put_byte(s, (s.gzhead.text ? 1 : 0) +
+ (s.gzhead.hcrc ? 2 : 0) +
+ (!s.gzhead.extra ? 0 : 4) +
+ (!s.gzhead.name ? 0 : 8) +
+ (!s.gzhead.comment ? 0 : 16)
+ );
+ put_byte(s, s.gzhead.time & 0xff);
+ put_byte(s, (s.gzhead.time >> 8) & 0xff);
+ put_byte(s, (s.gzhead.time >> 16) & 0xff);
+ put_byte(s, (s.gzhead.time >> 24) & 0xff);
+ put_byte(s, s.level === 9 ? 2 :
+ (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+ 4 : 0));
+ put_byte(s, s.gzhead.os & 0xff);
+ if (s.gzhead.extra && s.gzhead.extra.length) {
+ put_byte(s, s.gzhead.extra.length & 0xff);
+ put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
+ }
+ if (s.gzhead.hcrc) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);
+ }
+ s.gzindex = 0;
+ s.status = EXTRA_STATE;
+ }
+ }
+ if (s.status === EXTRA_STATE) {
+ if (s.gzhead.extra/* != Z_NULL*/) {
+ let beg = s.pending; /* start of bytes to update crc */
+ let left = (s.gzhead.extra.length & 0xffff) - s.gzindex;
+ while (s.pending + left > s.pending_buf_size) {
+ let copy = s.pending_buf_size - s.pending;
+ // zmemcpy(s.pending_buf + s.pending,
+ // s.gzhead.extra + s.gzindex, copy);
+ s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending);
+ s.pending = s.pending_buf_size;
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ s.gzindex += copy;
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ beg = 0;
+ left -= copy;
+ }
+ // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility
+ // TypedArray.slice and TypedArray.from don't exist in IE10-IE11
+ let gzhead_extra = new Uint8Array(s.gzhead.extra);
+ // zmemcpy(s->pending_buf + s->pending,
+ // s->gzhead->extra + s->gzindex, left);
+ s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending);
+ s.pending += left;
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ s.gzindex = 0;
+ }
+ s.status = NAME_STATE;
+ }
+ if (s.status === NAME_STATE) {
+ if (s.gzhead.name/* != Z_NULL*/) {
+ let beg = s.pending; /* start of bytes to update crc */
+ let val;
+ do {
+ if (s.pending === s.pending_buf_size) {
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ beg = 0;
+ }
+ // JS specific: little magic to add zero terminator to end of string
+ if (s.gzindex < s.gzhead.name.length) {
+ val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
+ } else {
+ val = 0;
+ }
+ put_byte(s, val);
+ } while (val !== 0);
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ s.gzindex = 0;
+ }
+ s.status = COMMENT_STATE;
+ }
+ if (s.status === COMMENT_STATE) {
+ if (s.gzhead.comment/* != Z_NULL*/) {
+ let beg = s.pending; /* start of bytes to update crc */
+ let val;
+ do {
+ if (s.pending === s.pending_buf_size) {
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ beg = 0;
+ }
+ // JS specific: little magic to add zero terminator to end of string
+ if (s.gzindex < s.gzhead.comment.length) {
+ val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
+ } else {
+ val = 0;
+ }
+ put_byte(s, val);
+ } while (val !== 0);
+ //--- HCRC_UPDATE(beg) ---//
+ if (s.gzhead.hcrc && s.pending > beg) {
+ strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);
+ }
+ //---//
+ }
+ s.status = HCRC_STATE;
+ }
+ if (s.status === HCRC_STATE) {
+ if (s.gzhead.hcrc) {
+ if (s.pending + 2 > s.pending_buf_size) {
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ }
+ put_byte(s, strm.adler & 0xff);
+ put_byte(s, (strm.adler >> 8) & 0xff);
+ strm.adler = 0; //crc32(0L, Z_NULL, 0);
+ }
+ s.status = BUSY_STATE;
+
+ /* Compression must start with an empty pending buffer */
+ flush_pending(strm);
+ if (s.pending !== 0) {
+ s.last_flush = -1;
+ return Z_OK$3;
+ }
+ }
+//#endif
+
+ /* Start a new block or continue the current one.
+ */
+ if (strm.avail_in !== 0 || s.lookahead !== 0 ||
+ (flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE)) {
+ let bstate = s.level === 0 ? deflate_stored(s, flush) :
+ s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
+ s.strategy === Z_RLE ? deflate_rle(s, flush) :
+ configuration_table[s.level].func(s, flush);
+
+ if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
+ s.status = FINISH_STATE;
+ }
+ if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
+ if (strm.avail_out === 0) {
+ s.last_flush = -1;
+ /* avoid BUF_ERROR next call, see above */
+ }
+ return Z_OK$3;
+ /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+ * of deflate should use the same flush parameter to make sure
+ * that the flush is complete. So we don't have to output an
+ * empty block here, this will be done at next call. This also
+ * ensures that for a very small output buffer, we emit at most
+ * one empty block.
+ */
+ }
+ if (bstate === BS_BLOCK_DONE) {
+ if (flush === Z_PARTIAL_FLUSH) {
+ _tr_align(s);
+ }
+ else if (flush !== Z_BLOCK$1) { /* FULL_FLUSH or SYNC_FLUSH */
+
+ _tr_stored_block(s, 0, 0, false);
+ /* For a full flush, this empty block will be recognized
+ * as a special marker by inflate_sync().
+ */
+ if (flush === Z_FULL_FLUSH$1) {
+ /*** CLEAR_HASH(s); ***/ /* forget history */
+ zero(s.head); // Fill with NIL (= 0);
+
+ if (s.lookahead === 0) {
+ s.strstart = 0;
+ s.block_start = 0;
+ s.insert = 0;
+ }
+ }
+ }
+ flush_pending(strm);
+ if (strm.avail_out === 0) {
+ s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+ return Z_OK$3;
+ }
+ }
+ }
+
+ if (flush !== Z_FINISH$3) { return Z_OK$3; }
+ if (s.wrap <= 0) { return Z_STREAM_END$3; }
+
+ /* Write the trailer */
+ if (s.wrap === 2) {
+ put_byte(s, strm.adler & 0xff);
+ put_byte(s, (strm.adler >> 8) & 0xff);
+ put_byte(s, (strm.adler >> 16) & 0xff);
+ put_byte(s, (strm.adler >> 24) & 0xff);
+ put_byte(s, strm.total_in & 0xff);
+ put_byte(s, (strm.total_in >> 8) & 0xff);
+ put_byte(s, (strm.total_in >> 16) & 0xff);
+ put_byte(s, (strm.total_in >> 24) & 0xff);
+ }
+ else
+ {
+ putShortMSB(s, strm.adler >>> 16);
+ putShortMSB(s, strm.adler & 0xffff);
+ }
+
+ flush_pending(strm);
+ /* If avail_out is zero, the application will call deflate again
+ * to flush the rest.
+ */
+ if (s.wrap > 0) { s.wrap = -s.wrap; }
+ /* write the trailer only once! */
+ return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3;
+};
+
+
+const deflateEnd = (strm) => {
+
+ if (deflateStateCheck(strm)) {
+ return Z_STREAM_ERROR$2;
+ }
+
+ const status = strm.state.status;
+
+ strm.state = null;
+
+ return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3;
+};
+
+
+/* =========================================================================
+ * Initializes the compression dictionary from the given byte
+ * sequence without producing any compressed output.
+ */
+const deflateSetDictionary = (strm, dictionary) => {
+
+ let dictLength = dictionary.length;
+
+ if (deflateStateCheck(strm)) {
+ return Z_STREAM_ERROR$2;
+ }
+
+ const s = strm.state;
+ const wrap = s.wrap;
+
+ if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
+ return Z_STREAM_ERROR$2;
+ }
+
+ /* when using zlib wrappers, compute Adler-32 for provided dictionary */
+ if (wrap === 1) {
+ /* adler32(strm->adler, dictionary, dictLength); */
+ strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);
+ }
+
+ s.wrap = 0; /* avoid computing Adler-32 in read_buf */
+
+ /* if dictionary would fill window, just replace the history */
+ if (dictLength >= s.w_size) {
+ if (wrap === 0) { /* already empty otherwise */
+ /*** CLEAR_HASH(s); ***/
+ zero(s.head); // Fill with NIL (= 0);
+ s.strstart = 0;
+ s.block_start = 0;
+ s.insert = 0;
+ }
+ /* use the tail */
+ // dictionary = dictionary.slice(dictLength - s.w_size);
+ let tmpDict = new Uint8Array(s.w_size);
+ tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);
+ dictionary = tmpDict;
+ dictLength = s.w_size;
+ }
+ /* insert dictionary into window and hash */
+ const avail = strm.avail_in;
+ const next = strm.next_in;
+ const input = strm.input;
+ strm.avail_in = dictLength;
+ strm.next_in = 0;
+ strm.input = dictionary;
+ fill_window(s);
+ while (s.lookahead >= MIN_MATCH) {
+ let str = s.strstart;
+ let n = s.lookahead - (MIN_MATCH - 1);
+ do {
+ /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+ s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);
+
+ s.prev[str & s.w_mask] = s.head[s.ins_h];
+
+ s.head[s.ins_h] = str;
+ str++;
+ } while (--n);
+ s.strstart = str;
+ s.lookahead = MIN_MATCH - 1;
+ fill_window(s);
+ }
+ s.strstart += s.lookahead;
+ s.block_start = s.strstart;
+ s.insert = s.lookahead;
+ s.lookahead = 0;
+ s.match_length = s.prev_length = MIN_MATCH - 1;
+ s.match_available = 0;
+ strm.next_in = next;
+ strm.input = input;
+ strm.avail_in = avail;
+ s.wrap = wrap;
+ return Z_OK$3;
+};
+
+
+var deflateInit_1 = deflateInit;
+var deflateInit2_1 = deflateInit2;
+var deflateReset_1 = deflateReset;
+var deflateResetKeep_1 = deflateResetKeep;
+var deflateSetHeader_1 = deflateSetHeader;
+var deflate_2$1 = deflate$2;
+var deflateEnd_1 = deflateEnd;
+var deflateSetDictionary_1 = deflateSetDictionary;
+var deflateInfo = 'pako deflate (from Nodeca project)';
+
+/* Not implemented
+module.exports.deflateBound = deflateBound;
+module.exports.deflateCopy = deflateCopy;
+module.exports.deflateGetDictionary = deflateGetDictionary;
+module.exports.deflateParams = deflateParams;
+module.exports.deflatePending = deflatePending;
+module.exports.deflatePrime = deflatePrime;
+module.exports.deflateTune = deflateTune;
+*/
+
+var deflate_1$2 = {
+ deflateInit: deflateInit_1,
+ deflateInit2: deflateInit2_1,
+ deflateReset: deflateReset_1,
+ deflateResetKeep: deflateResetKeep_1,
+ deflateSetHeader: deflateSetHeader_1,
+ deflate: deflate_2$1,
+ deflateEnd: deflateEnd_1,
+ deflateSetDictionary: deflateSetDictionary_1,
+ deflateInfo: deflateInfo
+};
+
+const _has = (obj, key) => {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+};
+
+var assign = function (obj /*from1, from2, from3, ...*/) {
+ const sources = Array.prototype.slice.call(arguments, 1);
+ while (sources.length) {
+ const source = sources.shift();
+ if (!source) { continue; }
+
+ if (typeof source !== 'object') {
+ throw new TypeError(source + 'must be non-object');
+ }
+
+ for (const p in source) {
+ if (_has(source, p)) {
+ obj[p] = source[p];
+ }
+ }
+ }
+
+ return obj;
+};
+
+
+// Join array of chunks to single array.
+var flattenChunks = (chunks) => {
+ // calculate data length
+ let len = 0;
+
+ for (let i = 0, l = chunks.length; i < l; i++) {
+ len += chunks[i].length;
+ }
+
+ // join chunks
+ const result = new Uint8Array(len);
+
+ for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {
+ let chunk = chunks[i];
+ result.set(chunk, pos);
+ pos += chunk.length;
+ }
+
+ return result;
+};
+
+var common = {
+ assign: assign,
+ flattenChunks: flattenChunks
+};
+
+// String encode/decode helpers
+
+
+// Quick check if we can use fast array to bin string conversion
+//
+// - apply(Array) can fail on Android 2.2
+// - apply(Uint8Array) can fail on iOS 5.1 Safari
+//
+let STR_APPLY_UIA_OK = true;
+
+try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }
+
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+const _utf8len = new Uint8Array(256);
+for (let q = 0; q < 256; q++) {
+ _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);
+}
+_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start
+
+
+// convert string to array (typed, when possible)
+var string2buf = (str) => {
+ if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {
+ return new TextEncoder().encode(str);
+ }
+
+ let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+ // count binary size
+ for (m_pos = 0; m_pos < str_len; m_pos++) {
+ c = str.charCodeAt(m_pos);
+ if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
+ c2 = str.charCodeAt(m_pos + 1);
+ if ((c2 & 0xfc00) === 0xdc00) {
+ c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+ m_pos++;
+ }
+ }
+ buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+ }
+
+ // allocate buffer
+ buf = new Uint8Array(buf_len);
+
+ // convert
+ for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
+ c = str.charCodeAt(m_pos);
+ if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
+ c2 = str.charCodeAt(m_pos + 1);
+ if ((c2 & 0xfc00) === 0xdc00) {
+ c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+ m_pos++;
+ }
+ }
+ if (c < 0x80) {
+ /* one byte */
+ buf[i++] = c;
+ } else if (c < 0x800) {
+ /* two bytes */
+ buf[i++] = 0xC0 | (c >>> 6);
+ buf[i++] = 0x80 | (c & 0x3f);
+ } else if (c < 0x10000) {
+ /* three bytes */
+ buf[i++] = 0xE0 | (c >>> 12);
+ buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+ buf[i++] = 0x80 | (c & 0x3f);
+ } else {
+ /* four bytes */
+ buf[i++] = 0xf0 | (c >>> 18);
+ buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+ buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+ buf[i++] = 0x80 | (c & 0x3f);
+ }
+ }
+
+ return buf;
+};
+
+// Helper
+const buf2binstring = (buf, len) => {
+ // On Chrome, the arguments in a function call that are allowed is `65534`.
+ // If the length of the buffer is smaller than that, we can use this optimization,
+ // otherwise we will take a slower path.
+ if (len < 65534) {
+ if (buf.subarray && STR_APPLY_UIA_OK) {
+ return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));
+ }
+ }
+
+ let result = '';
+ for (let i = 0; i < len; i++) {
+ result += String.fromCharCode(buf[i]);
+ }
+ return result;
+};
+
+
+// convert array to string
+var buf2string = (buf, max) => {
+ const len = max || buf.length;
+
+ if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {
+ return new TextDecoder().decode(buf.subarray(0, max));
+ }
+
+ let i, out;
+
+ // Reserve max possible length (2 words per char)
+ // NB: by unknown reasons, Array is significantly faster for
+ // String.fromCharCode.apply than Uint16Array.
+ const utf16buf = new Array(len * 2);
+
+ for (out = 0, i = 0; i < len;) {
+ let c = buf[i++];
+ // quick process ascii
+ if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+ let c_len = _utf8len[c];
+ // skip 5 & 6 byte codes
+ if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }
+
+ // apply mask on first byte
+ c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+ // join the rest
+ while (c_len > 1 && i < len) {
+ c = (c << 6) | (buf[i++] & 0x3f);
+ c_len--;
+ }
+
+ // terminated by end of string?
+ if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+ if (c < 0x10000) {
+ utf16buf[out++] = c;
+ } else {
+ c -= 0x10000;
+ utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+ utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+ }
+ }
+
+ return buf2binstring(utf16buf, out);
+};
+
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max - length limit (mandatory);
+var utf8border = (buf, max) => {
+
+ max = max || buf.length;
+ if (max > buf.length) { max = buf.length; }
+
+ // go back from last position, until start of sequence found
+ let pos = max - 1;
+ while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+ // Very small and broken sequence,
+ // return max, because we should return something anyway.
+ if (pos < 0) { return max; }
+
+ // If we came to start of buffer - that means buffer is too small,
+ // return max too.
+ if (pos === 0) { return max; }
+
+ return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+var strings = {
+ string2buf: string2buf,
+ buf2string: buf2string,
+ utf8border: utf8border
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+function ZStream() {
+ /* next input byte */
+ this.input = null; // JS specific, because we have no pointers
+ this.next_in = 0;
+ /* number of bytes available at input */
+ this.avail_in = 0;
+ /* total number of input bytes read so far */
+ this.total_in = 0;
+ /* next output byte should be put there */
+ this.output = null; // JS specific, because we have no pointers
+ this.next_out = 0;
+ /* remaining free space at output */
+ this.avail_out = 0;
+ /* total number of bytes output so far */
+ this.total_out = 0;
+ /* last error message, NULL if no error */
+ this.msg = ''/*Z_NULL*/;
+ /* not visible by applications */
+ this.state = null;
+ /* best guess about the data type: binary or text */
+ this.data_type = 2/*Z_UNKNOWN*/;
+ /* adler32 value of the uncompressed data */
+ this.adler = 0;
+}
+
+var zstream = ZStream;
+
+const toString$1 = Object.prototype.toString;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+const {
+ Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH: Z_FINISH$2,
+ Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2,
+ Z_DEFAULT_COMPRESSION,
+ Z_DEFAULT_STRATEGY,
+ Z_DEFLATED: Z_DEFLATED$1
+} = constants$2;
+
+/* ===========================================================================*/
+
+
+/**
+ * class Deflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[deflate]],
+ * [[deflateRaw]] and [[gzip]].
+ **/
+
+/* internal
+ * Deflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Deflate#onData]] not overridden.
+ **/
+
+/**
+ * Deflate.result -> Uint8Array
+ *
+ * Compressed result, generated by default [[Deflate#onData]]
+ * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Deflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Deflate.err -> Number
+ *
+ * Error code after deflate finished. 0 (Z_OK) on success.
+ * You will not need it in real life, because deflate errors
+ * are possible only on wrong options or bad `onData` / `onEnd`
+ * custom handlers.
+ **/
+
+/**
+ * Deflate.msg -> String
+ *
+ * Error message, if [[Deflate.err]] != 0
+ **/
+
+
+/**
+ * new Deflate(options)
+ * - options (Object): zlib deflate options.
+ *
+ * Creates new deflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `level`
+ * - `windowBits`
+ * - `memLevel`
+ * - `strategy`
+ * - `dictionary`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw deflate
+ * - `gzip` (Boolean) - create gzip wrapper
+ * - `header` (Object) - custom header for gzip
+ * - `text` (Boolean) - true if compressed data believed to be text
+ * - `time` (Number) - modification time, unix timestamp
+ * - `os` (Number) - operation system code
+ * - `extra` (Array) - array of bytes with extra data (max 65536)
+ * - `name` (String) - file name (binary string)
+ * - `comment` (String) - comment (binary string)
+ * - `hcrc` (Boolean) - true if header crc should be added
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * const pako = require('pako')
+ * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])
+ * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * const deflate = new pako.Deflate({ level: 3});
+ *
+ * deflate.push(chunk1, false);
+ * deflate.push(chunk2, true); // true -> last chunk
+ *
+ * if (deflate.err) { throw new Error(deflate.err); }
+ *
+ * console.log(deflate.result);
+ * ```
+ **/
+function Deflate$1(options) {
+ this.options = common.assign({
+ level: Z_DEFAULT_COMPRESSION,
+ method: Z_DEFLATED$1,
+ chunkSize: 16384,
+ windowBits: 15,
+ memLevel: 8,
+ strategy: Z_DEFAULT_STRATEGY
+ }, options || {});
+
+ let opt = this.options;
+
+ if (opt.raw && (opt.windowBits > 0)) {
+ opt.windowBits = -opt.windowBits;
+ }
+
+ else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
+ opt.windowBits += 16;
+ }
+
+ this.err = 0; // error code, if happens (0 = Z_OK)
+ this.msg = ''; // error message
+ this.ended = false; // used to avoid multiple onEnd() calls
+ this.chunks = []; // chunks of compressed data
+
+ this.strm = new zstream();
+ this.strm.avail_out = 0;
+
+ let status = deflate_1$2.deflateInit2(
+ this.strm,
+ opt.level,
+ opt.method,
+ opt.windowBits,
+ opt.memLevel,
+ opt.strategy
+ );
+
+ if (status !== Z_OK$2) {
+ throw new Error(messages[status]);
+ }
+
+ if (opt.header) {
+ deflate_1$2.deflateSetHeader(this.strm, opt.header);
+ }
+
+ if (opt.dictionary) {
+ let dict;
+ // Convert data if needed
+ if (typeof opt.dictionary === 'string') {
+ // If we need to compress text, change encoding to utf8.
+ dict = strings.string2buf(opt.dictionary);
+ } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {
+ dict = new Uint8Array(opt.dictionary);
+ } else {
+ dict = opt.dictionary;
+ }
+
+ status = deflate_1$2.deflateSetDictionary(this.strm, dict);
+
+ if (status !== Z_OK$2) {
+ throw new Error(messages[status]);
+ }
+
+ this._dict_set = true;
+ }
+}
+
+/**
+ * Deflate#push(data[, flush_mode]) -> Boolean
+ * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be
+ * converted to utf8 byte sequence.
+ * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.
+ *
+ * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
+ * new compressed chunks. Returns `true` on success. The last data block must
+ * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending
+ * buffers and call [[Deflate#onEnd]].
+ *
+ * On fail call [[Deflate#onEnd]] with error code and return false.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true); // push last chunk
+ * ```
+ **/
+Deflate$1.prototype.push = function (data, flush_mode) {
+ const strm = this.strm;
+ const chunkSize = this.options.chunkSize;
+ let status, _flush_mode;
+
+ if (this.ended) { return false; }
+
+ if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;
+ else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1;
+
+ // Convert data if needed
+ if (typeof data === 'string') {
+ // If we need to compress text, change encoding to utf8.
+ strm.input = strings.string2buf(data);
+ } else if (toString$1.call(data) === '[object ArrayBuffer]') {
+ strm.input = new Uint8Array(data);
+ } else {
+ strm.input = data;
+ }
+
+ strm.next_in = 0;
+ strm.avail_in = strm.input.length;
+
+ for (;;) {
+ if (strm.avail_out === 0) {
+ strm.output = new Uint8Array(chunkSize);
+ strm.next_out = 0;
+ strm.avail_out = chunkSize;
+ }
+
+ // Make sure avail_out > 6 to avoid repeating markers
+ if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {
+ this.onData(strm.output.subarray(0, strm.next_out));
+ strm.avail_out = 0;
+ continue;
+ }
+
+ status = deflate_1$2.deflate(strm, _flush_mode);
+
+ // Ended => flush and finish
+ if (status === Z_STREAM_END$2) {
+ if (strm.next_out > 0) {
+ this.onData(strm.output.subarray(0, strm.next_out));
+ }
+ status = deflate_1$2.deflateEnd(this.strm);
+ this.onEnd(status);
+ this.ended = true;
+ return status === Z_OK$2;
+ }
+
+ // Flush if out buffer full
+ if (strm.avail_out === 0) {
+ this.onData(strm.output);
+ continue;
+ }
+
+ // Flush if requested and has data
+ if (_flush_mode > 0 && strm.next_out > 0) {
+ this.onData(strm.output.subarray(0, strm.next_out));
+ strm.avail_out = 0;
+ continue;
+ }
+
+ if (strm.avail_in === 0) break;
+ }
+
+ return true;
+};
+
+
+/**
+ * Deflate#onData(chunk) -> Void
+ * - chunk (Uint8Array): output data.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Deflate$1.prototype.onData = function (chunk) {
+ this.chunks.push(chunk);
+};
+
+
+/**
+ * Deflate#onEnd(status) -> Void
+ * - status (Number): deflate status. 0 (Z_OK) on success,
+ * other if not.
+ *
+ * Called once after you tell deflate that the input stream is
+ * complete (Z_FINISH). By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Deflate$1.prototype.onEnd = function (status) {
+ // On success - join
+ if (status === Z_OK$2) {
+ this.result = common.flattenChunks(this.chunks);
+ }
+ this.chunks = [];
+ this.err = status;
+ this.msg = this.strm.msg;
+};
+
+
+/**
+ * deflate(data[, options]) -> Uint8Array
+ * - data (Uint8Array|ArrayBuffer|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * Compress `data` with deflate algorithm and `options`.
+ *
+ * Supported options are:
+ *
+ * - level
+ * - windowBits
+ * - memLevel
+ * - strategy
+ * - dictionary
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ * negative windowBits implicitly.
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * const pako = require('pako')
+ * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);
+ *
+ * console.log(pako.deflate(data));
+ * ```
+ **/
+function deflate$1(input, options) {
+ const deflator = new Deflate$1(options);
+
+ deflator.push(input, true);
+
+ // That will never happens, if you don't cheat with options :)
+ if (deflator.err) { throw deflator.msg || messages[deflator.err]; }
+
+ return deflator.result;
+}
+
+
+/**
+ * deflateRaw(data[, options]) -> Uint8Array
+ * - data (Uint8Array|ArrayBuffer|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function deflateRaw$1(input, options) {
+ options = options || {};
+ options.raw = true;
+ return deflate$1(input, options);
+}
+
+
+/**
+ * gzip(data[, options]) -> Uint8Array
+ * - data (Uint8Array|ArrayBuffer|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but create gzip wrapper instead of
+ * deflate one.
+ **/
+function gzip$1(input, options) {
+ options = options || {};
+ options.gzip = true;
+ return deflate$1(input, options);
+}
+
+
+var Deflate_1$1 = Deflate$1;
+var deflate_2 = deflate$1;
+var deflateRaw_1$1 = deflateRaw$1;
+var gzip_1$1 = gzip$1;
+var constants$1 = constants$2;
+
+var deflate_1$1 = {
+ Deflate: Deflate_1$1,
+ deflate: deflate_2,
+ deflateRaw: deflateRaw_1$1,
+ gzip: gzip_1$1,
+ constants: constants$1
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+// See state defs from inflate.js
+const BAD$1 = 16209; /* got a data error -- remain here until reset */
+const TYPE$1 = 16191; /* i: waiting for type bits, including last-flag bit */
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state.mode === LEN
+ strm.avail_in >= 6
+ strm.avail_out >= 258
+ start >= strm.avail_out
+ state.bits < 8
+
+ On return, state.mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm.avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm.avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+var inffast = function inflate_fast(strm, start) {
+ let _in; /* local strm.input */
+ let last; /* have enough input while in < last */
+ let _out; /* local strm.output */
+ let beg; /* inflate()'s initial strm.output */
+ let end; /* while out < end, enough space available */
+//#ifdef INFLATE_STRICT
+ let dmax; /* maximum distance from zlib header */
+//#endif
+ let wsize; /* window size or zero if not using window */
+ let whave; /* valid bytes in the window */
+ let wnext; /* window write index */
+ // Use `s_window` instead `window`, avoid conflict with instrumentation tools
+ let s_window; /* allocated sliding window, if wsize != 0 */
+ let hold; /* local strm.hold */
+ let bits; /* local strm.bits */
+ let lcode; /* local strm.lencode */
+ let dcode; /* local strm.distcode */
+ let lmask; /* mask for first level of length codes */
+ let dmask; /* mask for first level of distance codes */
+ let here; /* retrieved table entry */
+ let op; /* code bits, operation, extra bits, or */
+ /* window position, window bytes to copy */
+ let len; /* match length, unused bytes */
+ let dist; /* match distance */
+ let from; /* where to copy match from */
+ let from_source;
+
+
+ let input, output; // JS specific, because we have no pointers
+
+ /* copy state to local variables */
+ const state = strm.state;
+ //here = state.here;
+ _in = strm.next_in;
+ input = strm.input;
+ last = _in + (strm.avail_in - 5);
+ _out = strm.next_out;
+ output = strm.output;
+ beg = _out - (start - strm.avail_out);
+ end = _out + (strm.avail_out - 257);
+//#ifdef INFLATE_STRICT
+ dmax = state.dmax;
+//#endif
+ wsize = state.wsize;
+ whave = state.whave;
+ wnext = state.wnext;
+ s_window = state.window;
+ hold = state.hold;
+ bits = state.bits;
+ lcode = state.lencode;
+ dcode = state.distcode;
+ lmask = (1 << state.lenbits) - 1;
+ dmask = (1 << state.distbits) - 1;
+
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+
+ top:
+ do {
+ if (bits < 15) {
+ hold += input[_in++] << bits;
+ bits += 8;
+ hold += input[_in++] << bits;
+ bits += 8;
+ }
+
+ here = lcode[hold & lmask];
+
+ dolen:
+ for (;;) { // Goto emulation
+ op = here >>> 24/*here.bits*/;
+ hold >>>= op;
+ bits -= op;
+ op = (here >>> 16) & 0xff/*here.op*/;
+ if (op === 0) { /* literal */
+ //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+ // "inflate: literal '%c'\n" :
+ // "inflate: literal 0x%02x\n", here.val));
+ output[_out++] = here & 0xffff/*here.val*/;
+ }
+ else if (op & 16) { /* length base */
+ len = here & 0xffff/*here.val*/;
+ op &= 15; /* number of extra bits */
+ if (op) {
+ if (bits < op) {
+ hold += input[_in++] << bits;
+ bits += 8;
+ }
+ len += hold & ((1 << op) - 1);
+ hold >>>= op;
+ bits -= op;
+ }
+ //Tracevv((stderr, "inflate: length %u\n", len));
+ if (bits < 15) {
+ hold += input[_in++] << bits;
+ bits += 8;
+ hold += input[_in++] << bits;
+ bits += 8;
+ }
+ here = dcode[hold & dmask];
+
+ dodist:
+ for (;;) { // goto emulation
+ op = here >>> 24/*here.bits*/;
+ hold >>>= op;
+ bits -= op;
+ op = (here >>> 16) & 0xff/*here.op*/;
+
+ if (op & 16) { /* distance base */
+ dist = here & 0xffff/*here.val*/;
+ op &= 15; /* number of extra bits */
+ if (bits < op) {
+ hold += input[_in++] << bits;
+ bits += 8;
+ if (bits < op) {
+ hold += input[_in++] << bits;
+ bits += 8;
+ }
+ }
+ dist += hold & ((1 << op) - 1);
+//#ifdef INFLATE_STRICT
+ if (dist > dmax) {
+ strm.msg = 'invalid distance too far back';
+ state.mode = BAD$1;
+ break top;
+ }
+//#endif
+ hold >>>= op;
+ bits -= op;
+ //Tracevv((stderr, "inflate: distance %u\n", dist));
+ op = _out - beg; /* max distance in output */
+ if (dist > op) { /* see if copy from window */
+ op = dist - op; /* distance back in window */
+ if (op > whave) {
+ if (state.sane) {
+ strm.msg = 'invalid distance too far back';
+ state.mode = BAD$1;
+ break top;
+ }
+
+// (!) This block is disabled in zlib defaults,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+// if (len <= op - whave) {
+// do {
+// output[_out++] = 0;
+// } while (--len);
+// continue top;
+// }
+// len -= op - whave;
+// do {
+// output[_out++] = 0;
+// } while (--op > whave);
+// if (op === 0) {
+// from = _out - dist;
+// do {
+// output[_out++] = output[from++];
+// } while (--len);
+// continue top;
+// }
+//#endif
+ }
+ from = 0; // window index
+ from_source = s_window;
+ if (wnext === 0) { /* very common case */
+ from += wsize - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ output[_out++] = s_window[from++];
+ } while (--op);
+ from = _out - dist; /* rest from output */
+ from_source = output;
+ }
+ }
+ else if (wnext < op) { /* wrap around window */
+ from += wsize + wnext - op;
+ op -= wnext;
+ if (op < len) { /* some from end of window */
+ len -= op;
+ do {
+ output[_out++] = s_window[from++];
+ } while (--op);
+ from = 0;
+ if (wnext < len) { /* some from start of window */
+ op = wnext;
+ len -= op;
+ do {
+ output[_out++] = s_window[from++];
+ } while (--op);
+ from = _out - dist; /* rest from output */
+ from_source = output;
+ }
+ }
+ }
+ else { /* contiguous in window */
+ from += wnext - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ output[_out++] = s_window[from++];
+ } while (--op);
+ from = _out - dist; /* rest from output */
+ from_source = output;
+ }
+ }
+ while (len > 2) {
+ output[_out++] = from_source[from++];
+ output[_out++] = from_source[from++];
+ output[_out++] = from_source[from++];
+ len -= 3;
+ }
+ if (len) {
+ output[_out++] = from_source[from++];
+ if (len > 1) {
+ output[_out++] = from_source[from++];
+ }
+ }
+ }
+ else {
+ from = _out - dist; /* copy direct from output */
+ do { /* minimum length is three */
+ output[_out++] = output[from++];
+ output[_out++] = output[from++];
+ output[_out++] = output[from++];
+ len -= 3;
+ } while (len > 2);
+ if (len) {
+ output[_out++] = output[from++];
+ if (len > 1) {
+ output[_out++] = output[from++];
+ }
+ }
+ }
+ }
+ else if ((op & 64) === 0) { /* 2nd level distance code */
+ here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+ continue dodist;
+ }
+ else {
+ strm.msg = 'invalid distance code';
+ state.mode = BAD$1;
+ break top;
+ }
+
+ break; // need to emulate goto via "continue"
+ }
+ }
+ else if ((op & 64) === 0) { /* 2nd level length code */
+ here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+ continue dolen;
+ }
+ else if (op & 32) { /* end-of-block */
+ //Tracevv((stderr, "inflate: end of block\n"));
+ state.mode = TYPE$1;
+ break top;
+ }
+ else {
+ strm.msg = 'invalid literal/length code';
+ state.mode = BAD$1;
+ break top;
+ }
+
+ break; // need to emulate goto via "continue"
+ }
+ } while (_in < last && _out < end);
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ len = bits >> 3;
+ _in -= len;
+ bits -= len << 3;
+ hold &= (1 << bits) - 1;
+
+ /* update state and return */
+ strm.next_in = _in;
+ strm.next_out = _out;
+ strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
+ strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
+ state.hold = hold;
+ state.bits = bits;
+ return;
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+const MAXBITS = 15;
+const ENOUGH_LENS$1 = 852;
+const ENOUGH_DISTS$1 = 592;
+//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
+
+const CODES$1 = 0;
+const LENS$1 = 1;
+const DISTS$1 = 2;
+
+const lbase = new Uint16Array([ /* Length codes 257..285 base */
+ 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
+]);
+
+const lext = new Uint8Array([ /* Length codes 257..285 extra */
+ 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
+]);
+
+const dbase = new Uint16Array([ /* Distance codes 0..29 base */
+ 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
+]);
+
+const dext = new Uint8Array([ /* Distance codes 0..29 extra */
+ 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
+]);
+
+const inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>
+{
+ const bits = opts.bits;
+ //here = opts.here; /* table entry for duplication */
+
+ let len = 0; /* a code's length in bits */
+ let sym = 0; /* index of code symbols */
+ let min = 0, max = 0; /* minimum and maximum code lengths */
+ let root = 0; /* number of index bits for root table */
+ let curr = 0; /* number of index bits for current table */
+ let drop = 0; /* code bits to drop for sub-table */
+ let left = 0; /* number of prefix codes available */
+ let used = 0; /* code entries in table used */
+ let huff = 0; /* Huffman code */
+ let incr; /* for incrementing code, index */
+ let fill; /* index for replicating entries */
+ let low; /* low bits for current root entry */
+ let mask; /* mask for low root bits */
+ let next; /* next available space in table */
+ let base = null; /* base value table to use */
+// let shoextra; /* extra bits table to use */
+ let match; /* use base and extra for symbol >= match */
+ const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
+ const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
+ let extra = null;
+
+ let here_bits, here_op, here_val;
+
+ /*
+ Process a set of code lengths to create a canonical Huffman code. The
+ code lengths are lens[0..codes-1]. Each length corresponds to the
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
+ symbols by length from short to long, and retaining the symbol order
+ for codes with equal lengths. Then the code starts with all zero bits
+ for the first code of the shortest length, and the codes are integer
+ increments for the same length, and zeros are appended as the length
+ increases. For the deflate format, these bits are stored backwards
+ from their more natural integer increment ordering, and so when the
+ decoding tables are built in the large loop below, the integer codes
+ are incremented backwards.
+
+ This routine assumes, but does not check, that all of the entries in
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
+ 1..MAXBITS is interpreted as that code length. zero means that that
+ symbol does not occur in this code.
+
+ The codes are sorted by computing a count of codes for each length,
+ creating from that a table of starting indices for each length in the
+ sorted table, and then entering the symbols in order in the sorted
+ table. The sorted table is work[], with that space being provided by
+ the caller.
+
+ The length counts are used for other purposes as well, i.e. finding
+ the minimum and maximum length codes, determining if there are any
+ codes at all, checking for a valid set of lengths, and looking ahead
+ at length counts to determine sub-table sizes when building the
+ decoding tables.
+ */
+
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+ for (len = 0; len <= MAXBITS; len++) {
+ count[len] = 0;
+ }
+ for (sym = 0; sym < codes; sym++) {
+ count[lens[lens_index + sym]]++;
+ }
+
+ /* bound code lengths, force root to be within code lengths */
+ root = bits;
+ for (max = MAXBITS; max >= 1; max--) {
+ if (count[max] !== 0) { break; }
+ }
+ if (root > max) {
+ root = max;
+ }
+ if (max === 0) { /* no symbols to code at all */
+ //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */
+ //table.bits[opts.table_index] = 1; //here.bits = (var char)1;
+ //table.val[opts.table_index++] = 0; //here.val = (var short)0;
+ table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+
+ //table.op[opts.table_index] = 64;
+ //table.bits[opts.table_index] = 1;
+ //table.val[opts.table_index++] = 0;
+ table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+ opts.bits = 1;
+ return 0; /* no symbols, but wait for decoding to report error */
+ }
+ for (min = 1; min < max; min++) {
+ if (count[min] !== 0) { break; }
+ }
+ if (root < min) {
+ root = min;
+ }
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1;
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1;
+ left -= count[len];
+ if (left < 0) {
+ return -1;
+ } /* over-subscribed */
+ }
+ if (left > 0 && (type === CODES$1 || max !== 1)) {
+ return -1; /* incomplete set */
+ }
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++) {
+ offs[len + 1] = offs[len] + count[len];
+ }
+
+ /* sort symbols by length, by symbol order within each length */
+ for (sym = 0; sym < codes; sym++) {
+ if (lens[lens_index + sym] !== 0) {
+ work[offs[lens[lens_index + sym]]++] = sym;
+ }
+ }
+
+ /*
+ Create and fill in decoding tables. In this loop, the table being
+ filled is at next and has curr index bits. The code being used is huff
+ with length len. That code is converted to an index by dropping drop
+ bits off of the bottom. For codes where len is less than drop + curr,
+ those top drop + curr - len bits are incremented through all values to
+ fill the table with replicated entries.
+
+ root is the number of index bits for the root table. When len exceeds
+ root, sub-tables are created pointed to by the root entry with an index
+ of the low root bits of huff. This is saved in low to check for when a
+ new sub-table should be started. drop is zero when the root table is
+ being filled, and drop is root when sub-tables are being filled.
+
+ When a new sub-table is needed, it is necessary to look ahead in the
+ code lengths to determine what size sub-table is needed. The length
+ counts are used for this, and so count[] is decremented as codes are
+ entered in the tables.
+
+ used keeps track of how many table entries have been allocated from the
+ provided *table space. It is checked for LENS and DIST tables against
+ the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+ the initial root table size constants. See the comments in inftrees.h
+ for more information.
+
+ sym increments through all symbols, and the loop terminates when
+ all codes of length max, i.e. all codes, have been processed. This
+ routine permits incomplete codes, so another loop after this one fills
+ in the rest of the decoding tables with invalid code markers.
+ */
+
+ /* set up for code type */
+ // poor man optimization - use if-else instead of switch,
+ // to avoid deopts in old v8
+ if (type === CODES$1) {
+ base = extra = work; /* dummy value--not used */
+ match = 20;
+
+ } else if (type === LENS$1) {
+ base = lbase;
+ extra = lext;
+ match = 257;
+
+ } else { /* DISTS */
+ base = dbase;
+ extra = dext;
+ match = 0;
+ }
+
+ /* initialize opts for loop */
+ huff = 0; /* starting code */
+ sym = 0; /* starting code symbol */
+ len = min; /* starting code length */
+ next = table_index; /* current table to fill in */
+ curr = root; /* current table index bits */
+ drop = 0; /* current bits to drop from code for index */
+ low = -1; /* trigger new sub-table when len > root */
+ used = 1 << root; /* use root table entries */
+ mask = used - 1; /* mask for comparing low */
+
+ /* check available table space */
+ if ((type === LENS$1 && used > ENOUGH_LENS$1) ||
+ (type === DISTS$1 && used > ENOUGH_DISTS$1)) {
+ return 1;
+ }
+
+ /* process all codes and make table entries */
+ for (;;) {
+ /* create table entry */
+ here_bits = len - drop;
+ if (work[sym] + 1 < match) {
+ here_op = 0;
+ here_val = work[sym];
+ }
+ else if (work[sym] >= match) {
+ here_op = extra[work[sym] - match];
+ here_val = base[work[sym] - match];
+ }
+ else {
+ here_op = 32 + 64; /* end of block */
+ here_val = 0;
+ }
+
+ /* replicate for those indices with low len bits equal to huff */
+ incr = 1 << (len - drop);
+ fill = 1 << curr;
+ min = fill; /* save offset to next table */
+ do {
+ fill -= incr;
+ table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
+ } while (fill !== 0);
+
+ /* backwards increment the len-bit code huff */
+ incr = 1 << (len - 1);
+ while (huff & incr) {
+ incr >>= 1;
+ }
+ if (incr !== 0) {
+ huff &= incr - 1;
+ huff += incr;
+ } else {
+ huff = 0;
+ }
+
+ /* go to next symbol, update count, len */
+ sym++;
+ if (--count[len] === 0) {
+ if (len === max) { break; }
+ len = lens[lens_index + work[sym]];
+ }
+
+ /* create new sub-table if needed */
+ if (len > root && (huff & mask) !== low) {
+ /* if first time, transition to sub-tables */
+ if (drop === 0) {
+ drop = root;
+ }
+
+ /* increment past last table */
+ next += min; /* here min is 1 << curr */
+
+ /* determine length of next table */
+ curr = len - drop;
+ left = 1 << curr;
+ while (curr + drop < max) {
+ left -= count[curr + drop];
+ if (left <= 0) { break; }
+ curr++;
+ left <<= 1;
+ }
+
+ /* check for enough space */
+ used += 1 << curr;
+ if ((type === LENS$1 && used > ENOUGH_LENS$1) ||
+ (type === DISTS$1 && used > ENOUGH_DISTS$1)) {
+ return 1;
+ }
+
+ /* point entry in root table to sub-table */
+ low = huff & mask;
+ /*table.op[low] = curr;
+ table.bits[low] = root;
+ table.val[low] = next - opts.table_index;*/
+ table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
+ }
+ }
+
+ /* fill in remaining table entry if code is incomplete (guaranteed to have
+ at most one remaining entry, since if the code is incomplete, the
+ maximum code length that was allowed to get this far is one bit) */
+ if (huff !== 0) {
+ //table.op[next + huff] = 64; /* invalid code marker */
+ //table.bits[next + huff] = len - drop;
+ //table.val[next + huff] = 0;
+ table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
+ }
+
+ /* set return parameters */
+ //opts.table_index += used;
+ opts.bits = root;
+ return 0;
+};
+
+
+var inftrees = inflate_table;
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+
+
+
+
+
+const CODES = 0;
+const LENS = 1;
+const DISTS = 2;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+const {
+ Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,
+ Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,
+ Z_DEFLATED
+} = constants$2;
+
+
+/* STATES ====================================================================*/
+/* ===========================================================================*/
+
+
+const HEAD = 16180; /* i: waiting for magic header */
+const FLAGS = 16181; /* i: waiting for method and flags (gzip) */
+const TIME = 16182; /* i: waiting for modification time (gzip) */
+const OS = 16183; /* i: waiting for extra flags and operating system (gzip) */
+const EXLEN = 16184; /* i: waiting for extra length (gzip) */
+const EXTRA = 16185; /* i: waiting for extra bytes (gzip) */
+const NAME = 16186; /* i: waiting for end of file name (gzip) */
+const COMMENT = 16187; /* i: waiting for end of comment (gzip) */
+const HCRC = 16188; /* i: waiting for header crc (gzip) */
+const DICTID = 16189; /* i: waiting for dictionary check value */
+const DICT = 16190; /* waiting for inflateSetDictionary() call */
+const TYPE = 16191; /* i: waiting for type bits, including last-flag bit */
+const TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */
+const STORED = 16193; /* i: waiting for stored size (length and complement) */
+const COPY_ = 16194; /* i/o: same as COPY below, but only first time in */
+const COPY = 16195; /* i/o: waiting for input or output to copy stored block */
+const TABLE = 16196; /* i: waiting for dynamic block table lengths */
+const LENLENS = 16197; /* i: waiting for code length code lengths */
+const CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */
+const LEN_ = 16199; /* i: same as LEN below, but only first time in */
+const LEN = 16200; /* i: waiting for length/lit/eob code */
+const LENEXT = 16201; /* i: waiting for length extra bits */
+const DIST = 16202; /* i: waiting for distance code */
+const DISTEXT = 16203; /* i: waiting for distance extra bits */
+const MATCH = 16204; /* o: waiting for output space to copy string */
+const LIT = 16205; /* o: waiting for output space to write literal */
+const CHECK = 16206; /* i: waiting for 32-bit check value */
+const LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */
+const DONE = 16208; /* finished check, done -- remain here until reset */
+const BAD = 16209; /* got a data error -- remain here until reset */
+const MEM = 16210; /* got an inflate() memory error -- remain here until reset */
+const SYNC = 16211; /* looking for synchronization bytes to restart inflate() */
+
+/* ===========================================================================*/
+
+
+
+const ENOUGH_LENS = 852;
+const ENOUGH_DISTS = 592;
+//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
+
+const MAX_WBITS = 15;
+/* 32K LZ77 window */
+const DEF_WBITS = MAX_WBITS;
+
+
+const zswap32 = (q) => {
+
+ return (((q >>> 24) & 0xff) +
+ ((q >>> 8) & 0xff00) +
+ ((q & 0xff00) << 8) +
+ ((q & 0xff) << 24));
+};
+
+
+function InflateState() {
+ this.strm = null; /* pointer back to this zlib stream */
+ this.mode = 0; /* current inflate mode */
+ this.last = false; /* true if processing last block */
+ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,
+ bit 2 true to validate check value */
+ this.havedict = false; /* true if dictionary provided */
+ this.flags = 0; /* gzip header method and flags (0 if zlib), or
+ -1 if raw or no header yet */
+ this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
+ this.check = 0; /* protected copy of check value */
+ this.total = 0; /* protected copy of output count */
+ // TODO: may be {}
+ this.head = null; /* where to save gzip header information */
+
+ /* sliding window */
+ this.wbits = 0; /* log base 2 of requested window size */
+ this.wsize = 0; /* window size or zero if not using window */
+ this.whave = 0; /* valid bytes in the window */
+ this.wnext = 0; /* window write index */
+ this.window = null; /* allocated sliding window, if needed */
+
+ /* bit accumulator */
+ this.hold = 0; /* input bit accumulator */
+ this.bits = 0; /* number of bits in "in" */
+
+ /* for string and stored block copying */
+ this.length = 0; /* literal or length of data to copy */
+ this.offset = 0; /* distance back to copy string from */
+
+ /* for table and code decoding */
+ this.extra = 0; /* extra bits needed */
+
+ /* fixed and dynamic code tables */
+ this.lencode = null; /* starting table for length/literal codes */
+ this.distcode = null; /* starting table for distance codes */
+ this.lenbits = 0; /* index bits for lencode */
+ this.distbits = 0; /* index bits for distcode */
+
+ /* dynamic table building */
+ this.ncode = 0; /* number of code length code lengths */
+ this.nlen = 0; /* number of length code lengths */
+ this.ndist = 0; /* number of distance code lengths */
+ this.have = 0; /* number of code lengths in lens[] */
+ this.next = null; /* next available space in codes[] */
+
+ this.lens = new Uint16Array(320); /* temporary storage for code lengths */
+ this.work = new Uint16Array(288); /* work area for code table building */
+
+ /*
+ because we don't have pointers in js, we use lencode and distcode directly
+ as buffers so we don't need codes
+ */
+ //this.codes = new Int32Array(ENOUGH); /* space for code tables */
+ this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */
+ this.distdyn = null; /* dynamic table for distance codes (JS specific) */
+ this.sane = 0; /* if false, allow invalid distance too far */
+ this.back = 0; /* bits back of last unprocessed length/lit */
+ this.was = 0; /* initial length of match */
+}
+
+
+const inflateStateCheck = (strm) => {
+
+ if (!strm) {
+ return 1;
+ }
+ const state = strm.state;
+ if (!state || state.strm !== strm ||
+ state.mode < HEAD || state.mode > SYNC) {
+ return 1;
+ }
+ return 0;
+};
+
+
+const inflateResetKeep = (strm) => {
+
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
+ const state = strm.state;
+ strm.total_in = strm.total_out = state.total = 0;
+ strm.msg = ''; /*Z_NULL*/
+ if (state.wrap) { /* to support ill-conceived Java test suite */
+ strm.adler = state.wrap & 1;
+ }
+ state.mode = HEAD;
+ state.last = 0;
+ state.havedict = 0;
+ state.flags = -1;
+ state.dmax = 32768;
+ state.head = null/*Z_NULL*/;
+ state.hold = 0;
+ state.bits = 0;
+ //state.lencode = state.distcode = state.next = state.codes;
+ state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);
+ state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);
+
+ state.sane = 1;
+ state.back = -1;
+ //Tracev((stderr, "inflate: reset\n"));
+ return Z_OK$1;
+};
+
+
+const inflateReset = (strm) => {
+
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
+ const state = strm.state;
+ state.wsize = 0;
+ state.whave = 0;
+ state.wnext = 0;
+ return inflateResetKeep(strm);
+
+};
+
+
+const inflateReset2 = (strm, windowBits) => {
+ let wrap;
+
+ /* get the state */
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
+ const state = strm.state;
+
+ /* extract wrap request from windowBits parameter */
+ if (windowBits < 0) {
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ wrap = (windowBits >> 4) + 5;
+ if (windowBits < 48) {
+ windowBits &= 15;
+ }
+ }
+
+ /* set number of window bits, free window if different */
+ if (windowBits && (windowBits < 8 || windowBits > 15)) {
+ return Z_STREAM_ERROR$1;
+ }
+ if (state.window !== null && state.wbits !== windowBits) {
+ state.window = null;
+ }
+
+ /* update state and reset the rest of it */
+ state.wrap = wrap;
+ state.wbits = windowBits;
+ return inflateReset(strm);
+};
+
+
+const inflateInit2 = (strm, windowBits) => {
+
+ if (!strm) { return Z_STREAM_ERROR$1; }
+ //strm.msg = Z_NULL; /* in case we return an error */
+
+ const state = new InflateState();
+
+ //if (state === Z_NULL) return Z_MEM_ERROR;
+ //Tracev((stderr, "inflate: allocated\n"));
+ strm.state = state;
+ state.strm = strm;
+ state.window = null/*Z_NULL*/;
+ state.mode = HEAD; /* to pass state test in inflateReset2() */
+ const ret = inflateReset2(strm, windowBits);
+ if (ret !== Z_OK$1) {
+ strm.state = null/*Z_NULL*/;
+ }
+ return ret;
+};
+
+
+const inflateInit = (strm) => {
+
+ return inflateInit2(strm, DEF_WBITS);
+};
+
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding. Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter. This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time. However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+let virgin = true;
+
+let lenfix, distfix; // We have no pointers in JS, so keep tables separate
+
+
+const fixedtables = (state) => {
+
+ /* build fixed huffman tables if first call (may not be thread safe) */
+ if (virgin) {
+ lenfix = new Int32Array(512);
+ distfix = new Int32Array(32);
+
+ /* literal/length table */
+ let sym = 0;
+ while (sym < 144) { state.lens[sym++] = 8; }
+ while (sym < 256) { state.lens[sym++] = 9; }
+ while (sym < 280) { state.lens[sym++] = 7; }
+ while (sym < 288) { state.lens[sym++] = 8; }
+
+ inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });
+
+ /* distance table */
+ sym = 0;
+ while (sym < 32) { state.lens[sym++] = 5; }
+
+ inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });
+
+ /* do this just once */
+ virgin = false;
+ }
+
+ state.lencode = lenfix;
+ state.lenbits = 9;
+ state.distcode = distfix;
+ state.distbits = 5;
+};
+
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning. If window does not exist yet, create it. This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+const updatewindow = (strm, src, end, copy) => {
+
+ let dist;
+ const state = strm.state;
+
+ /* if it hasn't been done already, allocate space for the window */
+ if (state.window === null) {
+ state.wsize = 1 << state.wbits;
+ state.wnext = 0;
+ state.whave = 0;
+
+ state.window = new Uint8Array(state.wsize);
+ }
+
+ /* copy state->wsize or less output bytes into the circular window */
+ if (copy >= state.wsize) {
+ state.window.set(src.subarray(end - state.wsize, end), 0);
+ state.wnext = 0;
+ state.whave = state.wsize;
+ }
+ else {
+ dist = state.wsize - state.wnext;
+ if (dist > copy) {
+ dist = copy;
+ }
+ //zmemcpy(state->window + state->wnext, end - copy, dist);
+ state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);
+ copy -= dist;
+ if (copy) {
+ //zmemcpy(state->window, end - copy, copy);
+ state.window.set(src.subarray(end - copy, end), 0);
+ state.wnext = copy;
+ state.whave = state.wsize;
+ }
+ else {
+ state.wnext += dist;
+ if (state.wnext === state.wsize) { state.wnext = 0; }
+ if (state.whave < state.wsize) { state.whave += dist; }
+ }
+ }
+ return 0;
+};
+
+
+const inflate$2 = (strm, flush) => {
+
+ let state;
+ let input, output; // input/output buffers
+ let next; /* next input INDEX */
+ let put; /* next output INDEX */
+ let have, left; /* available input and output */
+ let hold; /* bit buffer */
+ let bits; /* bits in bit buffer */
+ let _in, _out; /* save starting available input and output */
+ let copy; /* number of stored or match bytes to copy */
+ let from; /* where to copy match bytes from */
+ let from_source;
+ let here = 0; /* current decoding table entry */
+ let here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
+ //let last; /* parent table entry */
+ let last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
+ let len; /* length to copy for repeats, bits to drop */
+ let ret; /* return code */
+ const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */
+ let opts;
+
+ let n; // temporary variable for NEED_BITS
+
+ const order = /* permutation of code lengths */
+ new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);
+
+
+ if (inflateStateCheck(strm) || !strm.output ||
+ (!strm.input && strm.avail_in !== 0)) {
+ return Z_STREAM_ERROR$1;
+ }
+
+ state = strm.state;
+ if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
+
+
+ //--- LOAD() ---
+ put = strm.next_out;
+ output = strm.output;
+ left = strm.avail_out;
+ next = strm.next_in;
+ input = strm.input;
+ have = strm.avail_in;
+ hold = state.hold;
+ bits = state.bits;
+ //---
+
+ _in = have;
+ _out = left;
+ ret = Z_OK$1;
+
+ inf_leave: // goto emulation
+ for (;;) {
+ switch (state.mode) {
+ case HEAD:
+ if (state.wrap === 0) {
+ state.mode = TYPEDO;
+ break;
+ }
+ //=== NEEDBITS(16);
+ while (bits < 16) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
+ if (state.wbits === 0) {
+ state.wbits = 15;
+ }
+ state.check = 0/*crc32(0L, Z_NULL, 0)*/;
+ //=== CRC2(state.check, hold);
+ hbuf[0] = hold & 0xff;
+ hbuf[1] = (hold >>> 8) & 0xff;
+ state.check = crc32_1(state.check, hbuf, 2, 0);
+ //===//
+
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = FLAGS;
+ break;
+ }
+ if (state.head) {
+ state.head.done = false;
+ }
+ if (!(state.wrap & 1) || /* check if zlib header allowed */
+ (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
+ strm.msg = 'incorrect header check';
+ state.mode = BAD;
+ break;
+ }
+ if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
+ strm.msg = 'unknown compression method';
+ state.mode = BAD;
+ break;
+ }
+ //--- DROPBITS(4) ---//
+ hold >>>= 4;
+ bits -= 4;
+ //---//
+ len = (hold & 0x0f)/*BITS(4)*/ + 8;
+ if (state.wbits === 0) {
+ state.wbits = len;
+ }
+ if (len > 15 || len > state.wbits) {
+ strm.msg = 'invalid window size';
+ state.mode = BAD;
+ break;
+ }
+
+ // !!! pako patch. Force use `options.windowBits` if passed.
+ // Required to always use max window size by default.
+ state.dmax = 1 << state.wbits;
+ //state.dmax = 1 << len;
+
+ state.flags = 0; /* indicate zlib header */
+ //Tracev((stderr, "inflate: zlib header ok\n"));
+ strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+ state.mode = hold & 0x200 ? DICTID : TYPE;
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ break;
+ case FLAGS:
+ //=== NEEDBITS(16); */
+ while (bits < 16) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.flags = hold;
+ if ((state.flags & 0xff) !== Z_DEFLATED) {
+ strm.msg = 'unknown compression method';
+ state.mode = BAD;
+ break;
+ }
+ if (state.flags & 0xe000) {
+ strm.msg = 'unknown header flags set';
+ state.mode = BAD;
+ break;
+ }
+ if (state.head) {
+ state.head.text = ((hold >> 8) & 1);
+ }
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ //=== CRC2(state.check, hold);
+ hbuf[0] = hold & 0xff;
+ hbuf[1] = (hold >>> 8) & 0xff;
+ state.check = crc32_1(state.check, hbuf, 2, 0);
+ //===//
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = TIME;
+ /* falls through */
+ case TIME:
+ //=== NEEDBITS(32); */
+ while (bits < 32) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if (state.head) {
+ state.head.time = hold;
+ }
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ //=== CRC4(state.check, hold)
+ hbuf[0] = hold & 0xff;
+ hbuf[1] = (hold >>> 8) & 0xff;
+ hbuf[2] = (hold >>> 16) & 0xff;
+ hbuf[3] = (hold >>> 24) & 0xff;
+ state.check = crc32_1(state.check, hbuf, 4, 0);
+ //===
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = OS;
+ /* falls through */
+ case OS:
+ //=== NEEDBITS(16); */
+ while (bits < 16) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if (state.head) {
+ state.head.xflags = (hold & 0xff);
+ state.head.os = (hold >> 8);
+ }
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ //=== CRC2(state.check, hold);
+ hbuf[0] = hold & 0xff;
+ hbuf[1] = (hold >>> 8) & 0xff;
+ state.check = crc32_1(state.check, hbuf, 2, 0);
+ //===//
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = EXLEN;
+ /* falls through */
+ case EXLEN:
+ if (state.flags & 0x0400) {
+ //=== NEEDBITS(16); */
+ while (bits < 16) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.length = hold;
+ if (state.head) {
+ state.head.extra_len = hold;
+ }
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ //=== CRC2(state.check, hold);
+ hbuf[0] = hold & 0xff;
+ hbuf[1] = (hold >>> 8) & 0xff;
+ state.check = crc32_1(state.check, hbuf, 2, 0);
+ //===//
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ }
+ else if (state.head) {
+ state.head.extra = null/*Z_NULL*/;
+ }
+ state.mode = EXTRA;
+ /* falls through */
+ case EXTRA:
+ if (state.flags & 0x0400) {
+ copy = state.length;
+ if (copy > have) { copy = have; }
+ if (copy) {
+ if (state.head) {
+ len = state.head.extra_len - state.length;
+ if (!state.head.extra) {
+ // Use untyped array for more convenient processing later
+ state.head.extra = new Uint8Array(state.head.extra_len);
+ }
+ state.head.extra.set(
+ input.subarray(
+ next,
+ // extra field is limited to 65536 bytes
+ // - no need for additional size check
+ next + copy
+ ),
+ /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
+ len
+ );
+ //zmemcpy(state.head.extra + len, next,
+ // len + copy > state.head.extra_max ?
+ // state.head.extra_max - len : copy);
+ }
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ state.check = crc32_1(state.check, input, copy, next);
+ }
+ have -= copy;
+ next += copy;
+ state.length -= copy;
+ }
+ if (state.length) { break inf_leave; }
+ }
+ state.length = 0;
+ state.mode = NAME;
+ /* falls through */
+ case NAME:
+ if (state.flags & 0x0800) {
+ if (have === 0) { break inf_leave; }
+ copy = 0;
+ do {
+ // TODO: 2 or 1 bytes?
+ len = input[next + copy++];
+ /* use constant limit because in js we should not preallocate memory */
+ if (state.head && len &&
+ (state.length < 65536 /*state.head.name_max*/)) {
+ state.head.name += String.fromCharCode(len);
+ }
+ } while (len && copy < have);
+
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ state.check = crc32_1(state.check, input, copy, next);
+ }
+ have -= copy;
+ next += copy;
+ if (len) { break inf_leave; }
+ }
+ else if (state.head) {
+ state.head.name = null;
+ }
+ state.length = 0;
+ state.mode = COMMENT;
+ /* falls through */
+ case COMMENT:
+ if (state.flags & 0x1000) {
+ if (have === 0) { break inf_leave; }
+ copy = 0;
+ do {
+ len = input[next + copy++];
+ /* use constant limit because in js we should not preallocate memory */
+ if (state.head && len &&
+ (state.length < 65536 /*state.head.comm_max*/)) {
+ state.head.comment += String.fromCharCode(len);
+ }
+ } while (len && copy < have);
+ if ((state.flags & 0x0200) && (state.wrap & 4)) {
+ state.check = crc32_1(state.check, input, copy, next);
+ }
+ have -= copy;
+ next += copy;
+ if (len) { break inf_leave; }
+ }
+ else if (state.head) {
+ state.head.comment = null;
+ }
+ state.mode = HCRC;
+ /* falls through */
+ case HCRC:
+ if (state.flags & 0x0200) {
+ //=== NEEDBITS(16); */
+ while (bits < 16) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {
+ strm.msg = 'header crc mismatch';
+ state.mode = BAD;
+ break;
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ }
+ if (state.head) {
+ state.head.hcrc = ((state.flags >> 9) & 1);
+ state.head.done = true;
+ }
+ strm.adler = state.check = 0;
+ state.mode = TYPE;
+ break;
+ case DICTID:
+ //=== NEEDBITS(32); */
+ while (bits < 32) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ strm.adler = state.check = zswap32(hold);
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = DICT;
+ /* falls through */
+ case DICT:
+ if (state.havedict === 0) {
+ //--- RESTORE() ---
+ strm.next_out = put;
+ strm.avail_out = left;
+ strm.next_in = next;
+ strm.avail_in = have;
+ state.hold = hold;
+ state.bits = bits;
+ //---
+ return Z_NEED_DICT$1;
+ }
+ strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+ state.mode = TYPE;
+ /* falls through */
+ case TYPE:
+ if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
+ /* falls through */
+ case TYPEDO:
+ if (state.last) {
+ //--- BYTEBITS() ---//
+ hold >>>= bits & 7;
+ bits -= bits & 7;
+ //---//
+ state.mode = CHECK;
+ break;
+ }
+ //=== NEEDBITS(3); */
+ while (bits < 3) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.last = (hold & 0x01)/*BITS(1)*/;
+ //--- DROPBITS(1) ---//
+ hold >>>= 1;
+ bits -= 1;
+ //---//
+
+ switch ((hold & 0x03)/*BITS(2)*/) {
+ case 0: /* stored block */
+ //Tracev((stderr, "inflate: stored block%s\n",
+ // state.last ? " (last)" : ""));
+ state.mode = STORED;
+ break;
+ case 1: /* fixed block */
+ fixedtables(state);
+ //Tracev((stderr, "inflate: fixed codes block%s\n",
+ // state.last ? " (last)" : ""));
+ state.mode = LEN_; /* decode codes */
+ if (flush === Z_TREES) {
+ //--- DROPBITS(2) ---//
+ hold >>>= 2;
+ bits -= 2;
+ //---//
+ break inf_leave;
+ }
+ break;
+ case 2: /* dynamic block */
+ //Tracev((stderr, "inflate: dynamic codes block%s\n",
+ // state.last ? " (last)" : ""));
+ state.mode = TABLE;
+ break;
+ case 3:
+ strm.msg = 'invalid block type';
+ state.mode = BAD;
+ }
+ //--- DROPBITS(2) ---//
+ hold >>>= 2;
+ bits -= 2;
+ //---//
+ break;
+ case STORED:
+ //--- BYTEBITS() ---// /* go to byte boundary */
+ hold >>>= bits & 7;
+ bits -= bits & 7;
+ //---//
+ //=== NEEDBITS(32); */
+ while (bits < 32) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
+ strm.msg = 'invalid stored block lengths';
+ state.mode = BAD;
+ break;
+ }
+ state.length = hold & 0xffff;
+ //Tracev((stderr, "inflate: stored length %u\n",
+ // state.length));
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ state.mode = COPY_;
+ if (flush === Z_TREES) { break inf_leave; }
+ /* falls through */
+ case COPY_:
+ state.mode = COPY;
+ /* falls through */
+ case COPY:
+ copy = state.length;
+ if (copy) {
+ if (copy > have) { copy = have; }
+ if (copy > left) { copy = left; }
+ if (copy === 0) { break inf_leave; }
+ //--- zmemcpy(put, next, copy); ---
+ output.set(input.subarray(next, next + copy), put);
+ //---//
+ have -= copy;
+ next += copy;
+ left -= copy;
+ put += copy;
+ state.length -= copy;
+ break;
+ }
+ //Tracev((stderr, "inflate: stored end\n"));
+ state.mode = TYPE;
+ break;
+ case TABLE:
+ //=== NEEDBITS(14); */
+ while (bits < 14) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
+ //--- DROPBITS(5) ---//
+ hold >>>= 5;
+ bits -= 5;
+ //---//
+ state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
+ //--- DROPBITS(5) ---//
+ hold >>>= 5;
+ bits -= 5;
+ //---//
+ state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
+ //--- DROPBITS(4) ---//
+ hold >>>= 4;
+ bits -= 4;
+ //---//
+//#ifndef PKZIP_BUG_WORKAROUND
+ if (state.nlen > 286 || state.ndist > 30) {
+ strm.msg = 'too many length or distance symbols';
+ state.mode = BAD;
+ break;
+ }
+//#endif
+ //Tracev((stderr, "inflate: table sizes ok\n"));
+ state.have = 0;
+ state.mode = LENLENS;
+ /* falls through */
+ case LENLENS:
+ while (state.have < state.ncode) {
+ //=== NEEDBITS(3);
+ while (bits < 3) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
+ //--- DROPBITS(3) ---//
+ hold >>>= 3;
+ bits -= 3;
+ //---//
+ }
+ while (state.have < 19) {
+ state.lens[order[state.have++]] = 0;
+ }
+ // We have separate tables & no pointers. 2 commented lines below not needed.
+ //state.next = state.codes;
+ //state.lencode = state.next;
+ // Switch to use dynamic table
+ state.lencode = state.lendyn;
+ state.lenbits = 7;
+
+ opts = { bits: state.lenbits };
+ ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
+ state.lenbits = opts.bits;
+
+ if (ret) {
+ strm.msg = 'invalid code lengths set';
+ state.mode = BAD;
+ break;
+ }
+ //Tracev((stderr, "inflate: code lengths ok\n"));
+ state.have = 0;
+ state.mode = CODELENS;
+ /* falls through */
+ case CODELENS:
+ while (state.have < state.nlen + state.ndist) {
+ for (;;) {
+ here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
+ here_bits = here >>> 24;
+ here_op = (here >>> 16) & 0xff;
+ here_val = here & 0xffff;
+
+ if ((here_bits) <= bits) { break; }
+ //--- PULLBYTE() ---//
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ //---//
+ }
+ if (here_val < 16) {
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ state.lens[state.have++] = here_val;
+ }
+ else {
+ if (here_val === 16) {
+ //=== NEEDBITS(here.bits + 2);
+ n = here_bits + 2;
+ while (bits < n) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ if (state.have === 0) {
+ strm.msg = 'invalid bit length repeat';
+ state.mode = BAD;
+ break;
+ }
+ len = state.lens[state.have - 1];
+ copy = 3 + (hold & 0x03);//BITS(2);
+ //--- DROPBITS(2) ---//
+ hold >>>= 2;
+ bits -= 2;
+ //---//
+ }
+ else if (here_val === 17) {
+ //=== NEEDBITS(here.bits + 3);
+ n = here_bits + 3;
+ while (bits < n) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ len = 0;
+ copy = 3 + (hold & 0x07);//BITS(3);
+ //--- DROPBITS(3) ---//
+ hold >>>= 3;
+ bits -= 3;
+ //---//
+ }
+ else {
+ //=== NEEDBITS(here.bits + 7);
+ n = here_bits + 7;
+ while (bits < n) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ len = 0;
+ copy = 11 + (hold & 0x7f);//BITS(7);
+ //--- DROPBITS(7) ---//
+ hold >>>= 7;
+ bits -= 7;
+ //---//
+ }
+ if (state.have + copy > state.nlen + state.ndist) {
+ strm.msg = 'invalid bit length repeat';
+ state.mode = BAD;
+ break;
+ }
+ while (copy--) {
+ state.lens[state.have++] = len;
+ }
+ }
+ }
+
+ /* handle error breaks in while */
+ if (state.mode === BAD) { break; }
+
+ /* check for end-of-block code (better have one) */
+ if (state.lens[256] === 0) {
+ strm.msg = 'invalid code -- missing end-of-block';
+ state.mode = BAD;
+ break;
+ }
+
+ /* build code tables -- note: do not change the lenbits or distbits
+ values here (9 and 6) without reading the comments in inftrees.h
+ concerning the ENOUGH constants, which depend on those values */
+ state.lenbits = 9;
+
+ opts = { bits: state.lenbits };
+ ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
+ // We have separate tables & no pointers. 2 commented lines below not needed.
+ // state.next_index = opts.table_index;
+ state.lenbits = opts.bits;
+ // state.lencode = state.next;
+
+ if (ret) {
+ strm.msg = 'invalid literal/lengths set';
+ state.mode = BAD;
+ break;
+ }
+
+ state.distbits = 6;
+ //state.distcode.copy(state.codes);
+ // Switch to use dynamic table
+ state.distcode = state.distdyn;
+ opts = { bits: state.distbits };
+ ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
+ // We have separate tables & no pointers. 2 commented lines below not needed.
+ // state.next_index = opts.table_index;
+ state.distbits = opts.bits;
+ // state.distcode = state.next;
+
+ if (ret) {
+ strm.msg = 'invalid distances set';
+ state.mode = BAD;
+ break;
+ }
+ //Tracev((stderr, 'inflate: codes ok\n'));
+ state.mode = LEN_;
+ if (flush === Z_TREES) { break inf_leave; }
+ /* falls through */
+ case LEN_:
+ state.mode = LEN;
+ /* falls through */
+ case LEN:
+ if (have >= 6 && left >= 258) {
+ //--- RESTORE() ---
+ strm.next_out = put;
+ strm.avail_out = left;
+ strm.next_in = next;
+ strm.avail_in = have;
+ state.hold = hold;
+ state.bits = bits;
+ //---
+ inffast(strm, _out);
+ //--- LOAD() ---
+ put = strm.next_out;
+ output = strm.output;
+ left = strm.avail_out;
+ next = strm.next_in;
+ input = strm.input;
+ have = strm.avail_in;
+ hold = state.hold;
+ bits = state.bits;
+ //---
+
+ if (state.mode === TYPE) {
+ state.back = -1;
+ }
+ break;
+ }
+ state.back = 0;
+ for (;;) {
+ here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
+ here_bits = here >>> 24;
+ here_op = (here >>> 16) & 0xff;
+ here_val = here & 0xffff;
+
+ if (here_bits <= bits) { break; }
+ //--- PULLBYTE() ---//
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ //---//
+ }
+ if (here_op && (here_op & 0xf0) === 0) {
+ last_bits = here_bits;
+ last_op = here_op;
+ last_val = here_val;
+ for (;;) {
+ here = state.lencode[last_val +
+ ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+ here_bits = here >>> 24;
+ here_op = (here >>> 16) & 0xff;
+ here_val = here & 0xffff;
+
+ if ((last_bits + here_bits) <= bits) { break; }
+ //--- PULLBYTE() ---//
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ //---//
+ }
+ //--- DROPBITS(last.bits) ---//
+ hold >>>= last_bits;
+ bits -= last_bits;
+ //---//
+ state.back += last_bits;
+ }
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ state.back += here_bits;
+ state.length = here_val;
+ if (here_op === 0) {
+ //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+ // "inflate: literal '%c'\n" :
+ // "inflate: literal 0x%02x\n", here.val));
+ state.mode = LIT;
+ break;
+ }
+ if (here_op & 32) {
+ //Tracevv((stderr, "inflate: end of block\n"));
+ state.back = -1;
+ state.mode = TYPE;
+ break;
+ }
+ if (here_op & 64) {
+ strm.msg = 'invalid literal/length code';
+ state.mode = BAD;
+ break;
+ }
+ state.extra = here_op & 15;
+ state.mode = LENEXT;
+ /* falls through */
+ case LENEXT:
+ if (state.extra) {
+ //=== NEEDBITS(state.extra);
+ n = state.extra;
+ while (bits < n) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
+ //--- DROPBITS(state.extra) ---//
+ hold >>>= state.extra;
+ bits -= state.extra;
+ //---//
+ state.back += state.extra;
+ }
+ //Tracevv((stderr, "inflate: length %u\n", state.length));
+ state.was = state.length;
+ state.mode = DIST;
+ /* falls through */
+ case DIST:
+ for (;;) {
+ here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
+ here_bits = here >>> 24;
+ here_op = (here >>> 16) & 0xff;
+ here_val = here & 0xffff;
+
+ if ((here_bits) <= bits) { break; }
+ //--- PULLBYTE() ---//
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ //---//
+ }
+ if ((here_op & 0xf0) === 0) {
+ last_bits = here_bits;
+ last_op = here_op;
+ last_val = here_val;
+ for (;;) {
+ here = state.distcode[last_val +
+ ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+ here_bits = here >>> 24;
+ here_op = (here >>> 16) & 0xff;
+ here_val = here & 0xffff;
+
+ if ((last_bits + here_bits) <= bits) { break; }
+ //--- PULLBYTE() ---//
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ //---//
+ }
+ //--- DROPBITS(last.bits) ---//
+ hold >>>= last_bits;
+ bits -= last_bits;
+ //---//
+ state.back += last_bits;
+ }
+ //--- DROPBITS(here.bits) ---//
+ hold >>>= here_bits;
+ bits -= here_bits;
+ //---//
+ state.back += here_bits;
+ if (here_op & 64) {
+ strm.msg = 'invalid distance code';
+ state.mode = BAD;
+ break;
+ }
+ state.offset = here_val;
+ state.extra = (here_op) & 15;
+ state.mode = DISTEXT;
+ /* falls through */
+ case DISTEXT:
+ if (state.extra) {
+ //=== NEEDBITS(state.extra);
+ n = state.extra;
+ while (bits < n) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
+ //--- DROPBITS(state.extra) ---//
+ hold >>>= state.extra;
+ bits -= state.extra;
+ //---//
+ state.back += state.extra;
+ }
+//#ifdef INFLATE_STRICT
+ if (state.offset > state.dmax) {
+ strm.msg = 'invalid distance too far back';
+ state.mode = BAD;
+ break;
+ }
+//#endif
+ //Tracevv((stderr, "inflate: distance %u\n", state.offset));
+ state.mode = MATCH;
+ /* falls through */
+ case MATCH:
+ if (left === 0) { break inf_leave; }
+ copy = _out - left;
+ if (state.offset > copy) { /* copy from window */
+ copy = state.offset - copy;
+ if (copy > state.whave) {
+ if (state.sane) {
+ strm.msg = 'invalid distance too far back';
+ state.mode = BAD;
+ break;
+ }
+// (!) This block is disabled in zlib defaults,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+// Trace((stderr, "inflate.c too far\n"));
+// copy -= state.whave;
+// if (copy > state.length) { copy = state.length; }
+// if (copy > left) { copy = left; }
+// left -= copy;
+// state.length -= copy;
+// do {
+// output[put++] = 0;
+// } while (--copy);
+// if (state.length === 0) { state.mode = LEN; }
+// break;
+//#endif
+ }
+ if (copy > state.wnext) {
+ copy -= state.wnext;
+ from = state.wsize - copy;
+ }
+ else {
+ from = state.wnext - copy;
+ }
+ if (copy > state.length) { copy = state.length; }
+ from_source = state.window;
+ }
+ else { /* copy from output */
+ from_source = output;
+ from = put - state.offset;
+ copy = state.length;
+ }
+ if (copy > left) { copy = left; }
+ left -= copy;
+ state.length -= copy;
+ do {
+ output[put++] = from_source[from++];
+ } while (--copy);
+ if (state.length === 0) { state.mode = LEN; }
+ break;
+ case LIT:
+ if (left === 0) { break inf_leave; }
+ output[put++] = state.length;
+ left--;
+ state.mode = LEN;
+ break;
+ case CHECK:
+ if (state.wrap) {
+ //=== NEEDBITS(32);
+ while (bits < 32) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ // Use '|' instead of '+' to make sure that result is signed
+ hold |= input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ _out -= left;
+ strm.total_out += _out;
+ state.total += _out;
+ if ((state.wrap & 4) && _out) {
+ strm.adler = state.check =
+ /*UPDATE_CHECK(state.check, put - _out, _out);*/
+ (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));
+
+ }
+ _out = left;
+ // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
+ if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {
+ strm.msg = 'incorrect data check';
+ state.mode = BAD;
+ break;
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ //Tracev((stderr, "inflate: check matches trailer\n"));
+ }
+ state.mode = LENGTH;
+ /* falls through */
+ case LENGTH:
+ if (state.wrap && state.flags) {
+ //=== NEEDBITS(32);
+ while (bits < 32) {
+ if (have === 0) { break inf_leave; }
+ have--;
+ hold += input[next++] << bits;
+ bits += 8;
+ }
+ //===//
+ if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {
+ strm.msg = 'incorrect length check';
+ state.mode = BAD;
+ break;
+ }
+ //=== INITBITS();
+ hold = 0;
+ bits = 0;
+ //===//
+ //Tracev((stderr, "inflate: length matches trailer\n"));
+ }
+ state.mode = DONE;
+ /* falls through */
+ case DONE:
+ ret = Z_STREAM_END$1;
+ break inf_leave;
+ case BAD:
+ ret = Z_DATA_ERROR$1;
+ break inf_leave;
+ case MEM:
+ return Z_MEM_ERROR$1;
+ case SYNC:
+ /* falls through */
+ default:
+ return Z_STREAM_ERROR$1;
+ }
+ }
+
+ // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
+
+ /*
+ Return from inflate(), updating the total counts and the check value.
+ If there was no progress during the inflate() call, return a buffer
+ error. Call updatewindow() to create and/or update the window state.
+ Note: a memory error from inflate() is non-recoverable.
+ */
+
+ //--- RESTORE() ---
+ strm.next_out = put;
+ strm.avail_out = left;
+ strm.next_in = next;
+ strm.avail_in = have;
+ state.hold = hold;
+ state.bits = bits;
+ //---
+
+ if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
+ (state.mode < CHECK || flush !== Z_FINISH$1))) {
+ if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;
+ }
+ _in -= strm.avail_in;
+ _out -= strm.avail_out;
+ strm.total_in += _in;
+ strm.total_out += _out;
+ state.total += _out;
+ if ((state.wrap & 4) && _out) {
+ strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
+ (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));
+ }
+ strm.data_type = state.bits + (state.last ? 64 : 0) +
+ (state.mode === TYPE ? 128 : 0) +
+ (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
+ if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {
+ ret = Z_BUF_ERROR;
+ }
+ return ret;
+};
+
+
+const inflateEnd = (strm) => {
+
+ if (inflateStateCheck(strm)) {
+ return Z_STREAM_ERROR$1;
+ }
+
+ let state = strm.state;
+ if (state.window) {
+ state.window = null;
+ }
+ strm.state = null;
+ return Z_OK$1;
+};
+
+
+const inflateGetHeader = (strm, head) => {
+
+ /* check state */
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
+ const state = strm.state;
+ if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }
+
+ /* save header structure */
+ state.head = head;
+ head.done = false;
+ return Z_OK$1;
+};
+
+
+const inflateSetDictionary = (strm, dictionary) => {
+ const dictLength = dictionary.length;
+
+ let state;
+ let dictid;
+ let ret;
+
+ /* check state */
+ if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }
+ state = strm.state;
+
+ if (state.wrap !== 0 && state.mode !== DICT) {
+ return Z_STREAM_ERROR$1;
+ }
+
+ /* check for correct dictionary identifier */
+ if (state.mode === DICT) {
+ dictid = 1; /* adler32(0, null, 0)*/
+ /* dictid = adler32(dictid, dictionary, dictLength); */
+ dictid = adler32_1(dictid, dictionary, dictLength, 0);
+ if (dictid !== state.check) {
+ return Z_DATA_ERROR$1;
+ }
+ }
+ /* copy dictionary to window using updatewindow(), which will amend the
+ existing dictionary if appropriate */
+ ret = updatewindow(strm, dictionary, dictLength, dictLength);
+ if (ret) {
+ state.mode = MEM;
+ return Z_MEM_ERROR$1;
+ }
+ state.havedict = 1;
+ // Tracev((stderr, "inflate: dictionary set\n"));
+ return Z_OK$1;
+};
+
+
+var inflateReset_1 = inflateReset;
+var inflateReset2_1 = inflateReset2;
+var inflateResetKeep_1 = inflateResetKeep;
+var inflateInit_1 = inflateInit;
+var inflateInit2_1 = inflateInit2;
+var inflate_2$1 = inflate$2;
+var inflateEnd_1 = inflateEnd;
+var inflateGetHeader_1 = inflateGetHeader;
+var inflateSetDictionary_1 = inflateSetDictionary;
+var inflateInfo = 'pako inflate (from Nodeca project)';
+
+/* Not implemented
+module.exports.inflateCodesUsed = inflateCodesUsed;
+module.exports.inflateCopy = inflateCopy;
+module.exports.inflateGetDictionary = inflateGetDictionary;
+module.exports.inflateMark = inflateMark;
+module.exports.inflatePrime = inflatePrime;
+module.exports.inflateSync = inflateSync;
+module.exports.inflateSyncPoint = inflateSyncPoint;
+module.exports.inflateUndermine = inflateUndermine;
+module.exports.inflateValidate = inflateValidate;
+*/
+
+var inflate_1$2 = {
+ inflateReset: inflateReset_1,
+ inflateReset2: inflateReset2_1,
+ inflateResetKeep: inflateResetKeep_1,
+ inflateInit: inflateInit_1,
+ inflateInit2: inflateInit2_1,
+ inflate: inflate_2$1,
+ inflateEnd: inflateEnd_1,
+ inflateGetHeader: inflateGetHeader_1,
+ inflateSetDictionary: inflateSetDictionary_1,
+ inflateInfo: inflateInfo
+};
+
+// (C) 1995-2013 Jean-loup Gailly and Mark Adler
+// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+
+function GZheader() {
+ /* true if compressed data believed to be text */
+ this.text = 0;
+ /* modification time */
+ this.time = 0;
+ /* extra flags (not used when writing a gzip file) */
+ this.xflags = 0;
+ /* operating system */
+ this.os = 0;
+ /* pointer to extra field or Z_NULL if none */
+ this.extra = null;
+ /* extra field length (valid if extra != Z_NULL) */
+ this.extra_len = 0; // Actually, we don't need it in JS,
+ // but leave for few code modifications
+
+ //
+ // Setup limits is not necessary because in js we should not preallocate memory
+ // for inflate use constant limit in 65536 bytes
+ //
+
+ /* space at extra (only when reading header) */
+ // this.extra_max = 0;
+ /* pointer to zero-terminated file name or Z_NULL */
+ this.name = '';
+ /* space at name (only when reading header) */
+ // this.name_max = 0;
+ /* pointer to zero-terminated comment or Z_NULL */
+ this.comment = '';
+ /* space at comment (only when reading header) */
+ // this.comm_max = 0;
+ /* true if there was or will be a header crc */
+ this.hcrc = 0;
+ /* true when done reading gzip header (not used when writing a gzip file) */
+ this.done = false;
+}
+
+var gzheader = GZheader;
+
+const toString = Object.prototype.toString;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+const {
+ Z_NO_FLUSH, Z_FINISH,
+ Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR
+} = constants$2;
+
+/* ===========================================================================*/
+
+
+/**
+ * class Inflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[inflate]]
+ * and [[inflateRaw]].
+ **/
+
+/* internal
+ * inflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Inflate#onData]] not overridden.
+ **/
+
+/**
+ * Inflate.result -> Uint8Array|String
+ *
+ * Uncompressed result, generated by default [[Inflate#onData]]
+ * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Inflate.err -> Number
+ *
+ * Error code after inflate finished. 0 (Z_OK) on success.
+ * Should be checked if broken data possible.
+ **/
+
+/**
+ * Inflate.msg -> String
+ *
+ * Error message, if [[Inflate.err]] != 0
+ **/
+
+
+/**
+ * new Inflate(options)
+ * - options (Object): zlib inflate options.
+ *
+ * Creates new inflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `windowBits`
+ * - `dictionary`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw inflate
+ * - `to` (String) - if equal to 'string', then result will be converted
+ * from utf8 to utf16 (javascript) string. When string output requested,
+ * chunk length can differ from `chunkSize`, depending on content.
+ *
+ * By default, when no options set, autodetect deflate/gzip data format via
+ * wrapper header.
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * const pako = require('pako')
+ * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])
+ * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * const inflate = new pako.Inflate({ level: 3});
+ *
+ * inflate.push(chunk1, false);
+ * inflate.push(chunk2, true); // true -> last chunk
+ *
+ * if (inflate.err) { throw new Error(inflate.err); }
+ *
+ * console.log(inflate.result);
+ * ```
+ **/
+function Inflate$1(options) {
+ this.options = common.assign({
+ chunkSize: 1024 * 64,
+ windowBits: 15,
+ to: ''
+ }, options || {});
+
+ const opt = this.options;
+
+ // Force window size for `raw` data, if not set directly,
+ // because we have no header for autodetect.
+ if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
+ opt.windowBits = -opt.windowBits;
+ if (opt.windowBits === 0) { opt.windowBits = -15; }
+ }
+
+ // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
+ if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
+ !(options && options.windowBits)) {
+ opt.windowBits += 32;
+ }
+
+ // Gzip header has no info about windows size, we can do autodetect only
+ // for deflate. So, if window size not set, force it to max when gzip possible
+ if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
+ // bit 3 (16) -> gzipped data
+ // bit 4 (32) -> autodetect gzip/deflate
+ if ((opt.windowBits & 15) === 0) {
+ opt.windowBits |= 15;
+ }
+ }
+
+ this.err = 0; // error code, if happens (0 = Z_OK)
+ this.msg = ''; // error message
+ this.ended = false; // used to avoid multiple onEnd() calls
+ this.chunks = []; // chunks of compressed data
+
+ this.strm = new zstream();
+ this.strm.avail_out = 0;
+
+ let status = inflate_1$2.inflateInit2(
+ this.strm,
+ opt.windowBits
+ );
+
+ if (status !== Z_OK) {
+ throw new Error(messages[status]);
+ }
+
+ this.header = new gzheader();
+
+ inflate_1$2.inflateGetHeader(this.strm, this.header);
+
+ // Setup dictionary
+ if (opt.dictionary) {
+ // Convert data if needed
+ if (typeof opt.dictionary === 'string') {
+ opt.dictionary = strings.string2buf(opt.dictionary);
+ } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
+ opt.dictionary = new Uint8Array(opt.dictionary);
+ }
+ if (opt.raw) { //In raw mode we need to set the dictionary early
+ status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary);
+ if (status !== Z_OK) {
+ throw new Error(messages[status]);
+ }
+ }
+ }
+}
+
+/**
+ * Inflate#push(data[, flush_mode]) -> Boolean
+ * - data (Uint8Array|ArrayBuffer): input data
+ * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE
+ * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,
+ * `true` means Z_FINISH.
+ *
+ * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
+ * new output chunks. Returns `true` on success. If end of stream detected,
+ * [[Inflate#onEnd]] will be called.
+ *
+ * `flush_mode` is not needed for normal operation, because end of stream
+ * detected automatically. You may try to use it for advanced things, but
+ * this functionality was not tested.
+ *
+ * On fail call [[Inflate#onEnd]] with error code and return false.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true); // push last chunk
+ * ```
+ **/
+Inflate$1.prototype.push = function (data, flush_mode) {
+ const strm = this.strm;
+ const chunkSize = this.options.chunkSize;
+ const dictionary = this.options.dictionary;
+ let status, _flush_mode, last_avail_out;
+
+ if (this.ended) return false;
+
+ if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;
+ else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;
+
+ // Convert data if needed
+ if (toString.call(data) === '[object ArrayBuffer]') {
+ strm.input = new Uint8Array(data);
+ } else {
+ strm.input = data;
+ }
+
+ strm.next_in = 0;
+ strm.avail_in = strm.input.length;
+
+ for (;;) {
+ if (strm.avail_out === 0) {
+ strm.output = new Uint8Array(chunkSize);
+ strm.next_out = 0;
+ strm.avail_out = chunkSize;
+ }
+
+ status = inflate_1$2.inflate(strm, _flush_mode);
+
+ if (status === Z_NEED_DICT && dictionary) {
+ status = inflate_1$2.inflateSetDictionary(strm, dictionary);
+
+ if (status === Z_OK) {
+ status = inflate_1$2.inflate(strm, _flush_mode);
+ } else if (status === Z_DATA_ERROR) {
+ // Replace code with more verbose
+ status = Z_NEED_DICT;
+ }
+ }
+
+ // Skip snyc markers if more data follows and not raw mode
+ while (strm.avail_in > 0 &&
+ status === Z_STREAM_END &&
+ strm.state.wrap > 0 &&
+ data[strm.next_in] !== 0)
+ {
+ inflate_1$2.inflateReset(strm);
+ status = inflate_1$2.inflate(strm, _flush_mode);
+ }
+
+ switch (status) {
+ case Z_STREAM_ERROR:
+ case Z_DATA_ERROR:
+ case Z_NEED_DICT:
+ case Z_MEM_ERROR:
+ this.onEnd(status);
+ this.ended = true;
+ return false;
+ }
+
+ // Remember real `avail_out` value, because we may patch out buffer content
+ // to align utf8 strings boundaries.
+ last_avail_out = strm.avail_out;
+
+ if (strm.next_out) {
+ if (strm.avail_out === 0 || status === Z_STREAM_END) {
+
+ if (this.options.to === 'string') {
+
+ let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
+
+ let tail = strm.next_out - next_out_utf8;
+ let utf8str = strings.buf2string(strm.output, next_out_utf8);
+
+ // move tail & realign counters
+ strm.next_out = tail;
+ strm.avail_out = chunkSize - tail;
+ if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);
+
+ this.onData(utf8str);
+
+ } else {
+ this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));
+ }
+ }
+ }
+
+ // Must repeat iteration if out buffer is full
+ if (status === Z_OK && last_avail_out === 0) continue;
+
+ // Finalize if end of stream reached.
+ if (status === Z_STREAM_END) {
+ status = inflate_1$2.inflateEnd(this.strm);
+ this.onEnd(status);
+ this.ended = true;
+ return true;
+ }
+
+ if (strm.avail_in === 0) break;
+ }
+
+ return true;
+};
+
+
+/**
+ * Inflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|String): output data. When string output requested,
+ * each chunk will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Inflate$1.prototype.onData = function (chunk) {
+ this.chunks.push(chunk);
+};
+
+
+/**
+ * Inflate#onEnd(status) -> Void
+ * - status (Number): inflate status. 0 (Z_OK) on success,
+ * other if not.
+ *
+ * Called either after you tell inflate that the input stream is
+ * complete (Z_FINISH). By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Inflate$1.prototype.onEnd = function (status) {
+ // On success - join
+ if (status === Z_OK) {
+ if (this.options.to === 'string') {
+ this.result = this.chunks.join('');
+ } else {
+ this.result = common.flattenChunks(this.chunks);
+ }
+ }
+ this.chunks = [];
+ this.err = status;
+ this.msg = this.strm.msg;
+};
+
+
+/**
+ * inflate(data[, options]) -> Uint8Array|String
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Decompress `data` with inflate/ungzip and `options`. Autodetect
+ * format via wrapper header by default. That's why we don't provide
+ * separate `ungzip` method.
+ *
+ * Supported options are:
+ *
+ * - windowBits
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ * negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be converted
+ * from utf8 to utf16 (javascript) string. When string output requested,
+ * chunk length can differ from `chunkSize`, depending on content.
+ *
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * const pako = require('pako');
+ * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));
+ * let output;
+ *
+ * try {
+ * output = pako.inflate(input);
+ * } catch (err) {
+ * console.log(err);
+ * }
+ * ```
+ **/
+function inflate$1(input, options) {
+ const inflator = new Inflate$1(options);
+
+ inflator.push(input);
+
+ // That will never happens, if you don't cheat with options :)
+ if (inflator.err) throw inflator.msg || messages[inflator.err];
+
+ return inflator.result;
+}
+
+
+/**
+ * inflateRaw(data[, options]) -> Uint8Array|String
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * The same as [[inflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function inflateRaw$1(input, options) {
+ options = options || {};
+ options.raw = true;
+ return inflate$1(input, options);
+}
+
+
+/**
+ * ungzip(data[, options]) -> Uint8Array|String
+ * - data (Uint8Array|ArrayBuffer): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Just shortcut to [[inflate]], because it autodetects format
+ * by header.content. Done for convenience.
+ **/
+
+
+var Inflate_1$1 = Inflate$1;
+var inflate_2 = inflate$1;
+var inflateRaw_1$1 = inflateRaw$1;
+var ungzip$1 = inflate$1;
+var constants = constants$2;
+
+var inflate_1$1 = {
+ Inflate: Inflate_1$1,
+ inflate: inflate_2,
+ inflateRaw: inflateRaw_1$1,
+ ungzip: ungzip$1,
+ constants: constants
+};
+
+const { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;
+
+const { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;
+
+
+
+var Deflate_1 = Deflate;
+var deflate_1 = deflate;
+var deflateRaw_1 = deflateRaw;
+var gzip_1 = gzip;
+var Inflate_1 = Inflate;
+var inflate_1 = inflate;
+var inflateRaw_1 = inflateRaw;
+var ungzip_1 = ungzip;
+var constants_1 = constants$2;
+
+var pako = {
+ Deflate: Deflate_1,
+ deflate: deflate_1,
+ deflateRaw: deflateRaw_1,
+ gzip: gzip_1,
+ Inflate: Inflate_1,
+ inflate: inflate_1,
+ inflateRaw: inflateRaw_1,
+ ungzip: ungzip_1,
+ constants: constants_1
+};
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.mjs":
+/*!**********************************************************************!*\
+ !*** ./node_modules/jspdf-autotable/dist/jspdf.plugin.autotable.mjs ***!
+ \**********************************************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ Cell: () => (/* binding */ Cell),
+/* harmony export */ CellHookData: () => (/* binding */ CellHookData),
+/* harmony export */ Column: () => (/* binding */ Column),
+/* harmony export */ HookData: () => (/* binding */ HookData),
+/* harmony export */ Row: () => (/* binding */ Row),
+/* harmony export */ Table: () => (/* binding */ Table),
+/* harmony export */ __createTable: () => (/* binding */ __createTable),
+/* harmony export */ __drawTable: () => (/* binding */ __drawTable),
+/* harmony export */ applyPlugin: () => (/* binding */ applyPlugin),
+/* harmony export */ autoTable: () => (/* binding */ autoTable),
+/* harmony export */ "default": () => (/* binding */ autoTable)
+/* harmony export */ });
+/**
+ * Improved text function with halign and valign support
+ * Inspiration from: http://stackoverflow.com/questions/28327510/align-text-right-using-jspdf/28433113#28433113
+ */
+function autoTableText (text, x, y, styles, doc) {
+ styles = styles || {};
+ var PHYSICAL_LINE_HEIGHT = 1.15;
+ var k = doc.internal.scaleFactor;
+ var fontSize = doc.internal.getFontSize() / k;
+ var lineHeightFactor = doc.getLineHeightFactor
+ ? doc.getLineHeightFactor()
+ : PHYSICAL_LINE_HEIGHT;
+ var lineHeight = fontSize * lineHeightFactor;
+ var splitRegex = /\r\n|\r|\n/g;
+ var splitText = '';
+ var lineCount = 1;
+ if (styles.valign === 'middle' ||
+ styles.valign === 'bottom' ||
+ styles.halign === 'center' ||
+ styles.halign === 'right') {
+ splitText = typeof text === 'string' ? text.split(splitRegex) : text;
+ lineCount = splitText.length || 1;
+ }
+ // Align the top
+ y += fontSize * (2 - PHYSICAL_LINE_HEIGHT);
+ if (styles.valign === 'middle')
+ y -= (lineCount / 2) * lineHeight;
+ else if (styles.valign === 'bottom')
+ y -= lineCount * lineHeight;
+ if (styles.halign === 'center' || styles.halign === 'right') {
+ var alignSize = fontSize;
+ if (styles.halign === 'center')
+ alignSize *= 0.5;
+ if (splitText && lineCount >= 1) {
+ for (var iLine = 0; iLine < splitText.length; iLine++) {
+ doc.text(splitText[iLine], x - doc.getStringUnitWidth(splitText[iLine]) * alignSize, y);
+ y += lineHeight;
+ }
+ return doc;
+ }
+ x -= doc.getStringUnitWidth(text) * alignSize;
+ }
+ if (styles.halign === 'justify') {
+ doc.text(text, x, y, { maxWidth: styles.maxWidth || 100, align: 'justify' });
+ }
+ else {
+ doc.text(text, x, y);
+ }
+ return doc;
+}
+
+var globalDefaults = {};
+var DocHandler = /** @class */ (function () {
+ function DocHandler(jsPDFDocument) {
+ this.jsPDFDocument = jsPDFDocument;
+ this.userStyles = {
+ // Black for versions of jspdf without getTextColor
+ textColor: jsPDFDocument.getTextColor
+ ? this.jsPDFDocument.getTextColor()
+ : 0,
+ fontSize: jsPDFDocument.internal.getFontSize(),
+ fontStyle: jsPDFDocument.internal.getFont().fontStyle,
+ font: jsPDFDocument.internal.getFont().fontName,
+ // 0 for versions of jspdf without getLineWidth
+ lineWidth: jsPDFDocument.getLineWidth
+ ? this.jsPDFDocument.getLineWidth()
+ : 0,
+ // Black for versions of jspdf without getDrawColor
+ lineColor: jsPDFDocument.getDrawColor
+ ? this.jsPDFDocument.getDrawColor()
+ : 0,
+ };
+ }
+ DocHandler.setDefaults = function (defaults, doc) {
+ if (doc === void 0) { doc = null; }
+ if (doc) {
+ doc.__autoTableDocumentDefaults = defaults;
+ }
+ else {
+ globalDefaults = defaults;
+ }
+ };
+ DocHandler.unifyColor = function (c) {
+ if (Array.isArray(c)) {
+ return c;
+ }
+ else if (typeof c === 'number') {
+ return [c, c, c];
+ }
+ else if (typeof c === 'string') {
+ return [c];
+ }
+ else {
+ return null;
+ }
+ };
+ DocHandler.prototype.applyStyles = function (styles, fontOnly) {
+ // Font style needs to be applied before font
+ // https://github.com/simonbengtsson/jsPDF-AutoTable/issues/632
+ var _a, _b, _c;
+ if (fontOnly === void 0) { fontOnly = false; }
+ if (styles.fontStyle && this.jsPDFDocument.setFontStyle) {
+ this.jsPDFDocument.setFontStyle(styles.fontStyle);
+ }
+ var _d = this.jsPDFDocument.internal.getFont(), fontStyle = _d.fontStyle, fontName = _d.fontName;
+ if (styles.font)
+ fontName = styles.font;
+ if (styles.fontStyle) {
+ fontStyle = styles.fontStyle;
+ var availableFontStyles = this.getFontList()[fontName];
+ if (availableFontStyles &&
+ availableFontStyles.indexOf(fontStyle) === -1 &&
+ this.jsPDFDocument.setFontStyle) {
+ // Common issue was that the default bold in headers
+ // made custom fonts not work. For example:
+ // https://github.com/simonbengtsson/jsPDF-AutoTable/issues/653
+ this.jsPDFDocument.setFontStyle(availableFontStyles[0]);
+ fontStyle = availableFontStyles[0];
+ }
+ }
+ this.jsPDFDocument.setFont(fontName, fontStyle);
+ if (styles.fontSize)
+ this.jsPDFDocument.setFontSize(styles.fontSize);
+ if (fontOnly) {
+ return; // Performance improvement
+ }
+ var color = DocHandler.unifyColor(styles.fillColor);
+ if (color)
+ (_a = this.jsPDFDocument).setFillColor.apply(_a, color);
+ color = DocHandler.unifyColor(styles.textColor);
+ if (color)
+ (_b = this.jsPDFDocument).setTextColor.apply(_b, color);
+ color = DocHandler.unifyColor(styles.lineColor);
+ if (color)
+ (_c = this.jsPDFDocument).setDrawColor.apply(_c, color);
+ if (typeof styles.lineWidth === 'number') {
+ this.jsPDFDocument.setLineWidth(styles.lineWidth);
+ }
+ };
+ DocHandler.prototype.splitTextToSize = function (text, size, opts) {
+ return this.jsPDFDocument.splitTextToSize(text, size, opts);
+ };
+ /**
+ * Adds a rectangle to the PDF
+ * @param x Coordinate (in units declared at inception of PDF document) against left edge of the page
+ * @param y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+ * @param width Width (in units declared at inception of PDF document)
+ * @param height Height (in units declared at inception of PDF document)
+ * @param fillStyle A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke.
+ */
+ DocHandler.prototype.rect = function (x, y, width, height, fillStyle) {
+ // null is excluded from fillStyle possible values because it isn't needed
+ // and is prone to bugs as it's used to postpone setting the style
+ // https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html#rect
+ return this.jsPDFDocument.rect(x, y, width, height, fillStyle);
+ };
+ DocHandler.prototype.getLastAutoTable = function () {
+ return this.jsPDFDocument.lastAutoTable || null;
+ };
+ DocHandler.prototype.getTextWidth = function (text) {
+ return this.jsPDFDocument.getTextWidth(text);
+ };
+ DocHandler.prototype.getDocument = function () {
+ return this.jsPDFDocument;
+ };
+ DocHandler.prototype.setPage = function (page) {
+ this.jsPDFDocument.setPage(page);
+ };
+ DocHandler.prototype.addPage = function () {
+ return this.jsPDFDocument.addPage();
+ };
+ DocHandler.prototype.getFontList = function () {
+ return this.jsPDFDocument.getFontList();
+ };
+ DocHandler.prototype.getGlobalOptions = function () {
+ return globalDefaults || {};
+ };
+ DocHandler.prototype.getDocumentOptions = function () {
+ return this.jsPDFDocument.__autoTableDocumentDefaults || {};
+ };
+ DocHandler.prototype.pageSize = function () {
+ var pageSize = this.jsPDFDocument.internal.pageSize;
+ // JSPDF 1.4 uses get functions instead of properties on pageSize
+ if (pageSize.width == null) {
+ pageSize = { width: pageSize.getWidth(), height: pageSize.getHeight() };
+ }
+ return pageSize;
+ };
+ DocHandler.prototype.scaleFactor = function () {
+ return this.jsPDFDocument.internal.scaleFactor;
+ };
+ DocHandler.prototype.getLineHeightFactor = function () {
+ var doc = this.jsPDFDocument;
+ return doc.getLineHeightFactor ? doc.getLineHeightFactor() : 1.15;
+ };
+ DocHandler.prototype.getLineHeight = function (fontSize) {
+ return (fontSize / this.scaleFactor()) * this.getLineHeightFactor();
+ };
+ DocHandler.prototype.pageNumber = function () {
+ var pageInfo = this.jsPDFDocument.internal.getCurrentPageInfo();
+ if (!pageInfo) {
+ // Only recent versions of jspdf has pageInfo
+ return this.jsPDFDocument.internal.getNumberOfPages();
+ }
+ return pageInfo.pageNumber;
+ };
+ return DocHandler;
+}());
+
+/******************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
+
+var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+};
+
+function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+};
+
+var HtmlRowInput = /** @class */ (function (_super) {
+ __extends(HtmlRowInput, _super);
+ function HtmlRowInput(element) {
+ var _this = _super.call(this) || this;
+ _this._element = element;
+ return _this;
+ }
+ return HtmlRowInput;
+}(Array));
+// Base style for all themes
+function defaultStyles(scaleFactor) {
+ return {
+ font: 'helvetica', // helvetica, times, courier
+ fontStyle: 'normal', // normal, bold, italic, bolditalic
+ overflow: 'linebreak', // linebreak, ellipsize, visible or hidden
+ fillColor: false, // Either false for transparent, rbg array e.g. [255, 255, 255] or gray level e.g 200
+ textColor: 20,
+ halign: 'left', // left, center, right, justify
+ valign: 'top', // top, middle, bottom
+ fontSize: 10,
+ cellPadding: 5 / scaleFactor, // number or {top,left,right,left,vertical,horizontal}
+ lineColor: 200,
+ lineWidth: 0,
+ cellWidth: 'auto', // 'auto'|'wrap'|number
+ minCellHeight: 0,
+ minCellWidth: 0,
+ };
+}
+function getTheme(name) {
+ var themes = {
+ striped: {
+ table: { fillColor: 255, textColor: 80, fontStyle: 'normal' },
+ head: { textColor: 255, fillColor: [41, 128, 185], fontStyle: 'bold' },
+ body: {},
+ foot: { textColor: 255, fillColor: [41, 128, 185], fontStyle: 'bold' },
+ alternateRow: { fillColor: 245 },
+ },
+ grid: {
+ table: {
+ fillColor: 255,
+ textColor: 80,
+ fontStyle: 'normal',
+ lineWidth: 0.1,
+ },
+ head: {
+ textColor: 255,
+ fillColor: [26, 188, 156],
+ fontStyle: 'bold',
+ lineWidth: 0,
+ },
+ body: {},
+ foot: {
+ textColor: 255,
+ fillColor: [26, 188, 156],
+ fontStyle: 'bold',
+ lineWidth: 0,
+ },
+ alternateRow: {},
+ },
+ plain: { head: { fontStyle: 'bold' }, foot: { fontStyle: 'bold' } },
+ };
+ return themes[name];
+}
+
+function getStringWidth(text, styles, doc) {
+ doc.applyStyles(styles, true);
+ var textArr = Array.isArray(text) ? text : [text];
+ var widestLineWidth = textArr
+ .map(function (text) { return doc.getTextWidth(text); })
+ .reduce(function (a, b) { return Math.max(a, b); }, 0);
+ return widestLineWidth;
+}
+function addTableBorder(doc, table, startPos, cursor) {
+ var lineWidth = table.settings.tableLineWidth;
+ var lineColor = table.settings.tableLineColor;
+ doc.applyStyles({ lineWidth: lineWidth, lineColor: lineColor });
+ var fillStyle = getFillStyle(lineWidth, false);
+ if (fillStyle) {
+ doc.rect(startPos.x, startPos.y, table.getWidth(doc.pageSize().width), cursor.y - startPos.y, fillStyle);
+ }
+}
+function getFillStyle(lineWidth, fillColor) {
+ var drawLine = lineWidth > 0;
+ var drawBackground = fillColor || fillColor === 0;
+ if (drawLine && drawBackground) {
+ return 'DF'; // Fill then stroke
+ }
+ else if (drawLine) {
+ return 'S'; // Only stroke (transparent background)
+ }
+ else if (drawBackground) {
+ return 'F'; // Only fill, no stroke
+ }
+ else {
+ return null;
+ }
+}
+function parseSpacing(value, defaultValue) {
+ var _a, _b, _c, _d;
+ value = value || defaultValue;
+ if (Array.isArray(value)) {
+ if (value.length >= 4) {
+ return {
+ top: value[0],
+ right: value[1],
+ bottom: value[2],
+ left: value[3],
+ };
+ }
+ else if (value.length === 3) {
+ return {
+ top: value[0],
+ right: value[1],
+ bottom: value[2],
+ left: value[1],
+ };
+ }
+ else if (value.length === 2) {
+ return {
+ top: value[0],
+ right: value[1],
+ bottom: value[0],
+ left: value[1],
+ };
+ }
+ else if (value.length === 1) {
+ value = value[0];
+ }
+ else {
+ value = defaultValue;
+ }
+ }
+ if (typeof value === 'object') {
+ if (typeof value.vertical === 'number') {
+ value.top = value.vertical;
+ value.bottom = value.vertical;
+ }
+ if (typeof value.horizontal === 'number') {
+ value.right = value.horizontal;
+ value.left = value.horizontal;
+ }
+ return {
+ left: (_a = value.left) !== null && _a !== void 0 ? _a : defaultValue,
+ top: (_b = value.top) !== null && _b !== void 0 ? _b : defaultValue,
+ right: (_c = value.right) !== null && _c !== void 0 ? _c : defaultValue,
+ bottom: (_d = value.bottom) !== null && _d !== void 0 ? _d : defaultValue,
+ };
+ }
+ if (typeof value !== 'number') {
+ value = defaultValue;
+ }
+ return { top: value, right: value, bottom: value, left: value };
+}
+function getPageAvailableWidth(doc, table) {
+ var margins = parseSpacing(table.settings.margin, 0);
+ return doc.pageSize().width - (margins.left + margins.right);
+}
+
+// Limitations
+// - No support for border spacing
+// - No support for transparency
+function parseCss(supportedFonts, element, scaleFactor, style, window) {
+ var result = {};
+ var pxScaleFactor = 96 / 72;
+ var backgroundColor = parseColor(element, function (elem) {
+ return window.getComputedStyle(elem)['backgroundColor'];
+ });
+ if (backgroundColor != null)
+ result.fillColor = backgroundColor;
+ var textColor = parseColor(element, function (elem) {
+ return window.getComputedStyle(elem)['color'];
+ });
+ if (textColor != null)
+ result.textColor = textColor;
+ var padding = parsePadding(style, scaleFactor);
+ if (padding)
+ result.cellPadding = padding;
+ var borderColorSide = 'borderTopColor';
+ var finalScaleFactor = pxScaleFactor * scaleFactor;
+ var btw = style.borderTopWidth;
+ if (style.borderBottomWidth === btw &&
+ style.borderRightWidth === btw &&
+ style.borderLeftWidth === btw) {
+ var borderWidth = (parseFloat(btw) || 0) / finalScaleFactor;
+ if (borderWidth)
+ result.lineWidth = borderWidth;
+ }
+ else {
+ result.lineWidth = {
+ top: (parseFloat(style.borderTopWidth) || 0) / finalScaleFactor,
+ right: (parseFloat(style.borderRightWidth) || 0) / finalScaleFactor,
+ bottom: (parseFloat(style.borderBottomWidth) || 0) / finalScaleFactor,
+ left: (parseFloat(style.borderLeftWidth) || 0) / finalScaleFactor,
+ };
+ // Choose border color of first available side
+ // could be improved by supporting object as lineColor
+ if (!result.lineWidth.top) {
+ if (result.lineWidth.right) {
+ borderColorSide = 'borderRightColor';
+ }
+ else if (result.lineWidth.bottom) {
+ borderColorSide = 'borderBottomColor';
+ }
+ else if (result.lineWidth.left) {
+ borderColorSide = 'borderLeftColor';
+ }
+ }
+ }
+ var borderColor = parseColor(element, function (elem) {
+ return window.getComputedStyle(elem)[borderColorSide];
+ });
+ if (borderColor != null)
+ result.lineColor = borderColor;
+ var accepted = ['left', 'right', 'center', 'justify'];
+ if (accepted.indexOf(style.textAlign) !== -1) {
+ result.halign = style.textAlign;
+ }
+ accepted = ['middle', 'bottom', 'top'];
+ if (accepted.indexOf(style.verticalAlign) !== -1) {
+ result.valign = style.verticalAlign;
+ }
+ var res = parseInt(style.fontSize || '');
+ if (!isNaN(res))
+ result.fontSize = res / pxScaleFactor;
+ var fontStyle = parseFontStyle(style);
+ if (fontStyle)
+ result.fontStyle = fontStyle;
+ var font = (style.fontFamily || '').toLowerCase();
+ if (supportedFonts.indexOf(font) !== -1) {
+ result.font = font;
+ }
+ return result;
+}
+function parseFontStyle(style) {
+ var res = '';
+ if (style.fontWeight === 'bold' ||
+ style.fontWeight === 'bolder' ||
+ parseInt(style.fontWeight) >= 700) {
+ res = 'bold';
+ }
+ if (style.fontStyle === 'italic' || style.fontStyle === 'oblique') {
+ res += 'italic';
+ }
+ return res;
+}
+function parseColor(element, styleGetter) {
+ var cssColor = realColor(element, styleGetter);
+ if (!cssColor)
+ return null;
+ var rgba = cssColor.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);
+ if (!rgba || !Array.isArray(rgba)) {
+ return null;
+ }
+ var color = [
+ parseInt(rgba[1]),
+ parseInt(rgba[2]),
+ parseInt(rgba[3]),
+ ];
+ var alpha = parseInt(rgba[4]);
+ if (alpha === 0 || isNaN(color[0]) || isNaN(color[1]) || isNaN(color[2])) {
+ return null;
+ }
+ return color;
+}
+function realColor(elem, styleGetter) {
+ var bg = styleGetter(elem);
+ if (bg === 'rgba(0, 0, 0, 0)' ||
+ bg === 'transparent' ||
+ bg === 'initial' ||
+ bg === 'inherit') {
+ if (elem.parentElement == null) {
+ return null;
+ }
+ return realColor(elem.parentElement, styleGetter);
+ }
+ else {
+ return bg;
+ }
+}
+function parsePadding(style, scaleFactor) {
+ var val = [
+ style.paddingTop,
+ style.paddingRight,
+ style.paddingBottom,
+ style.paddingLeft,
+ ];
+ var pxScaleFactor = 96 / (72 / scaleFactor);
+ var linePadding = (parseInt(style.lineHeight) - parseInt(style.fontSize)) / scaleFactor / 2;
+ var inputPadding = val.map(function (n) {
+ return parseInt(n || '0') / pxScaleFactor;
+ });
+ var padding = parseSpacing(inputPadding, 0);
+ if (linePadding > padding.top) {
+ padding.top = linePadding;
+ }
+ if (linePadding > padding.bottom) {
+ padding.bottom = linePadding;
+ }
+ return padding;
+}
+
+function parseHtml(doc, input, window, includeHiddenHtml, useCss) {
+ var _a, _b;
+ if (includeHiddenHtml === void 0) { includeHiddenHtml = false; }
+ if (useCss === void 0) { useCss = false; }
+ var tableElement;
+ if (typeof input === 'string') {
+ tableElement = window.document.querySelector(input);
+ }
+ else {
+ tableElement = input;
+ }
+ var supportedFonts = Object.keys(doc.getFontList());
+ var scaleFactor = doc.scaleFactor();
+ var head = [], body = [], foot = [];
+ if (!tableElement) {
+ console.error('Html table could not be found with input: ', input);
+ return { head: head, body: body, foot: foot };
+ }
+ for (var i = 0; i < tableElement.rows.length; i++) {
+ var element = tableElement.rows[i];
+ var tagName = (_b = (_a = element === null || element === void 0 ? void 0 : element.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) === null || _b === void 0 ? void 0 : _b.toLowerCase();
+ var row = parseRowContent(supportedFonts, scaleFactor, window, element, includeHiddenHtml, useCss);
+ if (!row)
+ continue;
+ if (tagName === 'thead') {
+ head.push(row);
+ }
+ else if (tagName === 'tfoot') {
+ foot.push(row);
+ }
+ else {
+ // Add to body both if parent is tbody or table
+ body.push(row);
+ }
+ }
+ return { head: head, body: body, foot: foot };
+}
+function parseRowContent(supportedFonts, scaleFactor, window, row, includeHidden, useCss) {
+ var resultRow = new HtmlRowInput(row);
+ for (var i = 0; i < row.cells.length; i++) {
+ var cell = row.cells[i];
+ var style_1 = window.getComputedStyle(cell);
+ if (includeHidden || style_1.display !== 'none') {
+ var cellStyles = void 0;
+ if (useCss) {
+ cellStyles = parseCss(supportedFonts, cell, scaleFactor, style_1, window);
+ }
+ resultRow.push({
+ rowSpan: cell.rowSpan,
+ colSpan: cell.colSpan,
+ styles: cellStyles,
+ _element: cell,
+ content: parseCellContent(cell),
+ });
+ }
+ }
+ var style = window.getComputedStyle(row);
+ if (resultRow.length > 0 && (includeHidden || style.display !== 'none')) {
+ return resultRow;
+ }
+}
+function parseCellContent(orgCell) {
+ // Work on cloned node to make sure no changes are applied to html table
+ var cell = orgCell.cloneNode(true);
+ // Remove extra space and line breaks in markup to make it more similar to
+ // what would be shown in html
+ cell.innerHTML = cell.innerHTML.replace(/\n/g, '').replace(/ +/g, ' ');
+ // Preserve
tags as line breaks in the pdf
+ cell.innerHTML = cell.innerHTML
+ .split(//) //start with '
'.
+ .map(function (part) { return part.trim(); })
+ .join('\n');
+ // innerText for ie
+ return cell.innerText || cell.textContent || '';
+}
+
+function validateInput(global, document, current) {
+ for (var _i = 0, _a = [global, document, current]; _i < _a.length; _i++) {
+ var options = _a[_i];
+ if (options && typeof options !== 'object') {
+ console.error('The options parameter should be of type object, is: ' + typeof options);
+ }
+ if (options.startY && typeof options.startY !== 'number') {
+ console.error('Invalid value for startY option', options.startY);
+ delete options.startY;
+ }
+ }
+}
+
+/* eslint-disable @typescript-eslint/no-unused-vars */
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
+function assign(target, s, s1, s2, s3) {
+ if (target == null) {
+ throw new TypeError('Cannot convert undefined or null to object');
+ }
+ var to = Object(target);
+ for (var index = 1; index < arguments.length; index++) {
+ // eslint-disable-next-line prefer-rest-params
+ var nextSource = arguments[index];
+ if (nextSource != null) {
+ // Skip over if undefined or null
+ for (var nextKey in nextSource) {
+ // Avoid bugs when hasOwnProperty is shadowed
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ }
+ return to;
+}
+
+function parseInput(d, current) {
+ var doc = new DocHandler(d);
+ var document = doc.getDocumentOptions();
+ var global = doc.getGlobalOptions();
+ validateInput(global, document, current);
+ var options = assign({}, global, document, current);
+ var win;
+ if (typeof window !== 'undefined') {
+ win = window;
+ }
+ var styles = parseStyles(global, document, current);
+ var hooks = parseHooks(global, document, current);
+ var settings = parseSettings(doc, options);
+ var content = parseContent$1(doc, options, win);
+ return { id: current.tableId, content: content, hooks: hooks, styles: styles, settings: settings };
+}
+function parseStyles(gInput, dInput, cInput) {
+ var styleOptions = {
+ styles: {},
+ headStyles: {},
+ bodyStyles: {},
+ footStyles: {},
+ alternateRowStyles: {},
+ columnStyles: {},
+ };
+ var _loop_1 = function (prop) {
+ if (prop === 'columnStyles') {
+ var global_1 = gInput[prop];
+ var document_1 = dInput[prop];
+ var current = cInput[prop];
+ styleOptions.columnStyles = assign({}, global_1, document_1, current);
+ }
+ else {
+ var allOptions = [gInput, dInput, cInput];
+ var styles = allOptions.map(function (opts) { return opts[prop] || {}; });
+ styleOptions[prop] = assign({}, styles[0], styles[1], styles[2]);
+ }
+ };
+ for (var _i = 0, _a = Object.keys(styleOptions); _i < _a.length; _i++) {
+ var prop = _a[_i];
+ _loop_1(prop);
+ }
+ return styleOptions;
+}
+function parseHooks(global, document, current) {
+ var allOptions = [global, document, current];
+ var result = {
+ didParseCell: [],
+ willDrawCell: [],
+ didDrawCell: [],
+ willDrawPage: [],
+ didDrawPage: [],
+ };
+ for (var _i = 0, allOptions_1 = allOptions; _i < allOptions_1.length; _i++) {
+ var options = allOptions_1[_i];
+ if (options.didParseCell)
+ result.didParseCell.push(options.didParseCell);
+ if (options.willDrawCell)
+ result.willDrawCell.push(options.willDrawCell);
+ if (options.didDrawCell)
+ result.didDrawCell.push(options.didDrawCell);
+ if (options.willDrawPage)
+ result.willDrawPage.push(options.willDrawPage);
+ if (options.didDrawPage)
+ result.didDrawPage.push(options.didDrawPage);
+ }
+ return result;
+}
+function parseSettings(doc, options) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
+ var margin = parseSpacing(options.margin, 40 / doc.scaleFactor());
+ var startY = (_a = getStartY(doc, options.startY)) !== null && _a !== void 0 ? _a : margin.top;
+ var showFoot;
+ if (options.showFoot === true) {
+ showFoot = 'everyPage';
+ }
+ else if (options.showFoot === false) {
+ showFoot = 'never';
+ }
+ else {
+ showFoot = (_b = options.showFoot) !== null && _b !== void 0 ? _b : 'everyPage';
+ }
+ var showHead;
+ if (options.showHead === true) {
+ showHead = 'everyPage';
+ }
+ else if (options.showHead === false) {
+ showHead = 'never';
+ }
+ else {
+ showHead = (_c = options.showHead) !== null && _c !== void 0 ? _c : 'everyPage';
+ }
+ var useCss = (_d = options.useCss) !== null && _d !== void 0 ? _d : false;
+ var theme = options.theme || (useCss ? 'plain' : 'striped');
+ var horizontalPageBreak = !!options.horizontalPageBreak;
+ var horizontalPageBreakRepeat = (_e = options.horizontalPageBreakRepeat) !== null && _e !== void 0 ? _e : null;
+ return {
+ includeHiddenHtml: (_f = options.includeHiddenHtml) !== null && _f !== void 0 ? _f : false,
+ useCss: useCss,
+ theme: theme,
+ startY: startY,
+ margin: margin,
+ pageBreak: (_g = options.pageBreak) !== null && _g !== void 0 ? _g : 'auto',
+ rowPageBreak: (_h = options.rowPageBreak) !== null && _h !== void 0 ? _h : 'auto',
+ tableWidth: (_j = options.tableWidth) !== null && _j !== void 0 ? _j : 'auto',
+ showHead: showHead,
+ showFoot: showFoot,
+ tableLineWidth: (_k = options.tableLineWidth) !== null && _k !== void 0 ? _k : 0,
+ tableLineColor: (_l = options.tableLineColor) !== null && _l !== void 0 ? _l : 200,
+ horizontalPageBreak: horizontalPageBreak,
+ horizontalPageBreakRepeat: horizontalPageBreakRepeat,
+ horizontalPageBreakBehaviour: (_m = options.horizontalPageBreakBehaviour) !== null && _m !== void 0 ? _m : 'afterAllRows',
+ };
+}
+function getStartY(doc, userStartY) {
+ var previous = doc.getLastAutoTable();
+ var sf = doc.scaleFactor();
+ var currentPage = doc.pageNumber();
+ var isSamePageAsPreviousTable = false;
+ if (previous && previous.startPageNumber) {
+ var endingPage = previous.startPageNumber + previous.pageNumber - 1;
+ isSamePageAsPreviousTable = endingPage === currentPage;
+ }
+ if (typeof userStartY === 'number') {
+ return userStartY;
+ }
+ else if (userStartY == null || userStartY === false) {
+ if (isSamePageAsPreviousTable && (previous === null || previous === void 0 ? void 0 : previous.finalY) != null) {
+ // Some users had issues with overlapping tables when they used multiple
+ // tables without setting startY so setting it here to a sensible default.
+ return previous.finalY + 20 / sf;
+ }
+ }
+ return null;
+}
+function parseContent$1(doc, options, window) {
+ var head = options.head || [];
+ var body = options.body || [];
+ var foot = options.foot || [];
+ if (options.html) {
+ var hidden = options.includeHiddenHtml;
+ if (window) {
+ var htmlContent = parseHtml(doc, options.html, window, hidden, options.useCss) || {};
+ head = htmlContent.head || head;
+ body = htmlContent.body || head;
+ foot = htmlContent.foot || head;
+ }
+ else {
+ console.error('Cannot parse html in non browser environment');
+ }
+ }
+ var columns = options.columns || parseColumns(head, body, foot);
+ return { columns: columns, head: head, body: body, foot: foot };
+}
+function parseColumns(head, body, foot) {
+ var firstRow = head[0] || body[0] || foot[0] || [];
+ var result = [];
+ Object.keys(firstRow)
+ .filter(function (key) { return key !== '_element'; })
+ .forEach(function (key) {
+ var colSpan = 1;
+ var input;
+ if (Array.isArray(firstRow)) {
+ input = firstRow[parseInt(key)];
+ }
+ else {
+ input = firstRow[key];
+ }
+ if (typeof input === 'object' && !Array.isArray(input)) {
+ colSpan = (input === null || input === void 0 ? void 0 : input.colSpan) || 1;
+ }
+ for (var i = 0; i < colSpan; i++) {
+ var id = void 0;
+ if (Array.isArray(firstRow)) {
+ id = result.length;
+ }
+ else {
+ id = key + (i > 0 ? "_".concat(i) : '');
+ }
+ var rowResult = { dataKey: id };
+ result.push(rowResult);
+ }
+ });
+ return result;
+}
+
+var HookData = /** @class */ (function () {
+ function HookData(doc, table, cursor) {
+ this.table = table;
+ this.pageNumber = table.pageNumber;
+ this.settings = table.settings;
+ this.cursor = cursor;
+ this.doc = doc.getDocument();
+ }
+ return HookData;
+}());
+var CellHookData = /** @class */ (function (_super) {
+ __extends(CellHookData, _super);
+ function CellHookData(doc, table, cell, row, column, cursor) {
+ var _this = _super.call(this, doc, table, cursor) || this;
+ _this.cell = cell;
+ _this.row = row;
+ _this.column = column;
+ _this.section = row.section;
+ return _this;
+ }
+ return CellHookData;
+}(HookData));
+
+var Table = /** @class */ (function () {
+ function Table(input, content) {
+ this.pageNumber = 1;
+ this.id = input.id;
+ this.settings = input.settings;
+ this.styles = input.styles;
+ this.hooks = input.hooks;
+ this.columns = content.columns;
+ this.head = content.head;
+ this.body = content.body;
+ this.foot = content.foot;
+ }
+ Table.prototype.getHeadHeight = function (columns) {
+ return this.head.reduce(function (acc, row) { return acc + row.getMaxCellHeight(columns); }, 0);
+ };
+ Table.prototype.getFootHeight = function (columns) {
+ return this.foot.reduce(function (acc, row) { return acc + row.getMaxCellHeight(columns); }, 0);
+ };
+ Table.prototype.allRows = function () {
+ return this.head.concat(this.body).concat(this.foot);
+ };
+ Table.prototype.callCellHooks = function (doc, handlers, cell, row, column, cursor) {
+ for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {
+ var handler = handlers_1[_i];
+ var data = new CellHookData(doc, this, cell, row, column, cursor);
+ var result = handler(data) === false;
+ // Make sure text is always string[] since user can assign string
+ cell.text = Array.isArray(cell.text) ? cell.text : [cell.text];
+ if (result) {
+ return false;
+ }
+ }
+ return true;
+ };
+ Table.prototype.callEndPageHooks = function (doc, cursor) {
+ doc.applyStyles(doc.userStyles);
+ for (var _i = 0, _a = this.hooks.didDrawPage; _i < _a.length; _i++) {
+ var handler = _a[_i];
+ handler(new HookData(doc, this, cursor));
+ }
+ };
+ Table.prototype.callWillDrawPageHooks = function (doc, cursor) {
+ for (var _i = 0, _a = this.hooks.willDrawPage; _i < _a.length; _i++) {
+ var handler = _a[_i];
+ handler(new HookData(doc, this, cursor));
+ }
+ };
+ Table.prototype.getWidth = function (pageWidth) {
+ if (typeof this.settings.tableWidth === 'number') {
+ return this.settings.tableWidth;
+ }
+ else if (this.settings.tableWidth === 'wrap') {
+ var wrappedWidth = this.columns.reduce(function (total, col) { return total + col.wrappedWidth; }, 0);
+ return wrappedWidth;
+ }
+ else {
+ var margin = this.settings.margin;
+ return pageWidth - margin.left - margin.right;
+ }
+ };
+ return Table;
+}());
+var Row = /** @class */ (function () {
+ function Row(raw, index, section, cells, spansMultiplePages) {
+ if (spansMultiplePages === void 0) { spansMultiplePages = false; }
+ this.height = 0;
+ this.raw = raw;
+ if (raw instanceof HtmlRowInput) {
+ this.raw = raw._element;
+ this.element = raw._element;
+ }
+ this.index = index;
+ this.section = section;
+ this.cells = cells;
+ this.spansMultiplePages = spansMultiplePages;
+ }
+ Row.prototype.getMaxCellHeight = function (columns) {
+ var _this = this;
+ return columns.reduce(function (acc, column) { var _a; return Math.max(acc, ((_a = _this.cells[column.index]) === null || _a === void 0 ? void 0 : _a.height) || 0); }, 0);
+ };
+ Row.prototype.hasRowSpan = function (columns) {
+ var _this = this;
+ return (columns.filter(function (column) {
+ var cell = _this.cells[column.index];
+ if (!cell)
+ return false;
+ return cell.rowSpan > 1;
+ }).length > 0);
+ };
+ Row.prototype.canEntireRowFit = function (height, columns) {
+ return this.getMaxCellHeight(columns) <= height;
+ };
+ Row.prototype.getMinimumRowHeight = function (columns, doc) {
+ var _this = this;
+ return columns.reduce(function (acc, column) {
+ var cell = _this.cells[column.index];
+ if (!cell)
+ return 0;
+ var lineHeight = doc.getLineHeight(cell.styles.fontSize);
+ var vPadding = cell.padding('vertical');
+ var oneRowHeight = vPadding + lineHeight;
+ return oneRowHeight > acc ? oneRowHeight : acc;
+ }, 0);
+ };
+ return Row;
+}());
+var Cell = /** @class */ (function () {
+ function Cell(raw, styles, section) {
+ var _a;
+ this.contentHeight = 0;
+ this.contentWidth = 0;
+ this.wrappedWidth = 0;
+ this.minReadableWidth = 0;
+ this.minWidth = 0;
+ this.width = 0;
+ this.height = 0;
+ this.x = 0;
+ this.y = 0;
+ this.styles = styles;
+ this.section = section;
+ this.raw = raw;
+ var content = raw;
+ if (raw != null && typeof raw === 'object' && !Array.isArray(raw)) {
+ this.rowSpan = raw.rowSpan || 1;
+ this.colSpan = raw.colSpan || 1;
+ content = (_a = raw.content) !== null && _a !== void 0 ? _a : raw;
+ if (raw._element) {
+ this.raw = raw._element;
+ }
+ }
+ else {
+ this.rowSpan = 1;
+ this.colSpan = 1;
+ }
+ // Stringify 0 and false, but not undefined or null
+ var text = content != null ? '' + content : '';
+ var splitRegex = /\r\n|\r|\n/g;
+ this.text = text.split(splitRegex);
+ }
+ Cell.prototype.getTextPos = function () {
+ var y;
+ if (this.styles.valign === 'top') {
+ y = this.y + this.padding('top');
+ }
+ else if (this.styles.valign === 'bottom') {
+ y = this.y + this.height - this.padding('bottom');
+ }
+ else {
+ var netHeight = this.height - this.padding('vertical');
+ y = this.y + netHeight / 2 + this.padding('top');
+ }
+ var x;
+ if (this.styles.halign === 'right') {
+ x = this.x + this.width - this.padding('right');
+ }
+ else if (this.styles.halign === 'center') {
+ var netWidth = this.width - this.padding('horizontal');
+ x = this.x + netWidth / 2 + this.padding('left');
+ }
+ else {
+ x = this.x + this.padding('left');
+ }
+ return { x: x, y: y };
+ };
+ // TODO (v4): replace parameters with only (lineHeight)
+ Cell.prototype.getContentHeight = function (scaleFactor, lineHeightFactor) {
+ if (lineHeightFactor === void 0) { lineHeightFactor = 1.15; }
+ var lineCount = Array.isArray(this.text) ? this.text.length : 1;
+ var lineHeight = (this.styles.fontSize / scaleFactor) * lineHeightFactor;
+ var height = lineCount * lineHeight + this.padding('vertical');
+ return Math.max(height, this.styles.minCellHeight);
+ };
+ Cell.prototype.padding = function (name) {
+ var padding = parseSpacing(this.styles.cellPadding, 0);
+ if (name === 'vertical') {
+ return padding.top + padding.bottom;
+ }
+ else if (name === 'horizontal') {
+ return padding.left + padding.right;
+ }
+ else {
+ return padding[name];
+ }
+ };
+ return Cell;
+}());
+var Column = /** @class */ (function () {
+ function Column(dataKey, raw, index) {
+ this.wrappedWidth = 0;
+ this.minReadableWidth = 0;
+ this.minWidth = 0;
+ this.width = 0;
+ this.dataKey = dataKey;
+ this.raw = raw;
+ this.index = index;
+ }
+ Column.prototype.getMaxCustomCellWidth = function (table) {
+ var max = 0;
+ for (var _i = 0, _a = table.allRows(); _i < _a.length; _i++) {
+ var row = _a[_i];
+ var cell = row.cells[this.index];
+ if (cell && typeof cell.styles.cellWidth === 'number') {
+ max = Math.max(max, cell.styles.cellWidth);
+ }
+ }
+ return max;
+ };
+ return Column;
+}());
+
+/**
+ * Calculate the column widths
+ */
+function calculateWidths(doc, table) {
+ calculate(doc, table);
+ var resizableColumns = [];
+ var initialTableWidth = 0;
+ table.columns.forEach(function (column) {
+ var customWidth = column.getMaxCustomCellWidth(table);
+ if (customWidth) {
+ // final column width
+ column.width = customWidth;
+ }
+ else {
+ // initial column width (will be resized)
+ column.width = column.wrappedWidth;
+ resizableColumns.push(column);
+ }
+ initialTableWidth += column.width;
+ });
+ // width difference that needs to be distributed
+ var resizeWidth = table.getWidth(doc.pageSize().width) - initialTableWidth;
+ // first resize attempt: with respect to minReadableWidth and minWidth
+ if (resizeWidth) {
+ resizeWidth = resizeColumns(resizableColumns, resizeWidth, function (column) {
+ return Math.max(column.minReadableWidth, column.minWidth);
+ });
+ }
+ // second resize attempt: ignore minReadableWidth but respect minWidth
+ if (resizeWidth) {
+ resizeWidth = resizeColumns(resizableColumns, resizeWidth, function (column) { return column.minWidth; });
+ }
+ resizeWidth = Math.abs(resizeWidth);
+ if (!table.settings.horizontalPageBreak &&
+ resizeWidth > 0.1 / doc.scaleFactor()) {
+ // Table can't get smaller due to custom-width or minWidth restrictions
+ // We can't really do much here. Up to user to for example
+ // reduce font size, increase page size or remove custom cell widths
+ // to allow more columns to be reduced in size
+ resizeWidth = resizeWidth < 1 ? resizeWidth : Math.round(resizeWidth);
+ console.log("Of the table content, ".concat(resizeWidth, " units width could not fit page"));
+ }
+ applyColSpans(table);
+ fitContent(table, doc);
+ applyRowSpans(table);
+}
+function calculate(doc, table) {
+ var sf = doc.scaleFactor();
+ var horizontalPageBreak = table.settings.horizontalPageBreak;
+ var availablePageWidth = getPageAvailableWidth(doc, table);
+ table.allRows().forEach(function (row) {
+ for (var _i = 0, _a = table.columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ var cell = row.cells[column.index];
+ if (!cell)
+ continue;
+ var hooks = table.hooks.didParseCell;
+ table.callCellHooks(doc, hooks, cell, row, column, null);
+ var padding = cell.padding('horizontal');
+ cell.contentWidth = getStringWidth(cell.text, cell.styles, doc) + padding;
+ // Using [^\S\u00A0] instead of \s ensures that we split the text on all
+ // whitespace except non-breaking spaces (\u00A0). We need to preserve
+ // them in the split process to ensure correct word separation and width
+ // calculation.
+ var longestWordWidth = getStringWidth(cell.text.join(' ').split(/[^\S\u00A0]+/), cell.styles, doc);
+ cell.minReadableWidth = longestWordWidth + cell.padding('horizontal');
+ if (typeof cell.styles.cellWidth === 'number') {
+ cell.minWidth = cell.styles.cellWidth;
+ cell.wrappedWidth = cell.styles.cellWidth;
+ }
+ else if (cell.styles.cellWidth === 'wrap' ||
+ horizontalPageBreak === true) {
+ // cell width should not be more than available page width
+ if (cell.contentWidth > availablePageWidth) {
+ cell.minWidth = availablePageWidth;
+ cell.wrappedWidth = availablePageWidth;
+ }
+ else {
+ cell.minWidth = cell.contentWidth;
+ cell.wrappedWidth = cell.contentWidth;
+ }
+ }
+ else {
+ // auto
+ var defaultMinWidth = 10 / sf;
+ cell.minWidth = cell.styles.minCellWidth || defaultMinWidth;
+ cell.wrappedWidth = cell.contentWidth;
+ if (cell.minWidth > cell.wrappedWidth) {
+ cell.wrappedWidth = cell.minWidth;
+ }
+ }
+ }
+ });
+ table.allRows().forEach(function (row) {
+ for (var _i = 0, _a = table.columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ var cell = row.cells[column.index];
+ // For now we ignore the minWidth and wrappedWidth of colspan cells when calculating colspan widths.
+ // Could probably be improved upon however.
+ if (cell && cell.colSpan === 1) {
+ column.wrappedWidth = Math.max(column.wrappedWidth, cell.wrappedWidth);
+ column.minWidth = Math.max(column.minWidth, cell.minWidth);
+ column.minReadableWidth = Math.max(column.minReadableWidth, cell.minReadableWidth);
+ }
+ else {
+ // Respect cellWidth set in columnStyles even if there is no cells for this column
+ // or if the column only have colspan cells. Since the width of colspan cells
+ // does not affect the width of columns, setting columnStyles cellWidth enables the
+ // user to at least do it manually.
+ // Note that this is not perfect for now since for example row and table styles are
+ // not accounted for
+ var columnStyles = table.styles.columnStyles[column.dataKey] ||
+ table.styles.columnStyles[column.index] ||
+ {};
+ var cellWidth = columnStyles.cellWidth || columnStyles.minCellWidth;
+ if (cellWidth && typeof cellWidth === 'number') {
+ column.minWidth = cellWidth;
+ column.wrappedWidth = cellWidth;
+ }
+ }
+ if (cell) {
+ // Make sure all columns get at least min width even though width calculations are not based on them
+ if (cell.colSpan > 1 && !column.minWidth) {
+ column.minWidth = cell.minWidth;
+ }
+ if (cell.colSpan > 1 && !column.wrappedWidth) {
+ column.wrappedWidth = cell.minWidth;
+ }
+ }
+ }
+ });
+}
+/**
+ * Distribute resizeWidth on passed resizable columns
+ */
+function resizeColumns(columns, resizeWidth, getMinWidth) {
+ var initialResizeWidth = resizeWidth;
+ var sumWrappedWidth = columns.reduce(function (acc, column) { return acc + column.wrappedWidth; }, 0);
+ for (var i = 0; i < columns.length; i++) {
+ var column = columns[i];
+ var ratio = column.wrappedWidth / sumWrappedWidth;
+ var suggestedChange = initialResizeWidth * ratio;
+ var suggestedWidth = column.width + suggestedChange;
+ var minWidth = getMinWidth(column);
+ var newWidth = suggestedWidth < minWidth ? minWidth : suggestedWidth;
+ resizeWidth -= newWidth - column.width;
+ column.width = newWidth;
+ }
+ resizeWidth = Math.round(resizeWidth * 1e10) / 1e10;
+ // Run the resizer again if there's remaining width needs
+ // to be distributed and there're columns that can be resized
+ if (resizeWidth) {
+ var resizableColumns = columns.filter(function (column) {
+ return resizeWidth < 0
+ ? column.width > getMinWidth(column) // check if column can shrink
+ : true; // check if column can grow
+ });
+ if (resizableColumns.length) {
+ resizeWidth = resizeColumns(resizableColumns, resizeWidth, getMinWidth);
+ }
+ }
+ return resizeWidth;
+}
+function applyRowSpans(table) {
+ var rowSpanCells = {};
+ var colRowSpansLeft = 1;
+ var all = table.allRows();
+ for (var rowIndex = 0; rowIndex < all.length; rowIndex++) {
+ var row = all[rowIndex];
+ for (var _i = 0, _a = table.columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ var data = rowSpanCells[column.index];
+ if (colRowSpansLeft > 1) {
+ colRowSpansLeft--;
+ delete row.cells[column.index];
+ }
+ else if (data) {
+ data.cell.height += row.height;
+ colRowSpansLeft = data.cell.colSpan;
+ delete row.cells[column.index];
+ data.left--;
+ if (data.left <= 1) {
+ delete rowSpanCells[column.index];
+ }
+ }
+ else {
+ var cell = row.cells[column.index];
+ if (!cell) {
+ continue;
+ }
+ cell.height = row.height;
+ if (cell.rowSpan > 1) {
+ var remaining = all.length - rowIndex;
+ var left = cell.rowSpan > remaining ? remaining : cell.rowSpan;
+ rowSpanCells[column.index] = { cell: cell, left: left, row: row };
+ }
+ }
+ }
+ }
+}
+function applyColSpans(table) {
+ var all = table.allRows();
+ for (var rowIndex = 0; rowIndex < all.length; rowIndex++) {
+ var row = all[rowIndex];
+ var colSpanCell = null;
+ var combinedColSpanWidth = 0;
+ var colSpansLeft = 0;
+ for (var columnIndex = 0; columnIndex < table.columns.length; columnIndex++) {
+ var column = table.columns[columnIndex];
+ // Width and colspan
+ colSpansLeft -= 1;
+ if (colSpansLeft > 1 && table.columns[columnIndex + 1]) {
+ combinedColSpanWidth += column.width;
+ delete row.cells[column.index];
+ }
+ else if (colSpanCell) {
+ var cell = colSpanCell;
+ delete row.cells[column.index];
+ colSpanCell = null;
+ cell.width = column.width + combinedColSpanWidth;
+ }
+ else {
+ var cell = row.cells[column.index];
+ if (!cell)
+ continue;
+ colSpansLeft = cell.colSpan;
+ combinedColSpanWidth = 0;
+ if (cell.colSpan > 1) {
+ colSpanCell = cell;
+ combinedColSpanWidth += column.width;
+ continue;
+ }
+ cell.width = column.width + combinedColSpanWidth;
+ }
+ }
+ }
+}
+function fitContent(table, doc) {
+ var rowSpanHeight = { count: 0, height: 0 };
+ for (var _i = 0, _a = table.allRows(); _i < _a.length; _i++) {
+ var row = _a[_i];
+ for (var _b = 0, _c = table.columns; _b < _c.length; _b++) {
+ var column = _c[_b];
+ var cell = row.cells[column.index];
+ if (!cell)
+ continue;
+ doc.applyStyles(cell.styles, true);
+ var textSpace = cell.width - cell.padding('horizontal');
+ if (cell.styles.overflow === 'linebreak') {
+ // Add one pt to textSpace to fix rounding error
+ cell.text = doc.splitTextToSize(cell.text, textSpace + 1 / doc.scaleFactor(), { fontSize: cell.styles.fontSize });
+ }
+ else if (cell.styles.overflow === 'ellipsize') {
+ cell.text = ellipsize(cell.text, textSpace, cell.styles, doc, '...');
+ }
+ else if (cell.styles.overflow === 'hidden') {
+ cell.text = ellipsize(cell.text, textSpace, cell.styles, doc, '');
+ }
+ else if (typeof cell.styles.overflow === 'function') {
+ var result = cell.styles.overflow(cell.text, textSpace);
+ if (typeof result === 'string') {
+ cell.text = [result];
+ }
+ else {
+ cell.text = result;
+ }
+ }
+ cell.contentHeight = cell.getContentHeight(doc.scaleFactor(), doc.getLineHeightFactor());
+ var realContentHeight = cell.contentHeight / cell.rowSpan;
+ if (cell.rowSpan > 1 &&
+ rowSpanHeight.count * rowSpanHeight.height <
+ realContentHeight * cell.rowSpan) {
+ rowSpanHeight = { height: realContentHeight, count: cell.rowSpan };
+ }
+ else if (rowSpanHeight && rowSpanHeight.count > 0) {
+ if (rowSpanHeight.height > realContentHeight) {
+ realContentHeight = rowSpanHeight.height;
+ }
+ }
+ if (realContentHeight > row.height) {
+ row.height = realContentHeight;
+ }
+ }
+ rowSpanHeight.count--;
+ }
+}
+function ellipsize(text, width, styles, doc, overflow) {
+ return text.map(function (str) { return ellipsizeStr(str, width, styles, doc, overflow); });
+}
+function ellipsizeStr(text, width, styles, doc, overflow) {
+ var precision = 10000 * doc.scaleFactor();
+ width = Math.ceil(width * precision) / precision;
+ if (width >= getStringWidth(text, styles, doc)) {
+ return text;
+ }
+ while (width < getStringWidth(text + overflow, styles, doc)) {
+ if (text.length <= 1) {
+ break;
+ }
+ text = text.substring(0, text.length - 1);
+ }
+ return text.trim() + overflow;
+}
+
+function createTable(jsPDFDoc, input) {
+ var doc = new DocHandler(jsPDFDoc);
+ var content = parseContent(input, doc.scaleFactor());
+ var table = new Table(input, content);
+ calculateWidths(doc, table);
+ doc.applyStyles(doc.userStyles);
+ return table;
+}
+function parseContent(input, sf) {
+ var content = input.content;
+ var columns = createColumns(content.columns);
+ // If no head or foot is set, try generating it with content from columns
+ if (content.head.length === 0) {
+ var sectionRow = generateSectionRow(columns, 'head');
+ if (sectionRow)
+ content.head.push(sectionRow);
+ }
+ if (content.foot.length === 0) {
+ var sectionRow = generateSectionRow(columns, 'foot');
+ if (sectionRow)
+ content.foot.push(sectionRow);
+ }
+ var theme = input.settings.theme;
+ var styles = input.styles;
+ return {
+ columns: columns,
+ head: parseSection('head', content.head, columns, styles, theme, sf),
+ body: parseSection('body', content.body, columns, styles, theme, sf),
+ foot: parseSection('foot', content.foot, columns, styles, theme, sf),
+ };
+}
+function parseSection(sectionName, sectionRows, columns, styleProps, theme, scaleFactor) {
+ var rowSpansLeftForColumn = {};
+ var result = sectionRows.map(function (rawRow, rowIndex) {
+ var skippedRowForRowSpans = 0;
+ var cells = {};
+ var colSpansAdded = 0;
+ var columnSpansLeft = 0;
+ for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
+ var column = columns_1[_i];
+ if (rowSpansLeftForColumn[column.index] == null ||
+ rowSpansLeftForColumn[column.index].left === 0) {
+ if (columnSpansLeft === 0) {
+ var rawCell = void 0;
+ if (Array.isArray(rawRow)) {
+ rawCell =
+ rawRow[column.index - colSpansAdded - skippedRowForRowSpans];
+ }
+ else {
+ rawCell = rawRow[column.dataKey];
+ }
+ var cellInputStyles = {};
+ if (typeof rawCell === 'object' && !Array.isArray(rawCell)) {
+ cellInputStyles = (rawCell === null || rawCell === void 0 ? void 0 : rawCell.styles) || {};
+ }
+ var styles = cellStyles(sectionName, column, rowIndex, theme, styleProps, scaleFactor, cellInputStyles);
+ var cell = new Cell(rawCell, styles, sectionName);
+ // dataKey is not used internally no more but keep for
+ // backwards compat in hooks
+ cells[column.dataKey] = cell;
+ cells[column.index] = cell;
+ columnSpansLeft = cell.colSpan - 1;
+ rowSpansLeftForColumn[column.index] = {
+ left: cell.rowSpan - 1,
+ times: columnSpansLeft,
+ };
+ }
+ else {
+ columnSpansLeft--;
+ colSpansAdded++;
+ }
+ }
+ else {
+ rowSpansLeftForColumn[column.index].left--;
+ columnSpansLeft = rowSpansLeftForColumn[column.index].times;
+ skippedRowForRowSpans++;
+ }
+ }
+ return new Row(rawRow, rowIndex, sectionName, cells);
+ });
+ return result;
+}
+function generateSectionRow(columns, section) {
+ var sectionRow = {};
+ columns.forEach(function (col) {
+ if (col.raw != null) {
+ var title = getSectionTitle(section, col.raw);
+ if (title != null)
+ sectionRow[col.dataKey] = title;
+ }
+ });
+ return Object.keys(sectionRow).length > 0 ? sectionRow : null;
+}
+function getSectionTitle(section, column) {
+ if (section === 'head') {
+ if (typeof column === 'object') {
+ return column.header || null;
+ }
+ else if (typeof column === 'string' || typeof column === 'number') {
+ return column;
+ }
+ }
+ else if (section === 'foot' && typeof column === 'object') {
+ return column.footer;
+ }
+ return null;
+}
+function createColumns(columns) {
+ return columns.map(function (input, index) {
+ var _a;
+ var key;
+ if (typeof input === 'object') {
+ key = (_a = input.dataKey) !== null && _a !== void 0 ? _a : index;
+ }
+ else {
+ key = index;
+ }
+ return new Column(key, input, index);
+ });
+}
+function cellStyles(sectionName, column, rowIndex, themeName, styles, scaleFactor, cellInputStyles) {
+ var theme = getTheme(themeName);
+ var sectionStyles;
+ if (sectionName === 'head') {
+ sectionStyles = styles.headStyles;
+ }
+ else if (sectionName === 'body') {
+ sectionStyles = styles.bodyStyles;
+ }
+ else if (sectionName === 'foot') {
+ sectionStyles = styles.footStyles;
+ }
+ var otherStyles = assign({}, theme.table, theme[sectionName], styles.styles, sectionStyles);
+ var columnStyles = styles.columnStyles[column.dataKey] ||
+ styles.columnStyles[column.index] ||
+ {};
+ var colStyles = sectionName === 'body' ? columnStyles : {};
+ var rowStyles = sectionName === 'body' && rowIndex % 2 === 0
+ ? assign({}, theme.alternateRow, styles.alternateRowStyles)
+ : {};
+ var defaultStyle = defaultStyles(scaleFactor);
+ var themeStyles = assign({}, defaultStyle, otherStyles, rowStyles, colStyles);
+ return assign(themeStyles, cellInputStyles);
+}
+
+// get columns can be fit into page
+function getColumnsCanFitInPage(doc, table, config) {
+ var _a;
+ if (config === void 0) { config = {}; }
+ // Get page width
+ var remainingWidth = getPageAvailableWidth(doc, table);
+ // Get column data key to repeat
+ var repeatColumnsMap = new Map();
+ var colIndexes = [];
+ var columns = [];
+ var horizontalPageBreakRepeat = [];
+ if (Array.isArray(table.settings.horizontalPageBreakRepeat)) {
+ horizontalPageBreakRepeat = table.settings.horizontalPageBreakRepeat;
+ // It can be a single value of type string or number (even number: 0)
+ }
+ else if (typeof table.settings.horizontalPageBreakRepeat === 'string' ||
+ typeof table.settings.horizontalPageBreakRepeat === 'number') {
+ horizontalPageBreakRepeat = [table.settings.horizontalPageBreakRepeat];
+ }
+ // Code to repeat the given column in split pages
+ horizontalPageBreakRepeat.forEach(function (field) {
+ var col = table.columns.find(function (item) { return item.dataKey === field || item.index === field; });
+ if (col && !repeatColumnsMap.has(col.index)) {
+ repeatColumnsMap.set(col.index, true);
+ colIndexes.push(col.index);
+ columns.push(table.columns[col.index]);
+ remainingWidth -= col.wrappedWidth;
+ }
+ });
+ var first = true;
+ var i = (_a = config === null || config === void 0 ? void 0 : config.start) !== null && _a !== void 0 ? _a : 0; // make sure couter is initiated outside the loop
+ while (i < table.columns.length) {
+ // Prevent duplicates
+ if (repeatColumnsMap.has(i)) {
+ i++;
+ continue;
+ }
+ var colWidth = table.columns[i].wrappedWidth;
+ // Take at least one column even if it doesn't fit
+ if (first || remainingWidth >= colWidth) {
+ first = false;
+ colIndexes.push(i);
+ columns.push(table.columns[i]);
+ remainingWidth -= colWidth;
+ }
+ else {
+ break;
+ }
+ i++;
+ }
+ return { colIndexes: colIndexes, columns: columns, lastIndex: i - 1 };
+}
+function calculateAllColumnsCanFitInPage(doc, table) {
+ var allResults = [];
+ for (var i = 0; i < table.columns.length; i++) {
+ var result = getColumnsCanFitInPage(doc, table, { start: i });
+ if (result.columns.length) {
+ allResults.push(result);
+ i = result.lastIndex;
+ }
+ }
+ return allResults;
+}
+
+function drawTable(jsPDFDoc, table) {
+ var settings = table.settings;
+ var startY = settings.startY;
+ var margin = settings.margin;
+ var cursor = { x: margin.left, y: startY };
+ var sectionsHeight = table.getHeadHeight(table.columns) + table.getFootHeight(table.columns);
+ var minTableBottomPos = startY + margin.bottom + sectionsHeight;
+ if (settings.pageBreak === 'avoid') {
+ var rows = table.body;
+ var tableHeight = rows.reduce(function (acc, row) { return acc + row.height; }, 0);
+ minTableBottomPos += tableHeight;
+ }
+ var doc = new DocHandler(jsPDFDoc);
+ if (settings.pageBreak === 'always' ||
+ (settings.startY != null && minTableBottomPos > doc.pageSize().height)) {
+ nextPage(doc);
+ cursor.y = margin.top;
+ }
+ table.callWillDrawPageHooks(doc, cursor);
+ var startPos = assign({}, cursor);
+ table.startPageNumber = doc.pageNumber();
+ if (settings.horizontalPageBreak) {
+ // managed flow for split columns
+ printTableWithHorizontalPageBreak(doc, table, startPos, cursor);
+ }
+ else {
+ // normal flow
+ doc.applyStyles(doc.userStyles);
+ if (settings.showHead === 'firstPage' ||
+ settings.showHead === 'everyPage') {
+ table.head.forEach(function (row) {
+ return printRow(doc, table, row, cursor, table.columns);
+ });
+ }
+ doc.applyStyles(doc.userStyles);
+ table.body.forEach(function (row, index) {
+ var isLastRow = index === table.body.length - 1;
+ printFullRow(doc, table, row, isLastRow, startPos, cursor, table.columns);
+ });
+ doc.applyStyles(doc.userStyles);
+ if (settings.showFoot === 'lastPage' || settings.showFoot === 'everyPage') {
+ table.foot.forEach(function (row) {
+ return printRow(doc, table, row, cursor, table.columns);
+ });
+ }
+ }
+ addTableBorder(doc, table, startPos, cursor);
+ table.callEndPageHooks(doc, cursor);
+ table.finalY = cursor.y;
+ jsPDFDoc.lastAutoTable = table;
+ doc.applyStyles(doc.userStyles);
+}
+function printTableWithHorizontalPageBreak(doc, table, startPos, cursor) {
+ // calculate width of columns and render only those which can fit into page
+ var allColumnsCanFitResult = calculateAllColumnsCanFitInPage(doc, table);
+ var settings = table.settings;
+ if (settings.horizontalPageBreakBehaviour === 'afterAllRows') {
+ allColumnsCanFitResult.forEach(function (colsAndIndexes, index) {
+ doc.applyStyles(doc.userStyles);
+ // add page to print next columns in new page
+ if (index > 0) {
+ // When adding a page here, make sure not to print the footers
+ // because they were already printed before on this same loop
+ addPage(doc, table, startPos, cursor, colsAndIndexes.columns, true);
+ }
+ else {
+ // print head for selected columns
+ printHead(doc, table, cursor, colsAndIndexes.columns);
+ }
+ // print body & footer for selected columns
+ printBody(doc, table, startPos, cursor, colsAndIndexes.columns);
+ printFoot(doc, table, cursor, colsAndIndexes.columns);
+ });
+ }
+ else {
+ var lastRowIndexOfLastPage_1 = -1;
+ var firstColumnsToFitResult = allColumnsCanFitResult[0];
+ var _loop_1 = function () {
+ // Print the first columns, taking note of the last row printed
+ var lastPrintedRowIndex = lastRowIndexOfLastPage_1;
+ if (firstColumnsToFitResult) {
+ doc.applyStyles(doc.userStyles);
+ var firstColumnsToFit = firstColumnsToFitResult.columns;
+ if (lastRowIndexOfLastPage_1 >= 0) {
+ // When adding a page here, make sure not to print the footers
+ // because they were already printed before on this same loop
+ addPage(doc, table, startPos, cursor, firstColumnsToFit, true);
+ }
+ else {
+ printHead(doc, table, cursor, firstColumnsToFit);
+ }
+ lastPrintedRowIndex = printBodyWithoutPageBreaks(doc, table, lastRowIndexOfLastPage_1 + 1, cursor, firstColumnsToFit);
+ printFoot(doc, table, cursor, firstColumnsToFit);
+ }
+ // Check how many rows were printed, so that the next columns would not print more rows than that
+ var maxNumberOfRows = lastPrintedRowIndex - lastRowIndexOfLastPage_1;
+ // Print the next columns, never exceding maxNumberOfRows
+ allColumnsCanFitResult.slice(1).forEach(function (colsAndIndexes) {
+ doc.applyStyles(doc.userStyles);
+ // When adding a page here, make sure not to print the footers
+ // because they were already printed before on this same loop
+ addPage(doc, table, startPos, cursor, colsAndIndexes.columns, true);
+ printBodyWithoutPageBreaks(doc, table, lastRowIndexOfLastPage_1 + 1, cursor, colsAndIndexes.columns, maxNumberOfRows);
+ printFoot(doc, table, cursor, colsAndIndexes.columns);
+ });
+ lastRowIndexOfLastPage_1 = lastPrintedRowIndex;
+ };
+ while (lastRowIndexOfLastPage_1 < table.body.length - 1) {
+ _loop_1();
+ }
+ }
+}
+function printHead(doc, table, cursor, columns) {
+ var settings = table.settings;
+ doc.applyStyles(doc.userStyles);
+ if (settings.showHead === 'firstPage' || settings.showHead === 'everyPage') {
+ table.head.forEach(function (row) { return printRow(doc, table, row, cursor, columns); });
+ }
+}
+function printBody(doc, table, startPos, cursor, columns) {
+ doc.applyStyles(doc.userStyles);
+ table.body.forEach(function (row, index) {
+ var isLastRow = index === table.body.length - 1;
+ printFullRow(doc, table, row, isLastRow, startPos, cursor, columns);
+ });
+}
+function printBodyWithoutPageBreaks(doc, table, startRowIndex, cursor, columns, maxNumberOfRows) {
+ doc.applyStyles(doc.userStyles);
+ maxNumberOfRows = maxNumberOfRows !== null && maxNumberOfRows !== void 0 ? maxNumberOfRows : table.body.length;
+ var endRowIndex = Math.min(startRowIndex + maxNumberOfRows, table.body.length);
+ var lastPrintedRowIndex = -1;
+ table.body.slice(startRowIndex, endRowIndex).forEach(function (row, index) {
+ var isLastRow = startRowIndex + index === table.body.length - 1;
+ var remainingSpace = getRemainingPageSpace(doc, table, isLastRow, cursor);
+ if (row.canEntireRowFit(remainingSpace, columns)) {
+ printRow(doc, table, row, cursor, columns);
+ lastPrintedRowIndex = startRowIndex + index;
+ }
+ });
+ return lastPrintedRowIndex;
+}
+function printFoot(doc, table, cursor, columns) {
+ var settings = table.settings;
+ doc.applyStyles(doc.userStyles);
+ if (settings.showFoot === 'lastPage' || settings.showFoot === 'everyPage') {
+ table.foot.forEach(function (row) { return printRow(doc, table, row, cursor, columns); });
+ }
+}
+function getRemainingLineCount(cell, remainingPageSpace, doc) {
+ var lineHeight = doc.getLineHeight(cell.styles.fontSize);
+ var vPadding = cell.padding('vertical');
+ var remainingLines = Math.floor((remainingPageSpace - vPadding) / lineHeight);
+ return Math.max(0, remainingLines);
+}
+function modifyRowToFit(row, remainingPageSpace, table, doc) {
+ var cells = {};
+ row.spansMultiplePages = true;
+ row.height = 0;
+ var rowHeight = 0;
+ for (var _i = 0, _a = table.columns; _i < _a.length; _i++) {
+ var column = _a[_i];
+ var cell = row.cells[column.index];
+ if (!cell)
+ continue;
+ if (!Array.isArray(cell.text)) {
+ cell.text = [cell.text];
+ }
+ var remainderCell = new Cell(cell.raw, cell.styles, cell.section);
+ remainderCell = assign(remainderCell, cell);
+ remainderCell.text = [];
+ var remainingLineCount = getRemainingLineCount(cell, remainingPageSpace, doc);
+ if (cell.text.length > remainingLineCount) {
+ remainderCell.text = cell.text.splice(remainingLineCount, cell.text.length);
+ }
+ var scaleFactor = doc.scaleFactor();
+ var lineHeightFactor = doc.getLineHeightFactor();
+ cell.contentHeight = cell.getContentHeight(scaleFactor, lineHeightFactor);
+ if (cell.contentHeight >= remainingPageSpace) {
+ cell.contentHeight = remainingPageSpace;
+ remainderCell.styles.minCellHeight -= remainingPageSpace;
+ }
+ if (cell.contentHeight > row.height) {
+ row.height = cell.contentHeight;
+ }
+ remainderCell.contentHeight = remainderCell.getContentHeight(scaleFactor, lineHeightFactor);
+ if (remainderCell.contentHeight > rowHeight) {
+ rowHeight = remainderCell.contentHeight;
+ }
+ cells[column.index] = remainderCell;
+ }
+ var remainderRow = new Row(row.raw, -1, row.section, cells, true);
+ remainderRow.height = rowHeight;
+ for (var _b = 0, _c = table.columns; _b < _c.length; _b++) {
+ var column = _c[_b];
+ var remainderCell = remainderRow.cells[column.index];
+ if (remainderCell) {
+ remainderCell.height = remainderRow.height;
+ }
+ var cell = row.cells[column.index];
+ if (cell) {
+ cell.height = row.height;
+ }
+ }
+ return remainderRow;
+}
+function shouldPrintOnCurrentPage(doc, row, remainingPageSpace, table) {
+ var pageHeight = doc.pageSize().height;
+ var margin = table.settings.margin;
+ var marginHeight = margin.top + margin.bottom;
+ var maxRowHeight = pageHeight - marginHeight;
+ if (row.section === 'body') {
+ // Should also take into account that head and foot is not
+ // on every page with some settings
+ maxRowHeight -=
+ table.getHeadHeight(table.columns) + table.getFootHeight(table.columns);
+ }
+ var minRowHeight = row.getMinimumRowHeight(table.columns, doc);
+ var minRowFits = minRowHeight < remainingPageSpace;
+ if (minRowHeight > maxRowHeight) {
+ console.log("Will not be able to print row ".concat(row.index, " correctly since it's minimum height is larger than page height"));
+ return true;
+ }
+ if (!minRowFits) {
+ return false;
+ }
+ var rowHasRowSpanCell = row.hasRowSpan(table.columns);
+ var rowHigherThanPage = row.getMaxCellHeight(table.columns) > maxRowHeight;
+ if (rowHigherThanPage) {
+ if (rowHasRowSpanCell) {
+ console.log("The content of row ".concat(row.index, " will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported."));
+ }
+ return true;
+ }
+ if (rowHasRowSpanCell) {
+ // Currently a new page is required whenever a rowspan row don't fit a page.
+ return false;
+ }
+ if (table.settings.rowPageBreak === 'avoid') {
+ return false;
+ }
+ // In all other cases print the row on current page
+ return true;
+}
+function printFullRow(doc, table, row, isLastRow, startPos, cursor, columns) {
+ var remainingSpace = getRemainingPageSpace(doc, table, isLastRow, cursor);
+ if (row.canEntireRowFit(remainingSpace, columns)) {
+ // The row fits in the current page
+ printRow(doc, table, row, cursor, columns);
+ }
+ else if (shouldPrintOnCurrentPage(doc, row, remainingSpace, table)) {
+ // The row gets split in two here, each piece in one page
+ var remainderRow = modifyRowToFit(row, remainingSpace, table, doc);
+ printRow(doc, table, row, cursor, columns);
+ addPage(doc, table, startPos, cursor, columns);
+ printFullRow(doc, table, remainderRow, isLastRow, startPos, cursor, columns);
+ }
+ else {
+ // The row get printed entirelly on the next page
+ addPage(doc, table, startPos, cursor, columns);
+ printFullRow(doc, table, row, isLastRow, startPos, cursor, columns);
+ }
+}
+function printRow(doc, table, row, cursor, columns) {
+ cursor.x = table.settings.margin.left;
+ for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
+ var column = columns_1[_i];
+ var cell = row.cells[column.index];
+ if (!cell) {
+ cursor.x += column.width;
+ continue;
+ }
+ doc.applyStyles(cell.styles);
+ cell.x = cursor.x;
+ cell.y = cursor.y;
+ var result = table.callCellHooks(doc, table.hooks.willDrawCell, cell, row, column, cursor);
+ if (result === false) {
+ cursor.x += column.width;
+ continue;
+ }
+ drawCellRect(doc, cell, cursor);
+ var textPos = cell.getTextPos();
+ autoTableText(cell.text, textPos.x, textPos.y, {
+ halign: cell.styles.halign,
+ valign: cell.styles.valign,
+ maxWidth: Math.ceil(cell.width - cell.padding('left') - cell.padding('right')),
+ }, doc.getDocument());
+ table.callCellHooks(doc, table.hooks.didDrawCell, cell, row, column, cursor);
+ cursor.x += column.width;
+ }
+ cursor.y += row.height;
+}
+function drawCellRect(doc, cell, cursor) {
+ var cellStyles = cell.styles;
+ // https://github.com/simonbengtsson/jsPDF-AutoTable/issues/774
+ // TODO (v4): better solution?
+ doc.getDocument().setFillColor(doc.getDocument().getFillColor());
+ if (typeof cellStyles.lineWidth === 'number') {
+ // Draw cell background with normal borders
+ var fillStyle = getFillStyle(cellStyles.lineWidth, cellStyles.fillColor);
+ if (fillStyle) {
+ doc.rect(cell.x, cursor.y, cell.width, cell.height, fillStyle);
+ }
+ }
+ else if (typeof cellStyles.lineWidth === 'object') {
+ // Draw cell background
+ if (cellStyles.fillColor) {
+ doc.rect(cell.x, cursor.y, cell.width, cell.height, 'F');
+ }
+ // Draw cell individual borders
+ drawCellBorders(doc, cell, cursor, cellStyles.lineWidth);
+ }
+}
+/**
+ * Draw all specified borders. Borders are centered on cell's edge and lengthened
+ * to overlap with neighbours to create sharp corners.
+ * @param doc
+ * @param cell
+ * @param cursor
+ * @param fillColor
+ * @param lineWidth
+ */
+function drawCellBorders(doc, cell, cursor, lineWidth) {
+ var x1, y1, x2, y2;
+ if (lineWidth.top) {
+ x1 = cursor.x;
+ y1 = cursor.y;
+ x2 = cursor.x + cell.width;
+ y2 = cursor.y;
+ if (lineWidth.right) {
+ x2 += 0.5 * lineWidth.right;
+ }
+ if (lineWidth.left) {
+ x1 -= 0.5 * lineWidth.left;
+ }
+ drawLine(lineWidth.top, x1, y1, x2, y2);
+ }
+ if (lineWidth.bottom) {
+ x1 = cursor.x;
+ y1 = cursor.y + cell.height;
+ x2 = cursor.x + cell.width;
+ y2 = cursor.y + cell.height;
+ if (lineWidth.right) {
+ x2 += 0.5 * lineWidth.right;
+ }
+ if (lineWidth.left) {
+ x1 -= 0.5 * lineWidth.left;
+ }
+ drawLine(lineWidth.bottom, x1, y1, x2, y2);
+ }
+ if (lineWidth.left) {
+ x1 = cursor.x;
+ y1 = cursor.y;
+ x2 = cursor.x;
+ y2 = cursor.y + cell.height;
+ if (lineWidth.top) {
+ y1 -= 0.5 * lineWidth.top;
+ }
+ if (lineWidth.bottom) {
+ y2 += 0.5 * lineWidth.bottom;
+ }
+ drawLine(lineWidth.left, x1, y1, x2, y2);
+ }
+ if (lineWidth.right) {
+ x1 = cursor.x + cell.width;
+ y1 = cursor.y;
+ x2 = cursor.x + cell.width;
+ y2 = cursor.y + cell.height;
+ if (lineWidth.top) {
+ y1 -= 0.5 * lineWidth.top;
+ }
+ if (lineWidth.bottom) {
+ y2 += 0.5 * lineWidth.bottom;
+ }
+ drawLine(lineWidth.right, x1, y1, x2, y2);
+ }
+ function drawLine(width, x1, y1, x2, y2) {
+ doc.getDocument().setLineWidth(width);
+ doc.getDocument().line(x1, y1, x2, y2, 'S');
+ }
+}
+function getRemainingPageSpace(doc, table, isLastRow, cursor) {
+ var bottomContentHeight = table.settings.margin.bottom;
+ var showFoot = table.settings.showFoot;
+ if (showFoot === 'everyPage' || (showFoot === 'lastPage' && isLastRow)) {
+ bottomContentHeight += table.getFootHeight(table.columns);
+ }
+ return doc.pageSize().height - cursor.y - bottomContentHeight;
+}
+function addPage(doc, table, startPos, cursor, columns, suppressFooter) {
+ if (columns === void 0) { columns = []; }
+ if (suppressFooter === void 0) { suppressFooter = false; }
+ doc.applyStyles(doc.userStyles);
+ if (table.settings.showFoot === 'everyPage' && !suppressFooter) {
+ table.foot.forEach(function (row) { return printRow(doc, table, row, cursor, columns); });
+ }
+ // Add user content just before adding new page ensure it will
+ // be drawn above other things on the page
+ table.callEndPageHooks(doc, cursor);
+ var margin = table.settings.margin;
+ addTableBorder(doc, table, startPos, cursor);
+ nextPage(doc);
+ table.pageNumber++;
+ cursor.x = margin.left;
+ cursor.y = margin.top;
+ startPos.y = margin.top;
+ // call didAddPage hooks before any content is added to the page
+ table.callWillDrawPageHooks(doc, cursor);
+ if (table.settings.showHead === 'everyPage') {
+ table.head.forEach(function (row) { return printRow(doc, table, row, cursor, columns); });
+ doc.applyStyles(doc.userStyles);
+ }
+}
+function nextPage(doc) {
+ var current = doc.pageNumber();
+ doc.setPage(current + 1);
+ var newCurrent = doc.pageNumber();
+ if (newCurrent === current) {
+ doc.addPage();
+ return true;
+ }
+ return false;
+}
+
+function applyPlugin(jsPDF) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ jsPDF.API.autoTable = function () {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ var options = args[0];
+ var input = parseInput(this, options);
+ var table = createTable(this, input);
+ drawTable(this, table);
+ return this;
+ };
+ // Assign false to enable `doc.lastAutoTable.finalY || 40` sugar
+ jsPDF.API.lastAutoTable = false;
+ jsPDF.API.autoTableText = function (text, x, y, styles) {
+ autoTableText(text, x, y, styles, this);
+ };
+ jsPDF.API.autoTableSetDefaults = function (defaults) {
+ DocHandler.setDefaults(defaults, this);
+ return this;
+ };
+ jsPDF.autoTableSetDefaults = function (defaults, doc) {
+ DocHandler.setDefaults(defaults, doc);
+ };
+ jsPDF.API.autoTableHtmlToJson = function (tableElem, includeHiddenElements) {
+ var _a;
+ if (includeHiddenElements === void 0) { includeHiddenElements = false; }
+ if (typeof window === 'undefined') {
+ console.error('Cannot run autoTableHtmlToJson in non browser environment');
+ return null;
+ }
+ var doc = new DocHandler(this);
+ var _b = parseHtml(doc, tableElem, window, includeHiddenElements, false), head = _b.head, body = _b.body;
+ var columns = ((_a = head[0]) === null || _a === void 0 ? void 0 : _a.map(function (c) { return c.content; })) || [];
+ return { columns: columns, rows: body, data: body };
+ };
+}
+
+var _a;
+function autoTable(d, options) {
+ var input = parseInput(d, options);
+ var table = createTable(d, input);
+ drawTable(d, table);
+}
+// Experimental export
+function __createTable(d, options) {
+ var input = parseInput(d, options);
+ return createTable(d, input);
+}
+function __drawTable(d, table) {
+ drawTable(d, table);
+}
+try {
+ if (typeof window !== 'undefined' && window) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ var anyWindow = window;
+ var jsPDF = anyWindow.jsPDF || ((_a = anyWindow.jspdf) === null || _a === void 0 ? void 0 : _a.jsPDF);
+ if (jsPDF) {
+ applyPlugin(jsPDF);
+ }
+ }
+}
+catch (error) {
+ console.error('Could not apply autoTable plugin', error);
+}
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/xlsx/xlsx.mjs":
+/*!************************************!*\
+ !*** ./node_modules/xlsx/xlsx.mjs ***!
+ \************************************/
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ CFB: () => (/* binding */ CFB),
+/* harmony export */ SSF: () => (/* binding */ SSF),
+/* harmony export */ parse_xlscfb: () => (/* binding */ parse_xlscfb),
+/* harmony export */ parse_zip: () => (/* binding */ parse_zip),
+/* harmony export */ read: () => (/* binding */ readSync),
+/* harmony export */ readFile: () => (/* binding */ readFileSync),
+/* harmony export */ readFileSync: () => (/* binding */ readFileSync),
+/* harmony export */ set_cptable: () => (/* binding */ set_cptable),
+/* harmony export */ set_fs: () => (/* binding */ set_fs),
+/* harmony export */ stream: () => (/* binding */ __stream),
+/* harmony export */ utils: () => (/* binding */ utils),
+/* harmony export */ version: () => (/* binding */ version),
+/* harmony export */ write: () => (/* binding */ writeSync),
+/* harmony export */ writeFile: () => (/* binding */ writeFileSync),
+/* harmony export */ writeFileAsync: () => (/* binding */ writeFileAsync),
+/* harmony export */ writeFileSync: () => (/* binding */ writeFileSync),
+/* harmony export */ writeFileXLSX: () => (/* binding */ writeFileSyncXLSX),
+/* harmony export */ writeXLSX: () => (/* binding */ writeSyncXLSX)
+/* harmony export */ });
+/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "?1bda")["Buffer"];
+/* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js");
+/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
+/* vim: set ts=2: */
+/*exported XLSX */
+/*global process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */
+var XLSX = {};
+XLSX.version = '0.18.5';
+var current_codepage = 1200, current_ansi = 1252;
+
+var VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000 ];
+/* ECMA-376 Part I 18.4.1 charset to codepage mapping */
+var CS2CP = ({
+ /*::[*/0/*::]*/: 1252, /* ANSI */
+ /*::[*/1/*::]*/: 65001, /* DEFAULT */
+ /*::[*/2/*::]*/: 65001, /* SYMBOL */
+ /*::[*/77/*::]*/: 10000, /* MAC */
+ /*::[*/128/*::]*/: 932, /* SHIFTJIS */
+ /*::[*/129/*::]*/: 949, /* HANGUL */
+ /*::[*/130/*::]*/: 1361, /* JOHAB */
+ /*::[*/134/*::]*/: 936, /* GB2312 */
+ /*::[*/136/*::]*/: 950, /* CHINESEBIG5 */
+ /*::[*/161/*::]*/: 1253, /* GREEK */
+ /*::[*/162/*::]*/: 1254, /* TURKISH */
+ /*::[*/163/*::]*/: 1258, /* VIETNAMESE */
+ /*::[*/177/*::]*/: 1255, /* HEBREW */
+ /*::[*/178/*::]*/: 1256, /* ARABIC */
+ /*::[*/186/*::]*/: 1257, /* BALTIC */
+ /*::[*/204/*::]*/: 1251, /* RUSSIAN */
+ /*::[*/222/*::]*/: 874, /* THAI */
+ /*::[*/238/*::]*/: 1250, /* EASTEUROPE */
+ /*::[*/255/*::]*/: 1252, /* OEM */
+ /*::[*/69/*::]*/: 6969 /* MISC */
+}/*:any*/);
+
+var set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; };
+function reset_ansi() { set_ansi(1252); }
+
+var set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };
+function reset_cp() { set_cp(1200); reset_ansi(); }
+
+function char_codes(data/*:string*/)/*:Array*/ { var o/*:Array*/ = []; for(var i = 0, len = data.length; i < len; ++i) o[i] = data.charCodeAt(i); return o; }
+
+function utf16leread(data/*:string*/)/*:string*/ {
+ var o/*:Array*/ = [];
+ for(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i) + (data.charCodeAt(2*i+1)<<8));
+ return o.join("");
+}
+function utf16beread(data/*:string*/)/*:string*/ {
+ var o/*:Array*/ = [];
+ for(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i+1) + (data.charCodeAt(2*i)<<8));
+ return o.join("");
+}
+
+var debom = function(data/*:string*/)/*:string*/ {
+ var c1 = data.charCodeAt(0), c2 = data.charCodeAt(1);
+ if(c1 == 0xFF && c2 == 0xFE) return utf16leread(data.slice(2));
+ if(c1 == 0xFE && c2 == 0xFF) return utf16beread(data.slice(2));
+ if(c1 == 0xFEFF) return data.slice(1);
+ return data;
+};
+
+var _getchar = function _gc1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
+var _getansi = function _ga1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
+
+var $cptable;
+function set_cptable(cptable) {
+ $cptable = cptable;
+ set_cp = function(cp/*:number*/) { current_codepage = cp; set_ansi(cp); };
+ debom = function(data/*:string*/) {
+ if(data.charCodeAt(0) === 0xFF && data.charCodeAt(1) === 0xFE) { return $cptable.utils.decode(1200, char_codes(data.slice(2))); }
+ return data;
+ };
+ _getchar = function _gc2(x/*:number*/)/*:string*/ {
+ if(current_codepage === 1200) return String.fromCharCode(x);
+ return $cptable.utils.decode(current_codepage, [x&255,x>>8])[0];
+ };
+ _getansi = function _ga2(x/*:number*/)/*:string*/ {
+ return $cptable.utils.decode(current_ansi, [x])[0];
+ };
+ cpdoit();
+}
+
+var DENSE = null;
+var DIF_XL = true;
+var Base64_map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+function Base64_encode(input) {
+ var o = "";
+ var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;
+ for (var i = 0; i < input.length; ) {
+ c1 = input.charCodeAt(i++);
+ e1 = c1 >> 2;
+ c2 = input.charCodeAt(i++);
+ e2 = (c1 & 3) << 4 | c2 >> 4;
+ c3 = input.charCodeAt(i++);
+ e3 = (c2 & 15) << 2 | c3 >> 6;
+ e4 = c3 & 63;
+ if (isNaN(c2)) {
+ e3 = e4 = 64;
+ } else if (isNaN(c3)) {
+ e4 = 64;
+ }
+ o += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4);
+ }
+ return o;
+}
+function Base64_decode(input) {
+ var o = "";
+ var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;
+ input = input.replace(/[^\w\+\/\=]/g, "");
+ for (var i = 0; i < input.length; ) {
+ e1 = Base64_map.indexOf(input.charAt(i++));
+ e2 = Base64_map.indexOf(input.charAt(i++));
+ c1 = e1 << 2 | e2 >> 4;
+ o += String.fromCharCode(c1);
+ e3 = Base64_map.indexOf(input.charAt(i++));
+ c2 = (e2 & 15) << 4 | e3 >> 2;
+ if (e3 !== 64) {
+ o += String.fromCharCode(c2);
+ }
+ e4 = Base64_map.indexOf(input.charAt(i++));
+ c3 = (e3 & 3) << 6 | e4;
+ if (e4 !== 64) {
+ o += String.fromCharCode(c3);
+ }
+ }
+ return o;
+}
+var has_buf = /*#__PURE__*/(function() { return typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && !!process.versions.node; })();
+
+var Buffer_from = /*#__PURE__*/(function() {
+ if(typeof Buffer !== 'undefined') {
+ var nbfs = !Buffer.from;
+ if(!nbfs) try { Buffer.from("foo", "utf8"); } catch(e) { nbfs = true; }
+ return nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);
+ }
+ return function() {};
+})();
+
+
+function new_raw_buf(len/*:number*/) {
+ /* jshint -W056 */
+ if(has_buf) return Buffer.alloc ? Buffer.alloc(len) : new Buffer(len);
+ return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len);
+ /* jshint +W056 */
+}
+
+function new_unsafe_buf(len/*:number*/) {
+ /* jshint -W056 */
+ if(has_buf) return Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : new Buffer(len);
+ return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len);
+ /* jshint +W056 */
+}
+
+var s2a = function s2a(s/*:string*/)/*:any*/ {
+ if(has_buf) return Buffer_from(s, "binary");
+ return s.split("").map(function(x/*:string*/)/*:number*/{ return x.charCodeAt(0) & 0xff; });
+};
+
+function s2ab(s/*:string*/)/*:any*/ {
+ if(typeof ArrayBuffer === 'undefined') return s2a(s);
+ var buf = new ArrayBuffer(s.length), view = new Uint8Array(buf);
+ for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
+ return buf;
+}
+
+function a2s(data/*:any*/)/*:string*/ {
+ if(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join("");
+ var o/*:Array*/ = []; for(var i = 0; i < data.length; ++i) o[i] = String.fromCharCode(data[i]); return o.join("");
+}
+
+function a2u(data/*:Array*/)/*:Uint8Array*/ {
+ if(typeof Uint8Array === 'undefined') throw new Error("Unsupported");
+ return new Uint8Array(data);
+}
+
+function ab2a(data/*:ArrayBuffer|Uint8Array*/)/*:Array*/ {
+ if(typeof ArrayBuffer == 'undefined') throw new Error("Unsupported");
+ if(data instanceof ArrayBuffer) return ab2a(new Uint8Array(data));
+ /*:: if(data instanceof ArrayBuffer) throw new Error("unreachable"); */
+ var o = new Array(data.length);
+ for(var i = 0; i < data.length; ++i) o[i] = data[i];
+ return o;
+}
+
+var bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf) ? buf : Buffer_from(buf); })); } : function(bufs) {
+ if(typeof Uint8Array !== "undefined") {
+ var i = 0, maxlen = 0;
+ for(i = 0; i < bufs.length; ++i) maxlen += bufs[i].length;
+ var o = new Uint8Array(maxlen);
+ var len = 0;
+ for(i = 0, maxlen = 0; i < bufs.length; maxlen += len, ++i) {
+ len = bufs[i].length;
+ if(bufs[i] instanceof Uint8Array) o.set(bufs[i], maxlen);
+ else if(typeof bufs[i] == "string") { throw "wtf"; }
+ else o.set(new Uint8Array(bufs[i]), maxlen);
+ }
+ return o;
+ }
+ return [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.call(buf); }));
+};
+
+function utf8decode(content/*:string*/) {
+ var out = [], widx = 0, L = content.length + 250;
+ var o = new_raw_buf(content.length + 255);
+ for(var ridx = 0; ridx < content.length; ++ridx) {
+ var c = content.charCodeAt(ridx);
+ if(c < 0x80) o[widx++] = c;
+ else if(c < 0x800) {
+ o[widx++] = (192|((c>>6)&31));
+ o[widx++] = (128|(c&63));
+ } else if(c >= 0xD800 && c < 0xE000) {
+ c = (c&1023)+64;
+ var d = content.charCodeAt(++ridx)&1023;
+ o[widx++] = (240|((c>>8)&7));
+ o[widx++] = (128|((c>>2)&63));
+ o[widx++] = (128|((d>>6)&15)|((c&3)<<4));
+ o[widx++] = (128|(d&63));
+ } else {
+ o[widx++] = (224|((c>>12)&15));
+ o[widx++] = (128|((c>>6)&63));
+ o[widx++] = (128|(c&63));
+ }
+ if(widx > L) {
+ out.push(o.slice(0, widx));
+ widx = 0;
+ o = new_raw_buf(65535);
+ L = 65530;
+ }
+ }
+ out.push(o.slice(0, widx));
+ return bconcat(out);
+}
+
+var chr0 = /\u0000/g, chr1 = /[\u0001-\u0006]/g;
+/*::
+declare type Block = any;
+declare type BufArray = {
+ newblk(sz:number):Block;
+ next(sz:number):Block;
+ end():any;
+ push(buf:Block):void;
+};
+
+type RecordHopperCB = {(d:any, Rn:string, RT:number):?boolean;};
+
+type EvertType = {[string]:string};
+type EvertNumType = {[string]:number};
+type EvertArrType = {[string]:Array};
+
+type StringConv = {(string):string};
+
+*/
+/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */
+/*jshint -W041 */
+function _strrev(x/*:string*/)/*:string*/ { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; }
+function pad0(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;}
+function pad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v;return t.length>=d?t:fill(' ',d-t.length)+t;}
+function rpad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:t+fill(' ',d-t.length);}
+function pad0r1(v/*:any*/,d/*:number*/)/*:string*/{var t=""+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;}
+function pad0r2(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;}
+var p2_32 = /*#__PURE__*/Math.pow(2,32);
+function pad0r(v/*:any*/,d/*:number*/)/*:string*/{if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(i,d); }
+/* yes, in 2022 this is still faster than string compare */
+function SSF_isgeneral(s/*:string*/, i/*:?number*/)/*:boolean*/ { i = i || 0; return s.length >= 7 + i && (s.charCodeAt(i)|32) === 103 && (s.charCodeAt(i+1)|32) === 101 && (s.charCodeAt(i+2)|32) === 110 && (s.charCodeAt(i+3)|32) === 101 && (s.charCodeAt(i+4)|32) === 114 && (s.charCodeAt(i+5)|32) === 97 && (s.charCodeAt(i+6)|32) === 108; }
+var days/*:Array >*/ = [
+ ['Sun', 'Sunday'],
+ ['Mon', 'Monday'],
+ ['Tue', 'Tuesday'],
+ ['Wed', 'Wednesday'],
+ ['Thu', 'Thursday'],
+ ['Fri', 'Friday'],
+ ['Sat', 'Saturday']
+];
+var months/*:Array >*/ = [
+ ['J', 'Jan', 'January'],
+ ['F', 'Feb', 'February'],
+ ['M', 'Mar', 'March'],
+ ['A', 'Apr', 'April'],
+ ['M', 'May', 'May'],
+ ['J', 'Jun', 'June'],
+ ['J', 'Jul', 'July'],
+ ['A', 'Aug', 'August'],
+ ['S', 'Sep', 'September'],
+ ['O', 'Oct', 'October'],
+ ['N', 'Nov', 'November'],
+ ['D', 'Dec', 'December']
+];
+function SSF_init_table(t/*:any*/) {
+ if(!t) t = {};
+ t[0]= 'General';
+ t[1]= '0';
+ t[2]= '0.00';
+ t[3]= '#,##0';
+ t[4]= '#,##0.00';
+ t[9]= '0%';
+ t[10]= '0.00%';
+ t[11]= '0.00E+00';
+ t[12]= '# ?/?';
+ t[13]= '# ??/??';
+ t[14]= 'm/d/yy';
+ t[15]= 'd-mmm-yy';
+ t[16]= 'd-mmm';
+ t[17]= 'mmm-yy';
+ t[18]= 'h:mm AM/PM';
+ t[19]= 'h:mm:ss AM/PM';
+ t[20]= 'h:mm';
+ t[21]= 'h:mm:ss';
+ t[22]= 'm/d/yy h:mm';
+ t[37]= '#,##0 ;(#,##0)';
+ t[38]= '#,##0 ;[Red](#,##0)';
+ t[39]= '#,##0.00;(#,##0.00)';
+ t[40]= '#,##0.00;[Red](#,##0.00)';
+ t[45]= 'mm:ss';
+ t[46]= '[h]:mm:ss';
+ t[47]= 'mmss.0';
+ t[48]= '##0.0E+0';
+ t[49]= '@';
+ t[56]= '"上午/下午 "hh"時"mm"分"ss"秒 "';
+ return t;
+}
+/* repeated to satiate webpack */
+var table_fmt = {
+ 0: 'General',
+ 1: '0',
+ 2: '0.00',
+ 3: '#,##0',
+ 4: '#,##0.00',
+ 9: '0%',
+ 10: '0.00%',
+ 11: '0.00E+00',
+ 12: '# ?/?',
+ 13: '# ??/??',
+ 14: 'm/d/yy',
+ 15: 'd-mmm-yy',
+ 16: 'd-mmm',
+ 17: 'mmm-yy',
+ 18: 'h:mm AM/PM',
+ 19: 'h:mm:ss AM/PM',
+ 20: 'h:mm',
+ 21: 'h:mm:ss',
+ 22: 'm/d/yy h:mm',
+ 37: '#,##0 ;(#,##0)',
+ 38: '#,##0 ;[Red](#,##0)',
+ 39: '#,##0.00;(#,##0.00)',
+ 40: '#,##0.00;[Red](#,##0.00)',
+ 45: 'mm:ss',
+ 46: '[h]:mm:ss',
+ 47: 'mmss.0',
+ 48: '##0.0E+0',
+ 49: '@',
+ 56: '"上午/下午 "hh"時"mm"分"ss"秒 "'
+};
+
+/* Defaults determined by systematically testing in Excel 2019 */
+
+/* These formats appear to default to other formats in the table */
+var SSF_default_map = {
+ 5: 37, 6: 38, 7: 39, 8: 40, // 5 -> 37 ... 8 -> 40
+
+ 23: 0, 24: 0, 25: 0, 26: 0, // 23 -> 0 ... 26 -> 0
+
+ 27: 14, 28: 14, 29: 14, 30: 14, 31: 14, // 27 -> 14 ... 31 -> 14
+
+ 50: 14, 51: 14, 52: 14, 53: 14, 54: 14, // 50 -> 14 ... 58 -> 14
+ 55: 14, 56: 14, 57: 14, 58: 14,
+ 59: 1, 60: 2, 61: 3, 62: 4, // 59 -> 1 ... 62 -> 4
+
+ 67: 9, 68: 10, // 67 -> 9 ... 68 -> 10
+ 69: 12, 70: 13, 71: 14, // 69 -> 12 ... 71 -> 14
+ 72: 14, 73: 15, 74: 16, 75: 17, // 72 -> 14 ... 75 -> 17
+ 76: 20, 77: 21, 78: 22, // 76 -> 20 ... 78 -> 22
+ 79: 45, 80: 46, 81: 47, // 79 -> 45 ... 81 -> 47
+ 82: 0 // 82 -> 0 ... 65536 -> 0 (omitted)
+};
+
+
+/* These formats technically refer to Accounting formats with no equivalent */
+var SSF_default_str = {
+ // 5 -- Currency, 0 decimal, black negative
+ 5: '"$"#,##0_);\\("$"#,##0\\)',
+ 63: '"$"#,##0_);\\("$"#,##0\\)',
+
+ // 6 -- Currency, 0 decimal, red negative
+ 6: '"$"#,##0_);[Red]\\("$"#,##0\\)',
+ 64: '"$"#,##0_);[Red]\\("$"#,##0\\)',
+
+ // 7 -- Currency, 2 decimal, black negative
+ 7: '"$"#,##0.00_);\\("$"#,##0.00\\)',
+ 65: '"$"#,##0.00_);\\("$"#,##0.00\\)',
+
+ // 8 -- Currency, 2 decimal, red negative
+ 8: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
+ 66: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
+
+ // 41 -- Accounting, 0 decimal, No Symbol
+ 41: '_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',
+
+ // 42 -- Accounting, 0 decimal, $ Symbol
+ 42: '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',
+
+ // 43 -- Accounting, 2 decimal, No Symbol
+ 43: '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',
+
+ // 44 -- Accounting, 2 decimal, $ Symbol
+ 44: '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'
+};
+
+function SSF_frac(x/*:number*/, D/*:number*/, mixed/*:?boolean*/)/*:Array*/ {
+ var sgn = x < 0 ? -1 : 1;
+ var B = x * sgn;
+ var P_2 = 0, P_1 = 1, P = 0;
+ var Q_2 = 1, Q_1 = 0, Q = 0;
+ var A = Math.floor(B);
+ while(Q_1 < D) {
+ A = Math.floor(B);
+ P = A * P_1 + P_2;
+ Q = A * Q_1 + Q_2;
+ if((B - A) < 0.00000005) break;
+ B = 1 / (B - A);
+ P_2 = P_1; P_1 = P;
+ Q_2 = Q_1; Q_1 = Q;
+ }
+ if(Q > D) { if(Q_1 > D) { Q = Q_2; P = P_2; } else { Q = Q_1; P = P_1; } }
+ if(!mixed) return [0, sgn * P, Q];
+ var q = Math.floor(sgn * P/Q);
+ return [q, sgn*P - q*Q, Q];
+}
+function SSF_parse_date_code(v/*:number*/,opts/*:?any*/,b2/*:?boolean*/) {
+ if(v > 2958465 || v < 0) return null;
+ var date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;
+ var dout=[];
+ var out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};
+ if(Math.abs(out.u) < 1e-6) out.u = 0;
+ if(opts && opts.date1904) date += 1462;
+ if(out.u > 0.9999) {
+ out.u = 0;
+ if(++time == 86400) { out.T = time = 0; ++date; ++out.D; }
+ }
+ if(date === 60) {dout = b2 ? [1317,10,29] : [1900,2,29]; dow=3;}
+ else if(date === 0) {dout = b2 ? [1317,8,29] : [1900,1,0]; dow=6;}
+ else {
+ if(date > 60) --date;
+ /* 1 = Jan 1 1900 in Gregorian */
+ var d = new Date(1900, 0, 1);
+ d.setDate(d.getDate() + date - 1);
+ dout = [d.getFullYear(), d.getMonth()+1,d.getDate()];
+ dow = d.getDay();
+ if(date < 60) dow = (dow + 6) % 7;
+ if(b2) dow = SSF_fix_hijri(d, dout);
+ }
+ out.y = dout[0]; out.m = dout[1]; out.d = dout[2];
+ out.S = time % 60; time = Math.floor(time / 60);
+ out.M = time % 60; time = Math.floor(time / 60);
+ out.H = time;
+ out.q = dow;
+ return out;
+}
+var SSFbasedate = /*#__PURE__*/new Date(1899, 11, 31, 0, 0, 0);
+var SSFdnthresh = /*#__PURE__*/SSFbasedate.getTime();
+var SSFbase1904 = /*#__PURE__*/new Date(1900, 2, 1, 0, 0, 0);
+function datenum_local(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
+ var epoch = /*#__PURE__*/v.getTime();
+ if(date1904) epoch -= 1461*24*60*60*1000;
+ else if(v >= SSFbase1904) epoch += 24*60*60*1000;
+ return (epoch - (SSFdnthresh + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/SSFbasedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000);
+}
+/* ECMA-376 18.8.30 numFmt*/
+/* Note: `toPrecision` uses standard form when prec > E and E >= -6 */
+/* exponent >= -9 and <= 9 */
+function SSF_strip_decimal(o/*:string*/)/*:string*/ {
+ return (o.indexOf(".") == -1) ? o : o.replace(/(?:\.0*|(\.\d*[1-9])0+)$/, "$1");
+}
+
+/* General Exponential always shows 2 digits exp and trims the mantissa */
+function SSF_normalize_exp(o/*:string*/)/*:string*/ {
+ if(o.indexOf("E") == -1) return o;
+ return o.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2");
+}
+
+/* exponent >= -9 and <= 9 */
+function SSF_small_exp(v/*:number*/)/*:string*/ {
+ var w = (v<0?12:11);
+ var o = SSF_strip_decimal(v.toFixed(12)); if(o.length <= w) return o;
+ o = v.toPrecision(10); if(o.length <= w) return o;
+ return v.toExponential(5);
+}
+
+/* exponent >= 11 or <= -10 likely exponential */
+function SSF_large_exp(v/*:number*/)/*:string*/ {
+ var o = SSF_strip_decimal(v.toFixed(11));
+ return (o.length > (v<0?12:11) || o === "0" || o === "-0") ? v.toPrecision(6) : o;
+}
+
+function SSF_general_num(v/*:number*/)/*:string*/ {
+ var V = Math.floor(Math.log(Math.abs(v))*Math.LOG10E), o;
+
+ if(V >= -4 && V <= -1) o = v.toPrecision(10+V);
+ else if(Math.abs(V) <= 9) o = SSF_small_exp(v);
+ else if(V === 10) o = v.toFixed(10).substr(0,12);
+ else o = SSF_large_exp(v);
+
+ return SSF_strip_decimal(SSF_normalize_exp(o.toUpperCase()));
+}
+
+
+/*
+ "General" rules:
+ - text is passed through ("@")
+ - booleans are rendered as TRUE/FALSE
+ - "up to 11 characters" displayed for numbers
+ - Default date format (code 14) used for Dates
+
+ The longest 32-bit integer text is "-2147483648", exactly 11 chars
+ TODO: technically the display depends on the width of the cell
+*/
+function SSF_general(v/*:any*/, opts/*:any*/) {
+ switch(typeof v) {
+ case 'string': return v;
+ case 'boolean': return v ? "TRUE" : "FALSE";
+ case 'number': return (v|0) === v ? v.toString(10) : SSF_general_num(v);
+ case 'undefined': return "";
+ case 'object':
+ if(v == null) return "";
+ if(v instanceof Date) return SSF_format(14, datenum_local(v, opts && opts.date1904), opts);
+ }
+ throw new Error("unsupported value in General format: " + v);
+}
+
+function SSF_fix_hijri(date/*:Date*/, o/*:[number, number, number]*/) {
+ /* TODO: properly adjust y/m/d and */
+ o[0] -= 581;
+ var dow = date.getDay();
+ if(date < 60) dow = (dow + 6) % 7;
+ return dow;
+}
+//var THAI_DIGITS = "\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59".split("");
+function SSF_write_date(type/*:number*/, fmt/*:string*/, val, ss0/*:?number*/)/*:string*/ {
+ var o="", ss=0, tt=0, y = val.y, out, outl = 0;
+ switch(type) {
+ case 98: /* 'b' buddhist year */
+ y = val.y + 543;
+ /* falls through */
+ case 121: /* 'y' year */
+ switch(fmt.length) {
+ case 1: case 2: out = y % 100; outl = 2; break;
+ default: out = y % 10000; outl = 4; break;
+ } break;
+ case 109: /* 'm' month */
+ switch(fmt.length) {
+ case 1: case 2: out = val.m; outl = fmt.length; break;
+ case 3: return months[val.m-1][1];
+ case 5: return months[val.m-1][0];
+ default: return months[val.m-1][2];
+ } break;
+ case 100: /* 'd' day */
+ switch(fmt.length) {
+ case 1: case 2: out = val.d; outl = fmt.length; break;
+ case 3: return days[val.q][0];
+ default: return days[val.q][1];
+ } break;
+ case 104: /* 'h' 12-hour */
+ switch(fmt.length) {
+ case 1: case 2: out = 1+(val.H+11)%12; outl = fmt.length; break;
+ default: throw 'bad hour format: ' + fmt;
+ } break;
+ case 72: /* 'H' 24-hour */
+ switch(fmt.length) {
+ case 1: case 2: out = val.H; outl = fmt.length; break;
+ default: throw 'bad hour format: ' + fmt;
+ } break;
+ case 77: /* 'M' minutes */
+ switch(fmt.length) {
+ case 1: case 2: out = val.M; outl = fmt.length; break;
+ default: throw 'bad minute format: ' + fmt;
+ } break;
+ case 115: /* 's' seconds */
+ if(fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt;
+ if(val.u === 0 && (fmt == "s" || fmt == "ss")) return pad0(val.S, fmt.length);
+ /*::if(!ss0) ss0 = 0; */
+ if(ss0 >= 2) tt = ss0 === 3 ? 1000 : 100;
+ else tt = ss0 === 1 ? 10 : 1;
+ ss = Math.round((tt)*(val.S + val.u));
+ if(ss >= 60*tt) ss = 0;
+ if(fmt === 's') return ss === 0 ? "0" : ""+ss/tt;
+ o = pad0(ss,2 + ss0);
+ if(fmt === 'ss') return o.substr(0,2);
+ return "." + o.substr(2,fmt.length-1);
+ case 90: /* 'Z' absolute time */
+ switch(fmt) {
+ case '[h]': case '[hh]': out = val.D*24+val.H; break;
+ case '[m]': case '[mm]': out = (val.D*24+val.H)*60+val.M; break;
+ case '[s]': case '[ss]': out = ((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u); break;
+ default: throw 'bad abstime format: ' + fmt;
+ } outl = fmt.length === 3 ? 1 : 2; break;
+ case 101: /* 'e' era */
+ out = y; outl = 1; break;
+ }
+ var outstr = outl > 0 ? pad0(out, outl) : "";
+ return outstr;
+}
+
+
+/*jshint -W086 */
+/*jshint +W086 */
+function commaify(s/*:string*/)/*:string*/ {
+ var w = 3;
+ if(s.length <= w) return s;
+ var j = (s.length % w), o = s.substr(0,j);
+ for(; j!=s.length; j+=w) o+=(o.length > 0 ? "," : "") + s.substr(j,w);
+ return o;
+}
+var pct1 = /%/g;
+function write_num_pct(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
+ var sfmt = fmt.replace(pct1,""), mul = fmt.length - sfmt.length;
+ return write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill("%",mul);
+}
+
+function write_num_cm(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
+ var idx = fmt.length - 1;
+ while(fmt.charCodeAt(idx-1) === 44) --idx;
+ return write_num(type, fmt.substr(0,idx), val / Math.pow(10,3*(fmt.length-idx)));
+}
+
+function write_num_exp(fmt/*:string*/, val/*:number*/)/*:string*/{
+ var o/*:string*/;
+ var idx = fmt.indexOf("E") - fmt.indexOf(".") - 1;
+ if(fmt.match(/^#+0.0E\+0$/)) {
+ if(val == 0) return "0.0E+0";
+ else if(val < 0) return "-" + write_num_exp(fmt, -val);
+ var period = fmt.indexOf("."); if(period === -1) period=fmt.indexOf('E');
+ var ee = Math.floor(Math.log(val)*Math.LOG10E)%period;
+ if(ee < 0) ee += period;
+ o = (val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);
+ if(o.indexOf("e") === -1) {
+ var fakee = Math.floor(Math.log(val)*Math.LOG10E);
+ if(o.indexOf(".") === -1) o = o.charAt(0) + "." + o.substr(1) + "E+" + (fakee - o.length+ee);
+ else o += "E+" + (fakee - ee);
+ while(o.substr(0,2) === "0.") {
+ o = o.charAt(0) + o.substr(2,period) + "." + o.substr(2+period);
+ o = o.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");
+ }
+ o = o.replace(/\+-/,"-");
+ }
+ o = o.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(period+ee)%period) + "." + $3.substr(ee) + "E"; });
+ } else o = val.toExponential(idx);
+ if(fmt.match(/E\+00$/) && o.match(/e[+-]\d$/)) o = o.substr(0,o.length-1) + "0" + o.charAt(o.length-1);
+ if(fmt.match(/E\-/) && o.match(/e\+/)) o = o.replace(/e\+/,"e");
+ return o.replace("e","E");
+}
+var frac1 = /# (\?+)( ?)\/( ?)(\d+)/;
+function write_num_f1(r/*:Array*/, aval/*:number*/, sign/*:string*/)/*:string*/ {
+ var den = parseInt(r[4],10), rr = Math.round(aval * den), base = Math.floor(rr/den);
+ var myn = (rr - base*den), myd = den;
+ return sign + (base === 0 ? "" : ""+base) + " " + (myn === 0 ? fill(" ", r[1].length + 1 + r[4].length) : pad_(myn,r[1].length) + r[2] + "/" + r[3] + pad0(myd,r[4].length));
+}
+function write_num_f2(r/*:Array*/, aval/*:number*/, sign/*:string*/)/*:string*/ {
+ return sign + (aval === 0 ? "" : ""+aval) + fill(" ", r[1].length + 2 + r[4].length);
+}
+var dec1 = /^#*0*\.([0#]+)/;
+var closeparen = /\).*[0#]/;
+var phone = /\(###\) ###\\?-####/;
+function hashq(str/*:string*/)/*:string*/ {
+ var o = "", cc;
+ for(var i = 0; i != str.length; ++i) switch((cc=str.charCodeAt(i))) {
+ case 35: break;
+ case 63: o+= " "; break;
+ case 48: o+= "0"; break;
+ default: o+= String.fromCharCode(cc);
+ }
+ return o;
+}
+function rnd(val/*:number*/, d/*:number*/)/*:string*/ { var dd = Math.pow(10,d); return ""+(Math.round(val * dd)/dd); }
+function dec(val/*:number*/, d/*:number*/)/*:number*/ {
+ var _frac = val - Math.floor(val), dd = Math.pow(10,d);
+ if (d < ('' + Math.round(_frac * dd)).length) return 0;
+ return Math.round(_frac * dd);
+}
+function carry(val/*:number*/, d/*:number*/)/*:number*/ {
+ if (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {
+ return 1;
+ }
+ return 0;
+}
+function flr(val/*:number*/)/*:string*/ {
+ if(val < 2147483647 && val > -2147483648) return ""+(val >= 0 ? (val|0) : (val-1|0));
+ return ""+Math.floor(val);
+}
+function write_num_flt(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/ {
+ if(type.charCodeAt(0) === 40 && !fmt.match(closeparen)) {
+ var ffmt = fmt.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");
+ if(val >= 0) return write_num_flt('n', ffmt, val);
+ return '(' + write_num_flt('n', ffmt, -val) + ')';
+ }
+ if(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val);
+ if(fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val);
+ if(fmt.indexOf('E') !== -1) return write_num_exp(fmt, val);
+ if(fmt.charCodeAt(0) === 36) return "$"+write_num_flt(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);
+ var o;
+ var r/*:?Array*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? "-" : "";
+ if(fmt.match(/^00+$/)) return sign + pad0r(aval,fmt.length);
+ if(fmt.match(/^[#?]+$/)) {
+ o = pad0r(val,0); if(o === "0") o = "";
+ return o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;
+ }
+ if((r = fmt.match(frac1))) return write_num_f1(r, aval, sign);
+ if(fmt.match(/^#+0+$/)) return sign + pad0r(aval,fmt.length - fmt.indexOf("0"));
+ if((r = fmt.match(dec1))) {
+ o = rnd(val, r[1].length).replace(/^([^\.]+)$/,"$1."+hashq(r[1])).replace(/\.$/,"."+hashq(r[1])).replace(/\.(\d*)$/,function($$, $1) { return "." + $1 + fill("0", hashq(/*::(*/r/*::||[""])*/[1]).length-$1.length); });
+ return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./,".");
+ }
+ fmt = fmt.replace(/^#+([0.])/, "$1");
+ if((r = fmt.match(/^(0*)\.(#*)$/))) {
+ return sign + rnd(aval, r[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,r[1].length?"0.":".");
+ }
+ if((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify(pad0r(aval,0));
+ if((r = fmt.match(/^#,##0\.([#0]*0)$/))) {
+ return val < 0 ? "-" + write_num_flt(type, fmt, -val) : commaify(""+(Math.floor(val) + carry(val, r[1].length))) + "." + pad0(dec(val, r[1].length),r[1].length);
+ }
+ if((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type,fmt.replace(/^#,#*,/,""),val);
+ if((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) {
+ o = _strrev(write_num_flt(type, fmt.replace(/[\\-]/g,""), val));
+ ri = 0;
+ return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri= 0) return write_num_int('n', ffmt, val);
+ return '(' + write_num_int('n', ffmt, -val) + ')';
+ }
+ if(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val);
+ if(fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val);
+ if(fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val);
+ if(fmt.charCodeAt(0) === 36) return "$"+write_num_int(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);
+ var o;
+ var r/*:?Array*/, ri, ff, aval = Math.abs(val), sign = val < 0 ? "-" : "";
+ if(fmt.match(/^00+$/)) return sign + pad0(aval,fmt.length);
+ if(fmt.match(/^[#?]+$/)) {
+ o = (""+val); if(val === 0) o = "";
+ return o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;
+ }
+ if((r = fmt.match(frac1))) return write_num_f2(r, aval, sign);
+ if(fmt.match(/^#+0+$/)) return sign + pad0(aval,fmt.length - fmt.indexOf("0"));
+ if((r = fmt.match(dec1))) {
+ /*:: if(!Array.isArray(r)) throw new Error("unreachable"); */
+ o = (""+val).replace(/^([^\.]+)$/,"$1."+hashq(r[1])).replace(/\.$/,"."+hashq(r[1]));
+ o = o.replace(/\.(\d*)$/,function($$, $1) {
+ /*:: if(!Array.isArray(r)) throw new Error("unreachable"); */
+ return "." + $1 + fill("0", hashq(r[1]).length-$1.length); });
+ return fmt.indexOf("0.") !== -1 ? o : o.replace(/^0\./,".");
+ }
+ fmt = fmt.replace(/^#+([0.])/, "$1");
+ if((r = fmt.match(/^(0*)\.(#*)$/))) {
+ return sign + (""+aval).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,r[1].length?"0.":".");
+ }
+ if((r = fmt.match(/^#{1,3},##0(\.?)$/))) return sign + commaify((""+aval));
+ if((r = fmt.match(/^#,##0\.([#0]*0)$/))) {
+ return val < 0 ? "-" + write_num_int(type, fmt, -val) : commaify((""+val)) + "." + fill('0',r[1].length);
+ }
+ if((r = fmt.match(/^#,#*,#0/))) return write_num_int(type,fmt.replace(/^#,#*,/,""),val);
+ if((r = fmt.match(/^([0#]+)(\\?-([0#]+))+$/))) {
+ o = _strrev(write_num_int(type, fmt.replace(/[\\-]/g,""), val));
+ ri = 0;
+ return _strrev(_strrev(fmt.replace(/\\/g,"")).replace(/[0#]/g,function(x){return ri*/ {
+ var out/*:Array*/ = [];
+ var in_str = false/*, cc*/;
+ for(var i = 0, j = 0; i < fmt.length; ++i) switch((/*cc=*/fmt.charCodeAt(i))) {
+ case 34: /* '"' */
+ in_str = !in_str; break;
+ case 95: case 42: case 92: /* '_' '*' '\\' */
+ ++i; break;
+ case 59: /* ';' */
+ out[out.length] = fmt.substr(j,i-j);
+ j = i+1;
+ }
+ out[out.length] = fmt.substr(j);
+ if(in_str === true) throw new Error("Format |" + fmt + "| unterminated string ");
+ return out;
+}
+
+var SSF_abstime = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;
+function fmt_is_date(fmt/*:string*/)/*:boolean*/ {
+ var i = 0, /*cc = 0,*/ c = "", o = "";
+ while(i < fmt.length) {
+ switch((c = fmt.charAt(i))) {
+ case 'G': if(SSF_isgeneral(fmt, i)) i+= 6; i++; break;
+ case '"': for(;(/*cc=*/fmt.charCodeAt(++i)) !== 34 && i < fmt.length;){/*empty*/} ++i; break;
+ case '\\': i+=2; break;
+ case '_': i+=2; break;
+ case '@': ++i; break;
+ case 'B': case 'b':
+ if(fmt.charAt(i+1) === "1" || fmt.charAt(i+1) === "2") return true;
+ /* falls through */
+ case 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':
+ /* falls through */
+ case 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g': return true;
+ case 'A': case 'a': case '上':
+ if(fmt.substr(i, 3).toUpperCase() === "A/P") return true;
+ if(fmt.substr(i, 5).toUpperCase() === "AM/PM") return true;
+ if(fmt.substr(i, 5).toUpperCase() === "上午/下午") return true;
+ ++i; break;
+ case '[':
+ o = c;
+ while(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);
+ if(o.match(SSF_abstime)) return true;
+ break;
+ case '.':
+ /* falls through */
+ case '0': case '#':
+ while(i < fmt.length && ("0#?.,E+-%".indexOf(c=fmt.charAt(++i)) > -1 || (c=='\\' && fmt.charAt(i+1) == "-" && "0#".indexOf(fmt.charAt(i+2))>-1))){/* empty */}
+ break;
+ case '?': while(fmt.charAt(++i) === c){/* empty */} break;
+ case '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break;
+ case '(': case ')': ++i; break;
+ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
+ while(i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1){/* empty */} break;
+ case ' ': ++i; break;
+ default: ++i; break;
+ }
+ }
+ return false;
+}
+
+function eval_fmt(fmt/*:string*/, v/*:any*/, opts/*:any*/, flen/*:number*/) {
+ var out = [], o = "", i = 0, c = "", lst='t', dt, j, cc;
+ var hr='H';
+ /* Tokenize */
+ while(i < fmt.length) {
+ switch((c = fmt.charAt(i))) {
+ case 'G': /* General */
+ if(!SSF_isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' +fmt);
+ out[out.length] = {t:'G', v:'General'}; i+=7; break;
+ case '"': /* Literal text */
+ for(o="";(cc=fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc);
+ out[out.length] = {t:'t', v:o}; ++i; break;
+ case '\\': var w = fmt.charAt(++i), t = (w === "(" || w === ")") ? w : 't';
+ out[out.length] = {t:t, v:w}; ++i; break;
+ case '_': out[out.length] = {t:'t', v:" "}; i+=2; break;
+ case '@': /* Text Placeholder */
+ out[out.length] = {t:'T', v:v}; ++i; break;
+ case 'B': case 'b':
+ if(fmt.charAt(i+1) === "1" || fmt.charAt(i+1) === "2") {
+ if(dt==null) { dt=SSF_parse_date_code(v, opts, fmt.charAt(i+1) === "2"); if(dt==null) return ""; }
+ out[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break;
+ }
+ /* falls through */
+ case 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':
+ c = c.toLowerCase();
+ /* falls through */
+ case 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g':
+ if(v < 0) return "";
+ if(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return ""; }
+ o = c; while(++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o+=c;
+ if(c === 'm' && lst.toLowerCase() === 'h') c = 'M';
+ if(c === 'h') c = hr;
+ out[out.length] = {t:c, v:o}; lst = c; break;
+ case 'A': case 'a': case '上':
+ var q={t:c, v:c};
+ if(dt==null) dt=SSF_parse_date_code(v, opts);
+ if(fmt.substr(i, 3).toUpperCase() === "A/P") { if(dt!=null) q.v = dt.H >= 12 ? "P" : "A"; q.t = 'T'; hr='h';i+=3;}
+ else if(fmt.substr(i,5).toUpperCase() === "AM/PM") { if(dt!=null) q.v = dt.H >= 12 ? "PM" : "AM"; q.t = 'T'; i+=5; hr='h'; }
+ else if(fmt.substr(i,5).toUpperCase() === "上午/下午") { if(dt!=null) q.v = dt.H >= 12 ? "下午" : "上午"; q.t = 'T'; i+=5; hr='h'; }
+ else { q.t = "t"; ++i; }
+ if(dt==null && q.t === 'T') return "";
+ out[out.length] = q; lst = c; break;
+ case '[':
+ o = c;
+ while(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);
+ if(o.slice(-1) !== ']') throw 'unterminated "[" block: |' + o + '|';
+ if(o.match(SSF_abstime)) {
+ if(dt==null) { dt=SSF_parse_date_code(v, opts); if(dt==null) return ""; }
+ out[out.length] = {t:'Z', v:o.toLowerCase()};
+ lst = o.charAt(1);
+ } else if(o.indexOf("$") > -1) {
+ o = (o.match(/\$([^-\[\]]*)/)||[])[1]||"$";
+ if(!fmt_is_date(fmt)) out[out.length] = {t:'t',v:o};
+ }
+ break;
+ /* Numbers */
+ case '.':
+ if(dt != null) {
+ o = c; while(++i < fmt.length && (c=fmt.charAt(i)) === "0") o += c;
+ out[out.length] = {t:'s', v:o}; break;
+ }
+ /* falls through */
+ case '0': case '#':
+ o = c; while(++i < fmt.length && "0#?.,E+-%".indexOf(c=fmt.charAt(i)) > -1) o += c;
+ out[out.length] = {t:'n', v:o}; break;
+ case '?':
+ o = c; while(fmt.charAt(++i) === c) o+=c;
+ out[out.length] = {t:c, v:o}; lst = c; break;
+ case '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break; // **
+ case '(': case ')': out[out.length] = {t:(flen===1?'t':c), v:c}; ++i; break;
+ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
+ o = c; while(i < fmt.length && "0123456789".indexOf(fmt.charAt(++i)) > -1) o+=fmt.charAt(i);
+ out[out.length] = {t:'D', v:o}; break;
+ case ' ': out[out.length] = {t:c, v:c}; ++i; break;
+ case '$': out[out.length] = {t:'t', v:'$'}; ++i; break;
+ default:
+ if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt);
+ out[out.length] = {t:'t', v:c}; ++i; break;
+ }
+ }
+
+ /* Scan for date/time parts */
+ var bt = 0, ss0 = 0, ssm;
+ for(i=out.length-1, lst='t'; i >= 0; --i) {
+ switch(out[i].t) {
+ case 'h': case 'H': out[i].t = hr; lst='h'; if(bt < 1) bt = 1; break;
+ case 's':
+ if((ssm=out[i].v.match(/\.0+$/))) ss0=Math.max(ss0,ssm[0].length-1);
+ if(bt < 3) bt = 3;
+ /* falls through */
+ case 'd': case 'y': case 'M': case 'e': lst=out[i].t; break;
+ case 'm': if(lst === 's') { out[i].t = 'M'; if(bt < 2) bt = 2; } break;
+ case 'X': /*if(out[i].v === "B2");*/
+ break;
+ case 'Z':
+ if(bt < 1 && out[i].v.match(/[Hh]/)) bt = 1;
+ if(bt < 2 && out[i].v.match(/[Mm]/)) bt = 2;
+ if(bt < 3 && out[i].v.match(/[Ss]/)) bt = 3;
+ }
+ }
+ /* time rounding depends on presence of minute / second / usec fields */
+ switch(bt) {
+ case 0: break;
+ case 1:
+ /*::if(!dt) break;*/
+ if(dt.u >= 0.5) { dt.u = 0; ++dt.S; }
+ if(dt.S >= 60) { dt.S = 0; ++dt.M; }
+ if(dt.M >= 60) { dt.M = 0; ++dt.H; }
+ break;
+ case 2:
+ /*::if(!dt) break;*/
+ if(dt.u >= 0.5) { dt.u = 0; ++dt.S; }
+ if(dt.S >= 60) { dt.S = 0; ++dt.M; }
+ break;
+ }
+
+ /* replace fields */
+ var nstr = "", jj;
+ for(i=0; i < out.length; ++i) {
+ switch(out[i].t) {
+ case 't': case 'T': case ' ': case 'D': break;
+ case 'X': out[i].v = ""; out[i].t = ";"; break;
+ case 'd': case 'm': case 'y': case 'h': case 'H': case 'M': case 's': case 'e': case 'b': case 'Z':
+ /*::if(!dt) throw "unreachable"; */
+ out[i].v = SSF_write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0);
+ out[i].t = 't'; break;
+ case 'n': case '?':
+ jj = i+1;
+ while(out[jj] != null && (
+ (c=out[jj].t) === "?" || c === "D" ||
+ ((c === " " || c === "t") && out[jj+1] != null && (out[jj+1].t === '?' || out[jj+1].t === "t" && out[jj+1].v === '/')) ||
+ (out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) ||
+ (c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj+1] != null && out[jj+1].t == '?'))
+ )) {
+ out[i].v += out[jj].v;
+ out[jj] = {v:"", t:";"}; ++jj;
+ }
+ nstr += out[i].v;
+ i = jj-1; break;
+ case 'G': out[i].t = 't'; out[i].v = SSF_general(v,opts); break;
+ }
+ }
+ var vv = "", myv, ostr;
+ if(nstr.length > 0) {
+ if(nstr.charCodeAt(0) == 40) /* '(' */ {
+ myv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v);
+ ostr = write_num('n', nstr, myv);
+ } else {
+ myv = (v<0 && flen > 1 ? -v : v);
+ ostr = write_num('n', nstr, myv);
+ if(myv < 0 && out[0] && out[0].t == 't') {
+ ostr = ostr.substr(1);
+ out[0].v = "-" + out[0].v;
+ }
+ }
+ jj=ostr.length-1;
+ var decpt = out.length;
+ for(i=0; i < out.length; ++i) if(out[i] != null && out[i].t != 't' && out[i].v.indexOf(".") > -1) { decpt = i; break; }
+ var lasti=out.length;
+ if(decpt === out.length && ostr.indexOf("E") === -1) {
+ for(i=out.length-1; i>= 0;--i) {
+ if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;
+ if(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); }
+ else if(jj < 0) out[i].v = "";
+ else { out[i].v = ostr.substr(0, jj+1); jj = -1; }
+ out[i].t = 't';
+ lasti = i;
+ }
+ if(jj>=0 && lasti= 0; --i) {
+ if(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;
+ j=out[i].v.indexOf(".")>-1&&i===decpt?out[i].v.indexOf(".")-1:out[i].v.length-1;
+ vv = out[i].v.substr(j+1);
+ for(; j>=0; --j) {
+ if(jj>=0 && (out[i].v.charAt(j) === "0" || out[i].v.charAt(j) === "#")) vv = ostr.charAt(jj--) + vv;
+ }
+ out[i].v = vv;
+ out[i].t = 't';
+ lasti = i;
+ }
+ if(jj>=0 && lasti-1&&i===decpt?out[i].v.indexOf(".")+1:0;
+ vv = out[i].v.substr(0,j);
+ for(; j-1) {
+ myv = (flen >1 && v < 0 && i>0 && out[i-1].v === "-" ? -v:v);
+ out[i].v = write_num(out[i].t, out[i].v, myv);
+ out[i].t = 't';
+ }
+ var retval = "";
+ for(i=0; i !== out.length; ++i) if(out[i] != null) retval += out[i].v;
+ return retval;
+}
+
+var cfregex2 = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;
+function chkcond(v, rr) {
+ if(rr == null) return false;
+ var thresh = parseFloat(rr[2]);
+ switch(rr[1]) {
+ case "=": if(v == thresh) return true; break;
+ case ">": if(v > thresh) return true; break;
+ case "<": if(v < thresh) return true; break;
+ case "<>": if(v != thresh) return true; break;
+ case ">=": if(v >= thresh) return true; break;
+ case "<=": if(v <= thresh) return true; break;
+ }
+ return false;
+}
+function choose_fmt(f/*:string*/, v/*:any*/) {
+ var fmt = SSF_split_fmt(f);
+ var l = fmt.length, lat = fmt[l-1].indexOf("@");
+ if(l<4 && lat>-1) --l;
+ if(fmt.length > 4) throw new Error("cannot find right format for |" + fmt.join("|") + "|");
+ if(typeof v !== "number") return [4, fmt.length === 4 || lat>-1?fmt[fmt.length-1]:"@"];
+ switch(fmt.length) {
+ case 1: fmt = lat>-1 ? ["General", "General", "General", fmt[0]] : [fmt[0], fmt[0], fmt[0], "@"]; break;
+ case 2: fmt = lat>-1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], "@"]; break;
+ case 3: fmt = lat>-1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], "@"]; break;
+ case 4: break;
+ }
+ var ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2];
+ if(fmt[0].indexOf("[") === -1 && fmt[1].indexOf("[") === -1) return [l, ff];
+ if(fmt[0].match(/\[[=<>]/) != null || fmt[1].match(/\[[=<>]/) != null) {
+ var m1 = fmt[0].match(cfregex2);
+ var m2 = fmt[1].match(cfregex2);
+ return chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]];
+ }
+ return [l, ff];
+}
+function SSF_format(fmt/*:string|number*/,v/*:any*/,o/*:?any*/) {
+ if(o == null) o = {};
+ var sfmt = "";
+ switch(typeof fmt) {
+ case "string":
+ if(fmt == "m/d/yy" && o.dateNF) sfmt = o.dateNF;
+ else sfmt = fmt;
+ break;
+ case "number":
+ if(fmt == 14 && o.dateNF) sfmt = o.dateNF;
+ else sfmt = (o.table != null ? (o.table/*:any*/) : table_fmt)[fmt];
+ if(sfmt == null) sfmt = (o.table && o.table[SSF_default_map[fmt]]) || table_fmt[SSF_default_map[fmt]];
+ if(sfmt == null) sfmt = SSF_default_str[fmt] || "General";
+ break;
+ }
+ if(SSF_isgeneral(sfmt,0)) return SSF_general(v, o);
+ if(v instanceof Date) v = datenum_local(v, o.date1904);
+ var f = choose_fmt(sfmt, v);
+ if(SSF_isgeneral(f[1])) return SSF_general(v, o);
+ if(v === true) v = "TRUE"; else if(v === false) v = "FALSE";
+ else if(v === "" || v == null) return "";
+ return eval_fmt(f[1], v, o, f[0]);
+}
+function SSF_load(fmt/*:string*/, idx/*:?number*/)/*:number*/ {
+ if(typeof idx != 'number') {
+ idx = +idx || -1;
+/*::if(typeof idx != 'number') return 0x188; */
+ for(var i = 0; i < 0x0188; ++i) {
+/*::if(typeof idx != 'number') return 0x188; */
+ if(table_fmt[i] == undefined) { if(idx < 0) idx = i; continue; }
+ if(table_fmt[i] == fmt) { idx = i; break; }
+ }
+/*::if(typeof idx != 'number') return 0x188; */
+ if(idx < 0) idx = 0x187;
+ }
+/*::if(typeof idx != 'number') return 0x188; */
+ table_fmt[idx] = fmt;
+ return idx;
+}
+function SSF_load_table(tbl/*:SSFTable*/)/*:void*/ {
+ for(var i=0; i!=0x0188; ++i)
+ if(tbl[i] !== undefined) SSF_load(tbl[i], i);
+}
+
+function make_ssf() {
+ table_fmt = SSF_init_table();
+}
+
+var SSF = {
+ format: SSF_format,
+ load: SSF_load,
+ _table: table_fmt,
+ load_table: SSF_load_table,
+ parse_date_code: SSF_parse_date_code,
+ is_date: fmt_is_date,
+ get_table: function get_table() { return SSF._table = table_fmt; }
+};
+
+var SSFImplicit/*{[number]:string}*/ = ({
+ "5": '"$"#,##0_);\\("$"#,##0\\)',
+ "6": '"$"#,##0_);[Red]\\("$"#,##0\\)',
+ "7": '"$"#,##0.00_);\\("$"#,##0.00\\)',
+ "8": '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
+ "23": 'General', "24": 'General', "25": 'General', "26": 'General',
+ "27": 'm/d/yy', "28": 'm/d/yy', "29": 'm/d/yy', "30": 'm/d/yy', "31": 'm/d/yy',
+ "32": 'h:mm:ss', "33": 'h:mm:ss', "34": 'h:mm:ss', "35": 'h:mm:ss',
+ "36": 'm/d/yy',
+ "41": '_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)',
+ "42": '_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_)',
+ "43": '_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)',
+ "44": '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)',
+ "50": 'm/d/yy', "51": 'm/d/yy', "52": 'm/d/yy', "53": 'm/d/yy', "54": 'm/d/yy',
+ "55": 'm/d/yy', "56": 'm/d/yy', "57": 'm/d/yy', "58": 'm/d/yy',
+ "59": '0',
+ "60": '0.00',
+ "61": '#,##0',
+ "62": '#,##0.00',
+ "63": '"$"#,##0_);\\("$"#,##0\\)',
+ "64": '"$"#,##0_);[Red]\\("$"#,##0\\)',
+ "65": '"$"#,##0.00_);\\("$"#,##0.00\\)',
+ "66": '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
+ "67": '0%',
+ "68": '0.00%',
+ "69": '# ?/?',
+ "70": '# ??/??',
+ "71": 'm/d/yy',
+ "72": 'm/d/yy',
+ "73": 'd-mmm-yy',
+ "74": 'd-mmm',
+ "75": 'mmm-yy',
+ "76": 'h:mm',
+ "77": 'h:mm:ss',
+ "78": 'm/d/yy h:mm',
+ "79": 'mm:ss',
+ "80": '[h]:mm:ss',
+ "81": 'mmss.0'
+}/*:any*/);
+
+/* dateNF parse TODO: move to SSF */
+var dateNFregex = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;
+function dateNF_regex(dateNF/*:string|number*/)/*:RegExp*/ {
+ var fmt = typeof dateNF == "number" ? table_fmt[dateNF] : dateNF;
+ fmt = fmt.replace(dateNFregex, "(\\d+)");
+ return new RegExp("^" + fmt + "$");
+}
+function dateNF_fix(str/*:string*/, dateNF/*:string*/, match/*:Array*/)/*:string*/ {
+ var Y = -1, m = -1, d = -1, H = -1, M = -1, S = -1;
+ (dateNF.match(dateNFregex)||[]).forEach(function(n, i) {
+ var v = parseInt(match[i+1], 10);
+ switch(n.toLowerCase().charAt(0)) {
+ case 'y': Y = v; break; case 'd': d = v; break;
+ case 'h': H = v; break; case 's': S = v; break;
+ case 'm': if(H >= 0) M = v; else m = v; break;
+ }
+ });
+ if(S >= 0 && M == -1 && m >= 0) { M = m; m = -1; }
+ var datestr = (("" + (Y>=0?Y: new Date().getFullYear())).slice(-4) + "-" + ("00" + (m>=1?m:1)).slice(-2) + "-" + ("00" + (d>=1?d:1)).slice(-2));
+ if(datestr.length == 7) datestr = "0" + datestr;
+ if(datestr.length == 8) datestr = "20" + datestr;
+ var timestr = (("00" + (H>=0?H:0)).slice(-2) + ":" + ("00" + (M>=0?M:0)).slice(-2) + ":" + ("00" + (S>=0?S:0)).slice(-2));
+ if(H == -1 && M == -1 && S == -1) return datestr;
+ if(Y == -1 && m == -1 && d == -1) return timestr;
+ return datestr + "T" + timestr;
+}
+
+/*::
+declare var ReadShift:any;
+declare var CheckField:any;
+declare var prep_blob:any;
+declare var __readUInt32LE:any;
+declare var __readInt32LE:any;
+declare var __toBuffer:any;
+declare var __utf16le:any;
+declare var bconcat:any;
+declare var s2a:any;
+declare var chr0:any;
+declare var chr1:any;
+declare var has_buf:boolean;
+declare var new_buf:any;
+declare var new_raw_buf:any;
+declare var new_unsafe_buf:any;
+declare var Buffer_from:any;
+*/
+/* cfb.js (C) 2013-present SheetJS -- http://sheetjs.com */
+/* vim: set ts=2: */
+/*jshint eqnull:true */
+/*exported CFB */
+/*global Uint8Array:false, Uint16Array:false */
+
+/*::
+type SectorEntry = {
+ name?:string;
+ nodes?:Array;
+ data:RawBytes;
+};
+type SectorList = {
+ [k:string|number]:SectorEntry;
+ name:?string;
+ fat_addrs:Array;
+ ssz:number;
+}
+type CFBFiles = {[n:string]:CFBEntry};
+*/
+/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
+/* vim: set ts=2: */
+/*exported CRC32 */
+var CRC32 = /*#__PURE__*/(function() {
+var CRC32 = {};
+CRC32.version = '1.2.0';
+/* see perf/crc32table.js */
+/*global Int32Array */
+function signed_crc_table()/*:any*/ {
+ var c = 0, table/*:Array*/ = new Array(256);
+
+ for(var n =0; n != 256; ++n){
+ c = n;
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
+ table[n] = c;
+ }
+
+ return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
+}
+
+var T0 = signed_crc_table();
+function slice_by_16_tables(T) {
+ var c = 0, v = 0, n = 0, table/*:Array*/ = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;
+
+ for(n = 0; n != 256; ++n) table[n] = T[n];
+ for(n = 0; n != 256; ++n) {
+ v = T[n];
+ for(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];
+ }
+ var out = [];
+ for(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);
+ return out;
+}
+var TT = slice_by_16_tables(T0);
+var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];
+var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];
+var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];
+function crc32_bstr(bstr/*:string*/, seed/*:number*/)/*:number*/ {
+ var C = seed/*:: ? 0 : 0 */ ^ -1;
+ for(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];
+ return ~C;
+}
+
+function crc32_buf(B/*:Uint8Array|Array*/, seed/*:number*/)/*:number*/ {
+ var C = seed/*:: ? 0 : 0 */ ^ -1, L = B.length - 15, i = 0;
+ for(; i < L;) C =
+ Tf[B[i++] ^ (C & 255)] ^
+ Te[B[i++] ^ ((C >> 8) & 255)] ^
+ Td[B[i++] ^ ((C >> 16) & 255)] ^
+ Tc[B[i++] ^ (C >>> 24)] ^
+ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^
+ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^
+ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];
+ L += 15;
+ while(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];
+ return ~C;
+}
+
+function crc32_str(str/*:string*/, seed/*:number*/)/*:number*/ {
+ var C = seed ^ -1;
+ for(var i = 0, L = str.length, c = 0, d = 0; i < L;) {
+ c = str.charCodeAt(i++);
+ if(c < 0x80) {
+ C = (C>>>8) ^ T0[(C^c)&0xFF];
+ } else if(c < 0x800) {
+ C = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];
+ } else if(c >= 0xD800 && c < 0xE000) {
+ c = (c&1023)+64; d = str.charCodeAt(i++)&1023;
+ C = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];
+ } else {
+ C = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];
+ C = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];
+ }
+ }
+ return ~C;
+}
+CRC32.table = T0;
+CRC32.bstr = crc32_bstr;
+CRC32.buf = crc32_buf;
+CRC32.str = crc32_str;
+return CRC32;
+})();
+/* [MS-CFB] v20171201 */
+var CFB = /*#__PURE__*/(function _CFB(){
+var exports = {};
+exports.version = '1.2.1';
+/* [MS-CFB] 2.6.4 */
+function namecmp(l/*:string*/, r/*:string*/)/*:number*/ {
+ var L = l.split("/"), R = r.split("/");
+ for(var i = 0, c = 0, Z = Math.min(L.length, R.length); i < Z; ++i) {
+ if((c = L[i].length - R[i].length)) return c;
+ if(L[i] != R[i]) return L[i] < R[i] ? -1 : 1;
+ }
+ return L.length - R.length;
+}
+function dirname(p/*:string*/)/*:string*/ {
+ if(p.charAt(p.length - 1) == "/") return (p.slice(0,-1).indexOf("/") === -1) ? p : dirname(p.slice(0, -1));
+ var c = p.lastIndexOf("/");
+ return (c === -1) ? p : p.slice(0, c+1);
+}
+
+function filename(p/*:string*/)/*:string*/ {
+ if(p.charAt(p.length - 1) == "/") return filename(p.slice(0, -1));
+ var c = p.lastIndexOf("/");
+ return (c === -1) ? p : p.slice(c+1);
+}
+/* -------------------------------------------------------------------------- */
+/* DOS Date format:
+ high|YYYYYYYm.mmmddddd.HHHHHMMM.MMMSSSSS|low
+ add 1980 to stored year
+ stored second should be doubled
+*/
+
+/* write JS date to buf as a DOS date */
+function write_dos_date(buf/*:CFBlob*/, date/*:Date|string*/) {
+ if(typeof date === "string") date = new Date(date);
+ var hms/*:number*/ = date.getHours();
+ hms = hms << 6 | date.getMinutes();
+ hms = hms << 5 | (date.getSeconds()>>>1);
+ buf.write_shift(2, hms);
+ var ymd/*:number*/ = (date.getFullYear() - 1980);
+ ymd = ymd << 4 | (date.getMonth()+1);
+ ymd = ymd << 5 | date.getDate();
+ buf.write_shift(2, ymd);
+}
+
+/* read four bytes from buf and interpret as a DOS date */
+function parse_dos_date(buf/*:CFBlob*/)/*:Date*/ {
+ var hms = buf.read_shift(2) & 0xFFFF;
+ var ymd = buf.read_shift(2) & 0xFFFF;
+ var val = new Date();
+ var d = ymd & 0x1F; ymd >>>= 5;
+ var m = ymd & 0x0F; ymd >>>= 4;
+ val.setMilliseconds(0);
+ val.setFullYear(ymd + 1980);
+ val.setMonth(m-1);
+ val.setDate(d);
+ var S = hms & 0x1F; hms >>>= 5;
+ var M = hms & 0x3F; hms >>>= 6;
+ val.setHours(hms);
+ val.setMinutes(M);
+ val.setSeconds(S<<1);
+ return val;
+}
+function parse_extra_field(blob/*:CFBlob*/)/*:any*/ {
+ prep_blob(blob, 0);
+ var o = /*::(*/{}/*:: :any)*/;
+ var flags = 0;
+ while(blob.l <= blob.length - 4) {
+ var type = blob.read_shift(2);
+ var sz = blob.read_shift(2), tgt = blob.l + sz;
+ var p = {};
+ switch(type) {
+ /* UNIX-style Timestamps */
+ case 0x5455: {
+ flags = blob.read_shift(1);
+ if(flags & 1) p.mtime = blob.read_shift(4);
+ /* for some reason, CD flag corresponds to LFH */
+ if(sz > 5) {
+ if(flags & 2) p.atime = blob.read_shift(4);
+ if(flags & 4) p.ctime = blob.read_shift(4);
+ }
+ if(p.mtime) p.mt = new Date(p.mtime*1000);
+ }
+ break;
+ }
+ blob.l = tgt;
+ o[type] = p;
+ }
+ return o;
+}
+var fs/*:: = require('fs'); */;
+function get_fs() { return fs || (fs = {}); }
+function parse(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
+if(file[0] == 0x50 && file[1] == 0x4b) return parse_zip(file, options);
+if((file[0] | 0x20) == 0x6d && (file[1]|0x20) == 0x69) return parse_mad(file, options);
+if(file.length < 512) throw new Error("CFB file size " + file.length + " < 512");
+var mver = 3;
+var ssz = 512;
+var nmfs = 0; // number of mini FAT sectors
+var difat_sec_cnt = 0;
+var dir_start = 0;
+var minifat_start = 0;
+var difat_start = 0;
+
+var fat_addrs/*:Array*/ = []; // locations of FAT sectors
+
+/* [MS-CFB] 2.2 Compound File Header */
+var blob/*:CFBlob*/ = /*::(*/file.slice(0,512)/*:: :any)*/;
+prep_blob(blob, 0);
+
+/* major version */
+var mv = check_get_mver(blob);
+mver = mv[0];
+switch(mver) {
+ case 3: ssz = 512; break; case 4: ssz = 4096; break;
+ case 0: if(mv[1] == 0) return parse_zip(file, options);
+ /* falls through */
+ default: throw new Error("Major Version: Expected 3 or 4 saw " + mver);
+}
+
+/* reprocess header */
+if(ssz !== 512) { blob = /*::(*/file.slice(0,ssz)/*:: :any)*/; prep_blob(blob, 28 /* blob.l */); }
+/* Save header for final object */
+var header/*:RawBytes*/ = file.slice(0,ssz);
+
+check_shifts(blob, mver);
+
+// Number of Directory Sectors
+var dir_cnt/*:number*/ = blob.read_shift(4, 'i');
+if(mver === 3 && dir_cnt !== 0) throw new Error('# Directory Sectors: Expected 0 saw ' + dir_cnt);
+
+// Number of FAT Sectors
+blob.l += 4;
+
+// First Directory Sector Location
+dir_start = blob.read_shift(4, 'i');
+
+// Transaction Signature
+blob.l += 4;
+
+// Mini Stream Cutoff Size
+blob.chk('00100000', 'Mini Stream Cutoff Size: ');
+
+// First Mini FAT Sector Location
+minifat_start = blob.read_shift(4, 'i');
+
+// Number of Mini FAT Sectors
+nmfs = blob.read_shift(4, 'i');
+
+// First DIFAT sector location
+difat_start = blob.read_shift(4, 'i');
+
+// Number of DIFAT Sectors
+difat_sec_cnt = blob.read_shift(4, 'i');
+
+// Grab FAT Sector Locations
+for(var q = -1, j = 0; j < 109; ++j) { /* 109 = (512 - blob.l)>>>2; */
+ q = blob.read_shift(4, 'i');
+ if(q<0) break;
+ fat_addrs[j] = q;
+}
+
+/** Break the file up into sectors */
+var sectors/*:Array*/ = sectorify(file, ssz);
+
+sleuth_fat(difat_start, difat_sec_cnt, sectors, ssz, fat_addrs);
+
+/** Chains */
+var sector_list/*:SectorList*/ = make_sector_list(sectors, dir_start, fat_addrs, ssz);
+
+sector_list[dir_start].name = "!Directory";
+if(nmfs > 0 && minifat_start !== ENDOFCHAIN) sector_list[minifat_start].name = "!MiniFAT";
+sector_list[fat_addrs[0]].name = "!FAT";
+sector_list.fat_addrs = fat_addrs;
+sector_list.ssz = ssz;
+
+/* [MS-CFB] 2.6.1 Compound File Directory Entry */
+var files/*:CFBFiles*/ = {}, Paths/*:Array*/ = [], FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];
+read_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, minifat_start);
+
+build_full_paths(FileIndex, FullPaths, Paths);
+Paths.shift();
+
+var o = {
+ FileIndex: FileIndex,
+ FullPaths: FullPaths
+};
+
+// $FlowIgnore
+if(options && options.raw) o.raw = {header: header, sectors: sectors};
+return o;
+} // parse
+
+/* [MS-CFB] 2.2 Compound File Header -- read up to major version */
+function check_get_mver(blob/*:CFBlob*/)/*:[number, number]*/ {
+ if(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];
+ // header signature 8
+ blob.chk(HEADER_SIGNATURE, 'Header Signature: ');
+
+ // clsid 16
+ //blob.chk(HEADER_CLSID, 'CLSID: ');
+ blob.l += 16;
+
+ // minor version 2
+ var mver/*:number*/ = blob.read_shift(2, 'u');
+
+ return [blob.read_shift(2,'u'), mver];
+}
+function check_shifts(blob/*:CFBlob*/, mver/*:number*/)/*:void*/ {
+ var shift = 0x09;
+
+ // Byte Order
+ //blob.chk('feff', 'Byte Order: '); // note: some writers put 0xffff
+ blob.l += 2;
+
+ // Sector Shift
+ switch((shift = blob.read_shift(2))) {
+ case 0x09: if(mver != 3) throw new Error('Sector Shift: Expected 9 saw ' + shift); break;
+ case 0x0c: if(mver != 4) throw new Error('Sector Shift: Expected 12 saw ' + shift); break;
+ default: throw new Error('Sector Shift: Expected 9 or 12 saw ' + shift);
+ }
+
+ // Mini Sector Shift
+ blob.chk('0600', 'Mini Sector Shift: ');
+
+ // Reserved
+ blob.chk('000000000000', 'Reserved: ');
+}
+
+/** Break the file up into sectors */
+function sectorify(file/*:RawBytes*/, ssz/*:number*/)/*:Array*/ {
+ var nsectors = Math.ceil(file.length/ssz)-1;
+ var sectors/*:Array*/ = [];
+ for(var i=1; i < nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);
+ sectors[nsectors-1] = file.slice(nsectors*ssz);
+ return sectors;
+}
+
+/* [MS-CFB] 2.6.4 Red-Black Tree */
+function build_full_paths(FI/*:CFBFileIndex*/, FP/*:Array*/, Paths/*:Array*/)/*:void*/ {
+ var i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;
+ var dad/*:Array*/ = [], q/*:Array*/ = [];
+
+ for(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }
+
+ for(; j < q.length; ++j) {
+ i = q[j];
+ L = FI[i].L; R = FI[i].R; C = FI[i].C;
+ if(dad[i] === i) {
+ if(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];
+ if(R !== -1 && dad[R] !== R) dad[i] = dad[R];
+ }
+ if(C !== -1 /*NOSTREAM*/) dad[C] = i;
+ if(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }
+ if(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }
+ }
+ for(i=1; i < pl; ++i) if(dad[i] === i) {
+ if(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];
+ else if(L !== -1 && dad[L] !== L) dad[i] = dad[L];
+ }
+
+ for(i=1; i < pl; ++i) {
+ if(FI[i].type === 0 /* unknown */) continue;
+ j = i;
+ if(j != dad[j]) do {
+ j = dad[j];
+ FP[i] = FP[j] + "/" + FP[i];
+ } while (j !== 0 && -1 !== dad[j] && j != dad[j]);
+ dad[i] = -1;
+ }
+
+ FP[0] += "/";
+ for(i=1; i < pl; ++i) {
+ if(FI[i].type !== 2 /* stream */) FP[i] += "/";
+ }
+}
+
+function get_mfat_entry(entry/*:CFBEntry*/, payload/*:RawBytes*/, mini/*:?RawBytes*/)/*:CFBlob*/ {
+ var start = entry.start, size = entry.size;
+ //return (payload.slice(start*MSSZ, start*MSSZ + size)/*:any*/);
+ var o = [];
+ var idx = start;
+ while(mini && size > 0 && idx >= 0) {
+ o.push(payload.slice(idx * MSSZ, idx * MSSZ + MSSZ));
+ size -= MSSZ;
+ idx = __readInt32LE(mini, idx * 4);
+ }
+ if(o.length === 0) return (new_buf(0)/*:any*/);
+ return (bconcat(o).slice(0, entry.size)/*:any*/);
+}
+
+/** Chase down the rest of the DIFAT chain to build a comprehensive list
+ DIFAT chains by storing the next sector number as the last 32 bits */
+function sleuth_fat(idx/*:number*/, cnt/*:number*/, sectors/*:Array*/, ssz/*:number*/, fat_addrs)/*:void*/ {
+ var q/*:number*/ = ENDOFCHAIN;
+ if(idx === ENDOFCHAIN) {
+ if(cnt !== 0) throw new Error("DIFAT chain shorter than expected");
+ } else if(idx !== -1 /*FREESECT*/) {
+ var sector = sectors[idx], m = (ssz>>>2)-1;
+ if(!sector) return;
+ for(var i = 0; i < m; ++i) {
+ if((q = __readInt32LE(sector,i*4)) === ENDOFCHAIN) break;
+ fat_addrs.push(q);
+ }
+ sleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);
+ }
+}
+
+/** Follow the linked list of sectors for a given starting point */
+function get_sector_list(sectors/*:Array*/, start/*:number*/, fat_addrs/*:Array*/, ssz/*:number*/, chkd/*:?Array*/)/*:SectorEntry*/ {
+ var buf/*:Array*/ = [], buf_chain/*:Array*/ = [];
+ if(!chkd) chkd = [];
+ var modulus = ssz - 1, j = 0, jj = 0;
+ for(j=start; j>=0;) {
+ chkd[j] = true;
+ buf[buf.length] = j;
+ buf_chain.push(sectors[j]);
+ var addr = fat_addrs[Math.floor(j*4/ssz)];
+ jj = ((j*4) & modulus);
+ if(ssz < 4 + jj) throw new Error("FAT boundary crossed: " + j + " 4 "+ssz);
+ if(!sectors[addr]) break;
+ j = __readInt32LE(sectors[addr], jj);
+ }
+ return {nodes: buf, data:__toBuffer([buf_chain])};
+}
+
+/** Chase down the sector linked lists */
+function make_sector_list(sectors/*:Array*/, dir_start/*:number*/, fat_addrs/*:Array*/, ssz/*:number*/)/*:SectorList*/ {
+ var sl = sectors.length, sector_list/*:SectorList*/ = ([]/*:any*/);
+ var chkd/*:Array*/ = [], buf/*:Array*/ = [], buf_chain/*:Array*/ = [];
+ var modulus = ssz - 1, i=0, j=0, k=0, jj=0;
+ for(i=0; i < sl; ++i) {
+ buf = ([]/*:Array*/);
+ k = (i + dir_start); if(k >= sl) k-=sl;
+ if(chkd[k]) continue;
+ buf_chain = [];
+ var seen = [];
+ for(j=k; j>=0;) {
+ seen[j] = true;
+ chkd[j] = true;
+ buf[buf.length] = j;
+ buf_chain.push(sectors[j]);
+ var addr/*:number*/ = fat_addrs[Math.floor(j*4/ssz)];
+ jj = ((j*4) & modulus);
+ if(ssz < 4 + jj) throw new Error("FAT boundary crossed: " + j + " 4 "+ssz);
+ if(!sectors[addr]) break;
+ j = __readInt32LE(sectors[addr], jj);
+ if(seen[j]) break;
+ }
+ sector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])}/*:SectorEntry*/);
+ }
+ return sector_list;
+}
+
+/* [MS-CFB] 2.6.1 Compound File Directory Entry */
+function read_directory(dir_start/*:number*/, sector_list/*:SectorList*/, sectors/*:Array*/, Paths/*:Array*/, nmfs, files, FileIndex, mini) {
+ var minifat_store = 0, pl = (Paths.length?2:0);
+ var sector = sector_list[dir_start].data;
+ var i = 0, namelen = 0, name;
+ for(; i < sector.length; i+= 128) {
+ var blob/*:CFBlob*/ = /*::(*/sector.slice(i, i+128)/*:: :any)*/;
+ prep_blob(blob, 64);
+ namelen = blob.read_shift(2);
+ name = __utf16le(blob,0,namelen-pl);
+ Paths.push(name);
+ var o/*:CFBEntry*/ = ({
+ name: name,
+ type: blob.read_shift(1),
+ color: blob.read_shift(1),
+ L: blob.read_shift(4, 'i'),
+ R: blob.read_shift(4, 'i'),
+ C: blob.read_shift(4, 'i'),
+ clsid: blob.read_shift(16),
+ state: blob.read_shift(4, 'i'),
+ start: 0,
+ size: 0
+ });
+ var ctime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);
+ if(ctime !== 0) o.ct = read_date(blob, blob.l-8);
+ var mtime/*:number*/ = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);
+ if(mtime !== 0) o.mt = read_date(blob, blob.l-8);
+ o.start = blob.read_shift(4, 'i');
+ o.size = blob.read_shift(4, 'i');
+ if(o.size < 0 && o.start < 0) { o.size = o.type = 0; o.start = ENDOFCHAIN; o.name = ""; }
+ if(o.type === 5) { /* root */
+ minifat_store = o.start;
+ if(nmfs > 0 && minifat_store !== ENDOFCHAIN) sector_list[minifat_store].name = "!StreamData";
+ /*minifat_size = o.size;*/
+ } else if(o.size >= 4096 /* MSCSZ */) {
+ o.storage = 'fat';
+ if(sector_list[o.start] === undefined) sector_list[o.start] = get_sector_list(sectors, o.start, sector_list.fat_addrs, sector_list.ssz);
+ sector_list[o.start].name = o.name;
+ o.content = (sector_list[o.start].data.slice(0,o.size)/*:any*/);
+ } else {
+ o.storage = 'minifat';
+ if(o.size < 0) o.size = 0;
+ else if(minifat_store !== ENDOFCHAIN && o.start !== ENDOFCHAIN && sector_list[minifat_store]) {
+ o.content = get_mfat_entry(o, sector_list[minifat_store].data, (sector_list[mini]||{}).data);
+ }
+ }
+ if(o.content) prep_blob(o.content, 0);
+ files[name] = o;
+ FileIndex.push(o);
+ }
+}
+
+function read_date(blob/*:RawBytes|CFBlob*/, offset/*:number*/)/*:Date*/ {
+ return new Date(( ( (__readUInt32LE(blob,offset+4)/1e7)*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7 ) - 11644473600)*1000);
+}
+
+function read_file(filename/*:string*/, options/*:CFBReadOpts*/) {
+ get_fs();
+ return parse(fs.readFileSync(filename), options);
+}
+
+function read(blob/*:RawBytes|string*/, options/*:CFBReadOpts*/) {
+ var type = options && options.type;
+ if(!type) {
+ if(has_buf && Buffer.isBuffer(blob)) type = "buffer";
+ }
+ switch(type || "base64") {
+ case "file": /*:: if(typeof blob !== 'string') throw "Must pass a filename when type='file'"; */return read_file(blob, options);
+ case "base64": /*:: if(typeof blob !== 'string') throw "Must pass a base64-encoded binary string when type='file'"; */return parse(s2a(Base64_decode(blob)), options);
+ case "binary": /*:: if(typeof blob !== 'string') throw "Must pass a binary string when type='file'"; */return parse(s2a(blob), options);
+ }
+ return parse(/*::typeof blob == 'string' ? new Buffer(blob, 'utf-8') : */blob, options);
+}
+
+function init_cfb(cfb/*:CFBContainer*/, opts/*:?any*/)/*:void*/ {
+ var o = opts || {}, root = o.root || "Root Entry";
+ if(!cfb.FullPaths) cfb.FullPaths = [];
+ if(!cfb.FileIndex) cfb.FileIndex = [];
+ if(cfb.FullPaths.length !== cfb.FileIndex.length) throw new Error("inconsistent CFB structure");
+ if(cfb.FullPaths.length === 0) {
+ cfb.FullPaths[0] = root + "/";
+ cfb.FileIndex[0] = ({ name: root, type: 5 }/*:any*/);
+ }
+ if(o.CLSID) cfb.FileIndex[0].clsid = o.CLSID;
+ seed_cfb(cfb);
+}
+function seed_cfb(cfb/*:CFBContainer*/)/*:void*/ {
+ var nm = "\u0001Sh33tJ5";
+ if(CFB.find(cfb, "/" + nm)) return;
+ var p = new_buf(4); p[0] = 55; p[1] = p[3] = 50; p[2] = 54;
+ cfb.FileIndex.push(({ name: nm, type: 2, content:p, size:4, L:69, R:69, C:69 }/*:any*/));
+ cfb.FullPaths.push(cfb.FullPaths[0] + nm);
+ rebuild_cfb(cfb);
+}
+function rebuild_cfb(cfb/*:CFBContainer*/, f/*:?boolean*/)/*:void*/ {
+ init_cfb(cfb);
+ var gc = false, s = false;
+ for(var i = cfb.FullPaths.length - 1; i >= 0; --i) {
+ var _file = cfb.FileIndex[i];
+ switch(_file.type) {
+ case 0:
+ if(s) gc = true;
+ else { cfb.FileIndex.pop(); cfb.FullPaths.pop(); }
+ break;
+ case 1: case 2: case 5:
+ s = true;
+ if(isNaN(_file.R * _file.L * _file.C)) gc = true;
+ if(_file.R > -1 && _file.L > -1 && _file.R == _file.L) gc = true;
+ break;
+ default: gc = true; break;
+ }
+ }
+ if(!gc && !f) return;
+
+ var now = new Date(1987, 1, 19), j = 0;
+ // Track which names exist
+ var fullPaths = Object.create ? Object.create(null) : {};
+ var data/*:Array<[string, CFBEntry]>*/ = [];
+ for(i = 0; i < cfb.FullPaths.length; ++i) {
+ fullPaths[cfb.FullPaths[i]] = true;
+ if(cfb.FileIndex[i].type === 0) continue;
+ data.push([cfb.FullPaths[i], cfb.FileIndex[i]]);
+ }
+ for(i = 0; i < data.length; ++i) {
+ var dad = dirname(data[i][0]);
+ s = fullPaths[dad];
+ if(!s) {
+ data.push([dad, ({
+ name: filename(dad).replace("/",""),
+ type: 1,
+ clsid: HEADER_CLSID,
+ ct: now, mt: now,
+ content: null
+ }/*:any*/)]);
+ // Add name to set
+ fullPaths[dad] = true;
+ }
+ }
+
+ data.sort(function(x,y) { return namecmp(x[0], y[0]); });
+ cfb.FullPaths = []; cfb.FileIndex = [];
+ for(i = 0; i < data.length; ++i) { cfb.FullPaths[i] = data[i][0]; cfb.FileIndex[i] = data[i][1]; }
+ for(i = 0; i < data.length; ++i) {
+ var elt = cfb.FileIndex[i];
+ var nm = cfb.FullPaths[i];
+
+ elt.name = filename(nm).replace("/","");
+ elt.L = elt.R = elt.C = -(elt.color = 1);
+ elt.size = elt.content ? elt.content.length : 0;
+ elt.start = 0;
+ elt.clsid = (elt.clsid || HEADER_CLSID);
+ if(i === 0) {
+ elt.C = data.length > 1 ? 1 : -1;
+ elt.size = 0;
+ elt.type = 5;
+ } else if(nm.slice(-1) == "/") {
+ for(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==nm) break;
+ elt.C = j >= data.length ? -1 : j;
+ for(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==dirname(nm)) break;
+ elt.R = j >= data.length ? -1 : j;
+ elt.type = 1;
+ } else {
+ if(dirname(cfb.FullPaths[i+1]||"") == dirname(nm)) elt.R = i + 1;
+ elt.type = 2;
+ }
+ }
+
+}
+
+function _write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {
+ var _opts = options || {};
+ /* MAD is order-sensitive, skip rebuild and sort */
+ if(_opts.fileType == 'mad') return write_mad(cfb, _opts);
+ rebuild_cfb(cfb);
+ switch(_opts.fileType) {
+ case 'zip': return write_zip(cfb, _opts);
+ //case 'mad': return write_mad(cfb, _opts);
+ }
+ var L = (function(cfb/*:CFBContainer*/)/*:Array*/{
+ var mini_size = 0, fat_size = 0;
+ for(var i = 0; i < cfb.FileIndex.length; ++i) {
+ var file = cfb.FileIndex[i];
+ if(!file.content) continue;
+ /*:: if(file.content == null) throw new Error("unreachable"); */
+ var flen = file.content.length;
+ if(flen > 0){
+ if(flen < 0x1000) mini_size += (flen + 0x3F) >> 6;
+ else fat_size += (flen + 0x01FF) >> 9;
+ }
+ }
+ var dir_cnt = (cfb.FullPaths.length +3) >> 2;
+ var mini_cnt = (mini_size + 7) >> 3;
+ var mfat_cnt = (mini_size + 0x7F) >> 7;
+ var fat_base = mini_cnt + fat_size + dir_cnt + mfat_cnt;
+ var fat_cnt = (fat_base + 0x7F) >> 7;
+ var difat_cnt = fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);
+ while(((fat_base + fat_cnt + difat_cnt + 0x7F) >> 7) > fat_cnt) difat_cnt = ++fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);
+ var L = [1, difat_cnt, fat_cnt, mfat_cnt, dir_cnt, fat_size, mini_size, 0];
+ cfb.FileIndex[0].size = mini_size << 6;
+ L[7] = (cfb.FileIndex[0].start=L[0]+L[1]+L[2]+L[3]+L[4]+L[5])+((L[6]+7) >> 3);
+ return L;
+ })(cfb);
+ var o = new_buf(L[7] << 9);
+ var i = 0, T = 0;
+ {
+ for(i = 0; i < 8; ++i) o.write_shift(1, HEADER_SIG[i]);
+ for(i = 0; i < 8; ++i) o.write_shift(2, 0);
+ o.write_shift(2, 0x003E);
+ o.write_shift(2, 0x0003);
+ o.write_shift(2, 0xFFFE);
+ o.write_shift(2, 0x0009);
+ o.write_shift(2, 0x0006);
+ for(i = 0; i < 3; ++i) o.write_shift(2, 0);
+ o.write_shift(4, 0);
+ o.write_shift(4, L[2]);
+ o.write_shift(4, L[0] + L[1] + L[2] + L[3] - 1);
+ o.write_shift(4, 0);
+ o.write_shift(4, 1<<12);
+ o.write_shift(4, L[3] ? L[0] + L[1] + L[2] - 1: ENDOFCHAIN);
+ o.write_shift(4, L[3]);
+ o.write_shift(-4, L[1] ? L[0] - 1: ENDOFCHAIN);
+ o.write_shift(4, L[1]);
+ for(i = 0; i < 109; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);
+ }
+ if(L[1]) {
+ for(T = 0; T < L[1]; ++T) {
+ for(; i < 236 + T * 127; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);
+ o.write_shift(-4, T === L[1] - 1 ? ENDOFCHAIN : T + 1);
+ }
+ }
+ var chainit = function(w/*:number*/)/*:void*/ {
+ for(T += w; i> 9);
+ }
+ chainit((L[6] + 7) >> 3);
+ while(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);
+ T = i = 0;
+ for(j = 0; j < cfb.FileIndex.length; ++j) {
+ file = cfb.FileIndex[j];
+ if(!file.content) continue;
+ /*:: if(file.content == null) throw new Error("unreachable"); */
+ flen = file.content.length;
+ if(!flen || flen >= 0x1000) continue;
+ file.start = T;
+ chainit((flen + 0x3F) >> 6);
+ }
+ while(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);
+ for(i = 0; i < L[4]<<2; ++i) {
+ var nm = cfb.FullPaths[i];
+ if(!nm || nm.length === 0) {
+ for(j = 0; j < 17; ++j) o.write_shift(4, 0);
+ for(j = 0; j < 3; ++j) o.write_shift(4, -1);
+ for(j = 0; j < 12; ++j) o.write_shift(4, 0);
+ continue;
+ }
+ file = cfb.FileIndex[i];
+ if(i === 0) file.start = file.size ? file.start - 1 : ENDOFCHAIN;
+ var _nm/*:string*/ = (i === 0 && _opts.root) || file.name;
+ flen = 2*(_nm.length+1);
+ o.write_shift(64, _nm, "utf16le");
+ o.write_shift(2, flen);
+ o.write_shift(1, file.type);
+ o.write_shift(1, file.color);
+ o.write_shift(-4, file.L);
+ o.write_shift(-4, file.R);
+ o.write_shift(-4, file.C);
+ if(!file.clsid) for(j = 0; j < 4; ++j) o.write_shift(4, 0);
+ else o.write_shift(16, file.clsid, "hex");
+ o.write_shift(4, file.state || 0);
+ o.write_shift(4, 0); o.write_shift(4, 0);
+ o.write_shift(4, 0); o.write_shift(4, 0);
+ o.write_shift(4, file.start);
+ o.write_shift(4, file.size); o.write_shift(4, 0);
+ }
+ for(i = 1; i < cfb.FileIndex.length; ++i) {
+ file = cfb.FileIndex[i];
+ /*:: if(!file.content) throw new Error("unreachable"); */
+ if(file.size >= 0x1000) {
+ o.l = (file.start+1) << 9;
+ if (has_buf && Buffer.isBuffer(file.content)) {
+ file.content.copy(o, o.l, 0, file.size);
+ // o is a 0-filled Buffer so just set next offset
+ o.l += (file.size + 511) & -512;
+ } else {
+ for(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);
+ for(; j & 0x1FF; ++j) o.write_shift(1, 0);
+ }
+ }
+ }
+ for(i = 1; i < cfb.FileIndex.length; ++i) {
+ file = cfb.FileIndex[i];
+ /*:: if(!file.content) throw new Error("unreachable"); */
+ if(file.size > 0 && file.size < 0x1000) {
+ if (has_buf && Buffer.isBuffer(file.content)) {
+ file.content.copy(o, o.l, 0, file.size);
+ // o is a 0-filled Buffer so just set next offset
+ o.l += (file.size + 63) & -64;
+ } else {
+ for(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);
+ for(; j & 0x3F; ++j) o.write_shift(1, 0);
+ }
+ }
+ }
+ if (has_buf) {
+ o.l = o.length;
+ } else {
+ // When using Buffer, already 0-filled
+ while(o.l < o.length) o.write_shift(1, 0);
+ }
+ return o;
+}
+/* [MS-CFB] 2.6.4 (Unicode 3.0.1 case conversion) */
+function find(cfb/*:CFBContainer*/, path/*:string*/)/*:?CFBEntry*/ {
+ var UCFullPaths/*:Array*/ = cfb.FullPaths.map(function(x) { return x.toUpperCase(); });
+ var UCPaths/*:Array*/ = UCFullPaths.map(function(x) { var y = x.split("/"); return y[y.length - (x.slice(-1) == "/" ? 2 : 1)]; });
+ var k/*:boolean*/ = false;
+ if(path.charCodeAt(0) === 47 /* "/" */) { k = true; path = UCFullPaths[0].slice(0, -1) + path; }
+ else k = path.indexOf("/") !== -1;
+ var UCPath/*:string*/ = path.toUpperCase();
+ var w/*:number*/ = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);
+ if(w !== -1) return cfb.FileIndex[w];
+
+ var m = !UCPath.match(chr1);
+ UCPath = UCPath.replace(chr0,'');
+ if(m) UCPath = UCPath.replace(chr1,'!');
+ for(w = 0; w < UCFullPaths.length; ++w) {
+ if((m ? UCFullPaths[w].replace(chr1,'!') : UCFullPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];
+ if((m ? UCPaths[w].replace(chr1,'!') : UCPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];
+ }
+ return null;
+}
+/** CFB Constants */
+var MSSZ = 64; /* Mini Sector Size = 1<<6 */
+//var MSCSZ = 4096; /* Mini Stream Cutoff Size */
+/* 2.1 Compound File Sector Numbers and Types */
+var ENDOFCHAIN = -2;
+/* 2.2 Compound File Header */
+var HEADER_SIGNATURE = 'd0cf11e0a1b11ae1';
+var HEADER_SIG = [0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1];
+var HEADER_CLSID = '00000000000000000000000000000000';
+var consts = {
+ /* 2.1 Compund File Sector Numbers and Types */
+ MAXREGSECT: -6,
+ DIFSECT: -4,
+ FATSECT: -3,
+ ENDOFCHAIN: ENDOFCHAIN,
+ FREESECT: -1,
+ /* 2.2 Compound File Header */
+ HEADER_SIGNATURE: HEADER_SIGNATURE,
+ HEADER_MINOR_VERSION: '3e00',
+ MAXREGSID: -6,
+ NOSTREAM: -1,
+ HEADER_CLSID: HEADER_CLSID,
+ /* 2.6.1 Compound File Directory Entry */
+ EntryTypes: ['unknown','storage','stream','lockbytes','property','root']
+};
+
+function write_file(cfb/*:CFBContainer*/, filename/*:string*/, options/*:CFBWriteOpts*/)/*:void*/ {
+ get_fs();
+ var o = _write(cfb, options);
+ /*:: if(typeof Buffer == 'undefined' || !Buffer.isBuffer(o) || !(o instanceof Buffer)) throw new Error("unreachable"); */
+ fs.writeFileSync(filename, o);
+}
+
+function a2s(o/*:RawBytes*/)/*:string*/ {
+ var out = new Array(o.length);
+ for(var i = 0; i < o.length; ++i) out[i] = String.fromCharCode(o[i]);
+ return out.join("");
+}
+
+function write(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes|string*/ {
+ var o = _write(cfb, options);
+ switch(options && options.type || "buffer") {
+ case "file": get_fs(); fs.writeFileSync(options.filename, (o/*:any*/)); return o;
+ case "binary": return typeof o == "string" ? o : a2s(o);
+ case "base64": return Base64_encode(typeof o == "string" ? o : a2s(o));
+ case "buffer": if(has_buf) return Buffer.isBuffer(o) ? o : Buffer_from(o);
+ /* falls through */
+ case "array": return typeof o == "string" ? s2a(o) : o;
+ }
+ return o;
+}
+/* node < 8.1 zlib does not expose bytesRead, so default to pure JS */
+var _zlib;
+function use_zlib(zlib) { try {
+ var InflateRaw = zlib.InflateRaw;
+ var InflRaw = new InflateRaw();
+ InflRaw._processChunk(new Uint8Array([3, 0]), InflRaw._finishFlushFlag);
+ if(InflRaw.bytesRead) _zlib = zlib;
+ else throw new Error("zlib does not expose bytesRead");
+} catch(e) {console.error("cannot use native zlib: " + (e.message || e)); } }
+
+function _inflateRawSync(payload, usz) {
+ if(!_zlib) return _inflate(payload, usz);
+ var InflateRaw = _zlib.InflateRaw;
+ var InflRaw = new InflateRaw();
+ var out = InflRaw._processChunk(payload.slice(payload.l), InflRaw._finishFlushFlag);
+ payload.l += InflRaw.bytesRead;
+ return out;
+}
+
+function _deflateRawSync(payload) {
+ return _zlib ? _zlib.deflateRawSync(payload) : _deflate(payload);
+}
+var CLEN_ORDER = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
+
+/* LEN_ID = [ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285 ]; */
+var LEN_LN = [ 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 ];
+
+/* DST_ID = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 ]; */
+var DST_LN = [ 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 ];
+
+function bit_swap_8(n) { var t = (((((n<<1)|(n<<11)) & 0x22110) | (((n<<5)|(n<<15)) & 0x88440))); return ((t>>16) | (t>>8) |t)&0xFF; }
+
+var use_typed_arrays = typeof Uint8Array !== 'undefined';
+
+var bitswap8 = use_typed_arrays ? new Uint8Array(1<<8) : [];
+for(var q = 0; q < (1<<8); ++q) bitswap8[q] = bit_swap_8(q);
+
+function bit_swap_n(n, b) {
+ var rev = bitswap8[n & 0xFF];
+ if(b <= 8) return rev >>> (8-b);
+ rev = (rev << 8) | bitswap8[(n>>8)&0xFF];
+ if(b <= 16) return rev >>> (16-b);
+ rev = (rev << 8) | bitswap8[(n>>16)&0xFF];
+ return rev >>> (24-b);
+}
+
+/* helpers for unaligned bit reads */
+function read_bits_2(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 6 ? 0 : buf[h+1]<<8))>>>w)& 0x03; }
+function read_bits_3(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 5 ? 0 : buf[h+1]<<8))>>>w)& 0x07; }
+function read_bits_4(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 4 ? 0 : buf[h+1]<<8))>>>w)& 0x0F; }
+function read_bits_5(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 3 ? 0 : buf[h+1]<<8))>>>w)& 0x1F; }
+function read_bits_7(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 1 ? 0 : buf[h+1]<<8))>>>w)& 0x7F; }
+
+/* works up to n = 3 * 8 + 1 = 25 */
+function read_bits_n(buf, bl, n) {
+ var w = (bl&7), h = (bl>>>3), f = ((1<>> w;
+ if(n < 8 - w) return v & f;
+ v |= buf[h+1]<<(8-w);
+ if(n < 16 - w) return v & f;
+ v |= buf[h+2]<<(16-w);
+ if(n < 24 - w) return v & f;
+ v |= buf[h+3]<<(24-w);
+ return v & f;
+}
+
+/* helpers for unaligned bit writes */
+function write_bits_3(buf, bl, v) { var w = bl & 7, h = bl >>> 3;
+ if(w <= 5) buf[h] |= (v & 7) << w;
+ else {
+ buf[h] |= (v << w) & 0xFF;
+ buf[h+1] = (v&7) >> (8-w);
+ }
+ return bl + 3;
+}
+
+function write_bits_1(buf, bl, v) {
+ var w = bl & 7, h = bl >>> 3;
+ v = (v&1) << w;
+ buf[h] |= v;
+ return bl + 1;
+}
+function write_bits_8(buf, bl, v) {
+ var w = bl & 7, h = bl >>> 3;
+ v <<= w;
+ buf[h] |= v & 0xFF; v >>>= 8;
+ buf[h+1] = v;
+ return bl + 8;
+}
+function write_bits_16(buf, bl, v) {
+ var w = bl & 7, h = bl >>> 3;
+ v <<= w;
+ buf[h] |= v & 0xFF; v >>>= 8;
+ buf[h+1] = v & 0xFF;
+ buf[h+2] = v >>> 8;
+ return bl + 16;
+}
+
+/* until ArrayBuffer#realloc is a thing, fake a realloc */
+function realloc(b, sz/*:number*/) {
+ var L = b.length, M = 2*L > sz ? 2*L : sz + 5, i = 0;
+ if(L >= sz) return b;
+ if(has_buf) {
+ var o = new_unsafe_buf(M);
+ // $FlowIgnore
+ if(b.copy) b.copy(o);
+ else for(; i < b.length; ++i) o[i] = b[i];
+ return o;
+ } else if(use_typed_arrays) {
+ var a = new Uint8Array(M);
+ if(a.set) a.set(b);
+ else for(; i < L; ++i) a[i] = b[i];
+ return a;
+ }
+ b.length = M;
+ return b;
+}
+
+/* zero-filled arrays for older browsers */
+function zero_fill_array(n) {
+ var o = new Array(n);
+ for(var i = 0; i < n; ++i) o[i] = 0;
+ return o;
+}
+
+/* build tree (used for literals and lengths) */
+function build_tree(clens, cmap, MAX/*:number*/)/*:number*/ {
+ var maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length;
+
+ var bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32);
+ for(i = 0; i < 32; ++i) bl_count[i] = 0;
+
+ for(i = L; i < MAX; ++i) clens[i] = 0;
+ L = clens.length;
+
+ var ctree = use_typed_arrays ? new Uint16Array(L) : zero_fill_array(L); // []
+
+ /* build code tree */
+ for(i = 0; i < L; ++i) {
+ bl_count[(w = clens[i])]++;
+ if(maxlen < w) maxlen = w;
+ ctree[i] = 0;
+ }
+ bl_count[0] = 0;
+ for(i = 1; i <= maxlen; ++i) bl_count[i+16] = (ccode = (ccode + bl_count[i-1])<<1);
+ for(i = 0; i < L; ++i) {
+ ccode = clens[i];
+ if(ccode != 0) ctree[i] = bl_count[ccode+16]++;
+ }
+
+ /* cmap[maxlen + 4 bits] = (off&15) + (lit<<4) reverse mapping */
+ var cleni = 0;
+ for(i = 0; i < L; ++i) {
+ cleni = clens[i];
+ if(cleni != 0) {
+ ccode = bit_swap_n(ctree[i], maxlen)>>(maxlen-cleni);
+ for(j = (1<<(maxlen + 4 - cleni)) - 1; j>=0; --j)
+ cmap[ccode|(j<*/ = [];
+ var i = 0;
+ for(;i<32; i++) dlens.push(5);
+ build_tree(dlens, fix_dmap, 32);
+
+ var clens/*:Array*/ = [];
+ i = 0;
+ for(; i<=143; i++) clens.push(8);
+ for(; i<=255; i++) clens.push(9);
+ for(; i<=279; i++) clens.push(7);
+ for(; i<=287; i++) clens.push(8);
+ build_tree(clens, fix_lmap, 288);
+})();var _deflateRaw = /*#__PURE__*/(function _deflateRawIIFE() {
+ var DST_LN_RE = use_typed_arrays ? new Uint8Array(0x8000) : [];
+ var j = 0, k = 0;
+ for(; j < DST_LN.length - 1; ++j) {
+ for(; k < DST_LN[j+1]; ++k) DST_LN_RE[k] = j;
+ }
+ for(;k < 32768; ++k) DST_LN_RE[k] = 29;
+
+ var LEN_LN_RE = use_typed_arrays ? new Uint8Array(0x103) : [];
+ for(j = 0, k = 0; j < LEN_LN.length - 1; ++j) {
+ for(; k < LEN_LN[j+1]; ++k) LEN_LN_RE[k] = j;
+ }
+
+ function write_stored(data, out) {
+ var boff = 0;
+ while(boff < data.length) {
+ var L = Math.min(0xFFFF, data.length - boff);
+ var h = boff + L == data.length;
+ out.write_shift(1, +h);
+ out.write_shift(2, L);
+ out.write_shift(2, (~L) & 0xFFFF);
+ while(L-- > 0) out[out.l++] = data[boff++];
+ }
+ return out.l;
+ }
+
+ /* Fixed Huffman */
+ function write_huff_fixed(data, out) {
+ var bl = 0;
+ var boff = 0;
+ var addrs = use_typed_arrays ? new Uint16Array(0x8000) : [];
+ while(boff < data.length) {
+ var L = /* data.length - boff; */ Math.min(0xFFFF, data.length - boff);
+
+ /* write a stored block for short data */
+ if(L < 10) {
+ bl = write_bits_3(out, bl, +!!(boff + L == data.length)); // jshint ignore:line
+ if(bl & 7) bl += 8 - (bl & 7);
+ out.l = (bl / 8) | 0;
+ out.write_shift(2, L);
+ out.write_shift(2, (~L) & 0xFFFF);
+ while(L-- > 0) out[out.l++] = data[boff++];
+ bl = out.l * 8;
+ continue;
+ }
+
+ bl = write_bits_3(out, bl, +!!(boff + L == data.length) + 2); // jshint ignore:line
+ var hash = 0;
+ while(L-- > 0) {
+ var d = data[boff];
+ hash = ((hash << 5) ^ d) & 0x7FFF;
+
+ var match = -1, mlen = 0;
+
+ if((match = addrs[hash])) {
+ match |= boff & ~0x7FFF;
+ if(match > boff) match -= 0x8000;
+ if(match < boff) while(data[match + mlen] == data[boff + mlen] && mlen < 250) ++mlen;
+ }
+
+ if(mlen > 2) {
+ /* Copy Token */
+ d = LEN_LN_RE[mlen];
+ if(d <= 22) bl = write_bits_8(out, bl, bitswap8[d+1]>>1) - 1;
+ else {
+ write_bits_8(out, bl, 3);
+ bl += 5;
+ write_bits_8(out, bl, bitswap8[d-23]>>5);
+ bl += 3;
+ }
+ var len_eb = (d < 8) ? 0 : ((d - 4)>>2);
+ if(len_eb > 0) {
+ write_bits_16(out, bl, mlen - LEN_LN[d]);
+ bl += len_eb;
+ }
+
+ d = DST_LN_RE[boff - match];
+ bl = write_bits_8(out, bl, bitswap8[d]>>3);
+ bl -= 3;
+
+ var dst_eb = d < 4 ? 0 : (d-2)>>1;
+ if(dst_eb > 0) {
+ write_bits_16(out, bl, boff - match - DST_LN[d]);
+ bl += dst_eb;
+ }
+ for(var q = 0; q < mlen; ++q) {
+ addrs[hash] = boff & 0x7FFF;
+ hash = ((hash << 5) ^ data[boff]) & 0x7FFF;
+ ++boff;
+ }
+ L-= mlen - 1;
+ } else {
+ /* Literal Token */
+ if(d <= 143) d = d + 48;
+ else bl = write_bits_1(out, bl, 1);
+ bl = write_bits_8(out, bl, bitswap8[d]);
+ addrs[hash] = boff & 0x7FFF;
+ ++boff;
+ }
+ }
+
+ bl = write_bits_8(out, bl, 0) - 1;
+ }
+ out.l = ((bl + 7)/8)|0;
+ return out.l;
+ }
+ return function _deflateRaw(data, out) {
+ if(data.length < 8) return write_stored(data, out);
+ return write_huff_fixed(data, out);
+ };
+})();
+
+function _deflate(data) {
+ var buf = new_buf(50+Math.floor(data.length*1.1));
+ var off = _deflateRaw(data, buf);
+ return buf.slice(0, off);
+}
+/* modified inflate function also moves original read head */
+
+var dyn_lmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);
+var dyn_dmap = use_typed_arrays ? new Uint16Array(32768) : zero_fill_array(32768);
+var dyn_cmap = use_typed_arrays ? new Uint16Array(128) : zero_fill_array(128);
+var dyn_len_1 = 1, dyn_len_2 = 1;
+
+/* 5.5.3 Expanding Huffman Codes */
+function dyn(data, boff/*:number*/) {
+ /* nomenclature from RFC1951 refers to bit values; these are offset by the implicit constant */
+ var _HLIT = read_bits_5(data, boff) + 257; boff += 5;
+ var _HDIST = read_bits_5(data, boff) + 1; boff += 5;
+ var _HCLEN = read_bits_4(data, boff) + 4; boff += 4;
+ var w = 0;
+
+ /* grab and store code lengths */
+ var clens = use_typed_arrays ? new Uint8Array(19) : zero_fill_array(19);
+ var ctree = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
+ var maxlen = 1;
+ var bl_count = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);
+ var next_code = use_typed_arrays ? new Uint8Array(8) : zero_fill_array(8);
+ var L = clens.length; /* 19 */
+ for(var i = 0; i < _HCLEN; ++i) {
+ clens[CLEN_ORDER[i]] = w = read_bits_3(data, boff);
+ if(maxlen < w) maxlen = w;
+ bl_count[w]++;
+ boff += 3;
+ }
+
+ /* build code tree */
+ var ccode = 0;
+ bl_count[0] = 0;
+ for(i = 1; i <= maxlen; ++i) next_code[i] = ccode = (ccode + bl_count[i-1])<<1;
+ for(i = 0; i < L; ++i) if((ccode = clens[i]) != 0) ctree[i] = next_code[ccode]++;
+ /* cmap[7 bits from stream] = (off&7) + (lit<<3) */
+ var cleni = 0;
+ for(i = 0; i < L; ++i) {
+ cleni = clens[i];
+ if(cleni != 0) {
+ ccode = bitswap8[ctree[i]]>>(8-cleni);
+ for(var j = (1<<(7-cleni))-1; j>=0; --j) dyn_cmap[ccode|(j<*/ = [];
+ maxlen = 1;
+ for(; hcodes.length < _HLIT + _HDIST;) {
+ ccode = dyn_cmap[read_bits_7(data, boff)];
+ boff += ccode & 7;
+ switch((ccode >>>= 3)) {
+ case 16:
+ w = 3 + read_bits_2(data, boff); boff += 2;
+ ccode = hcodes[hcodes.length - 1];
+ while(w-- > 0) hcodes.push(ccode);
+ break;
+ case 17:
+ w = 3 + read_bits_3(data, boff); boff += 3;
+ while(w-- > 0) hcodes.push(0);
+ break;
+ case 18:
+ w = 11 + read_bits_7(data, boff); boff += 7;
+ while(w -- > 0) hcodes.push(0);
+ break;
+ default:
+ hcodes.push(ccode);
+ if(maxlen < ccode) maxlen = ccode;
+ break;
+ }
+ }
+
+ /* build literal / length trees */
+ var h1 = hcodes.slice(0, _HLIT), h2 = hcodes.slice(_HLIT);
+ for(i = _HLIT; i < 286; ++i) h1[i] = 0;
+ for(i = _HDIST; i < 30; ++i) h2[i] = 0;
+ dyn_len_1 = build_tree(h1, dyn_lmap, 286);
+ dyn_len_2 = build_tree(h2, dyn_dmap, 30);
+ return boff;
+}
+
+/* return [ data, bytesRead ] */
+function inflate(data, usz/*:number*/) {
+ /* shortcircuit for empty buffer [0x03, 0x00] */
+ if(data[0] == 3 && !(data[1] & 0x3)) { return [new_raw_buf(usz), 2]; }
+
+ /* bit offset */
+ var boff = 0;
+
+ /* header includes final bit and type bits */
+ var header = 0;
+
+ var outbuf = new_unsafe_buf(usz ? usz : (1<<18));
+ var woff = 0;
+ var OL = outbuf.length>>>0;
+ var max_len_1 = 0, max_len_2 = 0;
+
+ while((header&1) == 0) {
+ header = read_bits_3(data, boff); boff += 3;
+ if((header >>> 1) == 0) {
+ /* Stored block */
+ if(boff & 7) boff += 8 - (boff&7);
+ /* 2 bytes sz, 2 bytes bit inverse */
+ var sz = data[boff>>>3] | data[(boff>>>3)+1]<<8;
+ boff += 32;
+ /* push sz bytes */
+ if(sz > 0) {
+ if(!usz && OL < woff + sz) { outbuf = realloc(outbuf, woff + sz); OL = outbuf.length; }
+ while(sz-- > 0) { outbuf[woff++] = data[boff>>>3]; boff += 8; }
+ }
+ continue;
+ } else if((header >> 1) == 1) {
+ /* Fixed Huffman */
+ max_len_1 = 9; max_len_2 = 5;
+ } else {
+ /* Dynamic Huffman */
+ boff = dyn(data, boff);
+ max_len_1 = dyn_len_1; max_len_2 = dyn_len_2;
+ }
+ for(;;) { // while(true) is apparently out of vogue in modern JS circles
+ if(!usz && (OL < woff + 32767)) { outbuf = realloc(outbuf, woff + 32767); OL = outbuf.length; }
+ /* ingest code and move read head */
+ var bits = read_bits_n(data, boff, max_len_1);
+ var code = (header>>>1) == 1 ? fix_lmap[bits] : dyn_lmap[bits];
+ boff += code & 15; code >>>= 4;
+ /* 0-255 are literals, 256 is end of block token, 257+ are copy tokens */
+ if(((code>>>8)&0xFF) === 0) outbuf[woff++] = code;
+ else if(code == 256) break;
+ else {
+ code -= 257;
+ var len_eb = (code < 8) ? 0 : ((code-4)>>2); if(len_eb > 5) len_eb = 0;
+ var tgt = woff + LEN_LN[code];
+ /* length extra bits */
+ if(len_eb > 0) {
+ tgt += read_bits_n(data, boff, len_eb);
+ boff += len_eb;
+ }
+
+ /* dist code */
+ bits = read_bits_n(data, boff, max_len_2);
+ code = (header>>>1) == 1 ? fix_dmap[bits] : dyn_dmap[bits];
+ boff += code & 15; code >>>= 4;
+ var dst_eb = (code < 4 ? 0 : (code-2)>>1);
+ var dst = DST_LN[code];
+ /* dist extra bits */
+ if(dst_eb > 0) {
+ dst += read_bits_n(data, boff, dst_eb);
+ boff += dst_eb;
+ }
+
+ /* in the common case, manual byte copy is faster than TA set / Buffer copy */
+ if(!usz && OL < tgt) { outbuf = realloc(outbuf, tgt + 100); OL = outbuf.length; }
+ while(woff < tgt) { outbuf[woff] = outbuf[woff - dst]; ++woff; }
+ }
+ }
+ }
+ if(usz) return [outbuf, (boff+7)>>>3];
+ return [outbuf.slice(0, woff), (boff+7)>>>3];
+}
+
+function _inflate(payload, usz) {
+ var data = payload.slice(payload.l||0);
+ var out = inflate(data, usz);
+ payload.l += out[1];
+ return out[0];
+}
+
+function warn_or_throw(wrn, msg) {
+ if(wrn) { if(typeof console !== 'undefined') console.error(msg); }
+ else throw new Error(msg);
+}
+
+function parse_zip(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
+ var blob/*:CFBlob*/ = /*::(*/file/*:: :any)*/;
+ prep_blob(blob, 0);
+
+ var FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];
+ var o = {
+ FileIndex: FileIndex,
+ FullPaths: FullPaths
+ };
+ init_cfb(o, { root: options.root });
+
+ /* find end of central directory, start just after signature */
+ var i = blob.length - 4;
+ while((blob[i] != 0x50 || blob[i+1] != 0x4b || blob[i+2] != 0x05 || blob[i+3] != 0x06) && i >= 0) --i;
+ blob.l = i + 4;
+
+ /* parse end of central directory */
+ blob.l += 4;
+ var fcnt = blob.read_shift(2);
+ blob.l += 6;
+ var start_cd = blob.read_shift(4);
+
+ /* parse central directory */
+ blob.l = start_cd;
+
+ for(i = 0; i < fcnt; ++i) {
+ /* trust local file header instead of CD entry */
+ blob.l += 20;
+ var csz = blob.read_shift(4);
+ var usz = blob.read_shift(4);
+ var namelen = blob.read_shift(2);
+ var efsz = blob.read_shift(2);
+ var fcsz = blob.read_shift(2);
+ blob.l += 8;
+ var offset = blob.read_shift(4);
+ var EF = parse_extra_field(/*::(*/blob.slice(blob.l+namelen, blob.l+namelen+efsz)/*:: :any)*/);
+ blob.l += namelen + efsz + fcsz;
+
+ var L = blob.l;
+ blob.l = offset + 4;
+ parse_local_file(blob, csz, usz, o, EF);
+ blob.l = L;
+ }
+ return o;
+}
+
+
+/* head starts just after local file header signature */
+function parse_local_file(blob/*:CFBlob*/, csz/*:number*/, usz/*:number*/, o/*:CFBContainer*/, EF) {
+ /* [local file header] */
+ blob.l += 2;
+ var flags = blob.read_shift(2);
+ var meth = blob.read_shift(2);
+ var date = parse_dos_date(blob);
+
+ if(flags & 0x2041) throw new Error("Unsupported ZIP encryption");
+ var crc32 = blob.read_shift(4);
+ var _csz = blob.read_shift(4);
+ var _usz = blob.read_shift(4);
+
+ var namelen = blob.read_shift(2);
+ var efsz = blob.read_shift(2);
+
+ // TODO: flags & (1<<11) // UTF8
+ var name = ""; for(var i = 0; i < namelen; ++i) name += String.fromCharCode(blob[blob.l++]);
+ if(efsz) {
+ var ef = parse_extra_field(/*::(*/blob.slice(blob.l, blob.l + efsz)/*:: :any)*/);
+ if((ef[0x5455]||{}).mt) date = ef[0x5455].mt;
+ if(((EF||{})[0x5455]||{}).mt) date = EF[0x5455].mt;
+ }
+ blob.l += efsz;
+
+ /* [encryption header] */
+
+ /* [file data] */
+ var data = blob.slice(blob.l, blob.l + _csz);
+ switch(meth) {
+ case 8: data = _inflateRawSync(blob, _usz); break;
+ case 0: break; // TODO: scan for magic number
+ default: throw new Error("Unsupported ZIP Compression method " + meth);
+ }
+
+ /* [data descriptor] */
+ var wrn = false;
+ if(flags & 8) {
+ crc32 = blob.read_shift(4);
+ if(crc32 == 0x08074b50) { crc32 = blob.read_shift(4); wrn = true; }
+ _csz = blob.read_shift(4);
+ _usz = blob.read_shift(4);
+ }
+
+ if(_csz != csz) warn_or_throw(wrn, "Bad compressed size: " + csz + " != " + _csz);
+ if(_usz != usz) warn_or_throw(wrn, "Bad uncompressed size: " + usz + " != " + _usz);
+ //var _crc32 = CRC32.buf(data, 0);
+ //if((crc32>>0) != (_crc32>>0)) warn_or_throw(wrn, "Bad CRC32 checksum: " + crc32 + " != " + _crc32);
+ cfb_add(o, name, data, {unsafe: true, mt: date});
+}
+function write_zip(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes*/ {
+ var _opts = options || {};
+ var out = [], cdirs = [];
+ var o/*:CFBlob*/ = new_buf(1);
+ var method = (_opts.compression ? 8 : 0), flags = 0;
+ var desc = false;
+ if(desc) flags |= 8;
+ var i = 0, j = 0;
+
+ var start_cd = 0, fcnt = 0;
+ var root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];
+ var crcs = [];
+ var sz_cd = 0;
+
+ for(i = 1; i < cfb.FullPaths.length; ++i) {
+ fp = cfb.FullPaths[i].slice(root.length); fi = cfb.FileIndex[i];
+ if(!fi.size || !fi.content || fp == "\u0001Sh33tJ5") continue;
+ var start = start_cd;
+
+ /* TODO: CP437 filename */
+ var namebuf = new_buf(fp.length);
+ for(j = 0; j < fp.length; ++j) namebuf.write_shift(1, fp.charCodeAt(j) & 0x7F);
+ namebuf = namebuf.slice(0, namebuf.l);
+ crcs[fcnt] = CRC32.buf(/*::((*/fi.content/*::||[]):any)*/, 0);
+
+ var outbuf = fi.content/*::||[]*/;
+ if(method == 8) outbuf = _deflateRawSync(outbuf);
+
+ /* local file header */
+ o = new_buf(30);
+ o.write_shift(4, 0x04034b50);
+ o.write_shift(2, 20);
+ o.write_shift(2, flags);
+ o.write_shift(2, method);
+ /* TODO: last mod file time/date */
+ if(fi.mt) write_dos_date(o, fi.mt);
+ else o.write_shift(4, 0);
+ o.write_shift(-4, (flags & 8) ? 0 : crcs[fcnt]);
+ o.write_shift(4, (flags & 8) ? 0 : outbuf.length);
+ o.write_shift(4, (flags & 8) ? 0 : /*::(*/fi.content/*::||[])*/.length);
+ o.write_shift(2, namebuf.length);
+ o.write_shift(2, 0);
+
+ start_cd += o.length;
+ out.push(o);
+ start_cd += namebuf.length;
+ out.push(namebuf);
+
+ /* TODO: extra fields? */
+
+ /* TODO: encryption header ? */
+
+ start_cd += outbuf.length;
+ out.push(outbuf);
+
+ /* data descriptor */
+ if(flags & 8) {
+ o = new_buf(12);
+ o.write_shift(-4, crcs[fcnt]);
+ o.write_shift(4, outbuf.length);
+ o.write_shift(4, /*::(*/fi.content/*::||[])*/.length);
+ start_cd += o.l;
+ out.push(o);
+ }
+
+ /* central directory */
+ o = new_buf(46);
+ o.write_shift(4, 0x02014b50);
+ o.write_shift(2, 0);
+ o.write_shift(2, 20);
+ o.write_shift(2, flags);
+ o.write_shift(2, method);
+ o.write_shift(4, 0); /* TODO: last mod file time/date */
+ o.write_shift(-4, crcs[fcnt]);
+
+ o.write_shift(4, outbuf.length);
+ o.write_shift(4, /*::(*/fi.content/*::||[])*/.length);
+ o.write_shift(2, namebuf.length);
+ o.write_shift(2, 0);
+ o.write_shift(2, 0);
+ o.write_shift(2, 0);
+ o.write_shift(2, 0);
+ o.write_shift(4, 0);
+ o.write_shift(4, start);
+
+ sz_cd += o.l;
+ cdirs.push(o);
+ sz_cd += namebuf.length;
+ cdirs.push(namebuf);
+ ++fcnt;
+ }
+
+ /* end of central directory */
+ o = new_buf(22);
+ o.write_shift(4, 0x06054b50);
+ o.write_shift(2, 0);
+ o.write_shift(2, 0);
+ o.write_shift(2, fcnt);
+ o.write_shift(2, fcnt);
+ o.write_shift(4, sz_cd);
+ o.write_shift(4, start_cd);
+ o.write_shift(2, 0);
+
+ return bconcat(([bconcat((out/*:any*/)), bconcat(cdirs), o]/*:any*/));
+}
+var ContentTypeMap = ({
+ "htm": "text/html",
+ "xml": "text/xml",
+
+ "gif": "image/gif",
+ "jpg": "image/jpeg",
+ "png": "image/png",
+
+ "mso": "application/x-mso",
+ "thmx": "application/vnd.ms-officetheme",
+ "sh33tj5": "application/octet-stream"
+}/*:any*/);
+
+function get_content_type(fi/*:CFBEntry*/, fp/*:string*/)/*:string*/ {
+ if(fi.ctype) return fi.ctype;
+
+ var ext = fi.name || "", m = ext.match(/\.([^\.]+)$/);
+ if(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];
+
+ if(fp) {
+ m = (ext = fp).match(/[\.\\]([^\.\\])+$/);
+ if(m && ContentTypeMap[m[1]]) return ContentTypeMap[m[1]];
+ }
+
+ return "application/octet-stream";
+}
+
+/* 76 character chunks TODO: intertwine encoding */
+function write_base64_76(bstr/*:string*/)/*:string*/ {
+ var data = Base64_encode(bstr);
+ var o = [];
+ for(var i = 0; i < data.length; i+= 76) o.push(data.slice(i, i+76));
+ return o.join("\r\n") + "\r\n";
+}
+
+/*
+Rules for QP:
+ - escape =## applies for all non-display characters and literal "="
+ - space or tab at end of line must be encoded
+ - \r\n newlines can be preserved, but bare \r and \n must be escaped
+ - lines must not exceed 76 characters, use soft breaks =\r\n
+
+TODO: Some files from word appear to write line extensions with bare equals:
+
+```
+*/ = [], split = encoded.split("\r\n");
+ for(var si = 0; si < split.length; ++si) {
+ var str = split[si];
+ if(str.length == 0) { o.push(""); continue; }
+ for(var i = 0; i < str.length;) {
+ var end = 76;
+ var tmp = str.slice(i, i + end);
+ if(tmp.charAt(end - 1) == "=") end --;
+ else if(tmp.charAt(end - 2) == "=") end -= 2;
+ else if(tmp.charAt(end - 3) == "=") end -= 3;
+ tmp = str.slice(i, i + end);
+ i += end;
+ if(i < str.length) tmp += "=";
+ o.push(tmp);
+ }
+ }
+
+ return o.join("\r\n");
+}
+function parse_quoted_printable(data/*:Array*/)/*:RawBytes*/ {
+ var o = [];
+
+ /* unify long lines */
+ for(var di = 0; di < data.length; ++di) {
+ var line = data[di];
+ while(di <= data.length && line.charAt(line.length - 1) == "=") line = line.slice(0, line.length - 1) + data[++di];
+ o.push(line);
+ }
+
+ /* decode */
+ for(var oi = 0; oi < o.length; ++oi) o[oi] = o[oi].replace(/[=][0-9A-Fa-f]{2}/g, function($$) { return String.fromCharCode(parseInt($$.slice(1), 16)); });
+ return s2a(o.join("\r\n"));
+}
+
+
+function parse_mime(cfb/*:CFBContainer*/, data/*:Array*/, root/*:string*/)/*:void*/ {
+ var fname = "", cte = "", ctype = "", fdata;
+ var di = 0;
+ for(;di < 10; ++di) {
+ var line = data[di];
+ if(!line || line.match(/^\s*$/)) break;
+ var m = line.match(/^(.*?):\s*([^\s].*)$/);
+ if(m) switch(m[1].toLowerCase()) {
+ case "content-location": fname = m[2].trim(); break;
+ case "content-type": ctype = m[2].trim(); break;
+ case "content-transfer-encoding": cte = m[2].trim(); break;
+ }
+ }
+ ++di;
+ switch(cte.toLowerCase()) {
+ case 'base64': fdata = s2a(Base64_decode(data.slice(di).join(""))); break;
+ case 'quoted-printable': fdata = parse_quoted_printable(data.slice(di)); break;
+ default: throw new Error("Unsupported Content-Transfer-Encoding " + cte);
+ }
+ var file = cfb_add(cfb, fname.slice(root.length), fdata, {unsafe: true});
+ if(ctype) file.ctype = ctype;
+}
+
+function parse_mad(file/*:RawBytes*/, options/*:CFBReadOpts*/)/*:CFBContainer*/ {
+ if(a2s(file.slice(0,13)).toLowerCase() != "mime-version:") throw new Error("Unsupported MAD header");
+ var root = (options && options.root || "");
+ // $FlowIgnore
+ var data = (has_buf && Buffer.isBuffer(file) ? file.toString("binary") : a2s(file)).split("\r\n");
+ var di = 0, row = "";
+
+ /* if root is not specified, scan for the common prefix */
+ for(di = 0; di < data.length; ++di) {
+ row = data[di];
+ if(!/^Content-Location:/i.test(row)) continue;
+ row = row.slice(row.indexOf("file"));
+ if(!root) root = row.slice(0, row.lastIndexOf("/") + 1);
+ if(row.slice(0, root.length) == root) continue;
+ while(root.length > 0) {
+ root = root.slice(0, root.length - 1);
+ root = root.slice(0, root.lastIndexOf("/") + 1);
+ if(row.slice(0,root.length) == root) break;
+ }
+ }
+
+ var mboundary = (data[1] || "").match(/boundary="(.*?)"/);
+ if(!mboundary) throw new Error("MAD cannot find boundary");
+ var boundary = "--" + (mboundary[1] || "");
+
+ var FileIndex/*:CFBFileIndex*/ = [], FullPaths/*:Array*/ = [];
+ var o = {
+ FileIndex: FileIndex,
+ FullPaths: FullPaths
+ };
+ init_cfb(o);
+ var start_di, fcnt = 0;
+ for(di = 0; di < data.length; ++di) {
+ var line = data[di];
+ if(line !== boundary && line !== boundary + "--") continue;
+ if(fcnt++) parse_mime(o, data.slice(start_di, di), root);
+ start_di = di;
+ }
+ return o;
+}
+
+function write_mad(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:string*/ {
+ var opts = options || {};
+ var boundary = opts.boundary || "SheetJS";
+ boundary = '------=' + boundary;
+
+ var out = [
+ 'MIME-Version: 1.0',
+ 'Content-Type: multipart/related; boundary="' + boundary.slice(2) + '"',
+ '',
+ '',
+ ''
+ ];
+
+ var root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];
+ for(var i = 1; i < cfb.FullPaths.length; ++i) {
+ fp = cfb.FullPaths[i].slice(root.length);
+ fi = cfb.FileIndex[i];
+ if(!fi.size || !fi.content || fp == "\u0001Sh33tJ5") continue;
+
+ /* Normalize filename */
+ fp = fp.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(c) {
+ return "_x" + c.charCodeAt(0).toString(16) + "_";
+ }).replace(/[\u0080-\uFFFF]/g, function(u) {
+ return "_u" + u.charCodeAt(0).toString(16) + "_";
+ });
+
+ /* Extract content as binary string */
+ var ca = fi.content;
+ // $FlowIgnore
+ var cstr = has_buf && Buffer.isBuffer(ca) ? ca.toString("binary") : a2s(ca);
+
+ /* 4/5 of first 1024 chars ascii -> quoted printable, else base64 */
+ var dispcnt = 0, L = Math.min(1024, cstr.length), cc = 0;
+ for(var csl = 0; csl <= L; ++csl) if((cc=cstr.charCodeAt(csl)) >= 0x20 && cc < 0x80) ++dispcnt;
+ var qp = dispcnt >= L * 4 / 5;
+
+ out.push(boundary);
+ out.push('Content-Location: ' + (opts.root || 'file:///C:/SheetJS/') + fp);
+ out.push('Content-Transfer-Encoding: ' + (qp ? 'quoted-printable' : 'base64'));
+ out.push('Content-Type: ' + get_content_type(fi, fp));
+ out.push('');
+
+ out.push(qp ? write_quoted_printable(cstr) : write_base64_76(cstr));
+ }
+ out.push(boundary + '--\r\n');
+ return out.join("\r\n");
+}
+function cfb_new(opts/*:?any*/)/*:CFBContainer*/ {
+ var o/*:CFBContainer*/ = ({}/*:any*/);
+ init_cfb(o, opts);
+ return o;
+}
+
+function cfb_add(cfb/*:CFBContainer*/, name/*:string*/, content/*:?RawBytes*/, opts/*:?any*/)/*:CFBEntry*/ {
+ var unsafe = opts && opts.unsafe;
+ if(!unsafe) init_cfb(cfb);
+ var file = !unsafe && CFB.find(cfb, name);
+ if(!file) {
+ var fpath/*:string*/ = cfb.FullPaths[0];
+ if(name.slice(0, fpath.length) == fpath) fpath = name;
+ else {
+ if(fpath.slice(-1) != "/") fpath += "/";
+ fpath = (fpath + name).replace("//","/");
+ }
+ file = ({name: filename(name), type: 2}/*:any*/);
+ cfb.FileIndex.push(file);
+ cfb.FullPaths.push(fpath);
+ if(!unsafe) CFB.utils.cfb_gc(cfb);
+ }
+ /*:: if(!file) throw new Error("unreachable"); */
+ file.content = (content/*:any*/);
+ file.size = content ? content.length : 0;
+ if(opts) {
+ if(opts.CLSID) file.clsid = opts.CLSID;
+ if(opts.mt) file.mt = opts.mt;
+ if(opts.ct) file.ct = opts.ct;
+ }
+ return file;
+}
+
+function cfb_del(cfb/*:CFBContainer*/, name/*:string*/)/*:boolean*/ {
+ init_cfb(cfb);
+ var file = CFB.find(cfb, name);
+ if(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {
+ cfb.FileIndex.splice(j, 1);
+ cfb.FullPaths.splice(j, 1);
+ return true;
+ }
+ return false;
+}
+
+function cfb_mov(cfb/*:CFBContainer*/, old_name/*:string*/, new_name/*:string*/)/*:boolean*/ {
+ init_cfb(cfb);
+ var file = CFB.find(cfb, old_name);
+ if(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {
+ cfb.FileIndex[j].name = filename(new_name);
+ cfb.FullPaths[j] = new_name;
+ return true;
+ }
+ return false;
+}
+
+function cfb_gc(cfb/*:CFBContainer*/)/*:void*/ { rebuild_cfb(cfb, true); }
+
+exports.find = find;
+exports.read = read;
+exports.parse = parse;
+exports.write = write;
+exports.writeFile = write_file;
+exports.utils = {
+ cfb_new: cfb_new,
+ cfb_add: cfb_add,
+ cfb_del: cfb_del,
+ cfb_mov: cfb_mov,
+ cfb_gc: cfb_gc,
+ ReadShift: ReadShift,
+ CheckField: CheckField,
+ prep_blob: prep_blob,
+ bconcat: bconcat,
+ use_zlib: use_zlib,
+ _deflateRaw: _deflate,
+ _inflateRaw: _inflate,
+ consts: consts
+};
+
+return exports;
+})();
+
+let _fs = void 0;
+function set_fs(fs) { _fs = fs; }
+
+
+/* normalize data for blob ctor */
+function blobify(data) {
+ if(typeof data === "string") return s2ab(data);
+ if(Array.isArray(data)) return a2u(data);
+ return data;
+}
+/* write or download file */
+function write_dl(fname/*:string*/, payload/*:any*/, enc/*:?string*/) {
+ /*global IE_SaveFile, Blob, navigator, saveAs, document, File, chrome */
+ if(typeof _fs !== 'undefined' && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload);
+ if(typeof Deno !== 'undefined') {
+ /* in this spot, it's safe to assume typed arrays and TextEncoder/TextDecoder exist */
+ if(enc && typeof payload == "string") switch(enc) {
+ case "utf8": payload = new TextEncoder(enc).encode(payload); break;
+ case "binary": payload = s2ab(payload); break;
+ /* TODO: binary equivalent */
+ default: throw new Error("Unsupported encoding " + enc);
+ }
+ return Deno.writeFileSync(fname, payload);
+ }
+ var data = (enc == "utf8") ? utf8write(payload) : payload;
+ /*:: declare var IE_SaveFile: any; */
+ if(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);
+ if(typeof Blob !== 'undefined') {
+ var blob = new Blob([blobify(data)], {type:"application/octet-stream"});
+ /*:: declare var navigator: any; */
+ if(typeof navigator !== 'undefined' && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname);
+ /*:: declare var saveAs: any; */
+ if(typeof saveAs !== 'undefined') return saveAs(blob, fname);
+ if(typeof URL !== 'undefined' && typeof document !== 'undefined' && document.createElement && URL.createObjectURL) {
+ var url = URL.createObjectURL(blob);
+ /*:: declare var chrome: any; */
+ if(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == "function") {
+ if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);
+ return chrome.downloads.download({ url: url, filename: fname, saveAs: true});
+ }
+ var a = document.createElement("a");
+ if(a.download != null) {
+ /*:: if(document.body == null) throw new Error("unreachable"); */
+ a.download = fname; a.href = url; document.body.appendChild(a); a.click();
+ /*:: if(document.body == null) throw new Error("unreachable"); */ document.body.removeChild(a);
+ if(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);
+ return url;
+ }
+ }
+ }
+ // $FlowIgnore
+ if(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript
+ // $FlowIgnore
+ var out = File(fname); out.open("w"); out.encoding = "binary";
+ if(Array.isArray(payload)) payload = a2s(payload);
+ out.write(payload); out.close(); return payload;
+ } catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }
+ throw new Error("cannot save file " + fname);
+}
+
+/* read binary data from file */
+function read_binary(path/*:string*/) {
+ if(typeof _fs !== 'undefined') return _fs.readFileSync(path);
+ if(typeof Deno !== 'undefined') return Deno.readFileSync(path);
+ // $FlowIgnore
+ if(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript
+ // $FlowIgnore
+ var infile = File(path); infile.open("r"); infile.encoding = "binary";
+ var data = infile.read(); infile.close();
+ return data;
+ } catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }
+ throw new Error("Cannot access file " + path);
+}
+function keys(o/*:any*/)/*:Array*/ {
+ var ks = Object.keys(o), o2 = [];
+ for(var i = 0; i < ks.length; ++i) if(Object.prototype.hasOwnProperty.call(o, ks[i])) o2.push(ks[i]);
+ return o2;
+}
+
+function evert_key(obj/*:any*/, key/*:string*/)/*:EvertType*/ {
+ var o = ([]/*:any*/), K = keys(obj);
+ for(var i = 0; i !== K.length; ++i) if(o[obj[K[i]][key]] == null) o[obj[K[i]][key]] = K[i];
+ return o;
+}
+
+function evert(obj/*:any*/)/*:EvertType*/ {
+ var o = ([]/*:any*/), K = keys(obj);
+ for(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = K[i];
+ return o;
+}
+
+function evert_num(obj/*:any*/)/*:EvertNumType*/ {
+ var o = ([]/*:any*/), K = keys(obj);
+ for(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = parseInt(K[i],10);
+ return o;
+}
+
+function evert_arr(obj/*:any*/)/*:EvertArrType*/ {
+ var o/*:EvertArrType*/ = ([]/*:any*/), K = keys(obj);
+ for(var i = 0; i !== K.length; ++i) {
+ if(o[obj[K[i]]] == null) o[obj[K[i]]] = [];
+ o[obj[K[i]]].push(K[i]);
+ }
+ return o;
+}
+
+var basedate = /*#__PURE__*/new Date(1899, 11, 30, 0, 0, 0); // 2209161600000
+function datenum(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
+ var epoch = /*#__PURE__*/v.getTime();
+ if(date1904) epoch -= 1462*24*60*60*1000;
+ var dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;
+ return (epoch - dnthresh) / (24 * 60 * 60 * 1000);
+}
+var refdate = /*#__PURE__*/new Date();
+var dnthresh = /*#__PURE__*/basedate.getTime() + (/*#__PURE__*/refdate.getTimezoneOffset() - /*#__PURE__*/basedate.getTimezoneOffset()) * 60000;
+var refoffset = /*#__PURE__*/refdate.getTimezoneOffset();
+function numdate(v/*:number*/)/*:Date*/ {
+ var out = new Date();
+ out.setTime(v * 24 * 60 * 60 * 1000 + dnthresh);
+ if (out.getTimezoneOffset() !== refoffset) {
+ out.setTime(out.getTime() + (out.getTimezoneOffset() - refoffset) * 60000);
+ }
+ return out;
+}
+
+/* ISO 8601 Duration */
+function parse_isodur(s) {
+ var sec = 0, mt = 0, time = false;
+ var m = s.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);
+ if(!m) throw new Error("|" + s + "| is not an ISO8601 Duration");
+ for(var i = 1; i != m.length; ++i) {
+ if(!m[i]) continue;
+ mt = 1;
+ if(i > 3) time = true;
+ switch(m[i].slice(m[i].length-1)) {
+ case 'Y':
+ throw new Error("Unsupported ISO Duration Field: " + m[i].slice(m[i].length-1));
+ case 'D': mt *= 24;
+ /* falls through */
+ case 'H': mt *= 60;
+ /* falls through */
+ case 'M':
+ if(!time) throw new Error("Unsupported ISO Duration Field: M");
+ else mt *= 60;
+ /* falls through */
+ case 'S': break;
+ }
+ sec += mt * parseInt(m[i], 10);
+ }
+ return sec;
+}
+
+var good_pd_date_1 = /*#__PURE__*/new Date('2017-02-19T19:06:09.000Z');
+var good_pd_date = /*#__PURE__*/isNaN(/*#__PURE__*/good_pd_date_1.getFullYear()) ? /*#__PURE__*/new Date('2/19/17') : good_pd_date_1;
+var good_pd = /*#__PURE__*/good_pd_date.getFullYear() == 2017;
+/* parses a date as a local date */
+function parseDate(str/*:string|Date*/, fixdate/*:?number*/)/*:Date*/ {
+ var d = new Date(str);
+ if(good_pd) {
+ /*:: if(fixdate == null) fixdate = 0; */
+ if(fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000);
+ else if(fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);
+ return d;
+ }
+ if(str instanceof Date) return str;
+ if(good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) {
+ var s = d.getFullYear();
+ if(str.indexOf("" + s) > -1) return d;
+ d.setFullYear(d.getFullYear() + 100); return d;
+ }
+ var n = str.match(/\d+/g)||["2017","2","19","0","0","0"];
+ var out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3]||0), (+n[4]||0), (+n[5]||0));
+ if(str.indexOf("Z") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000);
+ return out;
+}
+
+function cc2str(arr/*:Array*/, debomit)/*:string*/ {
+ if(has_buf && Buffer.isBuffer(arr)) {
+ if(debomit) {
+ if(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(arr.slice(2).toString("utf16le"));
+ if(arr[1] == 0xFE && arr[2] == 0xFF) return utf8write(utf16beread(arr.slice(2).toString("binary")));
+ }
+ return arr.toString("binary");
+ }
+
+ if(typeof TextDecoder !== "undefined") try {
+ if(debomit) {
+ if(arr[0] == 0xFF && arr[1] == 0xFE) return utf8write(new TextDecoder("utf-16le").decode(arr.slice(2)));
+ if(arr[0] == 0xFE && arr[1] == 0xFF) return utf8write(new TextDecoder("utf-16be").decode(arr.slice(2)));
+ }
+ var rev = {
+ "\u20ac": "\x80", "\u201a": "\x82", "\u0192": "\x83", "\u201e": "\x84",
+ "\u2026": "\x85", "\u2020": "\x86", "\u2021": "\x87", "\u02c6": "\x88",
+ "\u2030": "\x89", "\u0160": "\x8a", "\u2039": "\x8b", "\u0152": "\x8c",
+ "\u017d": "\x8e", "\u2018": "\x91", "\u2019": "\x92", "\u201c": "\x93",
+ "\u201d": "\x94", "\u2022": "\x95", "\u2013": "\x96", "\u2014": "\x97",
+ "\u02dc": "\x98", "\u2122": "\x99", "\u0161": "\x9a", "\u203a": "\x9b",
+ "\u0153": "\x9c", "\u017e": "\x9e", "\u0178": "\x9f"
+ };
+ if(Array.isArray(arr)) arr = new Uint8Array(arr);
+ return new TextDecoder("latin1").decode(arr).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(c) { return rev[c] || c; });
+ } catch(e) {}
+
+ var o = [];
+ for(var i = 0; i != arr.length; ++i) o.push(String.fromCharCode(arr[i]));
+ return o.join("");
+}
+
+function dup(o/*:any*/)/*:any*/ {
+ if(typeof JSON != 'undefined' && !Array.isArray(o)) return JSON.parse(JSON.stringify(o));
+ if(typeof o != 'object' || o == null) return o;
+ if(o instanceof Date) return new Date(o.getTime());
+ var out = {};
+ for(var k in o) if(Object.prototype.hasOwnProperty.call(o, k)) out[k] = dup(o[k]);
+ return out;
+}
+
+function fill(c/*:string*/,l/*:number*/)/*:string*/ { var o = ""; while(o.length < l) o+=c; return o; }
+
+/* TODO: stress test */
+function fuzzynum(s/*:string*/)/*:number*/ {
+ var v/*:number*/ = Number(s);
+ if(!isNaN(v)) return isFinite(v) ? v : NaN;
+ if(!/\d/.test(s)) return v;
+ var wt = 1;
+ var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";});
+ if(!isNaN(v = Number(ss))) return v / wt;
+ ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});
+ if(!isNaN(v = Number(ss))) return v / wt;
+ return v;
+}
+var lower_months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];
+function fuzzydate(s/*:string*/)/*:Date*/ {
+ var o = new Date(s), n = new Date(NaN);
+ var y = o.getYear(), m = o.getMonth(), d = o.getDate();
+ if(isNaN(d)) return n;
+ var lower = s.toLowerCase();
+ if(lower.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) {
+ lower = lower.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"");
+ if(lower.length > 3 && lower_months.indexOf(lower) == -1) return n;
+ } else if(lower.match(/[a-z]/)) return n;
+ if(y < 0 || y > 8099) return n;
+ if((m > 0 || d > 1) && y != 101) return o;
+ if(s.match(/[^-0-9:,\/\\]/)) return n;
+ return o;
+}
+
+var split_regex = /*#__PURE__*/(function() {
+ var safe_split_regex = "abacaba".split(/(:?b)/i).length == 5;
+ return function split_regex(str/*:string*/, re, def/*:string*/)/*:Array*/ {
+ if(safe_split_regex || typeof re == "string") return str.split(re);
+ var p = str.split(re), o = [p[0]];
+ for(var i = 1; i < p.length; ++i) { o.push(def); o.push(p[i]); }
+ return o;
+ };
+})();
+function getdatastr(data)/*:?string*/ {
+ if(!data) return null;
+ if(data.content && data.type) return cc2str(data.content, true);
+ if(data.data) return debom(data.data);
+ if(data.asNodeBuffer && has_buf) return debom(data.asNodeBuffer().toString('binary'));
+ if(data.asBinary) return debom(data.asBinary());
+ if(data._data && data._data.getContent) return debom(cc2str(Array.prototype.slice.call(data._data.getContent(),0)));
+ return null;
+}
+
+function getdatabin(data) {
+ if(!data) return null;
+ if(data.data) return char_codes(data.data);
+ if(data.asNodeBuffer && has_buf) return data.asNodeBuffer();
+ if(data._data && data._data.getContent) {
+ var o = data._data.getContent();
+ if(typeof o == "string") return char_codes(o);
+ return Array.prototype.slice.call(o);
+ }
+ if(data.content && data.type) return data.content;
+ return null;
+}
+
+function getdata(data) { return (data && data.name.slice(-4) === ".bin") ? getdatabin(data) : getdatastr(data); }
+
+/* Part 2 Section 10.1.2 "Mapping Content Types" Names are case-insensitive */
+/* OASIS does not comment on filename case sensitivity */
+function safegetzipfile(zip, file/*:string*/) {
+ var k = zip.FullPaths || keys(zip.files);
+ var f = file.toLowerCase().replace(/[\/]/g, '\\'), g = f.replace(/\\/g,'\/');
+ for(var i=0; i\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g;
+var tagregex1=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg, tagregex2 = /<[^>]*>/g;
+var tagregex = /*#__PURE__*/XML_HEADER.match(tagregex1) ? tagregex1 : tagregex2;
+var nsregex=/<\w*:/, nsregex2 = /<(\/?)\w+:/;
+function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/, skip_LC/*:?boolean*/)/*:any*/ {
+ var z = ({}/*:any*/);
+ var eq = 0, c = 0;
+ for(; eq !== tag.length; ++eq) if((c = tag.charCodeAt(eq)) === 32 || c === 10 || c === 13) break;
+ if(!skip_root) z[0] = tag.slice(0, eq);
+ if(eq === tag.length) return z;
+ var m = tag.match(attregexg), j=0, v="", i=0, q="", cc="", quot = 1;
+ if(m) for(i = 0; i != m.length; ++i) {
+ cc = m[i];
+ for(c=0; c != cc.length; ++c) if(cc.charCodeAt(c) === 61) break;
+ q = cc.slice(0,c).trim();
+ while(cc.charCodeAt(c+1) == 32) ++c;
+ quot = ((eq=cc.charCodeAt(c+1)) == 34 || eq == 39) ? 1 : 0;
+ v = cc.slice(c+1+quot, cc.length-quot);
+ for(j=0;j!=q.length;++j) if(q.charCodeAt(j) === 58) break;
+ if(j===q.length) {
+ if(q.indexOf("_") > 0) q = q.slice(0, q.indexOf("_")); // from ods
+ z[q] = v;
+ if(!skip_LC) z[q.toLowerCase()] = v;
+ }
+ else {
+ var k = (j===5 && q.slice(0,5)==="xmlns"?"xmlns":"")+q.slice(j+1);
+ if(z[k] && q.slice(j-3,j) == "ext") continue; // from ods
+ z[k] = v;
+ if(!skip_LC) z[k.toLowerCase()] = v;
+ }
+ }
+ return z;
+}
+function strip_ns(x/*:string*/)/*:string*/ { return x.replace(nsregex2, "<$1"); }
+
+var encodings = {
+ '"': '"',
+ ''': "'",
+ '>': '>',
+ '<': '<',
+ '&': '&'
+};
+var rencoding = /*#__PURE__*/evert(encodings);
+//var rencstr = "&<>'\"".split("");
+
+// TODO: CP remap (need to read file version to determine OS)
+var unescapexml/*:StringConv*/ = /*#__PURE__*/(function() {
+ /* 22.4.2.4 bstr (Basic String) */
+ var encregex = /&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig, coderegex = /_x([\da-fA-F]{4})_/ig;
+ return function unescapexml(text/*:string*/)/*:string*/ {
+ var s = text + '', i = s.indexOf("-1?16:10))||$$; }).replace(coderegex,function(m,c) {return String.fromCharCode(parseInt(c,16));});
+ var j = s.indexOf("]]>");
+ return unescapexml(s.slice(0, i)) + s.slice(i+9,j) + unescapexml(s.slice(j+3));
+ };
+})();
+
+var decregex=/[&<>'"]/g, charegex = /[\u0000-\u0008\u000b-\u001f]/g;
+function escapexml(text/*:string*/)/*:string*/{
+ var s = text + '';
+ return s.replace(decregex, function(y) { return rencoding[y]; }).replace(charegex,function(s) { return "_x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + "_";});
+}
+function escapexmltag(text/*:string*/)/*:string*/{ return escapexml(text).replace(/ /g,"_x0020_"); }
+
+var htmlcharegex = /[\u0000-\u001f]/g;
+function escapehtml(text/*:string*/)/*:string*/{
+ var s = text + '';
+ return s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\n/g, "
").replace(htmlcharegex,function(s) { return "" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
+}
+
+function escapexlml(text/*:string*/)/*:string*/{
+ var s = text + '';
+ return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return "" + (s.charCodeAt(0).toString(16)).toUpperCase() + ";"; });
+}
+
+/* TODO: handle codepages */
+var xlml_fixstr/*:StringConv*/ = /*#__PURE__*/(function() {
+ var entregex = /(\d+);/g;
+ function entrepl($$/*:string*/,$1/*:string*/)/*:string*/ { return String.fromCharCode(parseInt($1,10)); }
+ return function xlml_fixstr(str/*:string*/)/*:string*/ { return str.replace(entregex,entrepl); };
+})();
+function xlml_unfixstr(str/*:string*/)/*:string*/ { return str.replace(/(\r\n|[\r\n])/g,"\
"); }
+
+function parsexmlbool(value/*:any*/)/*:boolean*/ {
+ switch(value) {
+ case 1: case true: case '1': case 'true': case 'TRUE': return true;
+ /* case '0': case 'false': case 'FALSE':*/
+ default: return false;
+ }
+}
+
+function utf8reada(orig/*:string*/)/*:string*/ {
+ var out = "", i = 0, c = 0, d = 0, e = 0, f = 0, w = 0;
+ while (i < orig.length) {
+ c = orig.charCodeAt(i++);
+ if (c < 128) { out += String.fromCharCode(c); continue; }
+ d = orig.charCodeAt(i++);
+ if (c>191 && c<224) { f = ((c & 31) << 6); f |= (d & 63); out += String.fromCharCode(f); continue; }
+ e = orig.charCodeAt(i++);
+ if (c < 240) { out += String.fromCharCode(((c & 15) << 12) | ((d & 63) << 6) | (e & 63)); continue; }
+ f = orig.charCodeAt(i++);
+ w = (((c & 7) << 18) | ((d & 63) << 12) | ((e & 63) << 6) | (f & 63))-65536;
+ out += String.fromCharCode(0xD800 + ((w>>>10)&1023));
+ out += String.fromCharCode(0xDC00 + (w&1023));
+ }
+ return out;
+}
+
+function utf8readb(data) {
+ var out = new_raw_buf(2*data.length), w, i, j = 1, k = 0, ww=0, c;
+ for(i = 0; i < data.length; i+=j) {
+ j = 1;
+ if((c=data.charCodeAt(i)) < 128) w = c;
+ else if(c < 224) { w = (c&31)*64+(data.charCodeAt(i+1)&63); j=2; }
+ else if(c < 240) { w=(c&15)*4096+(data.charCodeAt(i+1)&63)*64+(data.charCodeAt(i+2)&63); j=3; }
+ else { j = 4;
+ w = (c & 7)*262144+(data.charCodeAt(i+1)&63)*4096+(data.charCodeAt(i+2)&63)*64+(data.charCodeAt(i+3)&63);
+ w -= 65536; ww = 0xD800 + ((w>>>10)&1023); w = 0xDC00 + (w&1023);
+ }
+ if(ww !== 0) { out[k++] = ww&255; out[k++] = ww>>>8; ww = 0; }
+ out[k++] = w%256; out[k++] = w>>>8;
+ }
+ return out.slice(0,k).toString('ucs2');
+}
+
+function utf8readc(data) { return Buffer_from(data, 'binary').toString('utf8'); }
+
+var utf8corpus = "foo bar baz\u00e2\u0098\u0083\u00f0\u009f\u008d\u00a3";
+var utf8read = has_buf && (/*#__PURE__*/utf8readc(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readc || /*#__PURE__*/utf8readb(utf8corpus) == /*#__PURE__*/utf8reada(utf8corpus) && utf8readb) || utf8reada;
+
+var utf8write/*:StringConv*/ = has_buf ? function(data) { return Buffer_from(data, 'utf8').toString("binary"); } : function(orig/*:string*/)/*:string*/ {
+ var out/*:Array*/ = [], i = 0, c = 0, d = 0;
+ while(i < orig.length) {
+ c = orig.charCodeAt(i++);
+ switch(true) {
+ case c < 128: out.push(String.fromCharCode(c)); break;
+ case c < 2048:
+ out.push(String.fromCharCode(192 + (c >> 6)));
+ out.push(String.fromCharCode(128 + (c & 63)));
+ break;
+ case c >= 55296 && c < 57344:
+ c -= 55296; d = orig.charCodeAt(i++) - 56320 + (c<<10);
+ out.push(String.fromCharCode(240 + ((d >>18) & 7)));
+ out.push(String.fromCharCode(144 + ((d >>12) & 63)));
+ out.push(String.fromCharCode(128 + ((d >> 6) & 63)));
+ out.push(String.fromCharCode(128 + (d & 63)));
+ break;
+ default:
+ out.push(String.fromCharCode(224 + (c >> 12)));
+ out.push(String.fromCharCode(128 + ((c >> 6) & 63)));
+ out.push(String.fromCharCode(128 + (c & 63)));
+ }
+ }
+ return out.join("");
+};
+
+// matches ... extracts content
+var matchtag = /*#__PURE__*/(function() {
+ var mtcache/*:{[k:string]:RegExp}*/ = ({}/*:any*/);
+ return function matchtag(f/*:string*/,g/*:?string*/)/*:RegExp*/ {
+ var t = f+"|"+(g||"");
+ if(mtcache[t]) return mtcache[t];
+ return (mtcache[t] = new RegExp('<(?:\\w+:)?'+f+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)(?:\\w+:)?'+f+'>',((g||"")/*:any*/)));
+ };
+})();
+
+var htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() {
+ var entities/*:Array<[RegExp, string]>*/ = [
+ ['nbsp', ' '], ['middot', '·'],
+ ['quot', '"'], ['apos', "'"], ['gt', '>'], ['lt', '<'], ['amp', '&']
+ ].map(function(x/*:[string, string]*/) { return [new RegExp('&' + x[0] + ';', "ig"), x[1]]; });
+ return function htmldecode(str/*:string*/)/*:string*/ {
+ var o = str
+ // Remove new lines and spaces from start of content
+ .replace(/^[\t\n\r ]+/, "")
+ // Remove new lines and spaces from end of content
+ .replace(/[\t\n\r ]+$/,"")
+ // Added line which removes any white space characters after and before html tags
+ .replace(/>\s+/g,">").replace(/\s+ tags with new lines
+ .replace(/<\s*[bB][rR]\s*\/?>/g,"\n")
+ // Strip HTML elements
+ .replace(/<[^>]*>/g,"");
+ for(var i = 0; i < entities.length; ++i) o = o.replace(entities[i][0], entities[i][1]);
+ return o;
+ };
+})();
+
+var vtregex = /*#__PURE__*/(function(){ var vt_cache = {};
+ return function vt_regex(bt) {
+ if(vt_cache[bt] !== undefined) return vt_cache[bt];
+ return (vt_cache[bt] = new RegExp("<(?:vt:)?" + bt + ">([\\s\\S]*?)(?:vt:)?" + bt + ">", 'g') );
+};})();
+var vtvregex = /<\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^>]*)>([\s\S]*);
+function parseVector(data/*:string*/, opts)/*:Array<{v:string,t:string}>*/ {
+ var h = parsexmltag(data);
+
+ var matches/*:Array*/ = data.match(vtregex(h.baseType))||[];
+ var res/*:Array*/ = [];
+ if(matches.length != h.size) {
+ if(opts.WTF) throw new Error("unexpected vector length " + matches.length + " != " + h.size);
+ return res;
+ }
+ matches.forEach(function(x/*:string*/) {
+ var v = x.replace(vtvregex,"").match(vtmregex);
+ if(v) res.push({v:utf8read(v[2]), t:v[1]});
+ });
+ return res;
+}
+
+var wtregex = /(^\s|\s$|\n)/;
+function writetag(f/*:string*/,g/*:string*/)/*:string*/ { return '<' + f + (g.match(wtregex)?' xml:space="preserve"' : "") + '>' + g + '' + f + '>'; }
+
+function wxt_helper(h)/*:string*/ { return keys(h).map(function(k) { return " " + k + '="' + h[k] + '"';}).join(""); }
+function writextag(f/*:string*/,g/*:?string*/,h) { return '<' + f + ((h != null) ? wxt_helper(h) : "") + ((g != null) ? (g.match(wtregex)?' xml:space="preserve"' : "") + '>' + g + '' + f : "/") + '>';}
+
+function write_w3cdtf(d/*:Date*/, t/*:?boolean*/)/*:string*/ { try { return d.toISOString().replace(/\.\d*/,""); } catch(e) { if(t) throw e; } return ""; }
+
+function write_vt(s, xlsx/*:?boolean*/)/*:string*/ {
+ switch(typeof s) {
+ case 'string':
+ var o = writextag('vt:lpwstr', escapexml(s));
+ if(xlsx) o = o.replace(/"/g, "_x0022_");
+ return o;
+ case 'number': return writextag((s|0)==s?'vt:i4':'vt:r8', escapexml(String(s)));
+ case 'boolean': return writextag('vt:bool',s?'true':'false');
+ }
+ if(s instanceof Date) return writextag('vt:filetime', write_w3cdtf(s));
+ throw new Error("Unable to serialize " + s);
+}
+
+function xlml_normalize(d)/*:string*/ {
+ if(has_buf &&/*::typeof Buffer !== "undefined" && d != null && d instanceof Buffer &&*/ Buffer.isBuffer(d)) return d.toString('utf8');
+ if(typeof d === 'string') return d;
+ /* duktape */
+ if(typeof Uint8Array !== 'undefined' && d instanceof Uint8Array) return utf8read(a2s(ab2a(d)));
+ throw new Error("Bad input format: expected Buffer or string");
+}
+/* UOS uses CJK in tags */
+var xlmlregex = /<(\/?)([^\s?>:\/]+)(?:[\s?:\/][^>]*)?>/mg;
+//var xlmlregex = /<(\/?)([a-z0-9]*:|)(\w+)[^>]*>/mg;
+
+var XMLNS = ({
+ CORE_PROPS: 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',
+ CUST_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",
+ EXT_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
+ CT: 'http://schemas.openxmlformats.org/package/2006/content-types',
+ RELS: 'http://schemas.openxmlformats.org/package/2006/relationships',
+ TCMNT: 'http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments',
+ 'dc': 'http://purl.org/dc/elements/1.1/',
+ 'dcterms': 'http://purl.org/dc/terms/',
+ 'dcmitype': 'http://purl.org/dc/dcmitype/',
+ 'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',
+ 'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
+ 'sjs': 'http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties',
+ 'vt': 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',
+ 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
+ 'xsd': 'http://www.w3.org/2001/XMLSchema'
+}/*:any*/);
+
+var XMLNS_main = [
+ 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',
+ 'http://purl.oclc.org/ooxml/spreadsheetml/main',
+ 'http://schemas.microsoft.com/office/excel/2006/main',
+ 'http://schemas.microsoft.com/office/excel/2006/2'
+];
+
+var XLMLNS = ({
+ 'o': 'urn:schemas-microsoft-com:office:office',
+ 'x': 'urn:schemas-microsoft-com:office:excel',
+ 'ss': 'urn:schemas-microsoft-com:office:spreadsheet',
+ 'dt': 'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882',
+ 'mv': 'http://macVmlSchemaUri',
+ 'v': 'urn:schemas-microsoft-com:vml',
+ 'html': 'http://www.w3.org/TR/REC-html40'
+}/*:any*/);
+function read_double_le(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ {
+ var s = 1 - 2 * (b[idx + 7] >>> 7);
+ var e = ((b[idx + 7] & 0x7f) << 4) + ((b[idx + 6] >>> 4) & 0x0f);
+ var m = (b[idx+6]&0x0f);
+ for(var i = 5; i >= 0; --i) m = m * 256 + b[idx + i];
+ if(e == 0x7ff) return m == 0 ? (s * Infinity) : NaN;
+ if(e == 0) e = -1022;
+ else { e -= 1023; m += Math.pow(2,52); }
+ return s * Math.pow(2, e - 52) * m;
+}
+
+function write_double_le(b/*:RawBytes|CFBlob*/, v/*:number*/, idx/*:number*/) {
+ var bs = ((((v < 0) || (1/v == -Infinity)) ? 1 : 0) << 7), e = 0, m = 0;
+ var av = bs ? (-v) : v;
+ if(!isFinite(av)) { e = 0x7ff; m = isNaN(v) ? 0x6969 : 0; }
+ else if(av == 0) e = m = 0;
+ else {
+ e = Math.floor(Math.log(av) / Math.LN2);
+ m = av * Math.pow(2, 52 - e);
+ if((e <= -1023) && (!isFinite(m) || (m < Math.pow(2,52)))) { e = -1022; }
+ else { m -= Math.pow(2,52); e+=1023; }
+ }
+ for(var i = 0; i <= 5; ++i, m/=256) b[idx + i] = m & 0xff;
+ b[idx + 6] = ((e & 0x0f) << 4) | (m & 0xf);
+ b[idx + 7] = (e >> 4) | bs;
+}
+
+var ___toBuffer = function(bufs/*:Array >*/)/*:RawBytes*/ { var x=[],w=10240; for(var i=0;i 0 && Buffer.isBuffer(bufs[0][0])) ? Buffer.concat(bufs[0].map(function(x) { return Buffer.isBuffer(x) ? x : Buffer_from(x); })) : ___toBuffer(bufs);} : ___toBuffer;
+
+var ___utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/)/*:string*/ { var ss/*:Array*/=[]; for(var i=s; i*/=[]; for(var i=s; i 0 ? __utf8(b, i+4,i+4+len-1) : "";};
+var __lpstr = ___lpstr;
+
+var ___cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : "";};
+var __cpstr = ___cpstr;
+
+var ___lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : "";};
+var __lpwstr = ___lpwstr;
+
+var ___lpp4 = function lpp4_(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf16le(b, i+4,i+4+len) : "";};
+var __lpp4 = ___lpp4;
+
+var ___8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len) : "";};
+var __8lpp4 = ___8lpp4;
+
+var ___double = function(b/*:RawBytes|CFBlob*/, idx/*:number*/) { return read_double_le(b, idx);};
+var __double = ___double;
+
+var is_buf = function is_buf_a(a) { return Array.isArray(a) || (typeof Uint8Array !== "undefined" && a instanceof Uint8Array); };
+
+if(has_buf/*:: && typeof Buffer !== 'undefined'*/) {
+ __lpstr = function lpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : "";};
+ __cpstr = function cpstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___cpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : "";};
+ __lpwstr = function lpwstr_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpwstr(b, i); var len = 2*b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len-1);};
+ __lpp4 = function lpp4_b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len);};
+ __8lpp4 = function lpp4_8b(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(!Buffer.isBuffer(b)/*:: || !(b instanceof Buffer)*/) return ___8lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf8',i+4,i+4+len);};
+ __double = function double_(b/*:RawBytes|CFBlob*/, i/*:number*/) { if(Buffer.isBuffer(b)/*::&& b instanceof Buffer*/) return b.readDoubleLE(i); return ___double(b,i); };
+ is_buf = function is_buf_b(a) { return Buffer.isBuffer(a) || Array.isArray(a) || (typeof Uint8Array !== "undefined" && a instanceof Uint8Array); };
+}
+
+/* from js-xls */
+function cpdoit() {
+ __utf16le = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(1200, b.slice(s,e)).replace(chr0, ''); };
+ __utf8 = function(b/*:RawBytes|CFBlob*/,s/*:number*/,e/*:number*/) { return $cptable.utils.decode(65001, b.slice(s,e)); };
+ __lpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_ansi, b.slice(i+4, i+4+len-1)) : "";};
+ __cpstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(current_codepage, b.slice(i+4, i+4+len-1)) : "";};
+ __lpwstr = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = 2*__readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len-1)) : "";};
+ __lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(1200, b.slice(i+4,i+4+len)) : "";};
+ __8lpp4 = function(b/*:RawBytes|CFBlob*/,i/*:number*/) { var len = __readUInt32LE(b,i); return len > 0 ? $cptable.utils.decode(65001, b.slice(i+4,i+4+len)) : "";};
+}
+if(typeof $cptable !== 'undefined') cpdoit();
+
+var __readUInt8 = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx]; };
+var __readUInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+1]*(1<<8))+b[idx]; };
+var __readInt16LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { var u = (b[idx+1]*(1<<8))+b[idx]; return (u < 0x8000) ? u : ((0xffff - u + 1) * -1); };
+var __readUInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]; };
+var __readInt32LE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx+3]<<24)|(b[idx+2]<<16)|(b[idx+1]<<8)|b[idx]; };
+var __readInt32BE = function(b/*:RawBytes|CFBlob*/, idx/*:number*/)/*:number*/ { return (b[idx]<<24)|(b[idx+1]<<16)|(b[idx+2]<<8)|b[idx+3]; };
+
+function ReadShift(size/*:number*/, t/*:?string*/)/*:number|string*/ {
+ var o="", oI/*:: :number = 0*/, oR, oo=[], w, vv, i, loc;
+ switch(t) {
+ case 'dbcs':
+ loc = this.l;
+ if(has_buf && Buffer.isBuffer(this)) o = this.slice(this.l, this.l+2*size).toString("utf16le");
+ else for(i = 0; i < size; ++i) { o+=String.fromCharCode(__readUInt16LE(this, loc)); loc+=2; }
+ size *= 2;
+ break;
+
+ case 'utf8': o = __utf8(this, this.l, this.l + size); break;
+ case 'utf16le': size *= 2; o = __utf16le(this, this.l, this.l + size); break;
+
+ case 'wstr':
+ if(typeof $cptable !== 'undefined') o = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l+2*size));
+ else return ReadShift.call(this, size, 'dbcs');
+ size = 2 * size; break;
+
+ /* [MS-OLEDS] 2.1.4 LengthPrefixedAnsiString */
+ case 'lpstr-ansi': o = __lpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;
+ case 'lpstr-cp': o = __cpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;
+ /* [MS-OLEDS] 2.1.5 LengthPrefixedUnicodeString */
+ case 'lpwstr': o = __lpwstr(this, this.l); size = 4 + 2 * __readUInt32LE(this, this.l); break;
+ /* [MS-OFFCRYPTO] 2.1.2 Length-Prefixed Padded Unicode String (UNICODE-LP-P4) */
+ case 'lpp4': size = 4 + __readUInt32LE(this, this.l); o = __lpp4(this, this.l); if(size & 0x02) size += 2; break;
+ /* [MS-OFFCRYPTO] 2.1.3 Length-Prefixed UTF-8 String (UTF-8-LP-P4) */
+ case '8lpp4': size = 4 + __readUInt32LE(this, this.l); o = __8lpp4(this, this.l); if(size & 0x03) size += 4 - (size & 0x03); break;
+
+ case 'cstr': size = 0; o = "";
+ while((w=__readUInt8(this, this.l + size++))!==0) oo.push(_getchar(w));
+ o = oo.join(""); break;
+ case '_wstr': size = 0; o = "";
+ while((w=__readUInt16LE(this,this.l +size))!==0){oo.push(_getchar(w));size+=2;}
+ size+=2; o = oo.join(""); break;
+
+ /* sbcs and dbcs support continue records in the SST way TODO codepages */
+ case 'dbcs-cont': o = ""; loc = this.l;
+ for(i = 0; i < size; ++i) {
+ if(this.lens && this.lens.indexOf(loc) !== -1) {
+ w = __readUInt8(this, loc);
+ this.l = loc + 1;
+ vv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');
+ return oo.join("") + vv;
+ }
+ oo.push(_getchar(__readUInt16LE(this, loc)));
+ loc+=2;
+ } o = oo.join(""); size *= 2; break;
+
+ case 'cpstr':
+ if(typeof $cptable !== 'undefined') {
+ o = $cptable.utils.decode(current_codepage, this.slice(this.l, this.l + size));
+ break;
+ }
+ /* falls through */
+ case 'sbcs-cont': o = ""; loc = this.l;
+ for(i = 0; i != size; ++i) {
+ if(this.lens && this.lens.indexOf(loc) !== -1) {
+ w = __readUInt8(this, loc);
+ this.l = loc + 1;
+ vv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');
+ return oo.join("") + vv;
+ }
+ oo.push(_getchar(__readUInt8(this, loc)));
+ loc+=1;
+ } o = oo.join(""); break;
+
+ default:
+ switch(size) {
+ case 1: oI = __readUInt8(this, this.l); this.l++; return oI;
+ case 2: oI = (t === 'i' ? __readInt16LE : __readUInt16LE)(this, this.l); this.l += 2; return oI;
+ case 4: case -4:
+ if(t === 'i' || ((this[this.l+3] & 0x80)===0)) { oI = ((size > 0) ? __readInt32LE : __readInt32BE)(this, this.l); this.l += 4; return oI; }
+ else { oR = __readUInt32LE(this, this.l); this.l += 4; } return oR;
+ case 8: case -8:
+ if(t === 'f') {
+ if(size == 8) oR = __double(this, this.l);
+ else oR = __double([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]], 0);
+ this.l += 8; return oR;
+ } else size = 8;
+ /* falls through */
+ case 16: o = __hexlify(this, this.l, size); break;
+ }}
+ this.l+=size; return o;
+}
+
+var __writeUInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); b[idx+2] = ((val >>> 16) & 0xFF); b[idx+3] = ((val >>> 24) & 0xFF); };
+var __writeInt32LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >> 8) & 0xFF); b[idx+2] = ((val >> 16) & 0xFF); b[idx+3] = ((val >> 24) & 0xFF); };
+var __writeUInt16LE = function(b/*:RawBytes|CFBlob*/, val/*:number*/, idx/*:number*/)/*:void*/ { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); };
+
+function WriteShift(t/*:number*/, val/*:string|number*/, f/*:?string*/)/*:any*/ {
+ var size = 0, i = 0;
+ if(f === 'dbcs') {
+ /*:: if(typeof val !== 'string') throw new Error("unreachable"); */
+ for(i = 0; i != val.length; ++i) __writeUInt16LE(this, val.charCodeAt(i), this.l + 2 * i);
+ size = 2 * val.length;
+ } else if(f === 'sbcs') {
+ if(typeof $cptable !== 'undefined' && current_ansi == 874) {
+ /* TODO: use tables directly, don't encode */
+ /*:: if(typeof val !== "string") throw new Error("unreachable"); */
+ for(i = 0; i != val.length; ++i) {
+ var cppayload = $cptable.utils.encode(current_ansi, val.charAt(i));
+ this[this.l + i] = cppayload[0];
+ }
+ } else {
+ /*:: if(typeof val !== 'string') throw new Error("unreachable"); */
+ val = val.replace(/[^\x00-\x7F]/g, "_");
+ /*:: if(typeof val !== 'string') throw new Error("unreachable"); */
+ for(i = 0; i != val.length; ++i) this[this.l + i] = (val.charCodeAt(i) & 0xFF);
+ }
+ size = val.length;
+ } else if(f === 'hex') {
+ for(; i < t; ++i) {
+ /*:: if(typeof val !== "string") throw new Error("unreachable"); */
+ this[this.l++] = (parseInt(val.slice(2*i, 2*i+2), 16)||0);
+ } return this;
+ } else if(f === 'utf16le') {
+ /*:: if(typeof val !== "string") throw new Error("unreachable"); */
+ var end/*:number*/ = Math.min(this.l + t, this.length);
+ for(i = 0; i < Math.min(val.length, t); ++i) {
+ var cc = val.charCodeAt(i);
+ this[this.l++] = (cc & 0xff);
+ this[this.l++] = (cc >> 8);
+ }
+ while(this.l < end) this[this.l++] = 0;
+ return this;
+ } else /*:: if(typeof val === 'number') */ switch(t) {
+ case 1: size = 1; this[this.l] = val&0xFF; break;
+ case 2: size = 2; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; break;
+ case 3: size = 3; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; val >>>= 8; this[this.l+2] = val&0xFF; break;
+ case 4: size = 4; __writeUInt32LE(this, val, this.l); break;
+ case 8: size = 8; if(f === 'f') { write_double_le(this, val, this.l); break; }
+ /* falls through */
+ case 16: break;
+ case -4: size = 4; __writeInt32LE(this, val, this.l); break;
+ }
+ this.l += size; return this;
+}
+
+function CheckField(hexstr/*:string*/, fld/*:string*/)/*:void*/ {
+ var m = __hexlify(this,this.l,hexstr.length>>1);
+ if(m !== hexstr) throw new Error(fld + 'Expected ' + hexstr + ' saw ' + m);
+ this.l += hexstr.length>>1;
+}
+
+function prep_blob(blob, pos/*:number*/)/*:void*/ {
+ blob.l = pos;
+ blob.read_shift = /*::(*/ReadShift/*:: :any)*/;
+ blob.chk = CheckField;
+ blob.write_shift = WriteShift;
+}
+
+function parsenoop(blob, length/*:: :number, opts?:any */) { blob.l += length; }
+
+function new_buf(sz/*:number*/)/*:Block*/ {
+ var o = new_raw_buf(sz);
+ prep_blob(o, 0);
+ return o;
+}
+
+/* [MS-XLSB] 2.1.4 Record */
+function recordhopper(data, cb/*:RecordHopperCB*/, opts/*:?any*/) {
+ if(!data) return;
+ var tmpbyte, cntbyte, length;
+ prep_blob(data, data.l || 0);
+ var L = data.length, RT = 0, tgt = 0;
+ while(data.l < L) {
+ RT = data.read_shift(1);
+ if(RT & 0x80) RT = (RT & 0x7F) + ((data.read_shift(1) & 0x7F)<<7);
+ var R = XLSBRecordEnum[RT] || XLSBRecordEnum[0xFFFF];
+ tmpbyte = data.read_shift(1);
+ length = tmpbyte & 0x7F;
+ for(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);
+ tgt = data.l + length;
+ var d = R.f && R.f(data, length, opts);
+ data.l = tgt;
+ if(cb(d, R, RT)) return;
+ }
+}
+
+/* control buffer usage for fixed-length buffers */
+function buf_array()/*:BufArray*/ {
+ var bufs/*:Array*/ = [], blksz = has_buf ? 256 : 2048;
+ var newblk = function ba_newblk(sz/*:number*/)/*:Block*/ {
+ var o/*:Block*/ = (new_buf(sz)/*:any*/);
+ prep_blob(o, 0);
+ return o;
+ };
+
+ var curbuf/*:Block*/ = newblk(blksz);
+
+ var endbuf = function ba_endbuf() {
+ if(!curbuf) return;
+ if(curbuf.length > curbuf.l) { curbuf = curbuf.slice(0, curbuf.l); curbuf.l = curbuf.length; }
+ if(curbuf.length > 0) bufs.push(curbuf);
+ curbuf = null;
+ };
+
+ var next = function ba_next(sz/*:number*/)/*:Block*/ {
+ if(curbuf && (sz < (curbuf.length - curbuf.l))) return curbuf;
+ endbuf();
+ return (curbuf = newblk(Math.max(sz+1, blksz)));
+ };
+
+ var end = function ba_end() {
+ endbuf();
+ return bconcat(bufs);
+ };
+
+ var push = function ba_push(buf) { endbuf(); curbuf = buf; if(curbuf.l == null) curbuf.l = curbuf.length; next(blksz); };
+
+ return ({ next:next, push:push, end:end, _bufs:bufs }/*:any*/);
+}
+
+function write_record(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/) {
+ var t/*:number*/ = +type, l;
+ if(isNaN(t)) return; // TODO: throw something here?
+ if(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;
+ l = 1 + (t >= 0x80 ? 1 : 0) + 1/* + length*/;
+ if(length >= 0x80) ++l; if(length >= 0x4000) ++l; if(length >= 0x200000) ++l;
+ var o = ba.next(l);
+ if(t <= 0x7F) o.write_shift(1, t);
+ else {
+ o.write_shift(1, (t & 0x7F) + 0x80);
+ o.write_shift(1, (t >> 7));
+ }
+ for(var i = 0; i != 4; ++i) {
+ if(length >= 0x80) { o.write_shift(1, (length & 0x7F)+0x80); length >>= 7; }
+ else { o.write_shift(1, length); break; }
+ }
+ if(/*:: length != null &&*/length > 0 && is_buf(payload)) ba.push(payload);
+}
+/* XLS ranges enforced */
+function shift_cell_xls(cell/*:CellAddress*/, tgt/*:any*/, opts/*:?any*/)/*:CellAddress*/ {
+ var out = dup(cell);
+ if(tgt.s) {
+ if(out.cRel) out.c += tgt.s.c;
+ if(out.rRel) out.r += tgt.s.r;
+ } else {
+ if(out.cRel) out.c += tgt.c;
+ if(out.rRel) out.r += tgt.r;
+ }
+ if(!opts || opts.biff < 12) {
+ while(out.c >= 0x100) out.c -= 0x100;
+ while(out.r >= 0x10000) out.r -= 0x10000;
+ }
+ return out;
+}
+
+function shift_range_xls(cell, range, opts) {
+ var out = dup(cell);
+ out.s = shift_cell_xls(out.s, range.s, opts);
+ out.e = shift_cell_xls(out.e, range.s, opts);
+ return out;
+}
+
+function encode_cell_xls(c/*:CellAddress*/, biff/*:number*/)/*:string*/ {
+ if(c.cRel && c.c < 0) { c = dup(c); while(c.c < 0) c.c += (biff > 8) ? 0x4000 : 0x100; }
+ if(c.rRel && c.r < 0) { c = dup(c); while(c.r < 0) c.r += (biff > 8) ? 0x100000 : ((biff > 5) ? 0x10000 : 0x4000); }
+ var s = encode_cell(c);
+ if(!c.cRel && c.cRel != null) s = fix_col(s);
+ if(!c.rRel && c.rRel != null) s = fix_row(s);
+ return s;
+}
+
+function encode_range_xls(r, opts)/*:string*/ {
+ if(r.s.r == 0 && !r.s.rRel) {
+ if(r.e.r == (opts.biff >= 12 ? 0xFFFFF : (opts.biff >= 8 ? 0x10000 : 0x4000)) && !r.e.rRel) {
+ return (r.s.cRel ? "" : "$") + encode_col(r.s.c) + ":" + (r.e.cRel ? "" : "$") + encode_col(r.e.c);
+ }
+ }
+ if(r.s.c == 0 && !r.s.cRel) {
+ if(r.e.c == (opts.biff >= 12 ? 0x3FFF : 0xFF) && !r.e.cRel) {
+ return (r.s.rRel ? "" : "$") + encode_row(r.s.r) + ":" + (r.e.rRel ? "" : "$") + encode_row(r.e.r);
+ }
+ }
+ return encode_cell_xls(r.s, opts.biff) + ":" + encode_cell_xls(r.e, opts.biff);
+}
+function decode_row(rowstr/*:string*/)/*:number*/ { return parseInt(unfix_row(rowstr),10) - 1; }
+function encode_row(row/*:number*/)/*:string*/ { return "" + (row + 1); }
+function fix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/([A-Z]|^)(\d+)$/,"$1$$$2"); }
+function unfix_row(cstr/*:string*/)/*:string*/ { return cstr.replace(/\$(\d+)$/,"$1"); }
+
+function decode_col(colstr/*:string*/)/*:number*/ { var c = unfix_col(colstr), d = 0, i = 0; for(; i !== c.length; ++i) d = 26*d + c.charCodeAt(i) - 64; return d - 1; }
+function encode_col(col/*:number*/)/*:string*/ { if(col < 0) throw new Error("invalid column " + col); var s=""; for(++col; col; col=Math.floor((col-1)/26)) s = String.fromCharCode(((col-1)%26) + 65) + s; return s; }
+function fix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^([A-Z])/,"$$$1"); }
+function unfix_col(cstr/*:string*/)/*:string*/ { return cstr.replace(/^\$([A-Z])/,"$1"); }
+
+function split_cell(cstr/*:string*/)/*:Array*/ { return cstr.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(","); }
+//function decode_cell(cstr/*:string*/)/*:CellAddress*/ { var splt = split_cell(cstr); return { c:decode_col(splt[0]), r:decode_row(splt[1]) }; }
+function decode_cell(cstr/*:string*/)/*:CellAddress*/ {
+ var R = 0, C = 0;
+ for(var i = 0; i < cstr.length; ++i) {
+ var cc = cstr.charCodeAt(i);
+ if(cc >= 48 && cc <= 57) R = 10 * R + (cc - 48);
+ else if(cc >= 65 && cc <= 90) C = 26 * C + (cc - 64);
+ }
+ return { c: C - 1, r:R - 1 };
+}
+//function encode_cell(cell/*:CellAddress*/)/*:string*/ { return encode_col(cell.c) + encode_row(cell.r); }
+function encode_cell(cell/*:CellAddress*/)/*:string*/ {
+ var col = cell.c + 1;
+ var s="";
+ for(; col; col=((col-1)/26)|0) s = String.fromCharCode(((col-1)%26) + 65) + s;
+ return s + (cell.r + 1);
+}
+function decode_range(range/*:string*/)/*:Range*/ {
+ var idx = range.indexOf(":");
+ if(idx == -1) return { s: decode_cell(range), e: decode_cell(range) };
+ return { s: decode_cell(range.slice(0, idx)), e: decode_cell(range.slice(idx + 1)) };
+}
+/*# if only one arg, it is assumed to be a Range. If 2 args, both are cell addresses */
+function encode_range(cs/*:CellAddrSpec|Range*/,ce/*:?CellAddrSpec*/)/*:string*/ {
+ if(typeof ce === 'undefined' || typeof ce === 'number') {
+/*:: if(!(cs instanceof Range)) throw "unreachable"; */
+ return encode_range(cs.s, cs.e);
+ }
+/*:: if((cs instanceof Range)) throw "unreachable"; */
+ if(typeof cs !== 'string') cs = encode_cell((cs/*:any*/));
+ if(typeof ce !== 'string') ce = encode_cell((ce/*:any*/));
+/*:: if(typeof cs !== 'string') throw "unreachable"; */
+/*:: if(typeof ce !== 'string') throw "unreachable"; */
+ return cs == ce ? cs : cs + ":" + ce;
+}
+
+function safe_decode_range(range/*:string*/)/*:Range*/ {
+ var o = {s:{c:0,r:0},e:{c:0,r:0}};
+ var idx = 0, i = 0, cc = 0;
+ var len = range.length;
+ for(idx = 0; i < len; ++i) {
+ if((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;
+ idx = 26*idx + cc;
+ }
+ o.s.c = --idx;
+
+ for(idx = 0; i < len; ++i) {
+ if((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;
+ idx = 10*idx + cc;
+ }
+ o.s.r = --idx;
+
+ if(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }
+ ++i;
+
+ for(idx = 0; i != len; ++i) {
+ if((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;
+ idx = 26*idx + cc;
+ }
+ o.e.c = --idx;
+
+ for(idx = 0; i != len; ++i) {
+ if((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;
+ idx = 10*idx + cc;
+ }
+ o.e.r = --idx;
+ return o;
+}
+
+function safe_format_cell(cell/*:Cell*/, v/*:any*/) {
+ var q = (cell.t == 'd' && v instanceof Date);
+ if(cell.z != null) try { return (cell.w = SSF_format(cell.z, q ? datenum(v) : v)); } catch(e) { }
+ try { return (cell.w = SSF_format((cell.XF||{}).numFmtId||(q ? 14 : 0), q ? datenum(v) : v)); } catch(e) { return ''+v; }
+}
+
+function format_cell(cell/*:Cell*/, v/*:any*/, o/*:any*/) {
+ if(cell == null || cell.t == null || cell.t == 'z') return "";
+ if(cell.w !== undefined) return cell.w;
+ if(cell.t == 'd' && !cell.z && o && o.dateNF) cell.z = o.dateNF;
+ if(cell.t == "e") return BErr[cell.v] || cell.v;
+ if(v == undefined) return safe_format_cell(cell, cell.v);
+ return safe_format_cell(cell, v);
+}
+
+function sheet_to_workbook(sheet/*:Worksheet*/, opts)/*:Workbook*/ {
+ var n = opts && opts.sheet ? opts.sheet : "Sheet1";
+ var sheets = {}; sheets[n] = sheet;
+ return { SheetNames: [n], Sheets: sheets };
+}
+
+function sheet_add_aoa(_ws/*:?Worksheet*/, data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ {
+ var o = opts || {};
+ var dense = _ws ? Array.isArray(_ws) : o.dense;
+ if(DENSE != null && dense == null) dense = DENSE;
+ var ws/*:Worksheet*/ = _ws || (dense ? ([]/*:any*/) : ({}/*:any*/));
+ var _R = 0, _C = 0;
+ if(ws && o.origin != null) {
+ if(typeof o.origin == 'number') _R = o.origin;
+ else {
+ var _origin/*:CellAddress*/ = typeof o.origin == "string" ? decode_cell(o.origin) : o.origin;
+ _R = _origin.r; _C = _origin.c;
+ }
+ if(!ws["!ref"]) ws["!ref"] = "A1:A1";
+ }
+ var range/*:Range*/ = ({s: {c:10000000, r:10000000}, e: {c:0, r:0}}/*:any*/);
+ if(ws['!ref']) {
+ var _range = safe_decode_range(ws['!ref']);
+ range.s.c = _range.s.c;
+ range.s.r = _range.s.r;
+ range.e.c = Math.max(range.e.c, _range.e.c);
+ range.e.r = Math.max(range.e.r, _range.e.r);
+ if(_R == -1) range.e.r = _R = _range.e.r + 1;
+ }
+ for(var R = 0; R != data.length; ++R) {
+ if(!data[R]) continue;
+ if(!Array.isArray(data[R])) throw new Error("aoa_to_sheet expects an array of arrays");
+ for(var C = 0; C != data[R].length; ++C) {
+ if(typeof data[R][C] === 'undefined') continue;
+ var cell/*:Cell*/ = ({v: data[R][C] }/*:any*/);
+ var __R = _R + R, __C = _C + C;
+ if(range.s.r > __R) range.s.r = __R;
+ if(range.s.c > __C) range.s.c = __C;
+ if(range.e.r < __R) range.e.r = __R;
+ if(range.e.c < __C) range.e.c = __C;
+ if(data[R][C] && typeof data[R][C] === 'object' && !Array.isArray(data[R][C]) && !(data[R][C] instanceof Date)) cell = data[R][C];
+ else {
+ if(Array.isArray(cell.v)) { cell.f = data[R][C][1]; cell.v = cell.v[0]; }
+ if(cell.v === null) {
+ if(cell.f) cell.t = 'n';
+ else if(o.nullError) { cell.t = 'e'; cell.v = 0; }
+ else if(!o.sheetStubs) continue;
+ else cell.t = 'z';
+ }
+ else if(typeof cell.v === 'number') cell.t = 'n';
+ else if(typeof cell.v === 'boolean') cell.t = 'b';
+ else if(cell.v instanceof Date) {
+ cell.z = o.dateNF || table_fmt[14];
+ if(o.cellDates) { cell.t = 'd'; cell.w = SSF_format(cell.z, datenum(cell.v)); }
+ else { cell.t = 'n'; cell.v = datenum(cell.v); cell.w = SSF_format(cell.z, cell.v); }
+ }
+ else cell.t = 's';
+ }
+ if(dense) {
+ if(!ws[__R]) ws[__R] = [];
+ if(ws[__R][__C] && ws[__R][__C].z) cell.z = ws[__R][__C].z;
+ ws[__R][__C] = cell;
+ } else {
+ var cell_ref = encode_cell(({c:__C,r:__R}/*:any*/));
+ if(ws[cell_ref] && ws[cell_ref].z) cell.z = ws[cell_ref].z;
+ ws[cell_ref] = cell;
+ }
+ }
+ }
+ if(range.s.c < 10000000) ws['!ref'] = encode_range(range);
+ return ws;
+}
+function aoa_to_sheet(data/*:AOA*/, opts/*:?any*/)/*:Worksheet*/ { return sheet_add_aoa(null, data, opts); }
+
+function parse_Int32LE(data) {
+ return data.read_shift(4, 'i');
+}
+function write_UInt32LE(x/*:number*/, o) {
+ if (!o) o = new_buf(4);
+ o.write_shift(4, x);
+ return o;
+}
+
+/* [MS-XLSB] 2.5.168 */
+function parse_XLWideString(data/*::, length*/)/*:string*/ {
+ var cchCharacters = data.read_shift(4);
+ return cchCharacters === 0 ? "" : data.read_shift(cchCharacters, 'dbcs');
+}
+function write_XLWideString(data/*:string*/, o) {
+ var _null = false; if (o == null) { _null = true; o = new_buf(4 + 2 * data.length); }
+ o.write_shift(4, data.length);
+ if (data.length > 0) o.write_shift(0, data, 'dbcs');
+ return _null ? o.slice(0, o.l) : o;
+}
+
+/* [MS-XLSB] 2.5.91 */
+//function parse_LPWideString(data/*::, length*/)/*:string*/ {
+// var cchCharacters = data.read_shift(2);
+// return cchCharacters === 0 ? "" : data.read_shift(cchCharacters, "utf16le");
+//}
+
+/* [MS-XLSB] 2.5.143 */
+function parse_StrRun(data) {
+ return { ich: data.read_shift(2), ifnt: data.read_shift(2) };
+}
+function write_StrRun(run, o) {
+ if (!o) o = new_buf(4);
+ o.write_shift(2, run.ich || 0);
+ o.write_shift(2, run.ifnt || 0);
+ return o;
+}
+
+/* [MS-XLSB] 2.5.121 */
+function parse_RichStr(data, length/*:number*/)/*:XLString*/ {
+ var start = data.l;
+ var flags = data.read_shift(1);
+ var str = parse_XLWideString(data);
+ var rgsStrRun = [];
+ var z = ({ t: str, h: str }/*:any*/);
+ if ((flags & 1) !== 0) { /* fRichStr */
+ /* TODO: formatted string */
+ var dwSizeStrRun = data.read_shift(4);
+ for (var i = 0; i != dwSizeStrRun; ++i) rgsStrRun.push(parse_StrRun(data));
+ z.r = rgsStrRun;
+ }
+ else z.r = [{ ich: 0, ifnt: 0 }];
+ //if((flags & 2) !== 0) { /* fExtStr */
+ // /* TODO: phonetic string */
+ //}
+ data.l = start + length;
+ return z;
+}
+function write_RichStr(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {
+ /* TODO: formatted string */
+ var _null = false; if (o == null) { _null = true; o = new_buf(15 + 4 * str.t.length); }
+ o.write_shift(1, 0);
+ write_XLWideString(str.t, o);
+ return _null ? o.slice(0, o.l) : o;
+}
+/* [MS-XLSB] 2.4.328 BrtCommentText (RichStr w/1 run) */
+var parse_BrtCommentText = parse_RichStr;
+function write_BrtCommentText(str/*:XLString*/, o/*:?Block*/)/*:Block*/ {
+ /* TODO: formatted string */
+ var _null = false; if (o == null) { _null = true; o = new_buf(23 + 4 * str.t.length); }
+ o.write_shift(1, 1);
+ write_XLWideString(str.t, o);
+ o.write_shift(4, 1);
+ write_StrRun({ ich: 0, ifnt: 0 }, o);
+ return _null ? o.slice(0, o.l) : o;
+}
+
+/* [MS-XLSB] 2.5.9 */
+function parse_XLSBCell(data)/*:any*/ {
+ var col = data.read_shift(4);
+ var iStyleRef = data.read_shift(2);
+ iStyleRef += data.read_shift(1) << 16;
+ data.l++; //var fPhShow = data.read_shift(1);
+ return { c: col, iStyleRef: iStyleRef };
+}
+function write_XLSBCell(cell/*:any*/, o/*:?Block*/) {
+ if (o == null) o = new_buf(8);
+ o.write_shift(-4, cell.c);
+ o.write_shift(3, cell.iStyleRef || cell.s);
+ o.write_shift(1, 0); /* fPhShow */
+ return o;
+}
+
+/* Short XLSB Cell does not include column */
+function parse_XLSBShortCell(data)/*:any*/ {
+ var iStyleRef = data.read_shift(2);
+ iStyleRef += data.read_shift(1) <<16;
+ data.l++; //var fPhShow = data.read_shift(1);
+ return { c:-1, iStyleRef: iStyleRef };
+}
+function write_XLSBShortCell(cell/*:any*/, o/*:?Block*/) {
+ if(o == null) o = new_buf(4);
+ o.write_shift(3, cell.iStyleRef || cell.s);
+ o.write_shift(1, 0); /* fPhShow */
+ return o;
+}
+
+/* [MS-XLSB] 2.5.21 */
+var parse_XLSBCodeName = parse_XLWideString;
+var write_XLSBCodeName = write_XLWideString;
+
+/* [MS-XLSB] 2.5.166 */
+function parse_XLNullableWideString(data/*::, length*/)/*:string*/ {
+ var cchCharacters = data.read_shift(4);
+ return cchCharacters === 0 || cchCharacters === 0xFFFFFFFF ? "" : data.read_shift(cchCharacters, 'dbcs');
+}
+function write_XLNullableWideString(data/*:string*/, o) {
+ var _null = false; if (o == null) { _null = true; o = new_buf(127); }
+ o.write_shift(4, data.length > 0 ? data.length : 0xFFFFFFFF);
+ if (data.length > 0) o.write_shift(0, data, 'dbcs');
+ return _null ? o.slice(0, o.l) : o;
+}
+
+/* [MS-XLSB] 2.5.165 */
+var parse_XLNameWideString = parse_XLWideString;
+//var write_XLNameWideString = write_XLWideString;
+
+/* [MS-XLSB] 2.5.114 */
+var parse_RelID = parse_XLNullableWideString;
+var write_RelID = write_XLNullableWideString;
+
+
+/* [MS-XLS] 2.5.217 ; [MS-XLSB] 2.5.122 */
+function parse_RkNumber(data)/*:number*/ {
+ var b = data.slice(data.l, data.l + 4);
+ var fX100 = (b[0] & 1), fInt = (b[0] & 2);
+ data.l += 4;
+ var RK = fInt === 0 ? __double([0, 0, 0, 0, (b[0] & 0xFC), b[1], b[2], b[3]], 0) : __readInt32LE(b, 0) >> 2;
+ return fX100 ? (RK / 100) : RK;
+}
+function write_RkNumber(data/*:number*/, o) {
+ if (o == null) o = new_buf(4);
+ var fX100 = 0, fInt = 0, d100 = data * 100;
+ if ((data == (data | 0)) && (data >= -(1 << 29)) && (data < (1 << 29))) { fInt = 1; }
+ else if ((d100 == (d100 | 0)) && (d100 >= -(1 << 29)) && (d100 < (1 << 29))) { fInt = 1; fX100 = 1; }
+ if (fInt) o.write_shift(-4, ((fX100 ? d100 : data) << 2) + (fX100 + 2));
+ else throw new Error("unsupported RkNumber " + data); // TODO
+}
+
+
+/* [MS-XLSB] 2.5.117 RfX */
+function parse_RfX(data /*::, length*/)/*:Range*/ {
+ var cell/*:Range*/ = ({ s: {}, e: {} }/*:any*/);
+ cell.s.r = data.read_shift(4);
+ cell.e.r = data.read_shift(4);
+ cell.s.c = data.read_shift(4);
+ cell.e.c = data.read_shift(4);
+ return cell;
+}
+function write_RfX(r/*:Range*/, o) {
+ if (!o) o = new_buf(16);
+ o.write_shift(4, r.s.r);
+ o.write_shift(4, r.e.r);
+ o.write_shift(4, r.s.c);
+ o.write_shift(4, r.e.c);
+ return o;
+}
+
+/* [MS-XLSB] 2.5.153 UncheckedRfX */
+var parse_UncheckedRfX = parse_RfX;
+var write_UncheckedRfX = write_RfX;
+
+/* [MS-XLSB] 2.5.155 UncheckedSqRfX */
+//function parse_UncheckedSqRfX(data) {
+// var cnt = data.read_shift(4);
+// var out = [];
+// for(var i = 0; i < cnt; ++i) {
+// var rng = parse_UncheckedRfX(data);
+// out.push(encode_range(rng));
+// }
+// return out.join(",");
+//}
+//function write_UncheckedSqRfX(sqrfx/*:string*/) {
+// var parts = sqrfx.split(/\s*,\s*/);
+// var o = new_buf(4); o.write_shift(4, parts.length);
+// var out = [o];
+// parts.forEach(function(rng) {
+// out.push(write_UncheckedRfX(safe_decode_range(rng)));
+// });
+// return bconcat(out);
+//}
+
+/* [MS-XLS] 2.5.342 ; [MS-XLSB] 2.5.171 */
+/* TODO: error checking, NaN and Infinity values are not valid Xnum */
+function parse_Xnum(data/*::, length*/) {
+ if(data.length - data.l < 8) throw "XLS Xnum Buffer underflow";
+ return data.read_shift(8, 'f');
+}
+function write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }
+
+/* [MS-XLSB] 2.4.324 BrtColor */
+function parse_BrtColor(data/*::, length*/) {
+ var out = {};
+ var d = data.read_shift(1);
+
+ //var fValidRGB = d & 1;
+ var xColorType = d >>> 1;
+
+ var index = data.read_shift(1);
+ var nTS = data.read_shift(2, 'i');
+ var bR = data.read_shift(1);
+ var bG = data.read_shift(1);
+ var bB = data.read_shift(1);
+ data.l++; //var bAlpha = data.read_shift(1);
+
+ switch (xColorType) {
+ case 0: out.auto = 1; break;
+ case 1:
+ out.index = index;
+ var icv = XLSIcv[index];
+ /* automatic pseudo index 81 */
+ if (icv) out.rgb = rgb2Hex(icv);
+ break;
+ case 2:
+ /* if(!fValidRGB) throw new Error("invalid"); */
+ out.rgb = rgb2Hex([bR, bG, bB]);
+ break;
+ case 3: out.theme = index; break;
+ }
+ if (nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768;
+
+ return out;
+}
+function write_BrtColor(color, o) {
+ if (!o) o = new_buf(8);
+ if (!color || color.auto) { o.write_shift(4, 0); o.write_shift(4, 0); return o; }
+ if (color.index != null) {
+ o.write_shift(1, 0x02);
+ o.write_shift(1, color.index);
+ } else if (color.theme != null) {
+ o.write_shift(1, 0x06);
+ o.write_shift(1, color.theme);
+ } else {
+ o.write_shift(1, 0x05);
+ o.write_shift(1, 0);
+ }
+ var nTS = color.tint || 0;
+ if (nTS > 0) nTS *= 32767;
+ else if (nTS < 0) nTS *= 32768;
+ o.write_shift(2, nTS);
+ if (!color.rgb || color.theme != null) {
+ o.write_shift(2, 0);
+ o.write_shift(1, 0);
+ o.write_shift(1, 0);
+ } else {
+ var rgb = (color.rgb || 'FFFFFF');
+ if (typeof rgb == 'number') rgb = ("000000" + rgb.toString(16)).slice(-6);
+ o.write_shift(1, parseInt(rgb.slice(0, 2), 16));
+ o.write_shift(1, parseInt(rgb.slice(2, 4), 16));
+ o.write_shift(1, parseInt(rgb.slice(4, 6), 16));
+ o.write_shift(1, 0xFF);
+ }
+ return o;
+}
+
+/* [MS-XLSB] 2.5.52 */
+function parse_FontFlags(data/*::, length, opts*/) {
+ var d = data.read_shift(1);
+ data.l++;
+ var out = {
+ fBold: d & 0x01,
+ fItalic: d & 0x02,
+ fUnderline: d & 0x04,
+ fStrikeout: d & 0x08,
+ fOutline: d & 0x10,
+ fShadow: d & 0x20,
+ fCondense: d & 0x40,
+ fExtend: d & 0x80
+ };
+ return out;
+}
+function write_FontFlags(font, o) {
+ if (!o) o = new_buf(2);
+ var grbit =
+ (font.italic ? 0x02 : 0) |
+ (font.strike ? 0x08 : 0) |
+ (font.outline ? 0x10 : 0) |
+ (font.shadow ? 0x20 : 0) |
+ (font.condense ? 0x40 : 0) |
+ (font.extend ? 0x80 : 0);
+ o.write_shift(1, grbit);
+ o.write_shift(1, 0);
+ return o;
+}
+
+/* [MS-OLEDS] 2.3.1 and 2.3.2 */
+function parse_ClipboardFormatOrString(o, w/*:number*/)/*:string*/ {
+ // $FlowIgnore
+ var ClipFmt = { 2: "BITMAP", 3: "METAFILEPICT", 8: "DIB", 14: "ENHMETAFILE" };
+ var m/*:number*/ = o.read_shift(4);
+ switch (m) {
+ case 0x00000000: return "";
+ case 0xffffffff: case 0xfffffffe: return ClipFmt[o.read_shift(4)] || "";
+ }
+ if (m > 0x190) throw new Error("Unsupported Clipboard: " + m.toString(16));
+ o.l -= 4;
+ return o.read_shift(0, w == 1 ? "lpstr" : "lpwstr");
+}
+function parse_ClipboardFormatOrAnsiString(o) { return parse_ClipboardFormatOrString(o, 1); }
+function parse_ClipboardFormatOrUnicodeString(o) { return parse_ClipboardFormatOrString(o, 2); }
+
+/* [MS-OLEPS] 2.2 PropertyType */
+// Note: some tree shakers cannot handle VT_VECTOR | $CONST, hence extra vars
+//var VT_EMPTY = 0x0000;
+//var VT_NULL = 0x0001;
+var VT_I2 = 0x0002;
+var VT_I4 = 0x0003;
+//var VT_R4 = 0x0004;
+//var VT_R8 = 0x0005;
+//var VT_CY = 0x0006;
+//var VT_DATE = 0x0007;
+//var VT_BSTR = 0x0008;
+//var VT_ERROR = 0x000A;
+var VT_BOOL = 0x000B;
+var VT_VARIANT = 0x000C;
+//var VT_DECIMAL = 0x000E;
+//var VT_I1 = 0x0010;
+//var VT_UI1 = 0x0011;
+//var VT_UI2 = 0x0012;
+var VT_UI4 = 0x0013;
+//var VT_I8 = 0x0014;
+//var VT_UI8 = 0x0015;
+//var VT_INT = 0x0016;
+//var VT_UINT = 0x0017;
+var VT_LPSTR = 0x001E;
+//var VT_LPWSTR = 0x001F;
+var VT_FILETIME = 0x0040;
+var VT_BLOB = 0x0041;
+//var VT_STREAM = 0x0042;
+//var VT_STORAGE = 0x0043;
+//var VT_STREAMED_Object = 0x0044;
+//var VT_STORED_Object = 0x0045;
+//var VT_BLOB_Object = 0x0046;
+var VT_CF = 0x0047;
+//var VT_CLSID = 0x0048;
+//var VT_VERSIONED_STREAM = 0x0049;
+var VT_VECTOR = 0x1000;
+var VT_VECTOR_VARIANT = 0x100C;
+var VT_VECTOR_LPSTR = 0x101E;
+//var VT_ARRAY = 0x2000;
+
+var VT_STRING = 0x0050; // 2.3.3.1.11 VtString
+var VT_USTR = 0x0051; // 2.3.3.1.12 VtUnalignedString
+var VT_CUSTOM = [VT_STRING, VT_USTR];
+
+/* [MS-OSHARED] 2.3.3.2.2.1 Document Summary Information PIDDSI */
+var DocSummaryPIDDSI = {
+ /*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },
+ /*::[*/0x02/*::]*/: { n: 'Category', t: VT_STRING },
+ /*::[*/0x03/*::]*/: { n: 'PresentationFormat', t: VT_STRING },
+ /*::[*/0x04/*::]*/: { n: 'ByteCount', t: VT_I4 },
+ /*::[*/0x05/*::]*/: { n: 'LineCount', t: VT_I4 },
+ /*::[*/0x06/*::]*/: { n: 'ParagraphCount', t: VT_I4 },
+ /*::[*/0x07/*::]*/: { n: 'SlideCount', t: VT_I4 },
+ /*::[*/0x08/*::]*/: { n: 'NoteCount', t: VT_I4 },
+ /*::[*/0x09/*::]*/: { n: 'HiddenCount', t: VT_I4 },
+ /*::[*/0x0a/*::]*/: { n: 'MultimediaClipCount', t: VT_I4 },
+ /*::[*/0x0b/*::]*/: { n: 'ScaleCrop', t: VT_BOOL },
+ /*::[*/0x0c/*::]*/: { n: 'HeadingPairs', t: VT_VECTOR_VARIANT /* VT_VECTOR | VT_VARIANT */ },
+ /*::[*/0x0d/*::]*/: { n: 'TitlesOfParts', t: VT_VECTOR_LPSTR /* VT_VECTOR | VT_LPSTR */ },
+ /*::[*/0x0e/*::]*/: { n: 'Manager', t: VT_STRING },
+ /*::[*/0x0f/*::]*/: { n: 'Company', t: VT_STRING },
+ /*::[*/0x10/*::]*/: { n: 'LinksUpToDate', t: VT_BOOL },
+ /*::[*/0x11/*::]*/: { n: 'CharacterCount', t: VT_I4 },
+ /*::[*/0x13/*::]*/: { n: 'SharedDoc', t: VT_BOOL },
+ /*::[*/0x16/*::]*/: { n: 'HyperlinksChanged', t: VT_BOOL },
+ /*::[*/0x17/*::]*/: { n: 'AppVersion', t: VT_I4, p: 'version' },
+ /*::[*/0x18/*::]*/: { n: 'DigSig', t: VT_BLOB },
+ /*::[*/0x1A/*::]*/: { n: 'ContentType', t: VT_STRING },
+ /*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING },
+ /*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING },
+ /*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING },
+ /*::[*/0xFF/*::]*/: {},
+ /* [MS-OLEPS] 2.18 */
+ /*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
+ /*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
+ /*::[*/0x72627262/*::]*/: {}
+};
+
+/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */
+var SummaryPIDSI = {
+ /*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 },
+ /*::[*/0x02/*::]*/: { n: 'Title', t: VT_STRING },
+ /*::[*/0x03/*::]*/: { n: 'Subject', t: VT_STRING },
+ /*::[*/0x04/*::]*/: { n: 'Author', t: VT_STRING },
+ /*::[*/0x05/*::]*/: { n: 'Keywords', t: VT_STRING },
+ /*::[*/0x06/*::]*/: { n: 'Comments', t: VT_STRING },
+ /*::[*/0x07/*::]*/: { n: 'Template', t: VT_STRING },
+ /*::[*/0x08/*::]*/: { n: 'LastAuthor', t: VT_STRING },
+ /*::[*/0x09/*::]*/: { n: 'RevNumber', t: VT_STRING },
+ /*::[*/0x0A/*::]*/: { n: 'EditTime', t: VT_FILETIME },
+ /*::[*/0x0B/*::]*/: { n: 'LastPrinted', t: VT_FILETIME },
+ /*::[*/0x0C/*::]*/: { n: 'CreatedDate', t: VT_FILETIME },
+ /*::[*/0x0D/*::]*/: { n: 'ModifiedDate', t: VT_FILETIME },
+ /*::[*/0x0E/*::]*/: { n: 'PageCount', t: VT_I4 },
+ /*::[*/0x0F/*::]*/: { n: 'WordCount', t: VT_I4 },
+ /*::[*/0x10/*::]*/: { n: 'CharCount', t: VT_I4 },
+ /*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF },
+ /*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING },
+ /*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 },
+ /*::[*/0xFF/*::]*/: {},
+ /* [MS-OLEPS] 2.18 */
+ /*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 },
+ /*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 },
+ /*::[*/0x72627262/*::]*/: {}
+};
+
+/* [MS-XLS] 2.4.63 Country/Region codes */
+var CountryEnum = {
+ /*::[*/0x0001/*::]*/: "US", // United States
+ /*::[*/0x0002/*::]*/: "CA", // Canada
+ /*::[*/0x0003/*::]*/: "", // Latin America (except Brazil)
+ /*::[*/0x0007/*::]*/: "RU", // Russia
+ /*::[*/0x0014/*::]*/: "EG", // Egypt
+ /*::[*/0x001E/*::]*/: "GR", // Greece
+ /*::[*/0x001F/*::]*/: "NL", // Netherlands
+ /*::[*/0x0020/*::]*/: "BE", // Belgium
+ /*::[*/0x0021/*::]*/: "FR", // France
+ /*::[*/0x0022/*::]*/: "ES", // Spain
+ /*::[*/0x0024/*::]*/: "HU", // Hungary
+ /*::[*/0x0027/*::]*/: "IT", // Italy
+ /*::[*/0x0029/*::]*/: "CH", // Switzerland
+ /*::[*/0x002B/*::]*/: "AT", // Austria
+ /*::[*/0x002C/*::]*/: "GB", // United Kingdom
+ /*::[*/0x002D/*::]*/: "DK", // Denmark
+ /*::[*/0x002E/*::]*/: "SE", // Sweden
+ /*::[*/0x002F/*::]*/: "NO", // Norway
+ /*::[*/0x0030/*::]*/: "PL", // Poland
+ /*::[*/0x0031/*::]*/: "DE", // Germany
+ /*::[*/0x0034/*::]*/: "MX", // Mexico
+ /*::[*/0x0037/*::]*/: "BR", // Brazil
+ /*::[*/0x003d/*::]*/: "AU", // Australia
+ /*::[*/0x0040/*::]*/: "NZ", // New Zealand
+ /*::[*/0x0042/*::]*/: "TH", // Thailand
+ /*::[*/0x0051/*::]*/: "JP", // Japan
+ /*::[*/0x0052/*::]*/: "KR", // Korea
+ /*::[*/0x0054/*::]*/: "VN", // Viet Nam
+ /*::[*/0x0056/*::]*/: "CN", // China
+ /*::[*/0x005A/*::]*/: "TR", // Turkey
+ /*::[*/0x0069/*::]*/: "JS", // Ramastan
+ /*::[*/0x00D5/*::]*/: "DZ", // Algeria
+ /*::[*/0x00D8/*::]*/: "MA", // Morocco
+ /*::[*/0x00DA/*::]*/: "LY", // Libya
+ /*::[*/0x015F/*::]*/: "PT", // Portugal
+ /*::[*/0x0162/*::]*/: "IS", // Iceland
+ /*::[*/0x0166/*::]*/: "FI", // Finland
+ /*::[*/0x01A4/*::]*/: "CZ", // Czech Republic
+ /*::[*/0x0376/*::]*/: "TW", // Taiwan
+ /*::[*/0x03C1/*::]*/: "LB", // Lebanon
+ /*::[*/0x03C2/*::]*/: "JO", // Jordan
+ /*::[*/0x03C3/*::]*/: "SY", // Syria
+ /*::[*/0x03C4/*::]*/: "IQ", // Iraq
+ /*::[*/0x03C5/*::]*/: "KW", // Kuwait
+ /*::[*/0x03C6/*::]*/: "SA", // Saudi Arabia
+ /*::[*/0x03CB/*::]*/: "AE", // United Arab Emirates
+ /*::[*/0x03CC/*::]*/: "IL", // Israel
+ /*::[*/0x03CE/*::]*/: "QA", // Qatar
+ /*::[*/0x03D5/*::]*/: "IR", // Iran
+ /*::[*/0xFFFF/*::]*/: "US" // United States
+};
+
+/* [MS-XLS] 2.5.127 */
+var XLSFillPattern = [
+ null,
+ 'solid',
+ 'mediumGray',
+ 'darkGray',
+ 'lightGray',
+ 'darkHorizontal',
+ 'darkVertical',
+ 'darkDown',
+ 'darkUp',
+ 'darkGrid',
+ 'darkTrellis',
+ 'lightHorizontal',
+ 'lightVertical',
+ 'lightDown',
+ 'lightUp',
+ 'lightGrid',
+ 'lightTrellis',
+ 'gray125',
+ 'gray0625'
+];
+
+function rgbify(arr/*:Array*/)/*:Array<[number, number, number]>*/ { return arr.map(function(x) { return [(x>>16)&255,(x>>8)&255,x&255]; }); }
+
+/* [MS-XLS] 2.5.161 */
+/* [MS-XLSB] 2.5.75 Icv */
+var _XLSIcv = /*#__PURE__*/ rgbify([
+ /* Color Constants */
+ 0x000000,
+ 0xFFFFFF,
+ 0xFF0000,
+ 0x00FF00,
+ 0x0000FF,
+ 0xFFFF00,
+ 0xFF00FF,
+ 0x00FFFF,
+
+ /* Overridable Defaults */
+ 0x000000,
+ 0xFFFFFF,
+ 0xFF0000,
+ 0x00FF00,
+ 0x0000FF,
+ 0xFFFF00,
+ 0xFF00FF,
+ 0x00FFFF,
+
+ 0x800000,
+ 0x008000,
+ 0x000080,
+ 0x808000,
+ 0x800080,
+ 0x008080,
+ 0xC0C0C0,
+ 0x808080,
+ 0x9999FF,
+ 0x993366,
+ 0xFFFFCC,
+ 0xCCFFFF,
+ 0x660066,
+ 0xFF8080,
+ 0x0066CC,
+ 0xCCCCFF,
+
+ 0x000080,
+ 0xFF00FF,
+ 0xFFFF00,
+ 0x00FFFF,
+ 0x800080,
+ 0x800000,
+ 0x008080,
+ 0x0000FF,
+ 0x00CCFF,
+ 0xCCFFFF,
+ 0xCCFFCC,
+ 0xFFFF99,
+ 0x99CCFF,
+ 0xFF99CC,
+ 0xCC99FF,
+ 0xFFCC99,
+
+ 0x3366FF,
+ 0x33CCCC,
+ 0x99CC00,
+ 0xFFCC00,
+ 0xFF9900,
+ 0xFF6600,
+ 0x666699,
+ 0x969696,
+ 0x003366,
+ 0x339966,
+ 0x003300,
+ 0x333300,
+ 0x993300,
+ 0x993366,
+ 0x333399,
+ 0x333333,
+
+ /* Other entries to appease BIFF8/12 */
+ 0xFFFFFF, /* 0x40 icvForeground ?? */
+ 0x000000, /* 0x41 icvBackground ?? */
+ 0x000000, /* 0x42 icvFrame ?? */
+ 0x000000, /* 0x43 icv3D ?? */
+ 0x000000, /* 0x44 icv3DText ?? */
+ 0x000000, /* 0x45 icv3DHilite ?? */
+ 0x000000, /* 0x46 icv3DShadow ?? */
+ 0x000000, /* 0x47 icvHilite ?? */
+ 0x000000, /* 0x48 icvCtlText ?? */
+ 0x000000, /* 0x49 icvCtlScrl ?? */
+ 0x000000, /* 0x4A icvCtlInv ?? */
+ 0x000000, /* 0x4B icvCtlBody ?? */
+ 0x000000, /* 0x4C icvCtlFrame ?? */
+ 0x000000, /* 0x4D icvCtlFore ?? */
+ 0x000000, /* 0x4E icvCtlBack ?? */
+ 0x000000, /* 0x4F icvCtlNeutral */
+ 0x000000, /* 0x50 icvInfoBk ?? */
+ 0x000000 /* 0x51 icvInfoText ?? */
+]);
+var XLSIcv = /*#__PURE__*/dup(_XLSIcv);
+
+/* [MS-XLSB] 2.5.97.2 */
+var BErr = {
+ /*::[*/0x00/*::]*/: "#NULL!",
+ /*::[*/0x07/*::]*/: "#DIV/0!",
+ /*::[*/0x0F/*::]*/: "#VALUE!",
+ /*::[*/0x17/*::]*/: "#REF!",
+ /*::[*/0x1D/*::]*/: "#NAME?",
+ /*::[*/0x24/*::]*/: "#NUM!",
+ /*::[*/0x2A/*::]*/: "#N/A",
+ /*::[*/0x2B/*::]*/: "#GETTING_DATA",
+ /*::[*/0xFF/*::]*/: "#WTF?"
+};
+//var RBErr = evert_num(BErr);
+var RBErr = {
+ "#NULL!": 0x00,
+ "#DIV/0!": 0x07,
+ "#VALUE!": 0x0F,
+ "#REF!": 0x17,
+ "#NAME?": 0x1D,
+ "#NUM!": 0x24,
+ "#N/A": 0x2A,
+ "#GETTING_DATA": 0x2B,
+ "#WTF?": 0xFF
+};
+
+/* Parts enumerated in OPC spec, MS-XLSB and MS-XLSX */
+/* 12.3 Part Summary */
+/* 14.2 Part Summary */
+/* [MS-XLSX] 2.1 Part Enumerations ; [MS-XLSB] 2.1.7 Part Enumeration */
+var ct2type/*{[string]:string}*/ = ({
+ /* Workbook */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
+ "application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
+ "application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
+ "application/vnd.ms-excel.addin.macroEnabled.main+xml": "workbooks",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": "workbooks",
+
+ /* Worksheet */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": "sheets",
+ "application/vnd.ms-excel.worksheet": "sheets",
+ "application/vnd.ms-excel.binIndexWs": "TODO", /* Binary Index */
+
+ /* Chartsheet */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": "charts",
+ "application/vnd.ms-excel.chartsheet": "charts",
+
+ /* Macrosheet */
+ "application/vnd.ms-excel.macrosheet+xml": "macros",
+ "application/vnd.ms-excel.macrosheet": "macros",
+ "application/vnd.ms-excel.intlmacrosheet": "TODO",
+ "application/vnd.ms-excel.binIndexMs": "TODO", /* Binary Index */
+
+ /* Dialogsheet */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": "dialogs",
+ "application/vnd.ms-excel.dialogsheet": "dialogs",
+
+ /* Shared Strings */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml": "strs",
+ "application/vnd.ms-excel.sharedStrings": "strs",
+
+ /* Styles */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": "styles",
+ "application/vnd.ms-excel.styles": "styles",
+
+ /* File Properties */
+ "application/vnd.openxmlformats-package.core-properties+xml": "coreprops",
+ "application/vnd.openxmlformats-officedocument.custom-properties+xml": "custprops",
+ "application/vnd.openxmlformats-officedocument.extended-properties+xml": "extprops",
+
+ /* Custom Data Properties */
+ "application/vnd.openxmlformats-officedocument.customXmlProperties+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty": "TODO",
+
+ /* Comments */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": "comments",
+ "application/vnd.ms-excel.comments": "comments",
+ "application/vnd.ms-excel.threadedcomments+xml": "threadedcomments",
+ "application/vnd.ms-excel.person+xml": "people",
+
+ /* Metadata (Stock/Geography and Dynamic Array) */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata",
+ "application/vnd.ms-excel.sheetMetadata": "metadata",
+
+ /* PivotTable */
+ "application/vnd.ms-excel.pivotTable": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml": "TODO",
+
+ /* Chart Objects */
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": "TODO",
+
+ /* Chart Colors */
+ "application/vnd.ms-office.chartcolorstyle+xml": "TODO",
+
+ /* Chart Style */
+ "application/vnd.ms-office.chartstyle+xml": "TODO",
+
+ /* Chart Advanced */
+ "application/vnd.ms-office.chartex+xml": "TODO",
+
+ /* Calculation Chain */
+ "application/vnd.ms-excel.calcChain": "calcchains",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml": "calcchains",
+
+ /* Printer Settings */
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings": "TODO",
+
+ /* ActiveX */
+ "application/vnd.ms-office.activeX": "TODO",
+ "application/vnd.ms-office.activeX+xml": "TODO",
+
+ /* Custom Toolbars */
+ "application/vnd.ms-excel.attachedToolbars": "TODO",
+
+ /* External Data Connections */
+ "application/vnd.ms-excel.connections": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": "TODO",
+
+ /* External Links */
+ "application/vnd.ms-excel.externalLink": "links",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
+
+ /* PivotCache */
+ "application/vnd.ms-excel.pivotCacheDefinition": "TODO",
+ "application/vnd.ms-excel.pivotCacheRecords": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml": "TODO",
+
+ /* Query Table */
+ "application/vnd.ms-excel.queryTable": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml": "TODO",
+
+ /* Shared Workbook */
+ "application/vnd.ms-excel.userNames": "TODO",
+ "application/vnd.ms-excel.revisionHeaders": "TODO",
+ "application/vnd.ms-excel.revisionLog": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml": "TODO",
+
+ /* Single Cell Table */
+ "application/vnd.ms-excel.tableSingleCells": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml": "TODO",
+
+ /* Slicer */
+ "application/vnd.ms-excel.slicer": "TODO",
+ "application/vnd.ms-excel.slicerCache": "TODO",
+ "application/vnd.ms-excel.slicer+xml": "TODO",
+ "application/vnd.ms-excel.slicerCache+xml": "TODO",
+
+ /* Sort Map */
+ "application/vnd.ms-excel.wsSortMap": "TODO",
+
+ /* Table */
+ "application/vnd.ms-excel.table": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": "TODO",
+
+ /* Themes */
+ "application/vnd.openxmlformats-officedocument.theme+xml": "themes",
+
+ /* Theme Override */
+ "application/vnd.openxmlformats-officedocument.themeOverride+xml": "TODO",
+
+ /* Timeline */
+ "application/vnd.ms-excel.Timeline+xml": "TODO", /* verify */
+ "application/vnd.ms-excel.TimelineCache+xml": "TODO", /* verify */
+
+ /* VBA */
+ "application/vnd.ms-office.vbaProject": "vba",
+ "application/vnd.ms-office.vbaProjectSignature": "TODO",
+
+ /* Volatile Dependencies */
+ "application/vnd.ms-office.volatileDependencies": "TODO",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml": "TODO",
+
+ /* Control Properties */
+ "application/vnd.ms-excel.controlproperties+xml": "TODO",
+
+ /* Data Model */
+ "application/vnd.openxmlformats-officedocument.model+data": "TODO",
+
+ /* Survey */
+ "application/vnd.ms-excel.Survey+xml": "TODO",
+
+ /* Drawing */
+ "application/vnd.openxmlformats-officedocument.drawing+xml": "drawings",
+ "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml": "TODO",
+ "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml": "TODO",
+
+ /* VML */
+ "application/vnd.openxmlformats-officedocument.vmlDrawing": "TODO",
+
+ "application/vnd.openxmlformats-package.relationships+xml": "rels",
+ "application/vnd.openxmlformats-officedocument.oleObject": "TODO",
+
+ /* Image */
+ "image/png": "TODO",
+
+ "sheet": "js"
+}/*:any*/);
+
+var CT_LIST = {
+ workbooks: {
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
+ xlsm: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroEnabled.main",
+ xlam: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
+ xltx: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"
+ },
+ strs: { /* Shared Strings */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
+ xlsb: "application/vnd.ms-excel.sharedStrings"
+ },
+ comments: { /* Comments */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
+ xlsb: "application/vnd.ms-excel.comments"
+ },
+ sheets: { /* Worksheet */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
+ xlsb: "application/vnd.ms-excel.worksheet"
+ },
+ charts: { /* Chartsheet */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",
+ xlsb: "application/vnd.ms-excel.chartsheet"
+ },
+ dialogs: { /* Dialogsheet */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",
+ xlsb: "application/vnd.ms-excel.dialogsheet"
+ },
+ macros: { /* Macrosheet (Excel 4.0 Macros) */
+ xlsx: "application/vnd.ms-excel.macrosheet+xml",
+ xlsb: "application/vnd.ms-excel.macrosheet"
+ },
+ metadata: { /* Metadata (Stock/Geography and Dynamic Array) */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
+ xlsb: "application/vnd.ms-excel.sheetMetadata"
+ },
+ styles: { /* Styles */
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
+ xlsb: "application/vnd.ms-excel.styles"
+ }
+};
+
+function new_ct()/*:any*/ {
+ return ({
+ workbooks:[], sheets:[], charts:[], dialogs:[], macros:[],
+ rels:[], strs:[], comments:[], threadedcomments:[], links:[],
+ coreprops:[], extprops:[], custprops:[], themes:[], styles:[],
+ calcchains:[], vba: [], drawings: [], metadata: [], people:[],
+ TODO:[], xmlns: "" }/*:any*/);
+}
+
+function parse_ct(data/*:?string*/) {
+ var ct = new_ct();
+ if(!data || !data.match) return ct;
+ var ctext = {};
+ (data.match(tagregex)||[]).forEach(function(x) {
+ var y = parsexmltag(x);
+ switch(y[0].replace(nsregex,"<")) {
+ case ' 0 ? ct.calcchains[0] : "";
+ ct.sst = ct.strs.length > 0 ? ct.strs[0] : "";
+ ct.style = ct.styles.length > 0 ? ct.styles[0] : "";
+ ct.defaults = ctext;
+ delete ct.calcchains;
+ return ct;
+}
+
+function write_ct(ct, opts)/*:string*/ {
+ var type2ct/*{[string]:Array}*/ = evert_arr(ct2type);
+
+ var o/*:Array*/ = [], v;
+ o[o.length] = (XML_HEADER);
+ o[o.length] = writextag('Types', null, {
+ 'xmlns': XMLNS.CT,
+ 'xmlns:xsd': XMLNS.xsd,
+ 'xmlns:xsi': XMLNS.xsi
+ });
+
+ o = o.concat([
+ ['xml', 'application/xml'],
+ ['bin', 'application/vnd.ms-excel.sheet.binary.macroEnabled.main'],
+ ['vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'],
+ ['data', 'application/vnd.openxmlformats-officedocument.model+data'],
+ /* from test files */
+ ['bmp', 'image/bmp'],
+ ['png', 'image/png'],
+ ['gif', 'image/gif'],
+ ['emf', 'image/x-emf'],
+ ['wmf', 'image/x-wmf'],
+ ['jpg', 'image/jpeg'], ['jpeg', 'image/jpeg'],
+ ['tif', 'image/tiff'], ['tiff', 'image/tiff'],
+ ['pdf', 'application/pdf'],
+ ['rels', 'application/vnd.openxmlformats-package.relationships+xml']
+ ].map(function(x) {
+ return writextag('Default', null, {'Extension':x[0], 'ContentType': x[1]});
+ }));
+
+ /* only write first instance */
+ var f1 = function(w) {
+ if(ct[w] && ct[w].length > 0) {
+ v = ct[w][0];
+ o[o.length] = (writextag('Override', null, {
+ 'PartName': (v[0] == '/' ? "":"/") + v,
+ 'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']
+ }));
+ }
+ };
+
+ /* book type-specific */
+ var f2 = function(w) {
+ (ct[w]||[]).forEach(function(v) {
+ o[o.length] = (writextag('Override', null, {
+ 'PartName': (v[0] == '/' ? "":"/") + v,
+ 'ContentType': CT_LIST[w][opts.bookType] || CT_LIST[w]['xlsx']
+ }));
+ });
+ };
+
+ /* standard type */
+ var f3 = function(t) {
+ (ct[t]||[]).forEach(function(v) {
+ o[o.length] = (writextag('Override', null, {
+ 'PartName': (v[0] == '/' ? "":"/") + v,
+ 'ContentType': type2ct[t][0]
+ }));
+ });
+ };
+
+ f1('workbooks');
+ f2('sheets');
+ f2('charts');
+ f3('themes');
+ ['strs', 'styles'].forEach(f1);
+ ['coreprops', 'extprops', 'custprops'].forEach(f3);
+ f3('vba');
+ f3('comments');
+ f3('threadedcomments');
+ f3('drawings');
+ f2('metadata');
+ f3('people');
+ if(o.length>2){ o[o.length] = (''); o[1]=o[1].replace("/>",">"); }
+ return o.join("");
+}
+/* 9.3 Relationships */
+var RELS = ({
+ WB: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
+ SHEET: "http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
+ HLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
+ VML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",
+ XPATH: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",
+ XMISS: "http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",
+ XLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",
+ CXML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",
+ CXMLP: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",
+ CMNT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
+ CORE_PROPS: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
+ EXT_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',
+ CUST_PROPS: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties',
+ SST: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
+ STY: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
+ THEME: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
+ CHART: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
+ CHARTEX: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
+ CS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",
+ WS: [
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
+ "http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"
+ ],
+ DS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",
+ MS: "http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",
+ IMG: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
+ DRAW: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
+ XLMETA: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
+ TCMNT: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",
+ PEOPLE: "http://schemas.microsoft.com/office/2017/10/relationships/person",
+ VBA: "http://schemas.microsoft.com/office/2006/relationships/vbaProject"
+}/*:any*/);
+
+
+/* 9.3.3 Representing Relationships */
+function get_rels_path(file/*:string*/)/*:string*/ {
+ var n = file.lastIndexOf("/");
+ return file.slice(0,n+1) + '_rels/' + file.slice(n+1) + ".rels";
+}
+
+function parse_rels(data/*:?string*/, currentFilePath/*:string*/) {
+ var rels = {"!id":{}};
+ if (!data) return rels;
+ if (currentFilePath.charAt(0) !== '/') {
+ currentFilePath = '/'+currentFilePath;
+ }
+ var hash = {};
+
+ (data.match(tagregex)||[]).forEach(function(x) {
+ var y = parsexmltag(x);
+ /* 9.3.2.2 OPC_Relationships */
+ if (y[0] === '2){ o[o.length] = (''); o[1]=o[1].replace("/>",">"); }
+ return o.join("");
+}
+
+function add_rels(rels, rId/*:number*/, f, type, relobj, targetmode/*:?string*/)/*:number*/ {
+ if(!relobj) relobj = {};
+ if(!rels['!id']) rels['!id'] = {};
+ if(!rels['!idx']) rels['!idx'] = 1;
+ if(rId < 0) for(rId = rels['!idx']; rels['!id']['rId' + rId]; ++rId){/* empty */}
+ rels['!idx'] = rId + 1;
+ relobj.Id = 'rId' + rId;
+ relobj.Type = type;
+ relobj.Target = f;
+ if(targetmode) relobj.TargetMode = targetmode;
+ else if([RELS.HLINK, RELS.XPATH, RELS.XMISS].indexOf(relobj.Type) > -1) relobj.TargetMode = "External";
+ if(rels['!id'][relobj.Id]) throw new Error("Cannot rewrite rId " + rId);
+ rels['!id'][relobj.Id] = relobj;
+ rels[('/' + relobj.Target).replace("//","/")] = relobj;
+ return rId;
+}
+/* Open Document Format for Office Applications (OpenDocument) Version 1.2 */
+/* Part 3 Section 4 Manifest File */
+var CT_ODS = "application/vnd.oasis.opendocument.spreadsheet";
+function parse_manifest(d, opts) {
+ var str = xlml_normalize(d);
+ var Rn;
+ var FEtag;
+ while((Rn = xlmlregex.exec(str))) switch(Rn[3]) {
+ case 'manifest': break; // 4.2
+ case 'file-entry': // 4.3
+ FEtag = parsexmltag(Rn[0], false);
+ if(FEtag.path == '/' && FEtag.type !== CT_ODS) throw new Error("This OpenDocument is not a spreadsheet");
+ break;
+ case 'encryption-data': // 4.4
+ case 'algorithm': // 4.5
+ case 'start-key-generation': // 4.6
+ case 'key-derivation': // 4.7