From def4998ec4f7ee967a670ec1ae18a3e13778428a Mon Sep 17 00:00:00 2001 From: Beau Blyth Date: Mon, 30 Sep 2019 21:40:16 -0700 Subject: [PATCH] adding removing pins, pin name reference --- app/Interfaces/ICanvasData.ts | 6 -- app/Interfaces/IFrame.ts | 2 +- app/Interfaces/IProjectData.ts | 8 +++ app/canvas_handler.ts | 36 ++++++++---- app/frame_handler.ts | 46 +++++++++++---- app/page.ts | 29 ++++++---- app/pin_handler.ts | 99 ++++++++++++++++++++++++++++---- dist/assets/stylesheets/main.css | 23 ++++++++ dist/bundle.js | 8 +++ dist/index.html | 5 +- help | 1 + pnpm-debug.log | 22 +++++++ 12 files changed, 232 insertions(+), 53 deletions(-) delete mode 100644 app/Interfaces/ICanvasData.ts create mode 100644 app/Interfaces/IProjectData.ts create mode 100644 dist/bundle.js create mode 100644 help create mode 100644 pnpm-debug.log diff --git a/app/Interfaces/ICanvasData.ts b/app/Interfaces/ICanvasData.ts deleted file mode 100644 index 1891558..0000000 --- a/app/Interfaces/ICanvasData.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface ICanvasData { - width: number; - height: number; - widthRatio: number; - heightRatio: number; -} diff --git a/app/Interfaces/IFrame.ts b/app/Interfaces/IFrame.ts index bab362a..ac2718a 100644 --- a/app/Interfaces/IFrame.ts +++ b/app/Interfaces/IFrame.ts @@ -2,5 +2,5 @@ import { IFramePinData } from './IFramePinData'; export interface IFrame { filename: string; - pinData: IFramePinData[]; + [index: number]: IFramePinData; } diff --git a/app/Interfaces/IProjectData.ts b/app/Interfaces/IProjectData.ts new file mode 100644 index 0000000..ab20f7e --- /dev/null +++ b/app/Interfaces/IProjectData.ts @@ -0,0 +1,8 @@ +export interface IProjectData { + currentFrame: number; + currentlySelectedPin: number; + width: number; + height: number; + widthRatio: number; + heightRatio: number; +} diff --git a/app/canvas_handler.ts b/app/canvas_handler.ts index f96d4d5..2a9a1b3 100644 --- a/app/canvas_handler.ts +++ b/app/canvas_handler.ts @@ -1,25 +1,26 @@ import { IAnimationData } from './Interfaces/IAnimationData'; -import { ICanvasData } from './Interfaces/ICanvasData'; +import { IProjectData } from './Interfaces/IProjectData'; +import { IFramePinData } from './Interfaces/IFramePinData'; // I display the canvas and am clickable export class CanvasHandler { private canvasImage: HTMLCanvasElement; private imageElement: HTMLImageElement; private animationData: IAnimationData; - private canvasData: ICanvasData; + private projectData: IProjectData; private orginInfo: HTMLElement; private targetImageSize: number = 256; constructor( animationData: IAnimationData, - canvasData: ICanvasData, + canvasData: IProjectData, canvasImage: HTMLCanvasElement, imageElement: HTMLImageElement, originInfo: HTMLElement ) { this.animationData = animationData; - this.canvasData = canvasData; + this.projectData = canvasData; this.canvasImage = canvasImage; this.imageElement = imageElement; this.orginInfo = originInfo; @@ -45,8 +46,8 @@ export class CanvasHandler { } private UpdateCanvasDataSize() { - this.canvasData.width = this.canvasImage.width; - this.canvasData.height = this.canvasImage.height; + this.projectData.width = this.canvasImage.width; + this.projectData.height = this.canvasImage.height; } private mouseDown = (event: MouseEvent) => { @@ -57,12 +58,25 @@ export class CanvasHandler { const pixelX: number = Math.floor(event.offsetX / ratioWidth); const pixelY: number = Math.floor(event.offsetY / ratioHeight); console.log('CLICK X:' + pixelX + ' Y:' + pixelY); - // update animation data - this.animationData.originX = pixelX; - this.animationData.originY = pixelY; + if (this.projectData.currentlySelectedPin === 0) { + // update animation data + this.animationData.originX = pixelX; + this.animationData.originY = pixelY; + } else { + console.log('current pin id = ' + this.projectData.currentlySelectedPin); + const newPinData: IFramePinData = { + id: this.projectData.currentlySelectedPin, + x: pixelX, + y: pixelY + }; + + this.animationData.frames[this.projectData.currentFrame][ + this.projectData.currentlySelectedPin + ] = newPinData; + } // update canvas data - this.canvasData.widthRatio = ratioWidth; - this.canvasData.heightRatio = ratioHeight; + this.projectData.widthRatio = ratioWidth; + this.projectData.heightRatio = ratioHeight; // update origin number display this.orginInfo.innerText = 'Origin X: ' + this.animationData.originX + ' Y: ' + this.animationData.originY; }; diff --git a/app/frame_handler.ts b/app/frame_handler.ts index 4832ead..ae705db 100644 --- a/app/frame_handler.ts +++ b/app/frame_handler.ts @@ -1,5 +1,6 @@ import { IAnimationData } from './Interfaces/IAnimationData'; -import { ICanvasData } from './Interfaces/ICanvasData'; +import { IProjectData } from './Interfaces/IProjectData'; +import { IFramePinData } from './Interfaces/IFramePinData'; export class FrameHandler { private start: number = 0; @@ -7,7 +8,7 @@ export class FrameHandler { private frameNumberDiv: HTMLElement; private animationData: IAnimationData; - private canvasData: ICanvasData; + private canvasData: IProjectData; private filenames: string[] = []; private currentFrame: number = 0; @@ -18,13 +19,16 @@ export class FrameHandler { private imageElement: HTMLImageElement; + private projectData: IProjectData; + constructor( animationData: IAnimationData, - canvasData: ICanvasData, + canvasData: IProjectData, htmlCanvasElement: HTMLCanvasElement, canvasContext: CanvasRenderingContext2D, frameNumberDiv: HTMLElement, - imageElement: HTMLImageElement + imageElement: HTMLImageElement, + projectData: IProjectData ) { this.animationData = animationData; this.canvasData = canvasData; @@ -33,6 +37,7 @@ export class FrameHandler { this.frameNumberDiv = frameNumberDiv; window.requestAnimationFrame(this.windowAnimationUpdate); this.imageElement = imageElement; + this.projectData = projectData; } public GetCurrentFrame(): number { @@ -57,6 +62,7 @@ export class FrameHandler { public GoToFrame(frame: number) { this.currentFrame = frame; this.RefreshImage(); + this.projectData.currentFrame = this.currentFrame; } public TogglePlayingAnimation() { @@ -88,21 +94,37 @@ export class FrameHandler { this.htmlCanvasElement.height ); // draw origin + + this.canvasContext.strokeStyle = '#000000'; const originCursorSize: number = 500; - const originX = this.animationData.originX * this.canvasData.widthRatio; - const originY = this.animationData.originY * this.canvasData.heightRatio; - this.canvasContext.beginPath(); - this.canvasContext.moveTo(originX, originY - originCursorSize); - this.canvasContext.lineTo(originX, originY + originCursorSize); - this.canvasContext.moveTo(originX - originCursorSize, originY); - this.canvasContext.lineTo(originX + originCursorSize, originY); - this.canvasContext.stroke(); + const originX = this.animationData.originX; + const originY = this.animationData.originY; + this.DrawCrossHair(500, this.canvasContext, originX, originY); + // frame number update this.frameNumberDiv.className = 'instruction'; this.frameNumberDiv.innerText = 'Frame ' + (this.currentFrame + 1).toString() + ' / ' + this.filenames.length.toString(); + // draw pins + for (let i = 0; i < 10; i++) { + this.canvasContext.strokeStyle = '#FF0000'; + let currentSelectedPinData: IFramePinData = this.animationData.frames[this.projectData.currentFrame][i]; + if (currentSelectedPinData !== null && currentSelectedPinData !== undefined) { + this.DrawCrossHair(50, this.canvasContext, currentSelectedPinData.x, currentSelectedPinData.y); + } + } } } + private DrawCrossHair(size: number, canvasContext: CanvasRenderingContext2D, x: number, y: number) { + x *= this.canvasData.widthRatio; + y *= this.canvasData.heightRatio; + canvasContext.beginPath(); + canvasContext.moveTo(x, y - size); + canvasContext.lineTo(x, y + size); + canvasContext.moveTo(x - size, y); + canvasContext.lineTo(x + size, y); + canvasContext.stroke(); + } + private windowAnimationUpdate = (timestamp: number) => { if (this.start === 0) { this.start = timestamp; diff --git a/app/page.ts b/app/page.ts index b3ba844..abd7b42 100644 --- a/app/page.ts +++ b/app/page.ts @@ -4,7 +4,7 @@ import { CanvasHandler } from './canvas_handler'; import { FileHandler } from './file_handler'; import { FrameHandler } from './frame_handler'; import { IAnimationData } from './Interfaces/IAnimationData'; -import { ICanvasData } from './Interfaces/ICanvasData'; +import { IProjectData } from './Interfaces/IProjectData'; import { IFrame } from './Interfaces/IFrame'; import { PinHandler } from './pin_handler'; @@ -27,7 +27,7 @@ export class Page { private canvasImage: HTMLCanvasElement; private canvasContext: CanvasRenderingContext2DSettings; - private canvasData: ICanvasData; + private projectData: IProjectData; private filenameInput: HTMLInputElement; public Load() { @@ -40,13 +40,14 @@ export class Page { loop: true, frames: [ { - filename: '', - pinData: [] + filename: '' } ] }; // blank slate canvas data - this.canvasData = { + this.projectData = { + currentFrame: 0, + currentlySelectedPin: 0, width: 0, height: 0, widthRatio: 0, @@ -59,13 +60,17 @@ export class Page { this.pinHandler = new PinHandler( document.getElementById('addpin') as HTMLElement, - document.getElementById('pinSettings') as HTMLElement + document.getElementById('pinSettings') as HTMLElement, + document.getElementById('pinContainer') as HTMLElement, + document.getElementById('originPin') as HTMLElement, + this.projectData, + this.animationData ); // setup canvas this.canvasHandler = new CanvasHandler( this.animationData, - this.canvasData, + this.projectData, canvasElement, imageElement, document.getElementById('originInfo') as HTMLElement @@ -74,11 +79,12 @@ export class Page { // setup frame handler this.frameHandler = new FrameHandler( this.animationData, - this.canvasData, + this.projectData, canvasElement, canvasElement.getContext('2d')!, document.getElementById('frameNumber') as HTMLElement, - imageElement + imageElement, + this.projectData ); // input elements @@ -148,6 +154,8 @@ export class Page { } case 83: { + this.pinHandler.UpdateAnimationPinNames(); + const zip = new JSZip(); // name of project const name = this.filenameInput.value; @@ -183,8 +191,7 @@ export class Page { for (let i = 0; i < event.dataTransfer!.files.length; i++) { newFrames.push({ - filename: event.dataTransfer!.files[i].name, - pinData: [] + filename: event.dataTransfer!.files[i].name }); } diff --git a/app/pin_handler.ts b/app/pin_handler.ts index 8ba1ba6..aec4d57 100644 --- a/app/pin_handler.ts +++ b/app/pin_handler.ts @@ -1,26 +1,103 @@ +import { IProjectData } from './Interfaces/IProjectData'; +import { IPin } from './Interfaces/IPin'; +import { IAnimationData } from './Interfaces/IAnimationData'; + export class PinHandler { private addPinButton: HTMLElement; private pinSettingsDiv: HTMLElement; private pins: number = 1; + private pinContainer: HTMLElement; + private allPinContainers: HTMLElement[]; + private projectData: IProjectData; + private animationData: IAnimationData; - constructor(addPinButton: HTMLElement, pinSettingsDiv: HTMLElement) { + constructor( + addPinButton: HTMLElement, + pinSettingsDiv: HTMLElement, + pinContainer: HTMLElement, + originPin: HTMLElement, + projectData: IProjectData, + animationData: IAnimationData + ) { this.addPinButton = addPinButton; this.pinSettingsDiv = pinSettingsDiv; - this.UpdatePinSettingsDiv(); + this.pinContainer = pinContainer; + this.projectData = projectData; + this.animationData = animationData; + // add origin click behaviour + originPin.addEventListener('click', () => { + this.DeselectAllPinContainers(); + originPin.className = 'pinButtonContainerSelected'; + projectData.currentlySelectedPin = 0; + }); + // put origin into pincontainer array + this.allPinContainers = [ originPin ]; + + // this.UpdatePinSettingsDiv(); this.addPinButton.addEventListener('click', this.AddPinButtonPressed); } - private UpdatePinSettingsDiv() { - let html: string = ''; - for (let i = 0; i < this.pins; i++) { - html += ''; + public UpdateAnimationPinNames = () => { + const animationPinData: IPin[] = []; + for (let i = 1; i < this.allPinContainers.length; i++) { + console.log(this.allPinContainers[i].children); + let pinName: string = this.allPinContainers[i].getElementsByTagName('input')[0].value; + if (pinName !== null && pinName !== undefined) { + let newPinData: IPin = { + id: parseInt(this.allPinContainers[i].id.split('_')[1]), + name: pinName + }; + animationPinData.push(newPinData); + } } - this.pinSettingsDiv.innerHTML = html; - } + this.animationData.pins = animationPinData; + console.log('updated animationPinData to ' + animationPinData); + }; - private AddPinButtonPressed() { - this.pins += 1; + private UpdatePinSettingsDiv = () => { + // create info window div and append to pincontainer + const newDiv = document.createElement('div'); + this.allPinContainers.push(newDiv); + + this.pinContainer.appendChild(newDiv); + newDiv.id = 'pinID_' + this.pins.toString(); + newDiv.className = 'pinButtonContainer'; + // text input field for pin name + const newNameInput = document.createElement('input'); + newNameInput.id = 'nameInput_' + this.pins.toString(); + newDiv.appendChild(newNameInput); + newNameInput.value = 'PinName_' + this.pins.toString(); + // button to remove pin + const removePinButton = document.createElement('button'); + newDiv.appendChild(removePinButton); + removePinButton.textContent = 'X'; + removePinButton.className = 'removeButton'; + removePinButton.addEventListener('click', () => { + newDiv.remove(); + }); + // break + newDiv.appendChild(document.createElement('br')); + // select pin to place + const selectPinButton = document.createElement('button'); + newDiv.appendChild(selectPinButton); + selectPinButton.textContent = 'Select'; + selectPinButton.addEventListener('click', () => { + this.DeselectAllPinContainers(); + newDiv.className = 'pinButtonContainerSelected'; + this.projectData.currentlySelectedPin = parseInt(newDiv.id.split('_')[1]); + console.log('selected pin ' + this.projectData.currentlySelectedPin); + }); + }; + + private DeselectAllPinContainers = () => { + for (let i = 0; i < this.allPinContainers.length; i++) { + this.allPinContainers[i].className = 'pinButtonContainer'; + } + }; + + private AddPinButtonPressed = () => { this.UpdatePinSettingsDiv(); - } + this.pins += 1; + }; } diff --git a/dist/assets/stylesheets/main.css b/dist/assets/stylesheets/main.css index cc69e40..d4e13ea 100644 --- a/dist/assets/stylesheets/main.css +++ b/dist/assets/stylesheets/main.css @@ -42,3 +42,26 @@ body { border: 2px solid #6b7578; image-rendering: pixelated; } + +.pinContainer { + display: flex; + flex-direction: row; +} +.pinButtonContainer { + flex: 1; + font-size: 12px; + border: 2px solid #6b7578; + padding: 1px; +} +.pinButtonContainerSelected { + flex: 1; + font-size: 12px; + border: 2px solid #0865df; + padding: 1px; + background-color: rgb(35, 75, 185); +} + +.removeButton { + background-color: rgb(158, 15, 34); + color: rgb(227, 227, 236); +} diff --git a/dist/bundle.js b/dist/bundle.js new file mode 100644 index 0000000..3edd1b4 --- /dev/null +++ b/dist/bundle.js @@ -0,0 +1,8 @@ +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=46)}([function(t,e,r){"use strict";var n=r(3),i=r(29),a=r(13),o=r(65),s=r(10);function u(t){return t}function h(t,e){for(var r=0;r1;)try{return f.stringifyByChunk(t,n,r)}catch(t){r=Math.floor(r/2)}return f.stringifyByChar(t)}function c(t,e){for(var r=0;r "+t:t}},t.exports=n},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";(function(t){if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,e.nodebuffer=void 0!==t,e.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)e.blob=!1;else{var n=new ArrayBuffer(0);try{e.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),e.blob=0===i.getBlob("application/zip").size}catch(t){e.blob=!1}}}try{e.nodestream=!!r(22).Readable}catch(t){e.nodestream=!1}}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var a={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var a=0;a=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1;function h(){o.call(this,"utf-8 decode"),this.leftOver=null}function f(){o.call(this,"utf-8 encode")}e.utf8encode=function(t){return i.nodebuffer?a.newBufferFrom(t,"utf-8"):function(t){var e,r,n,a,o,s=t.length,u=0;for(a=0;a>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e}(t)},e.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,a,o=t.length,u=new Array(2*o);for(r=0,e=0;e4)u[r++]=65533,e+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&e1?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(h,o),h.prototype.processChunk=function(t){var r=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+s[t[r]]>e?r:e}(r),u=r;o!==r.length&&(i.uint8array?(u=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(u=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:e.utf8decode(u),meta:t.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=h,n.inherits(f,o),f.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=f},function(t,e,r){"use strict";(function(t){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var n=r(51),i=r(52),a=r(21);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var a,o=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,r/=2}function h(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var f=-1;for(a=r;as&&(r=s-u),a=r;a>=0;a--){for(var l=!0,c=0;ci&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+l<=r)switch(l){case 1:h<128&&(f=h);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&h)<<6|63&a)>127&&(f=u);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(u=(15&h)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&h)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),h=this.slice(n,i),f=t.slice(e,r),l=0;li)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function z(t,e,r,n,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,a){return a||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,a){return a||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(2))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(7).Buffer)},function(t,e,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:r(66),t.exports={Promise:n}},function(t,e){var r,n,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var u,h=[],f=!1,l=-1;function c(){f&&u&&(f=!1,u.length?h=u.concat(h):l=-1,h.length&&d())}function d(){if(!f){var t=s(c);f=!0;for(var e=h.length;e;){for(u=h,h=[];++l1)for(var r=1;r0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return t}function l(){for(var t=[],e=0;e0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)a(u,this,e);else{var h=u.length,f=m(u,h);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){(e=t.exports=r(23)).Stream=e,e.Readable=e,e.Writable=r(17),e.Duplex=r(5),e.Transform=r(28),e.PassThrough=r(60)},function(t,e,r){var n=r(7),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o),a(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var a=r(12);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:a.nextTick;y.WritableState=v;var h=r(9);h.inherits=r(8);var f={deprecate:r(58)},l=r(24),c=r(16).Buffer,d=i.Uint8Array||function(){};var p,m=r(25);function g(){}function v(t,e){s=s||r(5),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,h=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(h||0===h)?h:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(a.nextTick(i,n),a.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),x(t,e))}(t,r,n,e,i);else{var o=k(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||b(t,r),n?u(w,t,r,o,i):w(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(t){if(s=s||r(5),!(p.call(y,this)||this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function _(t,e,r,n,i,a,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),x(t,e)}function b(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,_(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,f=r.encoding,l=r.callback;if(_(t,e,!1,e.objectMode?1:h.length,h,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(t,e){var r=k(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(y,l),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,c.isBuffer(n)||n instanceof d);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),a.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,a){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,x(t,e),r&&(e.finished?a.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(11),r(26).setImmediate,r(2))},function(t,e,r){"use strict";var n=r(10),i=r(32),a=r(33),o=r(34);a=r(33);function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},t.exports=s},function(t,e,r){"use strict";var n=r(0);var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var a=i,o=n+r;t^=-1;for(var s=n;s>>8^a[255&(t^e[s])];return-1^t}(0|e,t,t.length,0):function(t,e,r,n){var a=i,o=n+r;t^=-1;for(var s=n;s>>8^a[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length,0):0}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){t.exports=r(53)},function(t,e,r){"use strict";(function(e,n){var i=r(12);t.exports=_;var a,o=r(21);_.ReadableState=y;r(14).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(24),h=r(16).Buffer,f=e.Uint8Array||function(){};var l=r(9);l.inherits=r(8);var c=r(54),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(55),g=r(25);l.inherits(_,u);var v=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var n=e instanceof(a=a||r(5));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(27).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function _(t){if(a=a||r(5),!(this instanceof _))return new _(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,x(t)}(t,o)):(i||(a=function(t,e){var r;n=e,h.isBuffer(n)||n instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):b(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?b(t,o,e,!1):A(t,o)):b(t,o,e,!1))):n||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),I(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(C,t,e))}function C(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;ta.length?a.length:t;if(o===a.length?i+=a:i+=a.slice(0,t),0===(t-=o)){o===a.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=h.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var a=n.data,o=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,o),0===(t-=o)){o===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function B(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(z,e,t))}function z(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):x(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(t,e){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?f:_;function h(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",h),r.removeListener("end",f),r.removeListener("end",_),r.removeListener("data",m),c=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}a.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",h);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",l);var c=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==P(a.pipes,t))&&!c&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),_(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),_()}function y(){d("onfinish"),t.removeListener("close",v),_()}function _(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",v),t.once("finish",y),t.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(57),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(2))},function(t,e,r){"use strict";var n=r(59).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(5),i=r(9);function a(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,s=(3&e)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,h=d>2?63&i:64,f.push(a.charAt(o)+a.charAt(s)+a.charAt(u)+a.charAt(h));return f.join("")},e.decode=function(t){var e,r,n,o,s,u,h=0,f=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var l,c=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===a.charAt(64)&&c--,t.charAt(t.length-2)===a.charAt(64)&&c--,c%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=i.uint8array?new Uint8Array(0|c):new Array(0|c);h>4,r=(15&o)<<4|(s=a.indexOf(t.charAt(h++)))>>2,n=(3&s)<<6|(u=a.indexOf(t.charAt(h++))),l[f++]=e,64!==s&&(l[f++]=r),64!==u&&(l[f++]=n);return l}},function(t,e,r){"use strict";(function(e){var n=r(0),i=r(68),a=r(1),o=r(29),s=r(3),u=r(10),h=null;if(s.nodestream)try{h=r(69)}catch(t){}function f(t,r){return new u.Promise((function(i,a){var s=[],u=t._internalType,h=t._outputType,f=t._mimeType;t.on("data",(function(t,e){s.push(t),r&&r(e)})).on("error",(function(t){s=[],a(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return n.transformTo(t,e)}}(h,function(t,r){var n,i=0,a=null,o=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},function(t,e,r){"use strict";var n=r(0),i=r(1);function a(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(a,i),a.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},t.exports=a},function(t,e,r){"use strict";var n=r(1),i=r(19);function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r(0).inherits(a,n),a.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},t.exports=a},function(t,e,r){"use strict";var n=r(1);e.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},e.DEFLATE=r(72)},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+e[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var a=n,o=i+r;t^=-1;for(var s=i;s>>8^a[255&(t^e[s])];return-1^t}},function(t,e,r){"use strict";var n=r(4),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){a=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(t,e){if(e<65534&&(t.subarray&&a||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",o=0;o>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)h[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r1?h[n++]=65533:i<65536?h[n++]=i:(i-=65536,h[n++]=55296|i>>10&1023,h[n++]=56320|1023&i)}return u(h,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+o[t[r]]>e?r:e}},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"},function(t,e,r){"use strict";var n=r(0),i=r(3),a=r(43),o=r(86),s=r(87),u=r(45);t.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new u(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new o(t)}},function(t,e,r){"use strict";var n=r(44);function i(t){n.call(this,t);for(var e=0;e=0;--a)if(this.data[a]===e&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.readData(4);return e===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";var n=r(0);function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},t.exports=i},function(t,e,r){"use strict";var n=r(43);function i(t){n.call(this,t)}r(0).inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(new(r(47).Page)).Load()},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=r(48),a=r(49),o=r(89),s=r(90),u=r(91),h=r(92);class f{constructor(){this.handleFileSelect=t=>n(this,void 0,void 0,(function*(){t.stopPropagation(),t.preventDefault();const e=yield s.FileHandler.ProcessImages(t.dataTransfer.files);this.frameHandler.loadFrames(e);const r=[];for(let e=0;e{this.animationData.frameRate=this.frameRateInput.valueAsNumber,this.frameHandler.StopPlayingAnimation(),this.frameHandler.TogglePlayingAnimation(),console.log("new frame rate = "+this.animationData.frameRate)},this.updateLooping=()=>{this.animationData.loop=this.loopingInput.checked,console.log("new looping value = "+this.loopingInput.checked)}}static handleDragOver(t){null!==t&&(t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy")}Load(){this.animationData={pins:[],originX:0,originY:0,frameRate:30,loop:!0,frames:[{filename:"",pinData:[]}]},this.canvasData={width:0,height:0,widthRatio:0,heightRatio:0};const t=document.getElementById("canvasImage"),e=new Image;this.pinHandler=new h.PinHandler(document.getElementById("addpin"),document.getElementById("pinSettings")),this.canvasHandler=new o.CanvasHandler(this.animationData,this.canvasData,t,e,document.getElementById("originInfo")),this.frameHandler=new u.FrameHandler(this.animationData,this.canvasData,t,t.getContext("2d"),document.getElementById("frameNumber"),e),this.frameRateInput=document.getElementById("framerate"),this.frameRateInput.addEventListener("change",this.updateFrameRate),this.frameRateInput.value=this.animationData.frameRate.toString(),this.loopingInput=document.getElementById("looping"),this.loopingInput.addEventListener("change",this.updateLooping),this.filenameInput=document.getElementById("filename");const r=document.getElementById("dropZone");r.addEventListener("dragover",f.handleDragOver,!1),r.addEventListener("drop",this.handleFileSelect,!1);document.addEventListener("keydown",t=>{switch(t.keyCode){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:48===t.keyCode?this.frameHandler.GoToFrame(9):this.frameHandler.GoToFrame(t.keyCode-49),this.frameHandler.StopPlayingAnimation();break;case 39:case 190:console.log("next frame action"),this.frameHandler.AdvanceFrames(1),this.frameHandler.StopPlayingAnimation();break;case 37:case 188:console.log("previous frame action"),this.frameHandler.AdvanceFrames(-1),this.frameHandler.StopPlayingAnimation();break;case 40:this.frameHandler.GoToFrame(0),this.frameHandler.StopPlayingAnimation();break;case 32:this.frameHandler.TogglePlayingAnimation();break;case 83:{const t=new a,e=this.filenameInput.value;t.file(e+".anim",JSON.stringify(this.animationData));const r=this.frameHandler.GetFilenames();for(let n=0;n{i.saveAs(t,e+".zip")})}}})}}e.Page=f},function(t,e,r){(function(r){var n,i,a;i=[],void 0===(a="function"==typeof(n=function(){"use strict";function e(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){o(n.response,e,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r&&r.global===r?r:void 0,o=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(t,r,o){var s=a.URL||a.webkitURL,u=document.createElement("a");r=r||t.name||"download",u.download=r,u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?i(u):n(u.href)?e(t,r,o):i(u,u.target="_blank")):(u.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){i(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,r,a){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,a),r);else if(n(t))e(t,r,a);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout((function(){i(o)}))}}:function(t,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return e(t,r,n);var o="application/octet-stream"===t.type,s=/constructor/i.test(a.HTMLElement)||a.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"==typeof FileReader){var h=new FileReader;h.onloadend=function(){var t=h.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},h.readAsDataURL(t)}else{var f=a.URL||a.webkitURL,l=f.createObjectURL(t);i?i.location=l:location.href=l,i=null,setTimeout((function(){f.revokeObjectURL(l)}),4e4)}});a.saveAs=o.saveAs=o,t.exports=o})?n.apply(e,i):n)||(t.exports=a)}).call(this,r(2))},function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}n.prototype=r(50),n.prototype.loadAsync=r(84),n.support=r(3),n.defaults=r(31),n.version="3.2.0",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=r(10),t.exports=n},function(t,e,r){"use strict";var n=r(6),i=r(0),a=r(1),o=r(30),s=r(31),u=r(18),h=r(70),f=r(71),l=r(13),c=r(83),d=function(t,e,r){var n,o=i.getTypeOf(e),f=i.extend(r||{},s);f.date=f.date||new Date,null!==f.compression&&(f.compression=f.compression.toUpperCase()),"string"==typeof f.unixPermissions&&(f.unixPermissions=parseInt(f.unixPermissions,8)),f.unixPermissions&&16384&f.unixPermissions&&(f.dir=!0),f.dosPermissions&&16&f.dosPermissions&&(f.dir=!0),f.dir&&(t=m(t)),f.createFolders&&(n=p(t))&&g.call(this,n,!0);var d="string"===o&&!1===f.binary&&!1===f.base64;r&&void 0!==r.binary||(f.binary=!d),(e instanceof u&&0===e.uncompressedSize||f.dir||!e||0===e.length)&&(f.base64=!1,f.binary=!0,e="",f.compression="STORE",o="string");var v=null;v=e instanceof u||e instanceof a?e:l.isNode&&l.isStream(e)?new c(t,e):i.prepareContent(t,e,f.binary,f.optimizedBinaryString,f.base64);var y=new h(t,v,f);this.files[t]=y},p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e=void 0!==e?e:s.createFolders,t=m(t),this.files[t]||d.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach((function(r,n){t(r,n)&&e.push(n)})),e},file:function(t,e,r){if(1===arguments.length){if(v(t)){var n=t;return this.filter((function(t,e){return!e.dir&&n.test(t)}))}var i=this.files[this.root+t];return i&&!i.dir?i:null}return t=this.root+t,d.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(v(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=g.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n0?o-4:o;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,u=(1<>1,f=-7,l=r?i-1:0,c=r?-1:1,d=t[e+l];for(l+=c,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=256*a+t[e+l],l+=c,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=256*o+t[e+l],l+=c,f-=8);if(0===a)a=1-h;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=h}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,u,h=8*a-i-1,f=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?c/u:c*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=f?(s=0,o=f):o+l>=1?(s=(e*u-1)*Math.pow(2,i),o+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,h-=8);t[r+d-p]|=128*m}},function(t,e,r){t.exports=i;var n=r(14).EventEmitter;function i(){n.call(this)}r(8)(i,n),i.Readable=r(15),i.Writable=r(61),i.Duplex=r(62),i.Transform=r(63),i.PassThrough=r(64),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var o=!1;function s(){o||(o=!0,t.end())}function u(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",h),t.removeListener("error",h),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",h),t.on("error",h),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},function(t,e){},function(t,e,r){"use strict";var n=r(16).Buffer,i=r(56);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,a=n.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=a,i=s,e.copy(r,i),s+=o.data.length,o=o.next;return a},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,a,o,s,u=1,h={},f=!1,l=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){a.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(t){var e=l.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(o="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&p(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(e){t.postMessage(o+e,"*")}),c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==h)throw new Error(o[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var p;if(p="string"==typeof e.dictionary?a.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==h)throw new Error(o[r]);this._dict_set=!0}}function p(t,e){var r=new d(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}d.prototype.push=function(t,e){var r,o,s=this.strm,f=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=a.string2buf(t):"[object ArrayBuffer]"===u.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(f),s.next_out=0,s.avail_out=f),1!==(r=n.deflate(s,o))&&r!==h)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h):2!==o||(this.onEnd(h),s.avail_out=0,!0)},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=d,e.deflate=p,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,p(t,e)}},function(t,e,r){"use strict";var n,i=r(4),a=r(76),o=r(36),s=r(37),u=r(20),h=0,f=1,l=3,c=4,d=5,p=0,m=1,g=-2,v=-3,y=-5,_=-1,w=1,b=2,k=3,S=4,x=0,E=2,A=8,C=9,T=15,R=8,I=286,O=30,B=19,z=2*I+1,P=15,D=3,L=258,F=L+D+1,U=32,M=42,N=69,j=73,Z=91,H=103,W=113,Y=666,q=1,X=2,K=3,G=4,V=3;function J(t,e){return t.msg=u[e],e}function $(t){return(t<<1)-(t>4?9:0)}function Q(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function et(t,e){a._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function rt(t,e){t.pending_buf[t.pending++]=e}function nt(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function it(t,e){var r,n,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-F?t.strstart-(t.w_size-F):0,h=t.window,f=t.w_mask,l=t.prev,c=t.strstart+L,d=h[a+o-1],p=h[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+o]===p&&h[r+o-1]===d&&h[r]===h[a]&&h[++r]===h[a+1]){a+=2,r++;do{}while(h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&h[++a]===h[++r]&&ao){if(t.match_start=e,o=n,n>=s)break;d=h[a+o-1],p=h[a+o]}}}while((e=l[e&f])>u&&0!=--i);return o<=t.lookahead?o:t.lookahead}function at(t){var e,r,n,a,u,h,f,l,c,d,p=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-F)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);a+=p}if(0===t.strm.avail_in)break;if(h=t.strm,f=t.window,l=t.strstart+t.lookahead,c=a,d=void 0,(d=h.avail_in)>c&&(d=c),r=0===d?0:(h.avail_in-=d,i.arraySet(f,h.input,h.next_in,d,l),1===h.state.wrap?h.adler=o(h.adler,f,d,l):2===h.state.wrap&&(h.adler=s(h.adler,f,d,l)),h.next_in+=d,h.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=D)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=D&&(t.ins_h=(t.ins_h<=D)if(n=a._tr_tally(t,t.strstart-t.match_start,t.match_length-D),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=D){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=D&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=D-1)),t.prev_length>=D&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-D,n=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-D),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),a<1||a>C||r!==A||n<8||n>15||e<0||e>9||o<0||o>S)return J(t,g);8===n&&(n=9);var u=new ht;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&e===h)return q;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,et(t,!1),0===t.strm.avail_out))return q;if(t.strstart-t.block_start>=t.w_size-F&&(et(t,!1),0===t.strm.avail_out))return q}return t.insert=0,e===c?(et(t,!0),0===t.strm.avail_out?K:G):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),q)})),new ut(4,4,8,4,ot),new ut(4,5,16,8,ot),new ut(4,6,32,32,ot),new ut(4,4,16,16,st),new ut(8,16,32,32,st),new ut(8,16,128,128,st),new ut(8,32,128,256,st),new ut(32,128,258,1024,st),new ut(32,258,258,4096,st)],e.deflateInit=function(t,e){return ct(t,e,A,T,R,x)},e.deflateInit2=ct,e.deflateReset=lt,e.deflateResetKeep=ft,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,p):g},e.deflate=function(t,e){var r,i,o,u;if(!t||!t.state||e>d||e<0)return t?J(t,g):g;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===Y&&e!==c)return J(t,0===t.avail_out?y:g);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===M)if(2===i.wrap)t.adler=0,rt(i,31),rt(i,139),rt(i,8),i.gzhead?(rt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),rt(i,255&i.gzhead.time),rt(i,i.gzhead.time>>8&255),rt(i,i.gzhead.time>>16&255),rt(i,i.gzhead.time>>24&255),rt(i,9===i.level?2:i.strategy>=b||i.level<2?4:0),rt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(rt(i,255&i.gzhead.extra.length),rt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=N):(rt(i,0),rt(i,0),rt(i,0),rt(i,0),rt(i,0),rt(i,9===i.level?2:i.strategy>=b||i.level<2?4:0),rt(i,V),i.status=W);else{var v=A+(i.w_bits-8<<4)<<8;v|=(i.strategy>=b||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(v|=U),v+=31-v%31,i.status=W,nt(i,v),0!==i.strstart&&(nt(i,t.adler>>>16),nt(i,65535&t.adler)),t.adler=1}if(i.status===N)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending!==i.pending_buf_size));)rt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=j)}else i.status=j;if(i.status===j)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.gzindex=0,i.status=Z)}else i.status=Z;if(i.status===Z)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexo&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.status=H)}else i.status=H;if(i.status===H&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&tt(t),i.pending+2<=i.pending_buf_size&&(rt(i,255&t.adler),rt(i,t.adler>>8&255),t.adler=0,i.status=W)):i.status=W),0!==i.pending){if(tt(t),0===t.avail_out)return i.last_flush=-1,p}else if(0===t.avail_in&&$(e)<=$(r)&&e!==c)return J(t,y);if(i.status===Y&&0!==t.avail_in)return J(t,y);if(0!==t.avail_in||0!==i.lookahead||e!==h&&i.status!==Y){var _=i.strategy===b?function(t,e){for(var r;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(e===h)return q;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(et(t,!1),0===t.strm.avail_out))return q}return t.insert=0,e===c?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?q:X}(i,e):i.strategy===k?function(t,e){for(var r,n,i,o,s=t.window;;){if(t.lookahead<=L){if(at(t),t.lookahead<=L&&e===h)return q;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=D&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=t.strstart+L;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=D?(r=a._tr_tally(t,1,t.match_length-D),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(et(t,!1),0===t.strm.avail_out))return q}return t.insert=0,e===c?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?q:X}(i,e):n[i.level].func(i,e);if(_!==K&&_!==G||(i.status=Y),_===q||_===K)return 0===t.avail_out&&(i.last_flush=-1),p;if(_===X&&(e===f?a._tr_align(i):e!==d&&(a._tr_stored_block(i,0,0,!1),e===l&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),tt(t),0===t.avail_out))return i.last_flush=-1,p}return e!==c?p:i.wrap<=0?m:(2===i.wrap?(rt(i,255&t.adler),rt(i,t.adler>>8&255),rt(i,t.adler>>16&255),rt(i,t.adler>>24&255),rt(i,255&t.total_in),rt(i,t.total_in>>8&255),rt(i,t.total_in>>16&255),rt(i,t.total_in>>24&255)):(nt(i,t.adler>>>16),nt(i,65535&t.adler)),tt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:m)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==M&&e!==N&&e!==j&&e!==Z&&e!==H&&e!==W&&e!==Y?J(t,g):(t.state=null,e===W?J(t,v):p):g},e.deflateSetDictionary=function(t,e){var r,n,a,s,u,h,f,l,c=e.length;if(!t||!t.state)return g;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==M||r.lookahead)return g;for(1===s&&(t.adler=o(t.adler,e,c,0)),r.wrap=0,c>=r.w_size&&(0===s&&(Q(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new i.Buf8(r.w_size),i.arraySet(l,e,c-r.w_size,r.w_size,0),e=l,c=r.w_size),u=t.avail_in,h=t.next_in,f=t.input,t.avail_in=c,t.next_in=0,t.input=e,at(r);r.lookahead>=D;){n=r.strstart,a=r.lookahead-(D-1);do{r.ins_h=(r.ins_h<=0;)t[e]=0}var h=0,f=1,l=2,c=29,d=256,p=d+1+c,m=30,g=19,v=2*p+1,y=15,_=16,w=7,b=256,k=16,S=17,x=18,E=[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],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=new Array(2*(p+2));u(R);var I=new Array(2*m);u(I);var O=new Array(512);u(O);var B=new Array(256);u(B);var z=new Array(c);u(z);var P,D,L,F=new Array(m);function U(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function M(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function N(t){return t<256?O[t]:O[256+(t>>>7)]}function j(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Z(t,e,r){t.bi_valid>_-r?(t.bi_buf|=e<>_-t.bi_valid,t.bi_valid+=r-_):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function Y(t,e,r){var n,i,a=new Array(y+1),o=0;for(n=1;n<=y;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=W(a[s]++,s))}}function q(t){var e;for(e=0;e8?j(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function K(t,e,r,n){var i=2*e,a=2*r;return t[i]>1;r>=1;r--)G(t,a,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,G(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,u=e.dyn_tree,h=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;a<=y;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;rp&&(a=p,m++),u[2*n+1]=a,n>h||(t.bl_count[a]++,o=0,n>=d&&(o=c[n-d]),s=u[2*n],t.opt_len+=s*(a+o),l&&(t.static_len+=s*(f[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)(i=t.heap[--r])>h||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(t,e),Y(a,h,t.bl_count)}function $(t,e,r){var n,i,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++s>=7;n0?(t.strm.data_type===s&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return a;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e=3&&0===t.bl_tree[2*T[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(h=t.static_len+3+7>>>3)<=u&&(u=h)):u=h=r+5,r+4<=u&&-1!==e?et(t,e,r,n):t.strategy===i||h===u?(Z(t,(f<<1)+(n?1:0),3),V(t,R,I)):(Z(t,(l<<1)+(n?1:0),3),function(t,e,r,n){var i;for(Z(t,e-257,5),Z(t,r-1,5),Z(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(B[r]+d+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){Z(t,f<<1,3),H(t,b,R),function(t){16===t.bi_valid?(j(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";var n=r(78),i=r(4),a=r(38),o=r(40),s=r(20),u=r(39),h=r(81),f=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);if(this.header=new h,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=a.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(s[r])}function c(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(t,e){var r,s,u,h,l,c=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?c.input=a.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new i.Buf8(d),c.next_out=0,c.avail_out=d),(r=n.inflate(c,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==o.Z_STREAM_END&&(0!==c.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=a.utf8border(c.output,c.next_out),h=c.next_out-u,l=a.buf2string(c.output,u),c.next_out=h,c.avail_out=d-h,h&&i.arraySet(c.output,c.output,u,h,0),this.onData(l)):this.onData(i.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(m=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),c.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=l,e.inflate=c,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},e.ungzip=c},function(t,e,r){"use strict";var n=r(4),i=r(36),a=r(37),o=r(79),s=r(80),u=0,h=1,f=2,l=4,c=5,d=6,p=0,m=1,g=2,v=-2,y=-3,_=-4,w=-5,b=8,k=1,S=2,x=3,E=4,A=5,C=6,T=7,R=8,I=9,O=10,B=11,z=12,P=13,D=14,L=15,F=16,U=17,M=18,N=19,j=20,Z=21,H=22,W=23,Y=24,q=25,X=26,K=27,G=28,V=29,J=30,$=31,Q=32,tt=852,et=592,rt=15;function nt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function it(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function at(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=k,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(tt),e.distcode=e.distdyn=new n.Buf32(et),e.sane=1,e.back=-1,p):v}function ot(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,at(t)):v}function st(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?v:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ot(t))):v}function ut(t,e){var r,n;return t?(n=new it,t.state=n,n.window=null,(r=st(t,e))!==p&&(t.state=null),r):v}var ht,ft,lt=!0;function ct(t){if(lt){var e;for(ht=new n.Buf32(512),ft=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(h,t.lens,0,288,ht,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(f,t.lens,0,32,ft,0,t.work,{bits:5}),lt=!1}t.lencode=ht,t.lenbits=9,t.distcode=ft,t.distbits=5}function dt(t,e,r,i){var a,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(n.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,e,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,Ct,2,0),st=0,ut=0,r.mode=S;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&st)<<8)+(st>>8))%31){t.msg="incorrect header check",r.mode=J;break}if((15&st)!==b){t.msg="unknown compression method",r.mode=J;break}if(ut-=4,kt=8+(15&(st>>>=4)),0===r.wbits)r.wbits=kt;else if(kt>r.wbits){t.msg="invalid window size",r.mode=J;break}r.dmax=1<>8&1),512&r.flags&&(Ct[0]=255&st,Ct[1]=st>>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0,r.mode=x;case x:for(;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>8&255,Ct[2]=st>>>16&255,Ct[3]=st>>>24&255,r.check=a(r.check,Ct,4,0)),st=0,ut=0,r.mode=E;case E:for(;ut<16;){if(0===at)break t;at--,st+=tt[rt++]<>8),512&r.flags&&(Ct[0]=255&st,Ct[1]=st>>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0,r.mode=A;case A:if(1024&r.flags){for(;ut<16;){if(0===at)break t;at--,st+=tt[rt++]<>>8&255,r.check=a(r.check,Ct,2,0)),st=0,ut=0}else r.head&&(r.head.extra=null);r.mode=C;case C:if(1024&r.flags&&((lt=r.length)>at&&(lt=at),lt&&(r.head&&(kt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,tt,rt,lt,kt)),512&r.flags&&(r.check=a(r.check,tt,lt,rt)),at-=lt,rt+=lt,r.length-=lt),r.length))break t;r.length=0,r.mode=T;case T:if(2048&r.flags){if(0===at)break t;lt=0;do{kt=tt[rt+lt++],r.head&&kt&&r.length<65536&&(r.head.name+=String.fromCharCode(kt))}while(kt&<>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=z;break;case O:for(;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>=7&ut,ut-=7&ut,r.mode=K;break}for(;ut<3;){if(0===at)break t;at--,st+=tt[rt++]<>>=1)){case 0:r.mode=D;break;case 1:if(ct(r),r.mode=j,e===d){st>>>=2,ut-=2;break t}break;case 2:r.mode=U;break;case 3:t.msg="invalid block type",r.mode=J}st>>>=2,ut-=2;break;case D:for(st>>>=7&ut,ut-=7&ut;ut<32;){if(0===at)break t;at--,st+=tt[rt++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=J;break}if(r.length=65535&st,st=0,ut=0,r.mode=L,e===d)break t;case L:r.mode=F;case F:if(lt=r.length){if(lt>at&&(lt=at),lt>ot&&(lt=ot),0===lt)break t;n.arraySet(et,tt,rt,lt,it),at-=lt,rt+=lt,ot-=lt,it+=lt,r.length-=lt;break}r.mode=z;break;case U:for(;ut<14;){if(0===at)break t;at--,st+=tt[rt++]<>>=5,ut-=5,r.ndist=1+(31&st),st>>>=5,ut-=5,r.ncode=4+(15&st),st>>>=4,ut-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=J;break}r.have=0,r.mode=M;case M:for(;r.have>>=3,ut-=3}for(;r.have<19;)r.lens[Tt[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,xt={bits:r.lenbits},St=s(u,r.lens,0,19,r.lencode,0,r.work,xt),r.lenbits=xt.bits,St){t.msg="invalid code lengths set",r.mode=J;break}r.have=0,r.mode=N;case N:for(;r.have>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=gt,ut-=gt,r.lens[r.have++]=yt;else{if(16===yt){for(Et=gt+2;ut>>=gt,ut-=gt,0===r.have){t.msg="invalid bit length repeat",r.mode=J;break}kt=r.lens[r.have-1],lt=3+(3&st),st>>>=2,ut-=2}else if(17===yt){for(Et=gt+3;ut>>=gt)),st>>>=3,ut-=3}else{for(Et=gt+7;ut>>=gt)),st>>>=7,ut-=7}if(r.have+lt>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=J;break}for(;lt--;)r.lens[r.have++]=kt}}if(r.mode===J)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=J;break}if(r.lenbits=9,xt={bits:r.lenbits},St=s(h,r.lens,0,r.nlen,r.lencode,0,r.work,xt),r.lenbits=xt.bits,St){t.msg="invalid literal/lengths set",r.mode=J;break}if(r.distbits=6,r.distcode=r.distdyn,xt={bits:r.distbits},St=s(f,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,xt),r.distbits=xt.bits,St){t.msg="invalid distances set",r.mode=J;break}if(r.mode=j,e===d)break t;case j:r.mode=Z;case Z:if(at>=6&&ot>=258){t.next_out=it,t.avail_out=ot,t.next_in=rt,t.avail_in=at,r.hold=st,r.bits=ut,o(t,ft),it=t.next_out,et=t.output,ot=t.avail_out,rt=t.next_in,tt=t.input,at=t.avail_in,st=r.hold,ut=r.bits,r.mode===z&&(r.back=-1);break}for(r.back=0;vt=(At=r.lencode[st&(1<>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>_t)])>>>16&255,yt=65535&At,!(_t+(gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=_t,ut-=_t,r.back+=_t}if(st>>>=gt,ut-=gt,r.back+=gt,r.length=yt,0===vt){r.mode=X;break}if(32&vt){r.back=-1,r.mode=z;break}if(64&vt){t.msg="invalid literal/length code",r.mode=J;break}r.extra=15&vt,r.mode=H;case H:if(r.extra){for(Et=r.extra;ut>>=r.extra,ut-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=W;case W:for(;vt=(At=r.distcode[st&(1<>>16&255,yt=65535&At,!((gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>_t)])>>>16&255,yt=65535&At,!(_t+(gt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[rt++]<>>=_t,ut-=_t,r.back+=_t}if(st>>>=gt,ut-=gt,r.back+=gt,64&vt){t.msg="invalid distance code",r.mode=J;break}r.offset=yt,r.extra=15&vt,r.mode=Y;case Y:if(r.extra){for(Et=r.extra;ut>>=r.extra,ut-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=J;break}r.mode=q;case q:if(0===ot)break t;if(lt=ft-ot,r.offset>lt){if((lt=r.offset-lt)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=J;break}lt>r.wnext?(lt-=r.wnext,pt=r.wsize-lt):pt=r.wnext-lt,lt>r.length&&(lt=r.length),mt=r.window}else mt=et,pt=it-r.offset,lt=r.length;lt>ot&&(lt=ot),ot-=lt,r.length-=lt;do{et[it++]=mt[pt++]}while(--lt);0===r.length&&(r.mode=Z);break;case X:if(0===ot)break t;et[it++]=r.length,ot--,r.mode=Z;break;case K:if(r.wrap){for(;ut<32;){if(0===at)break t;at--,st|=tt[rt++]<>>=w=_>>>24,p-=w,0===(w=_>>>16&255))A[a++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=m[(65535&_)+(d&(1<>>=w,p-=w),p<15&&(d+=E[n++]<>>=w=_>>>24,p-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=g[(65535&_)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,k>(w=a-o)){if((w=k-w)>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,x=c,0===l){if(S+=h-w,w2;)A[a++]=x[S++],A[a++]=x[S++],A[a++]=x[S++],b-=3;b&&(A[a++]=x[S++],b>1&&(A[a++]=x[S++]))}else{S=a-k;do{A[a++]=A[S++],A[a++]=A[S++],A[a++]=A[S++],b-=3}while(b>2);b&&(A[a++]=A[S++],b>1&&(A[a++]=A[S++]))}break}}break}}while(n>3,d&=(1<<(p-=b<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n=1&&0===D[A];A--);if(C>A&&(C=A),0===A)return h[f++]=20971520,h[f++]=20971520,c.bits=1,0;for(E=1;E0&&(0===t||1!==A))return-1;for(L[1]=0,S=1;S<15;S++)L[S+1]=L[S]+D[S];for(x=0;x852||2===t&&O>592)return 1;for(;;){_=S-R,l[x]y?(w=F[U+l[x]],b=z[P+l[x]]):(w=96,b=0),d=1<>R)+(p-=d)]=_<<24|w<<16|b|0}while(0!==p);for(d=1<>=1;if(0!==d?(B&=d-1,B+=d):B=0,x++,0==--D[S]){if(S===A)break;S=e[r+l[x]]}if(S>C&&(B&g)!==m){for(0===R&&(R=C),v+=E,I=1<<(T=S-R);T+R852||2===t&&O>592)return 1;h[m=B&g]=C<<24|T<<16|v-f|0}}return 0!==B&&(h[v+B]=S-R<<24|64<<16|0),c.bits=C,0}},function(t,e,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(t,e,r){"use strict";var n=r(0),i=r(1),a=r(6),o=r(19),s=r(41),u=function(t,e){var r,n="";for(r=0;r>>=8;return n},h=function(t,e,r,i,h,f){var l,c,d=t.file,p=t.compression,m=f!==a.utf8encode,g=n.transformTo("string",f(d.name)),v=n.transformTo("string",a.utf8encode(d.name)),y=d.comment,_=n.transformTo("string",f(y)),w=n.transformTo("string",a.utf8encode(y)),b=v.length!==d.name.length,k=w.length!==y.length,S="",x="",E="",A=d.dir,C=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var R=0;e&&(R|=8),m||!b&&!k||(R|=2048);var I,O,B,z=0,P=0;A&&(z|=16),"UNIX"===h?(P=798,z|=(I=d.unixPermissions,O=A,B=I,I||(B=O?16893:33204),(65535&B)<<16)):(P=20,z|=63&(d.dosPermissions||0)),l=C.getUTCHours(),l<<=6,l|=C.getUTCMinutes(),l<<=5,l|=C.getUTCSeconds()/2,c=C.getUTCFullYear()-1980,c<<=4,c|=C.getUTCMonth()+1,c<<=5,c|=C.getUTCDate(),b&&(x=u(1,1)+u(o(g),4)+v,S+="up"+u(x.length,2)+x),k&&(E=u(1,1)+u(o(_),4)+w,S+="uc"+u(E.length,2)+E);var D="";return D+="\n\0",D+=u(R,2),D+=p.magic,D+=u(l,2),D+=u(c,2),D+=u(T.crc32,4),D+=u(T.compressedSize,4),D+=u(T.uncompressedSize,4),D+=u(g.length,2),D+=u(S.length,2),{fileRecord:s.LOCAL_FILE_HEADER+D+g+S,dirRecord:s.CENTRAL_FILE_HEADER+u(P,2)+D+u(_.length,2)+"\0\0\0\0"+u(z,4)+u(i,4)+g+S+_}},f=function(t){return s.DATA_DESCRIPTOR+u(t.crc32,4)+u(t.compressedSize,4)+u(t.uncompressedSize,4)};function l(t,e,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(l,i),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,i.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=h(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=h(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:f(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(e,a.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},function(t,e,r){"use strict";var n=r(44);function i(t){n.call(this,t)}r(0).inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";var n=r(45);function i(t){n.call(this,t)}r(0).inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},t.exports=i},function(t,e,r){"use strict";var n=r(42),i=r(0),a=r(18),o=r(19),s=r(6),u=r(35),h=r(3);function f(t,e){this.options=t,this.loadOptions=e}f.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index{const e=this.canvasImage.width/this.imageElement.width,r=this.canvasImage.height/this.imageElement.height,n=Math.floor(t.offsetX/e),i=Math.floor(t.offsetY/r);console.log("CLICK X:"+n+" Y:"+i),this.animationData.originX=n,this.animationData.originY=i,this.canvasData.widthRatio=e,this.canvasData.heightRatio=r,this.orginInfo.innerText="Origin X: "+this.animationData.originX+" Y: "+this.animationData.originY},this.animationData=t,this.canvasData=e,this.canvasImage=r,this.imageElement=n,this.orginInfo=i,this.ResizeCanvas(),this.UpdateCanvasDataSize();const a=this.canvasImage.getContext("2d");a.fillRect(0,0,this.targetImageSize,this.targetImageSize),a.imageSmoothingEnabled=!1,this.canvasImage.addEventListener("click",this.mouseDown)}ResizeCanvas(){const t=this.imageElement.height/this.imageElement.width,e=this.targetImageSize/t,r=this.targetImageSize;console.log("hwratio = "+t),this.canvasImage.width=e,this.canvasImage.height=r,this.UpdateCanvasDataSize()}UpdateCanvasDataSize(){this.canvasData.width=this.canvasImage.width,this.canvasData.height=this.canvasImage.height}}},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});class i{}e.FileHandler=i,i.ProcessImages=t=>new Promise((e,r)=>n(void 0,void 0,void 0,(function*(){const r=[];for(let e=0;enew Promise((e,r)=>{const n=new FileReader;n.onload=t=>{e(t.target.result)},n.onerror=r,n.readAsDataURL(t)})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.FrameHandler=class{constructor(t,e,r,n,i,a){this.start=0,this.filenames=[],this.currentFrame=0,this.windowAnimationUpdate=t=>{0===this.start&&(this.start=t);const e=t-this.start;this.playingAnimation&&e>1e3/this.animationData.frameRate&&(this.AdvanceFrames(1),this.start=0),this.RefreshImage(),window.requestAnimationFrame(this.windowAnimationUpdate)},this.animationData=t,this.canvasData=e,this.htmlCanvasElement=r,this.canvasContext=n,this.frameNumberDiv=i,window.requestAnimationFrame(this.windowAnimationUpdate),this.imageElement=a}GetCurrentFrame(){return this.currentFrame}loadFrames(t){this.filenames=t,this.currentFrame=0,this.RefreshImage()}AdvanceFrames(t){this.currentFrame+=t,this.currentFrame%=this.filenames.length,this.currentFrame<0&&(this.currentFrame=this.filenames.length-1),this.GoToFrame(this.currentFrame)}GoToFrame(t){this.currentFrame=t,this.RefreshImage()}TogglePlayingAnimation(){this.playingAnimation=!this.playingAnimation,console.log("playingAnimation = ",this.playingAnimation)}StopPlayingAnimation(){this.playingAnimation=!1}GetFilenames(){return this.filenames}RefreshImage(){if(0===this.filenames.length)this.frameNumberDiv.className="warning",this.frameNumberDiv.innerText="No images uploaded yet";else{this.canvasContext.clearRect(0,0,this.htmlCanvasElement.width,this.htmlCanvasElement.height),this.canvasContext.imageSmoothingEnabled=!1,this.imageElement.src=this.filenames[this.currentFrame],this.canvasContext.drawImage(this.imageElement,0,0,this.htmlCanvasElement.width,this.htmlCanvasElement.height);const t=500,e=this.animationData.originX*this.canvasData.widthRatio,r=this.animationData.originY*this.canvasData.heightRatio;this.canvasContext.beginPath(),this.canvasContext.moveTo(e,r-t),this.canvasContext.lineTo(e,r+t),this.canvasContext.moveTo(e-t,r),this.canvasContext.lineTo(e+t,r),this.canvasContext.stroke(),this.frameNumberDiv.className="instruction",this.frameNumberDiv.innerText="Frame "+(this.currentFrame+1).toString()+" / "+this.filenames.length.toString()}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.PinHandler=class{constructor(t,e){this.pins=1,this.addPinButton=t,this.pinSettingsDiv=e,this.UpdatePinSettingsDiv(),this.addPinButton.addEventListener("click",this.AddPinButtonPressed)}UpdatePinSettingsDiv(){let t="";for(let e=0;e';this.pinSettingsDiv.innerHTML=t}AddPinButtonPressed(){this.pins+=1,this.UpdatePinSettingsDiv()}}}]); \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index e65f05f..4e5a625 100644 --- a/dist/index.html +++ b/dist/index.html @@ -22,7 +22,10 @@ -
+
+

