UNPKG

photoeditorsdk-server

Version:

The most comprehensive photo editor SDK for Server Applications based on NodeJs

4 lines 583 kB
var f0=Object.create;var Gs=Object.defineProperty,p0=Object.defineProperties,_0=Object.getOwnPropertyDescriptor,g0=Object.getOwnPropertyDescriptors,y0=Object.getOwnPropertyNames,mu=Object.getOwnPropertySymbols,x0=Object.getPrototypeOf,fu=Object.prototype.hasOwnProperty,b0=Object.prototype.propertyIsEnumerable;var $a=(o,e,t)=>e in o?Gs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,C=(o,e)=>{for(var t in e||(e={}))fu.call(e,t)&&$a(o,t,e[t]);if(mu)for(var t of mu(e))b0.call(e,t)&&$a(o,t,e[t]);return o},L=(o,e)=>p0(o,g0(e)),pu=o=>Gs(o,"__esModule",{value:!0});var _=(o,e)=>()=>(o&&(e=o(o=0)),e);var xt=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Te=(o,e)=>{for(var t in e)Gs(o,t,{get:e[t],enumerable:!0})},_u=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y0(e))!fu.call(o,r)&&(t||r!=="default")&&Gs(o,r,{get:()=>e[r],enumerable:!(i=_0(e,r))||i.enumerable});return o},Ws=(o,e)=>_u(pu(Gs(o!=null?f0(x0(o)):{},"default",!e&&o&&o.__esModule?{get:()=>o.default,enumerable:!0}:{value:o,enumerable:!0})),o),je=(o=>(e,t)=>o&&o.get(e)||(t=_u(pu({}),e,1),o&&o.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var M=(o,e,t)=>($a(o,typeof e!="symbol"?e+"":e,t),t);var Gr=(o,e,t)=>new Promise((i,r)=>{var s=l=>{try{a(t.next(l))}catch(h){r(h)}},n=l=>{try{a(t.throw(l))}catch(h){r(h)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,n);a((t=t.apply(o,e)).next())});var tt={};Te(tt,{FragmentPrecision:()=>Lo,ImageFormat:()=>Mt,OptionType:()=>E,RenderType:()=>qe,RendererType:()=>ke,UniformType:()=>ce});var qe,Mt,E,ce,ke,Lo,ct=_(()=>{qe={IMAGE:"image",DATAURL:"data-url",BUFFER:"buffer",BLOB:"blob",MSBLOB:"ms-blob"},Mt={PNG:"image/png",JPEG:"image/jpeg",RAW:"raw"},E=(u=>(u.NUMBER="number",u.VECTOR2="vector2",u.COLOR_MATRIX="color-matrix",u.COLOR="color",u.ARRAY="array",u.OBJECT="object",u.STRING="string",u.BOOLEAN="boolean",u.CONFIGURABLE="configurable",u.IMAGE="image",u.FUNCTION="function",u.TEXTURE="texture",u.ALL="*",u))(E||{}),ce=(y=>(y.SAMPLER2D="sampler2d",y.INT="i",y.INT1="1i",y.INT2="2i",y.INT3="3i",y.INT4="4i",y.FLOAT="f",y.FLOAT1="1f",y.FLOAT2="2f",y.FLOAT_VECTOR2="2fv",y.FLOAT3="3f",y.FLOAT4="4f",y.MAT3="mat3",y.MAT3FV="mat3fv",y.MAT4="mat4",y))(ce||{}),ke=(t=>(t.WEBGL="webgl",t.CANVAS="canvas",t))(ke||{}),Lo=(i=>(i.High="highp",i.Medium="mediump",i.Low="lowp",i))(Lo||{})});var ui,el=_(()=>{ui=class{constructor(e,t,i){this.width=e;this.height=t;this.data=i}}});var yu={};Te(yu,{serverUtils:()=>T0});var Di,gu,v0,w0,T0,xu=_(()=>{Di=require("canvas"),gu=Ws(require("gl"));el();v0=o=>{let t=new Di.Canvas(o.width,o.height).getContext("2d");t.drawImage(o,0,0);let i=t.getImageData(0,0,o.width,o.height);return new ui(o.width,o.height,i.data)},w0=(o,e)=>{let t=e instanceof ui?e:v0(e),r=new Di.Canvas(t.width,t.height).getContext("2d");r.drawImage(e,0,0);let s=r.getImageData(0,0,t.width,t.height),n=new ui(t.width,t.height,s.data);o.texImage2D(o.TEXTURE_2D,0,o.RGBA,t.width,t.height,0,o.RGBA,o.UNSIGNED_BYTE,n.data)},T0={isSupported:()=>!0,isCanvas:o=>o instanceof Di.Canvas,isImage:o=>!1,Image:Di.Image,createCanvas:()=>new Di.Canvas(300,150),glMaxTexture:o=>o.getParameter(o.MAX_TEXTURE_SIZE),glGet:o=>(0,gu.default)(o.width,o.height,{preserveDrawingBuffer:!0}),glResize(o,e){let t=o.getExtension("STACKGL_resize_drawingbuffer");return t&&t.resize(e.x,e.y),o},glTexImage:w0}});var bu,Ie,Wr,tl,vu,Bt=_(()=>{ct();bu=(xu(),je(yu)).serverUtils;Ie=bu,Wr=o=>o._type==="webgl",tl=o=>Boolean(o&&"tagName"in o&&o.tagName&&o.tagName.toUpperCase()==="CANVAS"),vu=o=>Boolean("tagName"in o&&o.tagName.toUpperCase()==="IMG")});var zo,wu,Tu=_(()=>{zo=class{static head(e){return e[0]}static tail(e){return e.slice(1)}static last(e){return e[e.length-1]}static init(e){return e.slice(0,e.length-1)}static remove(e,t){return e.filter((i,r,s)=>!t(i,r,s))}static findIndex(e,t){for(let i=0;i<e.length;i++)if(t(e[i]))return i;return-1}static find(e,t){for(let i=0;i<e.length;i++)if(t(e[i]))return e[i]}static flatten(e){return e.reduce(function(t,i){return t.concat(Array.isArray(i)?zo.flatten(i):i)},[])}static range(e,t){let i=[];if(t>e)for(let r=e;r<t;r++)i.push(r);return i}static repeat(e,t){let i=[];for(let r=0;r<t;r++)i[r]=e;return i}static zip(e,t){let i=Math.min(e.length,t.length),r=[];for(let s=0;s<i;s++)r[s]=[e[s],t[s]];return r}},wu=zo});var di,R0,kt,Vr=_(()=>{di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",R0={encode(o){let e="",t,i,r,s,n,a,l,h=0;do t=o[h++],i=o[h++],r=o[h++],s=t>>2,n=(t&3)<<4|i>>4,a=(i&15)<<2|r>>6,l=r&63,isNaN(i)?a=l=64:isNaN(r)&&(l=64),e=e+di.charAt(s)+di.charAt(n)+di.charAt(a)+di.charAt(l),t=i=r="",s=n=a=l="";while(h<o.length);return e},decode(o){let e,t,i,r,s,n,a,l=0,h=[];if(/[^A-Za-z0-9+/=]/g.exec(o))throw new Error(`There were invalid base64 characters in the input text. Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '=' Expect errors in decoding.`);o=o.replace(/[^A-Za-z0-9+/=]/g,"");do r=di.indexOf(o.charAt(l++)),s=di.indexOf(o.charAt(l++)),n=di.indexOf(o.charAt(l++)),a=di.indexOf(o.charAt(l++)),e=r<<2|s>>4,t=(s&15)<<4|n>>2,i=(n&3)<<6|a,h.push(e),n!==64&&h.push(t),a!==64&&h.push(i),e=t=i="",r=s=n=a="";while(l<o.length);return h}},kt=R0});var Pi,il,k,Dt=_(()=>{Bt();Tu();Vr();Pi=class{static mapRange(e,t,i){return(e-t.getMin())*i.getLength()/t.getLength()+i.getMin()}static isPlainObject(e){if(typeof e!="object"||!e)return!1;if(typeof Object.getPrototypeOf=="function"){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)==="[object Object]"}static isMobile(){if(typeof navigator=="undefined")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}static isBrowser(){return typeof window!="undefined"}static values(e){let t=[];for(let i in e)t.push(e[i]);return t}static generateUUID(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let i=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t==="x"?i:i&3|8).toString(16)})}static resizeVectorToFit(e,t){let i=Math.min(t.x/e.x,t.y/e.y);return e.clone().multiply(i)}static resizeVectorToFill(e,t){let i=e.x/e.y,r=t.x/t.y;return i>r?t.clone().set(t.y*i,t.y):t.clone().set(t.x,t.x/i)}static isExtendable(e){return typeof e!="undefined"&&e!==null&&(typeof e=="object"||typeof e=="function")}static defaults(e,...t){let i={};for(let r in e)i[r]=e[r];for(let r=0;r<t.length;r++){let s=t[r];for(let n in s)typeof i[n]=="undefined"&&(i[n]=s[n])}return i}static deepMerge(e,...t){let i=(r,s)=>{if(s===void 0)return i(null,r);if(Array.isArray(s))return[...s];if(!Pi.isPlainObject(s))return s;if(!Pi.isPlainObject(r))return C({},s);let n=C({},r);return Object.keys(s).forEach(a=>{let l=s[a];l!==void 0&&(n[a]=i(r[a],l))}),n};return t.reduce(i,e)}static deepDefaults(e,...t){let i=[...t].reverse();return Pi.deepMerge(...i,e)}static deepClone(e){let t={};for(let i in e)Pi.isExtendable(e[i])?t[i]=Pi.deepClone(e[i]):t[i]=e[i];return t}static extend(e,...t){let i={};for(let r in e)i[r]=e[r];for(let r=0;r<t.length;r++){let s=t[r];for(let n in s)i[n]=s[n]}return i}static clone(e){return this.extend({},e)}static getUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}static createCanvas(){return Ie.createCanvas()}static isPowerOfTwo(e){return(e.x&e.x-1)===0&&(e.y&e.y-1)===0}static nextLowestPOT(e){for(let t=1;t<32;t<<=1)e|=e>>t;return e-(e>>1)}static nextHighestPOT(e){e--;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}static moveArrayItem(e,t,i){if(i>=e.length){let r=i-e.length;for(;r--+1;)e.push(void 0)}e.splice(i,0,e.splice(t,1)[0])}static ensureCanvasDimensions(e,t){return e.width!==t.x||e.height!==t.y?(e.width=t.x,e.height=t.y,!0):!1}static byteArrayToString(e){return e.map(t=>String.fromCharCode(t)).join("")}static clamp(e,t,i){return Math.max(t,Math.min(e,i))}static wildCardMatch(e,t){return new RegExp(`^${t.split("*").join(".*")}$`).test(e)}static flipObject(e){let t={};for(let i in e)t[e[i]]=i;return t}static ISODateString(e){function t(i){return i<10?`0${i}`:i}return`${e.getUTCFullYear()}-${t(e.getUTCMonth()+1)}-${t(e.getUTCDate())}T${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())}Z`}static getCrossOriginValue(e){if(!e)return"anonymous";if(e!=="none")return e}static invariant(e,t){if(!e)throw new Error(t)}static executePromises(e){let t=e.length,i=0,r=[],s=[];return new Promise((n,a)=>{let l=()=>{i++,i>=t&&(s.length<=0?n(r):a(s))},h=m=>{r.push(m),l()},c=m=>{s.push(m),l()};e.forEach(m=>{m.then(h).catch(c)})})}},il=Pi;M(il,"Array",wu);k=il});var Cu=xt((l2,Ru)=>{"use strict";var C0=/[|\\{}()[\]^$+*?.]/g;Ru.exports=function(o){if(typeof o!="string")throw new TypeError("Expected a string");return o.replace(C0,"\\$&")}});var Su=xt((h2,ku)=>{"use strict";ku.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var rl=xt((c2,Iu)=>{var Ai=Su(),Eu={};for(No in Ai)Ai.hasOwnProperty(No)&&(Eu[Ai[No]]=No);var No,U=Iu.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(Xe in U)if(U.hasOwnProperty(Xe)){if(!("channels"in U[Xe]))throw new Error("missing channels property: "+Xe);if(!("labels"in U[Xe]))throw new Error("missing channel labels property: "+Xe);if(U[Xe].labels.length!==U[Xe].channels)throw new Error("channel and label counts mismatch: "+Xe);Ou=U[Xe].channels,Fu=U[Xe].labels,delete U[Xe].channels,delete U[Xe].labels,Object.defineProperty(U[Xe],"channels",{value:Ou}),Object.defineProperty(U[Xe],"labels",{value:Fu})}var Ou,Fu,Xe;U.rgb.hsl=function(o){var e=o[0]/255,t=o[1]/255,i=o[2]/255,r=Math.min(e,t,i),s=Math.max(e,t,i),n=s-r,a,l,h;return s===r?a=0:e===s?a=(t-i)/n:t===s?a=2+(i-e)/n:i===s&&(a=4+(e-t)/n),a=Math.min(a*60,360),a<0&&(a+=360),h=(r+s)/2,s===r?l=0:h<=.5?l=n/(s+r):l=n/(2-s-r),[a,l*100,h*100]};U.rgb.hsv=function(o){var e,t,i,r,s,n=o[0]/255,a=o[1]/255,l=o[2]/255,h=Math.max(n,a,l),c=h-Math.min(n,a,l),m=function(d){return(h-d)/6/c+1/2};return c===0?r=s=0:(s=c/h,e=m(n),t=m(a),i=m(l),n===h?r=i-t:a===h?r=1/3+e-i:l===h&&(r=2/3+t-e),r<0?r+=1:r>1&&(r-=1)),[r*360,s*100,h*100]};U.rgb.hwb=function(o){var e=o[0],t=o[1],i=o[2],r=U.rgb.hsl(o)[0],s=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[r,s*100,i*100]};U.rgb.cmyk=function(o){var e=o[0]/255,t=o[1]/255,i=o[2]/255,r,s,n,a;return a=Math.min(1-e,1-t,1-i),r=(1-e-a)/(1-a)||0,s=(1-t-a)/(1-a)||0,n=(1-i-a)/(1-a)||0,[r*100,s*100,n*100,a*100]};function k0(o,e){return Math.pow(o[0]-e[0],2)+Math.pow(o[1]-e[1],2)+Math.pow(o[2]-e[2],2)}U.rgb.keyword=function(o){var e=Eu[o];if(e)return e;var t=1/0,i;for(var r in Ai)if(Ai.hasOwnProperty(r)){var s=Ai[r],n=k0(o,s);n<t&&(t=n,i=r)}return i};U.keyword.rgb=function(o){return Ai[o]};U.rgb.xyz=function(o){var e=o[0]/255,t=o[1]/255,i=o[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var r=e*.4124+t*.3576+i*.1805,s=e*.2126+t*.7152+i*.0722,n=e*.0193+t*.1192+i*.9505;return[r*100,s*100,n*100]};U.rgb.lab=function(o){var e=U.rgb.xyz(o),t=e[0],i=e[1],r=e[2],s,n,a;return t/=95.047,i/=100,r/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=116*i-16,n=500*(t-i),a=200*(i-r),[s,n,a]};U.hsl.rgb=function(o){var e=o[0]/360,t=o[1]/100,i=o[2]/100,r,s,n,a,l;if(t===0)return l=i*255,[l,l,l];i<.5?s=i*(1+t):s=i+t-i*t,r=2*i-s,a=[0,0,0];for(var h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?l=r+(s-r)*6*n:2*n<1?l=s:3*n<2?l=r+(s-r)*(2/3-n)*6:l=r,a[h]=l*255;return a};U.hsl.hsv=function(o){var e=o[0],t=o[1]/100,i=o[2]/100,r=t,s=Math.max(i,.01),n,a;return i*=2,t*=i<=1?i:2-i,r*=s<=1?s:2-s,a=(i+t)/2,n=i===0?2*r/(s+r):2*t/(i+t),[e,n*100,a*100]};U.hsv.rgb=function(o){var e=o[0]/60,t=o[1]/100,i=o[2]/100,r=Math.floor(e)%6,s=e-Math.floor(e),n=255*i*(1-t),a=255*i*(1-t*s),l=255*i*(1-t*(1-s));switch(i*=255,r){case 0:return[i,l,n];case 1:return[a,i,n];case 2:return[n,i,l];case 3:return[n,a,i];case 4:return[l,n,i];case 5:return[i,n,a]}};U.hsv.hsl=function(o){var e=o[0],t=o[1]/100,i=o[2]/100,r=Math.max(i,.01),s,n,a;return a=(2-t)*i,s=(2-t)*r,n=t*r,n/=s<=1?s:2-s,n=n||0,a/=2,[e,n*100,a*100]};U.hwb.rgb=function(o){var e=o[0]/360,t=o[1]/100,i=o[2]/100,r=t+i,s,n,a,l;r>1&&(t/=r,i/=r),s=Math.floor(6*e),n=1-i,a=6*e-s,(s&1)!==0&&(a=1-a),l=t+a*(n-t);var h,c,m;switch(s){default:case 6:case 0:h=n,c=l,m=t;break;case 1:h=l,c=n,m=t;break;case 2:h=t,c=n,m=l;break;case 3:h=t,c=l,m=n;break;case 4:h=l,c=t,m=n;break;case 5:h=n,c=t,m=l;break}return[h*255,c*255,m*255]};U.cmyk.rgb=function(o){var e=o[0]/100,t=o[1]/100,i=o[2]/100,r=o[3]/100,s,n,a;return s=1-Math.min(1,e*(1-r)+r),n=1-Math.min(1,t*(1-r)+r),a=1-Math.min(1,i*(1-r)+r),[s*255,n*255,a*255]};U.xyz.rgb=function(o){var e=o[0]/100,t=o[1]/100,i=o[2]/100,r,s,n;return r=e*3.2406+t*-1.5372+i*-.4986,s=e*-.9689+t*1.8758+i*.0415,n=e*.0557+t*-.204+i*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,r=Math.min(Math.max(0,r),1),s=Math.min(Math.max(0,s),1),n=Math.min(Math.max(0,n),1),[r*255,s*255,n*255]};U.xyz.lab=function(o){var e=o[0],t=o[1],i=o[2],r,s,n;return e/=95.047,t/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,r=116*t-16,s=500*(e-t),n=200*(t-i),[r,s,n]};U.lab.xyz=function(o){var e=o[0],t=o[1],i=o[2],r,s,n;s=(e+16)/116,r=t/500+s,n=s-i/200;var a=Math.pow(s,3),l=Math.pow(r,3),h=Math.pow(n,3);return s=a>.008856?a:(s-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,n=h>.008856?h:(n-16/116)/7.787,r*=95.047,s*=100,n*=108.883,[r,s,n]};U.lab.lch=function(o){var e=o[0],t=o[1],i=o[2],r,s,n;return r=Math.atan2(i,t),s=r*360/2/Math.PI,s<0&&(s+=360),n=Math.sqrt(t*t+i*i),[e,n,s]};U.lch.lab=function(o){var e=o[0],t=o[1],i=o[2],r,s,n;return n=i/360*2*Math.PI,r=t*Math.cos(n),s=t*Math.sin(n),[e,r,s]};U.rgb.ansi16=function(o){var e=o[0],t=o[1],i=o[2],r=1 in arguments?arguments[1]:U.rgb.hsv(o)[2];if(r=Math.round(r/50),r===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return r===2&&(s+=60),s};U.hsv.ansi16=function(o){return U.rgb.ansi16(U.hsv.rgb(o),o[2])};U.rgb.ansi256=function(o){var e=o[0],t=o[1],i=o[2];if(e===t&&t===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var r=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5);return r};U.ansi16.rgb=function(o){var e=o%10;if(e===0||e===7)return o>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(o>50)+1)*.5,i=(e&1)*t*255,r=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[i,r,s]};U.ansi256.rgb=function(o){if(o>=232){var e=(o-232)*10+8;return[e,e,e]}o-=16;var t,i=Math.floor(o/36)/5*255,r=Math.floor((t=o%36)/6)/5*255,s=t%6/5*255;return[i,r,s]};U.rgb.hex=function(o){var e=((Math.round(o[0])&255)<<16)+((Math.round(o[1])&255)<<8)+(Math.round(o[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};U.hex.rgb=function(o){var e=o.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(a){return a+a}).join(""));var i=parseInt(t,16),r=i>>16&255,s=i>>8&255,n=i&255;return[r,s,n]};U.rgb.hcg=function(o){var e=o[0]/255,t=o[1]/255,i=o[2]/255,r=Math.max(Math.max(e,t),i),s=Math.min(Math.min(e,t),i),n=r-s,a,l;return n<1?a=s/(1-n):a=0,n<=0?l=0:r===e?l=(t-i)/n%6:r===t?l=2+(i-e)/n:l=4+(e-t)/n+4,l/=6,l%=1,[l*360,n*100,a*100]};U.hsl.hcg=function(o){var e=o[1]/100,t=o[2]/100,i=1,r=0;return t<.5?i=2*e*t:i=2*e*(1-t),i<1&&(r=(t-.5*i)/(1-i)),[o[0],i*100,r*100]};U.hsv.hcg=function(o){var e=o[1]/100,t=o[2]/100,i=e*t,r=0;return i<1&&(r=(t-i)/(1-i)),[o[0],i*100,r*100]};U.hcg.rgb=function(o){var e=o[0]/360,t=o[1]/100,i=o[2]/100;if(t===0)return[i*255,i*255,i*255];var r=[0,0,0],s=e%1*6,n=s%1,a=1-n,l=0;switch(Math.floor(s)){case 0:r[0]=1,r[1]=n,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=n;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=n,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return l=(1-t)*i,[(t*r[0]+l)*255,(t*r[1]+l)*255,(t*r[2]+l)*255]};U.hcg.hsv=function(o){var e=o[1]/100,t=o[2]/100,i=e+t*(1-e),r=0;return i>0&&(r=e/i),[o[0],r*100,i*100]};U.hcg.hsl=function(o){var e=o[1]/100,t=o[2]/100,i=t*(1-e)+.5*e,r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[o[0],r*100,i*100]};U.hcg.hwb=function(o){var e=o[1]/100,t=o[2]/100,i=e+t*(1-e);return[o[0],(i-e)*100,(1-i)*100]};U.hwb.hcg=function(o){var e=o[1]/100,t=o[2]/100,i=1-t,r=i-e,s=0;return r<1&&(s=(i-r)/(1-r)),[o[0],r*100,s*100]};U.apple.rgb=function(o){return[o[0]/65535*255,o[1]/65535*255,o[2]/65535*255]};U.rgb.apple=function(o){return[o[0]/255*65535,o[1]/255*65535,o[2]/255*65535]};U.gray.rgb=function(o){return[o[0]/100*255,o[0]/100*255,o[0]/100*255]};U.gray.hsl=U.gray.hsv=function(o){return[0,0,o[0]]};U.gray.hwb=function(o){return[0,100,o[0]]};U.gray.cmyk=function(o){return[0,0,0,o[0]]};U.gray.lab=function(o){return[o[0],0,0]};U.gray.hex=function(o){var e=Math.round(o[0]/100*255)&255,t=(e<<16)+(e<<8)+e,i=t.toString(16).toUpperCase();return"000000".substring(i.length)+i};U.rgb.gray=function(o){var e=(o[0]+o[1]+o[2])/3;return[e/255*100]}});var Bu=xt((u2,Mu)=>{var Uo=rl();function S0(){for(var o={},e=Object.keys(Uo),t=e.length,i=0;i<t;i++)o[e[i]]={distance:-1,parent:null};return o}function O0(o){var e=S0(),t=[o];for(e[o].distance=0;t.length;)for(var i=t.pop(),r=Object.keys(Uo[i]),s=r.length,n=0;n<s;n++){var a=r[n],l=e[a];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,t.unshift(a))}return e}function F0(o,e){return function(t){return e(o(t))}}function E0(o,e){for(var t=[e[o].parent,o],i=Uo[e[o].parent][o],r=e[o].parent;e[r].parent;)t.unshift(e[r].parent),i=F0(Uo[e[r].parent][r],i),r=e[r].parent;return i.conversion=t,i}Mu.exports=function(o){for(var e=O0(o),t={},i=Object.keys(e),r=i.length,s=0;s<r;s++){var n=i[s],a=e[n];a.parent!==null&&(t[n]=E0(n,e))}return t}});var Pu=xt((d2,Du)=>{var sl=rl(),I0=Bu(),Hr={},M0=Object.keys(sl);function B0(o){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),o(t))};return"conversion"in o&&(e.conversion=o.conversion),e}function D0(o){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var i=o(t);if(typeof i=="object")for(var r=i.length,s=0;s<r;s++)i[s]=Math.round(i[s]);return i};return"conversion"in o&&(e.conversion=o.conversion),e}M0.forEach(function(o){Hr[o]={},Object.defineProperty(Hr[o],"channels",{value:sl[o].channels}),Object.defineProperty(Hr[o],"labels",{value:sl[o].labels});var e=I0(o),t=Object.keys(e);t.forEach(function(i){var r=e[i];Hr[o][i]=D0(r),Hr[o][i].raw=B0(r)})});Du.exports=Hr});var Lu=xt((m2,Au)=>{"use strict";var jr=Pu(),Go=(o,e)=>function(){return`\x1B[${o.apply(jr,arguments)+e}m`},Wo=(o,e)=>function(){let t=o.apply(jr,arguments);return`\x1B[${38+e};5;${t}m`},Vo=(o,e)=>function(){let t=o.apply(jr,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function P0(){let o=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let r of Object.keys(e)){let s=e[r];for(let n of Object.keys(s)){let a=s[n];e[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[n]=e[n],o.set(a[0],a[1])}Object.defineProperty(e,r,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:o,enumerable:!1})}let t=r=>r,i=(r,s,n)=>[r,s,n];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Go(t,0)},e.color.ansi256={ansi256:Wo(t,0)},e.color.ansi16m={rgb:Vo(i,0)},e.bgColor.ansi={ansi:Go(t,10)},e.bgColor.ansi256={ansi256:Wo(t,10)},e.bgColor.ansi16m={rgb:Vo(i,10)};for(let r of Object.keys(jr)){if(typeof jr[r]!="object")continue;let s=jr[r];r==="ansi16"&&(r="ansi"),"ansi16"in s&&(e.color.ansi[r]=Go(s.ansi16,0),e.bgColor.ansi[r]=Go(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[r]=Wo(s.ansi256,0),e.bgColor.ansi256[r]=Wo(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[r]=Vo(s.rgb,0),e.bgColor.ansi16m[r]=Vo(s.rgb,10))}return e}Object.defineProperty(Au,"exports",{enumerable:!0,get:P0})});var Nu=xt((f2,zu)=>{"use strict";zu.exports=(o,e)=>{e=e||process.argv;let t=o.startsWith("-")?"":o.length===1?"-":"--",i=e.indexOf(t+o),r=e.indexOf("--");return i!==-1&&(r===-1?!0:i<r)}});var Gu=xt((p2,Uu)=>{"use strict";var A0=require("os"),St=Nu(),Ne=process.env,qr;St("no-color")||St("no-colors")||St("color=false")?qr=!1:(St("color")||St("colors")||St("color=true")||St("color=always"))&&(qr=!0);"FORCE_COLOR"in Ne&&(qr=Ne.FORCE_COLOR.length===0||parseInt(Ne.FORCE_COLOR,10)!==0);function L0(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function z0(o){if(qr===!1)return 0;if(St("color=16m")||St("color=full")||St("color=truecolor"))return 3;if(St("color=256"))return 2;if(o&&!o.isTTY&&qr!==!0)return 0;let e=qr?1:0;if(process.platform==="win32"){let t=A0.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in Ne)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in Ne)||Ne.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Ne)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ne.TEAMCITY_VERSION)?1:0;if(Ne.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ne){let t=parseInt((Ne.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ne.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ne.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ne.TERM)||"COLORTERM"in Ne?1:(Ne.TERM==="dumb",e)}function ol(o){let e=z0(o);return L0(e)}Uu.exports={supportsColor:ol,stdout:ol(process.stdout),stderr:ol(process.stderr)}});var qu=xt((_2,ju)=>{"use strict";var N0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Wu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,U0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,G0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,W0=new Map([["n",` `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Hu(o){return o[0]==="u"&&o.length===5||o[0]==="x"&&o.length===3?String.fromCharCode(parseInt(o.slice(1),16)):W0.get(o)||o}function V0(o,e){let t=[],i=e.trim().split(/\s*,\s*/g),r;for(let s of i)if(!isNaN(s))t.push(Number(s));else if(r=s.match(U0))t.push(r[2].replace(G0,(n,a,l)=>a?Hu(a):l));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${o}')`);return t}function H0(o){Wu.lastIndex=0;let e=[],t;for(;(t=Wu.exec(o))!==null;){let i=t[1];if(t[2]){let r=V0(i,t[2]);e.push([i].concat(r))}else e.push([i])}return e}function Vu(o,e){let t={};for(let r of e)for(let s of r.styles)t[s[0]]=r.inverse?null:s.slice(1);let i=o;for(let r of Object.keys(t))if(Array.isArray(t[r])){if(!(r in i))throw new Error(`Unknown Chalk style: ${r}`);t[r].length>0?i=i[r].apply(i,t[r]):i=i[r]}return i}ju.exports=(o,e)=>{let t=[],i=[],r=[];if(e.replace(N0,(s,n,a,l,h,c)=>{if(n)r.push(Hu(n));else if(l){let m=r.join("");r=[],i.push(t.length===0?m:Vu(o,t)(m)),t.push({inverse:a,styles:H0(l)})}else if(h){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(Vu(o,t)(r.join(""))),r=[],t.pop()}else r.push(c)}),i.push(r.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return i.join("")}});var Zu=xt((g2,Hs)=>{"use strict";var al=Cu(),Se=Lu(),nl=Gu().stdout,j0=qu(),Yu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Ku=["ansi","ansi","ansi256","ansi16m"],Ju=new Set(["gray"]),Xr=Object.create(null);function Xu(o,e){e=e||{};let t=nl?nl.level:0;o.level=e.level===void 0?t:e.level,o.enabled="enabled"in e?e.enabled:o.level>0}function Vs(o){if(!this||!(this instanceof Vs)||this.template){let e={};return Xu(e,o),e.template=function(){let t=[].slice.call(arguments);return Y0.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,Vs.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=Vs,e.template}Xu(this,o)}Yu&&(Se.blue.open="\x1B[94m");for(let o of Object.keys(Se))Se[o].closeRe=new RegExp(al(Se[o].close),"g"),Xr[o]={get(){let e=Se[o];return Ho.call(this,this._styles?this._styles.concat(e):[e],this._empty,o)}};Xr.visible={get(){return Ho.call(this,this._styles||[],!0,"visible")}};Se.color.closeRe=new RegExp(al(Se.color.close),"g");for(let o of Object.keys(Se.color.ansi))Ju.has(o)||(Xr[o]={get(){let e=this.level;return function(){let i={open:Se.color[Ku[e]][o].apply(null,arguments),close:Se.color.close,closeRe:Se.color.closeRe};return Ho.call(this,this._styles?this._styles.concat(i):[i],this._empty,o)}}});Se.bgColor.closeRe=new RegExp(al(Se.bgColor.close),"g");for(let o of Object.keys(Se.bgColor.ansi)){if(Ju.has(o))continue;let e="bg"+o[0].toUpperCase()+o.slice(1);Xr[e]={get(){let t=this.level;return function(){let r={open:Se.bgColor[Ku[t]][o].apply(null,arguments),close:Se.bgColor.close,closeRe:Se.bgColor.closeRe};return Ho.call(this,this._styles?this._styles.concat(r):[r],this._empty,o)}}}}var q0=Object.defineProperties(()=>{},Xr);function Ho(o,e,t){let i=function(){return X0.apply(i,arguments)};i._styles=o,i._empty=e;let r=this;return Object.defineProperty(i,"level",{enumerable:!0,get(){return r.level},set(s){r.level=s}}),Object.defineProperty(i,"enabled",{enumerable:!0,get(){return r.enabled},set(s){r.enabled=s}}),i.hasGrey=this.hasGrey||t==="gray"||t==="grey",i.__proto__=q0,i}function X0(){let o=arguments,e=o.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let r=1;r<e;r++)t+=" "+o[r];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let i=Se.dim.open;Yu&&this.hasGrey&&(Se.dim.open="");for(let r of this._styles.slice().reverse())t=r.open+t.replace(r.closeRe,r.open)+r.close,t=t.replace(/\r?\n/g,`${r.close}$&${r.open}`);return Se.dim.open=i,t}function Y0(o,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),i=[e.raw[0]];for(let r=1;r<e.length;r++)i.push(String(t[r-1]).replace(/[{}\\]/g,"\\$&")),i.push(String(e.raw[r]));return j0(o,i.join(""))}Object.defineProperties(Vs.prototype,Xr);Hs.exports=Vs();Hs.exports.supportsColor=nl;Hs.exports.default=Hs.exports});var K0,Qu,J0,$u,Z0,I,ut=_(()=>{Dt();K0=[{name:"trace",type:"trace",background:"#EEEEEE",color:"#AAAAAA"},{name:"info",type:"log",background:"#BDE5F8",color:"#00529B"},{name:"warn",type:"warn",background:"#FEEFB3",color:"#9F6000"},{name:"error",type:"error",background:"#FFBABA",color:"#D8000C"},{name:"log",type:"log",background:"#EEEEEE",color:"#1f4f6b"}],Qu=()=>console&&console.group&&console.groupCollapsed&&console.groupEnd,J0=(o,e)=>{{let t=Zu();return[t.bgHex("#2D7BFF"),t.bgHex("#2B2B2B").white,t.bgHex("#2D7BFF"),t.bgHex(o).hex(e).bold,t.bgHex("#2B2B2B").white,t.bgHex("#2D7BFF")]}},$u=class{constructor(e="warn",t=K0){this._levels=[...t],this._maxLevel=this.getLevelIndexByName(e),this._consoleFuncs={trace:(...i)=>{Qu()?(console.groupCollapsed(...i),console.trace(),console.groupEnd()):console.trace(...i)}},this._levels.forEach(({name:i})=>{this[i]=(r,...s)=>{this._log(i,r,...s)}})}getLevelIndexByName(e){return k.Array.findIndex(this._levels,t=>t.name===e)}getLevelObjectByName(e){return k.Array.find(this._levels,t=>t.name===e)}canLog(e){let t=this.getLevelIndexByName(e);return t<0?!1:t>=this._maxLevel}setLevel(e){let t=this.getLevelIndexByName(e);t<0||(this._maxLevel=t)}_log(e,t,...i){let r=this.getLevelObjectByName(e);if(!r||!this.canLog(e))return;let{name:s,type:n,background:a,color:l}=r,h=i.filter(u=>u!==void 0).map(u=>u.toObject?JSON.parse(JSON.stringify(u.toObject())):u),c=this._consoleFuncs[n]||console[n]?(...u)=>console[n](...u):(...u)=>console.log(...u),m=h.length,d=J0(a,l);{let u=`${d[0](" ")} ${d[1]("PhotoEditorSDK")} ${d[2](" ")} ${d[3](t)}`,f=`${d[5](" ")} `;if(m<=0){c(`${u} ${f}`);return}if(m===1&&typeof h[0]=="string"){c(`${u} ${d[4](h[0])} ${f}`);return}Qu()?(console.groupCollapsed(`${u} ${f}`),c(...h),console.groupEnd()):c(`${u} ${f}`,...h)}}image(e="",t){}texture(e="",t){}logGlTexture(e,t,i=150,r=150,s){}},Z0=new $u("warn"),I=Z0});var Q0,$0,Ue,Li=_(()=>{Q0=o=>{{let e=require("fs");return new Promise((t,i)=>{try{e.readFile(o,(r,s)=>{r?i(r):t([o,s])})}catch(r){i(r)}})}},$0=o=>{{let e=require("request");return new Promise((t,i)=>{e.get(o,{encoding:null},(r,s,n)=>{if(r)return i(r);if(s.statusCode!==200)return i(new Error(`Server responded with status code ${s.statusCode}`));t([o,s.body])})})}},Ue={load(o,e={cors:!0,value:"anonymous"}){return(()=>o.substr(0,5)==="data:"?Promise.resolve([o,o]):o.match(/^(https?|ftp|file):\/\//)?$0(o):Q0(o))().then(([i,r])=>this._createAndLoadImage(i,r,e))},loadImage(o,e={cors:!0,value:"anonymous"}){return this.load(o,e)},_loadWithoutExif(o,e={cors:!0,value:"anonymous"}){return new Promise((t,i)=>{let r=new window.Image;r.addEventListener("load",()=>{t(r)}),r.addEventListener("error",()=>{i(new Error(`Failed to load image at ${o}`))}),e.cors&&(r.crossOrigin=e.value),r.src=o})},_createAndLoadImage(o,e,t={cors:!0,value:"anonymous"}){return new Promise((i,r)=>{{let s=require("canvas"),n=new s.Image;n.src=e,n.rawSource=e,n.filePath=o,i(n)}})},_stringEndsWith(o,e,t=o.length){return(t===void 0||t>o.length)&&(t=o.length),o.substring(t-e.length,t)===e},_loadAsDataURL(o,e={cors:!0,value:"anonymous"}){return Promise.reject(new Error("Loading images as data urls is only supported in browser environments."))},loadXHR(o,e){return new Promise((t,i)=>{let r;window.XDomainRequest?(r=new window.XDomainRequest,e&&r.overrideMimeType(e),r.onload=function(){t(r)},r.onerror=function(s){i(s)}):window.XMLHttpRequest&&(r=new window.XMLHttpRequest,e&&r.overrideMimeType(e),r.onreadystatechange=function(s){r.readyState===4&&(r.status===200?t(r):i(new Error(`HTTP Status ${r.status}`)))}),r.open("GET",o,!0),r.send()})}}});var td=xt(Yr=>{var js,ed=(js=require("querystring"))&&typeof js=="object"&&"default"in js?js.default:js,ex=/https?|ftp|gopher|file/;function qo(o){typeof o=="string"&&(o=Kr(o));var e=function(t,i,r){var s=t.auth,n=t.hostname,a=t.protocol||"",l=t.pathname||"",h=t.hash||"",c=t.query||"",m=!1;s=s?encodeURIComponent(s).replace(/%3A/i,":")+"@":"",t.host?m=s+t.host:n&&(m=s+(~n.indexOf(":")?"["+n+"]":n),t.port&&(m+=":"+t.port)),c&&typeof c=="object"&&(c=i.encode(c));var d=t.search||c&&"?"+c||"";return a&&a.substr(-1)!==":"&&(a+=":"),t.slashes||(!a||r.test(a))&&m!==!1?(m="//"+(m||""),l&&l[0]!=="/"&&(l="/"+l)):m||(m=""),h&&h[0]!=="#"&&(h="#"+h),d&&d[0]!=="?"&&(d="?"+d),{protocol:a,host:m,pathname:l=l.replace(/[?#]/g,encodeURIComponent),search:d=d.replace("#","%23"),hash:h}}(o,ed,ex);return""+e.protocol+e.host+e.pathname+e.search+e.hash}var hl="http://",cl="w.w",ul=hl+cl,tx=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,ix=/https?|ftp|gopher|file/;function jo(o,e){var t=typeof o=="string"?Kr(o):o;o=typeof o=="object"?qo(o):o;var i=Kr(e),r="";t.protocol&&!t.slashes&&(r=t.protocol,o=o.replace(t.protocol,""),r+=e[0]==="/"||o[0]==="/"?"/":""),r&&i.protocol&&(r="",i.slashes||(r=i.protocol,e=e.replace(i.protocol,"")));var s=o.match(tx);s&&!i.protocol&&(o=o.substr((r=s[1]+(s[2]||"")).length),/^\/\/[^/]/.test(e)&&(r=r.slice(0,-1)));var n=new URL(o,ul+"/"),a=new URL(e,n).toString().replace(ul,""),l=i.protocol||t.protocol;return l+=t.slashes||i.slashes?"//":"",!r&&l?a=a.replace(hl,l):r&&(a=a.replace(hl,"")),ix.test(a)||~e.indexOf(".")||o.slice(-1)==="/"||e.slice(-1)==="/"||a.slice(-1)!=="/"||(a=a.slice(0,-1)),r&&(a=r+(a[0]==="/"?a.substr(1):a)),a}function zi(){}zi.prototype.parse=Kr,zi.prototype.format=qo,zi.prototype.resolve=jo,zi.prototype.resolveObject=jo;var ll=/^https?|ftp|gopher|file/,rx=/^(.*?)([#?].*)/,sx=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,ox=/^([a-z0-9.+-]*:)?\/\/\/*/i,nx=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function Kr(o,e,t){if(e===void 0&&(e=!1),t===void 0&&(t=!1),o&&typeof o=="object"&&o instanceof zi)return o;var i=(o=o.trim()).match(rx);o=i?i[1].replace(/\\/g,"/")+i[2]:o.replace(/\\/g,"/"),nx.test(o)&&o.slice(-1)!=="/"&&(o+="/");var r=!/(^javascript)/.test(o)&&o.match(sx),s=ox.test(o),n="";r&&(ll.test(r[1])||(n=r[1].toLowerCase(),o=""+r[2]+r[3]),r[2]||(s=!1,ll.test(r[1])?(n=r[1],o=""+r[3]):o="//"+r[3]),r[2].length!==3&&r[2].length!==1||(n=r[1],o="/"+r[3]));var a,l=(i?i[1]:o).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),h=l&&l[1],c=new zi,m="",d="";try{a=new URL(o)}catch(y){m=y,n||t||!/^\/\//.test(o)||/^\/\/.+[@.]/.test(o)||(d="/",o=o.substr(1));try{a=new URL(o,ul)}catch(g){return c.protocol=n,c.href=n,c}}c.slashes=s&&!d,c.host=a.host===cl?"":a.host,c.hostname=a.hostname===cl?"":a.hostname.replace(/(\[|\])/g,""),c.protocol=m?n||null:a.protocol,c.search=a.search.replace(/\\/g,"%5C"),c.hash=a.hash.replace(/\\/g,"%5C");var u=o.split("#");!c.search&&~u[0].indexOf("?")&&(c.search="?"),c.hash||u[1]!==""||(c.hash="#"),c.query=e?ed.decode(a.search.substr(1)):c.search.substr(1),c.pathname=d+(r?function(y){return y.replace(/['^|`]/g,function(g){return"%"+g.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(g,p){try{return decodeURIComponent(p).split("").map(function(v){var x=v.charCodeAt();return x>256||/^[a-z0-9]$/i.test(v)?v:"%"+x.toString(16).toUpperCase()}).join("")}catch(v){return p}})}(a.pathname):a.pathname),c.protocol==="about:"&&c.pathname==="blank"&&(c.protocol="",c.pathname=""),m&&o[0]!=="/"&&(c.pathname=c.pathname.substr(1)),n&&!ll.test(n)&&o.slice(-1)!=="/"&&c.pathname==="/"&&(c.pathname=""),c.path=c.pathname+c.search,c.auth=[a.username,a.password].map(decodeURIComponent).filter(Boolean).join(":"),c.port=a.port,h&&!c.host.endsWith(h)&&(c.host+=h,c.port=h.slice(1)),c.href=d?""+c.pathname+c.search+c.hash:qo(c);var f=/^(file)/.test(c.href)?["host","hostname"]:[];return Object.keys(c).forEach(function(y){~f.indexOf(y)||(c[y]=c[y]||null)}),c}Yr.parse=Kr,Yr.format=qo,Yr.resolve=jo,Yr.resolveObject=function(o,e){return Kr(jo(o,e))},Yr.Url=zi});var Xo,ax,qs,dt,Ni=_(()=>{Xo=Ws(td()),ax=5e3,qs=typeof window!="undefined"?window:global,dt=class{constructor(e){this._url=e,this._parsedUrl=(0,Xo.parse)(this._url,!0)}_isJSONPRequest(){let{query:e}=this._parsedUrl;for(let t in e)if(e[t]==="?")return!0;return!1}load(){return this._isJSONPRequest()?this._loadJSONP():this._loadJSON()}_loadJSON(){return new Promise((e,t)=>{let i;qs.XDomainRequest?(i=new qs.XDomainRequest,i.onload=function(){let r=JSON.parse(i.responseText);e(r)},i.onerror=function(r){t(r)},i.open("GET",this._url,!0),i.send()):qs.XMLHttpRequest&&(i=new XMLHttpRequest,i.onreadystatechange=function(r){if(i.readyState===4)if(i.status===200){let s=JSON.parse(i.responseText);e(s)}else t(new Error(`HTTP Status ${i.status}`))},i.open("GET",this._url,!0),i.send())})}_loadJSONP(){let e=!1,t=!1,i=`pesdk${Math.round(Math.random()*99999999999999)}`;return new Promise((r,s)=>{let n=this._createJSONPNode(i);qs[i]=a=>{this._removeJSONPNode(n),e||(t=!0,r(a))},qs.setTimeout(()=>{t||(this._removeJSONPNode(n),e=!0,s(new Error("Timeout of 5 seconds exceeded.")))},ax)})}_createJSONPNode(e){let t=this._buildJSONPUrl(e),i=document.querySelector("head"),r=document.createElement("script");return r.src=t,i.appendChild(r),r}_removeJSONPNode(e){e.parentNode.removeChild(e)}_buildJSONPUrl(e){let{query:t}=this._parsedUrl,i=null;for(let r in t)if(t[r]==="?"){i=r;break}return delete this._parsedUrl.search,t[i]=e,(0,Xo.format)(this._parsedUrl)}}});var dl={};Te(dl,{ImageLoader:()=>Ue,JSONLoader:()=>dt});var id=_(()=>{Li();Ni()});var Ye,S,Ui=_(()=>{Ye=class{constructor(e,t,i,r=1){this.r=e,this.g=t,this.b=i,this.a=r}toRGBA(){return`rgba(${[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255),this.a.toFixed(2)].join(",")})`}set(e,t,i,r=this.a){return this.r=e,this.g=t,this.b=i,this.a=r,this}toRGB(){return[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)]}toHex(){return`#${[this._componentToHex(Math.round(this.r*255)),this._componentToHex(Math.round(this.g*255)),this._componentToHex(Math.round(this.b*255))].join("")}`}toGLColor(){return[this.r,this.g,this.b,this.a]}toArray(){return this.toGLColor()}toRGBGLColor(){return[this.r,this.g,this.b]}toHSV(){let e=Math.max(this.r,this.g,this.b),t=Math.min(this.r,this.g,this.b),i,r,s=e,n=e-t;if(r=e===0?0:n/e,e===t)i=0;else{switch(e){case this.r:i=(this.g-this.b)/n,this.g<this.b&&(i+=6);break;case this.g:i=(this.b-this.r)/n+2;break;case this.b:i=(this.r-this.g)/n+4;break}i/=6}return[i,r,s]}fromHSV(e,t,i){return this.copy(Ye.fromHSV(e,t,i)),this}static fromHSV(e,t,i,r=1){let[s,n,a]=[],l=Math.floor(e*6),h=e*6-l,c=i*(1-t),m=i*(1-h*t),d=i*(1-(1-h)*t);switch(l%6){case 0:s=i,n=d,a=c;break;case 1:s=m,n=i,a=c;break;case 2:s=c,n=i,a=d;break;case 3:s=c,n=m,a=i;break;case 4:s=d,n=c,a=i;break;case 5:s=i,n=c,a=m;break}return new Ye(s,n,a,r)}static fromArray(e){return new Ye(e[0],e[1],e[2],e[3])}static fromHex(e){let[t,i,r]=e.match(/[0-9A-fa-f]{1,2}/g);return new Ye(parseInt(t,16)/255,parseInt(i,16)/255,parseInt(r,16)/255,1)}clone(){return new Ye(this.r,this.g,this.b,this.a)}cloneRGB(){return new Ye(this.r,this.g,this.b,1)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this.a+=e.a,this}minus(e){return this.r-=e.r,this.g-=e.g,this.b-=e.b,this.a-=e.a,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this.a*=e,this}divideScalar(e){return this.r/=e,this.g/=e,this.b/=e,this.a/=e,this}clamp(e,t){return this.r=Math.min(Math.max(this.r,e),t),this.g=Math.min(Math.max(this.g,e),t),this.b=Math.min(Math.max(this.b,e),t),this.a=Math.min(Math.max(this.a,e),t),this}mix(e,t){return this.r=(1-t)*this.r+t*e.r,this.g=(1-t)*this.g+t*e.g,this.b=(1-t)*this.b+t*e.b,this.a=(1-t)*this.a+t*e.a,this}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}_componentToHex(e){let t=e.toString(16);return t.length===1?`0${t}`:t}toString(){return`Color(${this.r}, ${this.g}, ${this.b}, ${this.a})`}static get TRANSPARENT(){return new Ye(0,0,0,0)}static get WHITE(){return new Ye(1,1,1,1)}static get BLACK(){return new Ye(0,0,0,1)}static get RED(){return new Ye(1,0,0,1)}static get BLUE(){return new Ye(0,0,1,1)}static get GREEN(){return new Ye(0,1,0,1)}},S=Ye});var lx,rd,Ke,Jr=_(()=>{ut();lx=12,rd=class{constructor(){this._maxListeners=lx,this._events={},this._pipeDestinations=[]}pipeEvents(e){this._pipeDestinations.push(e)}unpipeEvents(e){let t=this._pipeDestinations.indexOf(e);t!==-1&&this._pipeDestinations.splice(t,1)}on(e,t){if(typeof e=="undefined")throw new Error(`Invalid event type: \`${e}\``);if(typeof t!="function")throw new TypeError;let i=this._events[e]||(this._events[e]=[]);return i.indexOf(t)!==-1?this:(i.push(t),this._maxListeners&&i.length>this._maxListeners&&(I.warn("EventEmitter",`Possible memory leak detected, added ${i.length} \`${e}\` listeners (current limit is ${this._maxListeners})`),typeof console!="undefined"&&console.trace()),this)}once(e,t){if(typeof e=="undefined")throw new Error(`Invalid event type: \`${e}\``);let i=this;function r(){i.off(e,r),t.apply(null,arguments)}return this.on(e,r)}off(e,...t){if(typeof e=="undefined")throw new Error(`Invalid event type: \`${e}\``);if(t.length===0)return this._events[e]=null,this;let i=t[0];if(typeof i!="function")throw new TypeError;let r=this._events[e];if(!r||!r.length)return this;let s=r.indexOf(i);return s===-1?this:(r.splice(s,1),this)}emit(e,...t){if(typeof e=="undefined")throw new Error(`Invalid event type: \`${e}\``);this._pipeDestinations.forEach(r=>{r.emit(e,...t)});let i=this._events[e];return!i||!i.length?!1:(i.slice(0).forEach(r=>r.apply(null,t)),!0)}setMaxListeners(e){if(parseInt(e,10)!==e)throw new TypeError;this._maxListeners=e}},Ke=rd});var Ce,Kt=_(()=>{Ce=o=>{if(o){o.width=1,o.height=1;let e=o.getContext("2d");e&&e.clearRect(0,0,1,1)}}});var Gi,ml=_(()=>{ut();Kt();Gi={checkFramebufferStatus(o,e){let t=e.checkFramebufferStatus(e.FRAMEBUFFER),i={[e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT]:"Incomplete attachment",[e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT]:"Missing attachment",[e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS]:"Incomplete dimensions",[e.FRAMEBUFFER_UNSUPPORTED]:"Framebuffer unsupported"};t!==e.FRAMEBUFFER_COMPLETE&&I.warn(o,`Framebuffer incomplete: ${i[t]}`)},determineGPUName(o){let e=null,t=null;o||(t=document.createElement("canvas"),o=t.getContext("experimental-webgl")||t.getContext("webgl"));let i=o&&o.getExtension("WEBGL_debug_renderer_info");return i&&(e=o.getParameter(i.UNMASKED_RENDERER_WEBGL),t&&t.remove()),Ce(t),e},isGPUBlacklisted(o,e=null){return!1}}});var Yo,sd=_(()=>{Yo=o=>typeof o=="number"});var hx,Wi,Ko,A,Jt=_(()=>{sd();hx=o=>o instanceof A,Wi=(o,e)=>hx(o)?{x:o.x,y:o.y}:{x:o,y:Yo(e)?e:o},Ko=(o,e)=>(t,i)=>{let{x:r,y:s}=Wi(t,i);return o.x=e(o.x,r),o.y=e(o.y,s),o},A=class{constructor(e=0,t=0){this.add=Ko(this,(e,t)=>e+t);this.subtract=Ko(this,(e,t)=>e-t);this.divide=Ko(this,(e,t)=>e/t);this.multiply=Ko(this,(e,t)=>e*t);this.x=e,this.y=t}set(e,t){let{x:i,y:r}=Wi(e,t);return this.x=i,this.y=r,this}clone(){return new A(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}clamp(e,t){return Yo(e)&&(e=new A(e,e)),Yo(t)&&(t=new A(t,t)),e&&(this.x=Math.max(e.x,this.x),this.y=Math.max(e.y,this.y)),t&&(this.x=Math.min(t.x,this.x),this.y=Math.min(t.y,this.y)),this}dot(e,t){let{x:i,y:r}=Wi(e,t);return this.x*i+this.y*r}equals(e,t){let{x:i,y:r}=Wi(e,t);return i===this.x&&r===this.y}flip(){let e=this.x;return this.x=this.y,this.y=e,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}floor(){return this.x|=0,this.y|=0,this}abs(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this}len(){return Math.sqrt(this.x*this.x+this.y*this.y)}min(){return Math.min(this.x,this.y)}max(){return Math.max(this.x,this.y)}toObject(){return{x:this.x,y:this.y}}toString(){return`Vector2({ x: ${this.x}, y: ${this.y} })`}roundDecimal(e){return this.x=parseFloat(this.x.toFixed(e)),this.y=parseFloat(this.y.toFixed(e)),this}asArray(e=!1){return e?[this.y,this.x]:[this.x,this.y]}static fromObject(e){return new A(e.x,e.y)}static get NULL(){return new A(0,0)}}});var it,fl=_(()=>{Jt();it=class{constructor(){this.a=1;this.b=0;this.c=0;this.d=1;this.tx=0;this.ty=0;this.reset()}multiply(e){let t,i,r,s,n,a;return t=this.a*e.a+this.b*e.c,i=this.a*e.b+this.b*e.d,r=this.c*e.a+this.d*e.c,s=this.c*e.b+this.d*e.d,n=this.tx*e.a+this.ty*e.c+e.tx,a=this.tx*e.b+this.ty*e.d+e.ty,this.a=t,this.b=i,this.c=r,this.d=s,this.tx=n,this.ty=a,this}applyToVector(e){let{x:t,y:i}=e;return e=e.clone(),e.x=this.a*t+this.c*i+this.tx,e.y=this.b*t+this.d*i+this.tx,e}applyInverseToVector(e){let t=1/(this.a*this.d+this.c*-this.b),{x:i,y:r}=e;return e=e.clone(),e.x=this.d*t*i+-this.c*t*r+(this.ty*this.c-this.tx*this.d)*t,e.y=this.a*t*r+-this.b*t*i+(-this.ty*this.a+this.tx*this.b)*t,e}rectangleToCoordinates(e,t=new A(0,0)){let i=e.width*(1-t.x),r=e.width*-t.x,s=e.height*(1-t.y),n=e.height*-t.y,a=[];return a.push(new A(this.a*r+this.c*n+this.tx,this.d*n+this.b*r+this.ty)),a.push(new A(this.a*i+this.c*n+this.tx,this.d*n+this.b*i+this.ty)),a.push(new A(this.a*i+this.c*s+this.tx,this.d*s+this.b*i+this.ty)),a.push(new A(this.a*r+this.c*s+this.tx,this.d*s+this.b*r+this.ty)),a}reset(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0}toArray(){let e=[this.a,this.b,0,this.c,this.d,0,this.tx,this.ty,1];return typeof Float32Array=="undefined"?e:new Float32Array(e)}toString(){return`Matrix({ a: ${this.a}, b: ${this.b}, c: ${this.c}, d: ${this.d}, tx: ${this.tx}, ty: ${this.ty} })`}static get IDENTITY(){return new it}}});var ue,pl=_(()=>{Jt();ue=class{constructor(e=0,t=0,i=0,r=0){this.x=0;this.y=0;