Origin

+
+
Name:
Click image to set Origin
diff --git a/help b/help new file mode 100644 index 0000000..7538cec --- /dev/null +++ b/help @@ -0,0 +1 @@ +pnpm run start:dev \ No newline at end of file diff --git a/pnpm-debug.log b/pnpm-debug.log new file mode 100644 index 0000000..dd9b102 --- /dev/null +++ b/pnpm-debug.log @@ -0,0 +1,22 @@ +{ + "0 debug pnpm:scope": { + "selected": 1, + "workspacePrefix": null + }, + "1 error pnpm": { + "message": { + "errno": 1, + "code": "ELIFECYCLE", + "pkgid": "animationtool@1.0.0", + "stage": "start:dev", + "script": "webpack-dev-server --config webpack/dev.config.js", + "pkgname": "animationtool" + }, + "err": { + "name": "Error", + "message": "animationtool@1.0.0 start:dev: `webpack-dev-server --config webpack/dev.config.js`\nExit status 1", + "code": "ELIFECYCLE", + "stack": "Error: animationtool@1.0.0 start:dev: `webpack-dev-server --config webpack/dev.config.js`\nExit status 1\n at EventEmitter.proc.on (C:\\Users\\tekno\\AppData\\Roaming\\npm\\node_modules\\pnpm\\lib\\node_modules\\@zkochan\\npm-lifecycle\\index.js:302:16)\n at EventEmitter.emit (events.js:198:13)\n at ChildProcess. (C:\\Users\\tekno\\AppData\\Roaming\\npm\\node_modules\\pnpm\\lib\\node_modules\\@zkochan\\npm-lifecycle\\lib\\spawn.js:55:14)\n at ChildProcess.emit (events.js:198:13)\n at maybeClose (internal/child_process.js:982:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)" + } + } +} \ No newline at end of file