@hufe921/canvas-editor-plugin-docx
Version:
docx plugin for canvas-editor
6 lines • 850 kB
JavaScript
(function(Ve,ke){typeof exports=="object"&&typeof module<"u"?module.exports=ke(require("@hufe921/canvas-editor")):typeof define=="function"&&define.amd?define(["@hufe921/canvas-editor"],ke):(Ve=typeof globalThis<"u"?globalThis:Ve||self,Ve.docx=ke(Ve.canvasEditor))})(this,function(Ve){"use strict";var ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jg(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var su={exports:{}},cu={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]},uu={exports:{}},zg=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},qg=zg,Hg=Array.prototype.concat,Gg=Array.prototype.slice,lu=uu.exports=function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];qg(o)?n=Hg.call(n,Gg.call(o)):n.push(o)}return n};lu.wrap=function(e){return function(){return e(lu(arguments))}};var Vg=uu.exports,xr=cu,Dr=Vg,du=Object.hasOwnProperty,hu=Object.create(null);for(var _a in xr)du.call(xr,_a)&&(hu[xr[_a]]=_a);var Tt=su.exports={to:{},get:{}};Tt.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case"hsl":n=Tt.get.hsl(e),r="hsl";break;case"hwb":n=Tt.get.hwb(e),r="hwb";break;default:n=Tt.get.rgb(e),r="rgb";break}return n?{model:r,value:n}:null},Tt.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,c,d;if(a=e.match(n)){for(d=a[2],a=a[1],c=0;c<3;c++){var y=c*2;s[c]=parseInt(a.slice(y,y+2),16)}d&&(s[3]=parseInt(d,16)/255)}else if(a=e.match(t)){for(a=a[1],d=a[3],c=0;c<3;c++)s[c]=parseInt(a[c]+a[c],16);d&&(s[3]=parseInt(d+d,16)/255)}else if(a=e.match(r)){for(c=0;c<3;c++)s[c]=parseInt(a[c+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=e.match(i)){for(c=0;c<3;c++)s[c]=Math.round(parseFloat(a[c+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=e.match(o))?a[1]==="transparent"?[0,0,0,0]:du.call(xr,a[1])?(s=xr[a[1]],s[3]=1,s):null:null;for(c=0;c<3;c++)s[c]=gn(s[c],0,255);return s[3]=gn(s[3],0,1),s},Tt.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=gn(parseFloat(n[2]),0,100),s=gn(parseFloat(n[3]),0,100),a=gn(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},Tt.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=gn(parseFloat(n[2]),0,100),s=gn(parseFloat(n[3]),0,100),a=gn(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},Tt.to.hex=function(){var e=Dr(arguments);return"#"+ni(e[0])+ni(e[1])+ni(e[2])+(e[3]<1?ni(Math.round(e[3]*255)):"")},Tt.to.rgb=function(){var e=Dr(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Tt.to.rgb.percent=function(){var e=Dr(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},Tt.to.hsl=function(){var e=Dr(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Tt.to.hwb=function(){var e=Dr(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Tt.to.keyword=function(e){return hu[e.slice(0,3)]};function gn(e,t,n){return Math.min(Math.max(t,e),n)}function ni(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Xg=su.exports;const _r=cu,fu={};for(const e of Object.keys(_r))fu[_r[e]]=e;const Ae={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"]}};var pu=Ae;for(const e of Object.keys(Ae)){if(!("channels"in Ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in Ae[e]))throw new Error("missing channel labels property: "+e);if(Ae[e].labels.length!==Ae[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=Ae[e];delete Ae[e].channels,delete Ae[e].labels,Object.defineProperty(Ae[e],"channels",{value:t}),Object.defineProperty(Ae[e],"labels",{value:n})}Ae.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,c;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const d=(i+o)/2;return o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]},Ae.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,c=e[2]/255,d=Math.max(s,a,c),y=d-Math.min(s,a,c),w=function(x){return(d-x)/6/y+1/2};return y===0?(i=0,o=0):(o=y/d,t=w(s),n=w(a),r=w(c),s===d?i=r-n:a===d?i=1/3+t-r:c===d&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]},Ae.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=Ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]},Ae.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function $g(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}Ae.rgb.keyword=function(e){const t=fu[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(_r)){const o=_r[i],s=$g(e,o);s<n&&(n=s,r=i)}return r},Ae.keyword.rgb=function(e){return _r[e]},Ae.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]},Ae.rgb.lab=function(e){const t=Ae.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]},Ae.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,c=[0,0,0];for(let d=0;d<3;d++)o=t+1/3*-(d-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[d]=s*255;return c},Ae.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[t,a*100,s*100]},Ae.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,c,s];case 1:return[a,r,s];case 2:return[s,r,c];case 3:return[s,a,r];case 4:return[c,s,r];case 5:return[r,s,a]}},Ae.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,o*100,s*100]},Ae.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,s&1&&(o=1-o);const c=n+o*(a-n);let d,y,w;switch(s){default:case 6:case 0:d=a,y=c,w=n;break;case 1:d=c,y=a,w=n;break;case 2:d=n,y=a,w=c;break;case 3:d=n,y=c,w=a;break;case 4:d=c,y=n,w=a;break;case 5:d=a,y=n,w=c;break}return[d*255,y*255,w*255]},Ae.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]},Ae.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]},Ae.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),s=200*(n-r);return[i,o,s]},Ae.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,s;o=(t+16)/116,i=n/500+o,s=o-r/200;const a=o**3,c=i**3,d=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]},Ae.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[t,s,i]},Ae.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[t,o,s]},Ae.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?Ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},Ae.hsv.ansi16=function(e){return Ae.rgb.ansi16(Ae.hsv.rgb(e),e[2])},Ae.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},Ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]},Ae.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]},Ae.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n},Ae.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]},Ae.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===t?c=(n-r)/s%6:i===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,a*100]},Ae.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]},Ae.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]},Ae.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-n)*r,[(n*i[0]+c)*255,(n*i[1]+c)*255,(n*i[2]+c)*255]},Ae.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]},Ae.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]},Ae.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]},Ae.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]},Ae.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Ae.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Ae.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Ae.gray.hsl=function(e){return[0,0,e[0]]},Ae.gray.hsv=Ae.gray.hsl,Ae.gray.hwb=function(e){return[0,100,e[0]]},Ae.gray.cmyk=function(e){return[0,0,0,e[0]]},Ae.gray.lab=function(e){return[e[0],0,0]},Ae.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},Ae.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const ri=pu;function Kg(){const e={},t=Object.keys(ri);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function Zg(e){const t=Kg(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),i=Object.keys(ri[r]);for(let o=i.length,s=0;s<o;s++){const a=i[s],c=t[a];c.distance===-1&&(c.distance=t[r].distance+1,c.parent=r,n.unshift(a))}}return t}function Yg(e,t){return function(n){return t(e(n))}}function Jg(e,t){const n=[t[e].parent,e];let r=ri[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=Yg(ri[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var Qg=function(e){const t=Zg(e),n={},r=Object.keys(t);for(let i=r.length,o=0;o<i;o++){const s=r[o];t[s].parent!==null&&(n[s]=Jg(s,t))}return n};const Ta=pu,em=Qg,zn={},tm=Object.keys(Ta);function nm(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function rm(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}tm.forEach(e=>{zn[e]={},Object.defineProperty(zn[e],"channels",{value:Ta[e].channels}),Object.defineProperty(zn[e],"labels",{value:Ta[e].labels});const t=em(e);Object.keys(t).forEach(r=>{const i=t[r];zn[e][r]=rm(i),zn[e][r].raw=nm(i)})});var im=zn;const qn=Xg,Et=im,gu=["keyword","gray","hex"],Ea={};for(const e of Object.keys(Et))Ea[[...Et[e].labels].sort().join("")]=e;const ii={};function nt(e,t){if(!(this instanceof nt))return new nt(e,t);if(t&&t in gu&&(t=null),t&&!(t in Et))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof nt)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=qn.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Et[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Et[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=Aa(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in Ea))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ea[o];const{labels:s}=Et[this.model],a=[];for(n=0;n<s.length;n++)a.push(e[s[n]]);this.color=Aa(a)}if(ii[this.model])for(r=Et[this.model].channels,n=0;n<r;n++){const i=ii[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}nt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in qn.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const n=t.valpha===1?t.color:[...t.color,this.valpha];return qn.to[t.model](n)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return qn.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Et[this.model],{labels:n}=Et[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new nt([...this.color.map(om(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new nt([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Xe("rgb",0,et(255)),green:Xe("rgb",1,et(255)),blue:Xe("rgb",2,et(255)),hue:Xe(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Xe("hsl",1,et(100)),lightness:Xe("hsl",2,et(100)),saturationv:Xe("hsv",1,et(100)),value:Xe("hsv",2,et(100)),chroma:Xe("hcg",1,et(100)),gray:Xe("hcg",2,et(100)),white:Xe("hwb",1,et(100)),wblack:Xe("hwb",2,et(100)),cyan:Xe("cmyk",0,et(100)),magenta:Xe("cmyk",1,et(100)),yellow:Xe("cmyk",2,et(100)),black:Xe("cmyk",3,et(100)),x:Xe("xyz",0,et(95.047)),y:Xe("xyz",1,et(100)),z:Xe("xyz",2,et(108.833)),l:Xe("lab",0,et(100)),a:Xe("lab",1),b:Xe("lab",2),keyword(e){return e!==void 0?new nt(e):Et[this.model].keyword(this.color)},hex(e){return e!==void 0?new nt(e):qn.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new nt(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),qn.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return nt.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,c=1-a;return nt.rgb(a*n.red()+c*r.red(),a*n.green()+c*r.green(),a*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(Et)){if(gu.includes(e))continue;const{channels:t}=Et[e];nt.prototype[e]=function(...n){return this.model===e?new nt(this):n.length>0?new nt(n,e):new nt([...sm(Et[this.model][e].raw(this.color)),this.valpha],e)},nt[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Aa(n,t)),new nt(r,e)}}function am(e,t){return Number(e.toFixed(t))}function om(e){return function(t){return am(t,e)}}function Xe(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(ii[r]||(ii[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function et(e){return function(t){return Math.max(0,Math.min(e,t))}}function sm(e){return Array.isArray(e)?e:[e]}function Aa(e,t){for(let n=0;n<t;n++)typeof e[n]!="number"&&(e[n]=0);return e}var cm=nt;const mu=Mg(cm);var um=Object.defineProperty,lm=(e,t,n)=>t in e?um(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,me=(e,t,n)=>(lm(e,typeof t!="symbol"?t+"":t,n),n);class ai{constructor(t){me(this,"rootKey"),this.rootKey=t}}const dm=Object.seal({});class ge extends ai{constructor(t){super(t),me(this,"root"),this.root=new Array}prepForXml(t){var n;t.stack.push(this);const r=this.root.map(i=>i instanceof ai?i.prepForXml(t):i).filter(i=>i!==void 0);return t.stack.pop(),{[this.rootKey]:r.length?r.length===1&&((n=r[0])!=null&&n._attr)?r[0]:r:dm}}addChildElement(t){return this.root.push(t),this}}class en extends ge{prepForXml(t){const n=super.prepForXml(t);if(n&&(typeof n[this.rootKey]!="object"||Object.keys(n[this.rootKey]).length))return n}}class Te extends ai{constructor(t){super("_attr"),me(this,"xmlKeys"),this.root=t}prepForXml(t){const n={};return Object.keys(this.root).forEach(r=>{const i=this.root[r];if(i!==void 0){const o=this.xmlKeys&&this.xmlKeys[r]||r;n[o]=i}}),{_attr:n}}}class qt extends ai{constructor(t){super("_attr"),this.root=t}prepForXml(t){return{_attr:Object.values(this.root).filter(({value:r})=>r!==void 0).reduce((r,{key:i,value:o})=>({...r,[i]:o}),{})}}}class $e extends Te{constructor(){super(...arguments),me(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}}var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yu={},Ca={exports:{}},Hn=typeof Reflect=="object"?Reflect:null,bu=Hn&&typeof Hn.apply=="function"?Hn.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},oi;Hn&&typeof Hn.ownKeys=="function"?oi=Hn.ownKeys:Object.getOwnPropertySymbols?oi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:oi=function(t){return Object.getOwnPropertyNames(t)};function hm(e){console&&console.warn&&console.warn(e)}var vu=Number.isNaN||function(t){return t!==t};function Me(){Me.init.call(this)}Ca.exports=Me,Ca.exports.once=mm,Me.EventEmitter=Me,Me.prototype._events=void 0,Me.prototype._eventsCount=0,Me.prototype._maxListeners=void 0;var wu=10;function si(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Me,"defaultMaxListeners",{enumerable:!0,get:function(){return wu},set:function(e){if(typeof e!="number"||e<0||vu(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");wu=e}}),Me.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Me.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||vu(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function xu(e){return e._maxListeners===void 0?Me.defaultMaxListeners:e._maxListeners}Me.prototype.getMaxListeners=function(){return xu(this)},Me.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var s;if(n.length>0&&(s=n[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(c===void 0)return!1;if(typeof c=="function")bu(c,this,n);else for(var d=c.length,y=Au(c,d),r=0;r<d;++r)bu(y[r],this,n);return!0};function Du(e,t,n,r){var i,o,s;if(si(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s=="function"?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=xu(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,hm(a)}return e}Me.prototype.addListener=function(t,n){return Du(this,t,n,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(t,n){return Du(this,t,n,!0)};function fm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=fm.bind(r);return i.listener=n,r.wrapFn=i,i}Me.prototype.once=function(t,n){return si(n),this.on(t,_u(this,t,n)),this},Me.prototype.prependOnceListener=function(t,n){return si(n),this.prependListener(t,_u(this,t,n)),this},Me.prototype.removeListener=function(t,n){var r,i,o,s,a;if(si(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;o===0?r.shift():pm(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,a||n)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),s;for(i=0;i<o.length;++i)s=o[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function Tu(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?gm(i):Au(i,i.length)}Me.prototype.listeners=function(t){return Tu(this,t,!0)},Me.prototype.rawListeners=function(t){return Tu(this,t,!1)},Me.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Eu.call(e,t)},Me.prototype.listenerCount=Eu;function Eu(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?oi(this._events):[]};function Au(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function pm(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function gm(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function mm(e,t){return new Promise(function(n,r){function i(s){e.removeListener(t,o),r(s)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}Uu(e,t,o,{once:!0}),t!=="error"&&ym(e,i,{once:!0})})}function ym(e,t,n){typeof e.on=="function"&&Uu(e,"error",t,n)}function Uu(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Sa=Ca.exports,Fa={exports:{}};typeof Object.create=="function"?Fa.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Fa.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var Tn=Fa.exports,ka={},Tr={},Cu;function bm(){if(Cu)return Tr;Cu=1,Tr.byteLength=a,Tr.toByteArray=d,Tr.fromByteArray=x;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=r.length;i<o;++i)e[i]=r[i],t[r.charCodeAt(i)]=i;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(h){var v=h.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var u=h.indexOf("=");u===-1&&(u=v);var m=u===v?0:4-u%4;return[u,m]}function a(h){var v=s(h),u=v[0],m=v[1];return(u+m)*3/4-m}function c(h,v,u){return(v+u)*3/4-u}function d(h){var v,u=s(h),m=u[0],l=u[1],g=new n(c(h,m,l)),_=0,E=l>0?m-4:m,U;for(U=0;U<E;U+=4)v=t[h.charCodeAt(U)]<<18|t[h.charCodeAt(U+1)]<<12|t[h.charCodeAt(U+2)]<<6|t[h.charCodeAt(U+3)],g[_++]=v>>16&255,g[_++]=v>>8&255,g[_++]=v&255;return l===2&&(v=t[h.charCodeAt(U)]<<2|t[h.charCodeAt(U+1)]>>4,g[_++]=v&255),l===1&&(v=t[h.charCodeAt(U)]<<10|t[h.charCodeAt(U+1)]<<4|t[h.charCodeAt(U+2)]>>2,g[_++]=v>>8&255,g[_++]=v&255),g}function y(h){return e[h>>18&63]+e[h>>12&63]+e[h>>6&63]+e[h&63]}function w(h,v,u){for(var m,l=[],g=v;g<u;g+=3)m=(h[g]<<16&16711680)+(h[g+1]<<8&65280)+(h[g+2]&255),l.push(y(m));return l.join("")}function x(h){for(var v,u=h.length,m=u%3,l=[],g=16383,_=0,E=u-m;_<E;_+=g)l.push(w(h,_,_+g>E?E:_+g));return m===1?(v=h[u-1],l.push(e[v>>2]+e[v<<4&63]+"==")):m===2&&(v=(h[u-2]<<8)+h[u-1],l.push(e[v>>10]+e[v>>4&63]+e[v<<2&63]+"=")),l.join("")}return Tr}var ci={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Su;function vm(){return Su||(Su=1,ci.read=function(e,t,n,r,i){var o,s,a=i*8-r-1,c=(1<<a)-1,d=c>>1,y=-7,w=n?i-1:0,x=n?-1:1,h=e[t+w];for(w+=x,o=h&(1<<-y)-1,h>>=-y,y+=a;y>0;o=o*256+e[t+w],w+=x,y-=8);for(s=o&(1<<-y)-1,o>>=-y,y+=r;y>0;s=s*256+e[t+w],w+=x,y-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-d}return(h?-1:1)*s*Math.pow(2,o-r)},ci.write=function(e,t,n,r,i,o){var s,a,c,d=o*8-i-1,y=(1<<d)-1,w=y>>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,v=r?1:-1,u=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=y):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+w>=1?t+=x/c:t+=x*Math.pow(2,1-w),t*c>=2&&(s++,c/=2),s+w>=y?(a=0,s=y):s+w>=1?(a=(t*c-1)*Math.pow(2,i),s=s+w):(a=t*Math.pow(2,w-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=a&255,h+=v,a/=256,i-=8);for(s=s<<i|a,d+=i;d>0;e[n+h]=s&255,h+=v,s/=256,d-=8);e[n+h-v]|=u*128}),ci}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var Fu;function Er(){return Fu||(Fu=1,function(e){var t=bm(),n=vm(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var S=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(S,f),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');var f=new Uint8Array(S);return Object.setPrototypeOf(f,a.prototype),f}function a(S,f,p){if(typeof S=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(S)}return c(S,f,p)}a.poolSize=8192;function c(S,f,p){if(typeof S=="string")return x(S,f);if(ArrayBuffer.isView(S))return v(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(he(S,ArrayBuffer)||S&&he(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(S,SharedArrayBuffer)||S&&he(S.buffer,SharedArrayBuffer)))return u(S,f,p);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var T=S.valueOf&&S.valueOf();if(T!=null&&T!==S)return a.from(T,f,p);var P=m(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),f,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,f,p){return c(S,f,p)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function d(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function y(S,f,p){return d(S),S<=0?s(S):f!==void 0?typeof p=="string"?s(S).fill(f,p):s(S).fill(f):s(S)}a.alloc=function(S,f,p){return y(S,f,p)};function w(S){return d(S),s(S<0?0:l(S)|0)}a.allocUnsafe=function(S){return w(S)},a.allocUnsafeSlow=function(S){return w(S)};function x(S,f){if((typeof f!="string"||f==="")&&(f="utf8"),!a.isEncoding(f))throw new TypeError("Unknown encoding: "+f);var p=_(S,f)|0,T=s(p),P=T.write(S,f);return P!==p&&(T=T.slice(0,P)),T}function h(S){for(var f=S.length<0?0:l(S.length)|0,p=s(f),T=0;T<f;T+=1)p[T]=S[T]&255;return p}function v(S){if(he(S,Uint8Array)){var f=new Uint8Array(S);return u(f.buffer,f.byteOffset,f.byteLength)}return h(S)}function u(S,f,p){if(f<0||S.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<f+(p||0))throw new RangeError('"length" is outside of buffer bounds');var T;return f===void 0&&p===void 0?T=new Uint8Array(S):p===void 0?T=new Uint8Array(S,f):T=new Uint8Array(S,f,p),Object.setPrototypeOf(T,a.prototype),T}function m(S){if(a.isBuffer(S)){var f=l(S.length)|0,p=s(f);return p.length===0||S.copy(p,0,0,f),p}if(S.length!==void 0)return typeof S.length!="number"||b(S.length)?s(0):h(S);if(S.type==="Buffer"&&Array.isArray(S.data))return h(S.data)}function l(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function g(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,p){if(he(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),he(p,Uint8Array)&&(p=a.from(p,p.offset,p.byteLength)),!a.isBuffer(f)||!a.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===p)return 0;for(var T=f.length,P=p.length,J=0,O=Math.min(T,P);J<O;++J)if(f[J]!==p[J]){T=f[J],P=p[J];break}return T<P?-1:P<T?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,p){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);var T;if(p===void 0)for(p=0,T=0;T<f.length;++T)p+=f[T].length;var P=a.allocUnsafe(p),J=0;for(T=0;T<f.length;++T){var O=f[T];if(he(O,Uint8Array))J+O.length>P.length?a.from(O).copy(P,J):Uint8Array.prototype.set.call(P,O,J);else if(a.isBuffer(O))O.copy(P,J);else throw new TypeError('"list" argument must be an Array of Buffers');J+=O.length}return P};function _(S,f){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||he(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var p=S.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&p===0)return 0;for(var P=!1;;)switch(f){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return k(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return L(S).length;default:if(P)return T?-1:k(S).length;f=(""+f).toLowerCase(),P=!0}}a.byteLength=_;function E(S,f,p){var T=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,f>>>=0,p<=f))return"";for(S||(S="utf8");;)switch(S){case"hex":return V(this,f,p);case"utf8":case"utf-8":return D(this,f,p);case"ascii":return j(this,f,p);case"latin1":case"binary":return Q(this,f,p);case"base64":return z(this,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,f,p);default:if(T)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),T=!0}}a.prototype._isBuffer=!0;function U(S,f,p){var T=S[f];S[f]=S[p],S[p]=T}a.prototype.swap16=function(){var f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<f;p+=2)U(this,p,p+1);return this},a.prototype.swap32=function(){var f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<f;p+=4)U(this,p,p+3),U(this,p+1,p+2);return this},a.prototype.swap64=function(){var f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<f;p+=8)U(this,p,p+7),U(this,p+1,p+6),U(this,p+2,p+5),U(this,p+3,p+4);return this},a.prototype.toString=function(){var f=this.length;return f===0?"":arguments.length===0?D(this,0,f):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){var f="",p=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(f+=" ... "),"<Buffer "+f+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(f,p,T,P,J){if(he(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(p===void 0&&(p=0),T===void 0&&(T=f?f.length:0),P===void 0&&(P=0),J===void 0&&(J=this.length),p<0||T>f.length||P<0||J>this.length)throw new RangeError("out of range index");if(P>=J&&p>=T)return 0;if(P>=J)return-1;if(p>=T)return 1;if(p>>>=0,T>>>=0,P>>>=0,J>>>=0,this===f)return 0;for(var O=J-P,q=T-p,Y=Math.min(O,q),te=this.slice(P,J),le=f.slice(p,T),be=0;be<Y;++be)if(te[be]!==le[be]){O=te[be],q=le[be];break}return O<q?-1:q<O?1:0};function I(S,f,p,T,P){if(S.length===0)return-1;if(typeof p=="string"?(T=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,b(p)&&(p=P?0:S.length-1),p<0&&(p=S.length+p),p>=S.length){if(P)return-1;p=S.length-1}else if(p<0)if(P)p=0;else return-1;if(typeof f=="string"&&(f=a.from(f,T)),a.isBuffer(f))return f.length===0?-1:R(S,f,p,T,P);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,f,p):Uint8Array.prototype.lastIndexOf.call(S,f,p):R(S,[f],p,T,P);throw new TypeError("val must be string, number or Buffer")}function R(S,f,p,T,P){var J=1,O=S.length,q=f.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(S.length<2||f.length<2)return-1;J=2,O/=2,q/=2,p/=2}function Y(Ue,Ee){return J===1?Ue[Ee]:Ue.readUInt16BE(Ee*J)}var te;if(P){var le=-1;for(te=p;te<O;te++)if(Y(S,te)===Y(f,le===-1?0:te-le)){if(le===-1&&(le=te),te-le+1===q)return le*J}else le!==-1&&(te-=te-le),le=-1}else for(p+q>O&&(p=O-q),te=p;te>=0;te--){for(var be=!0,xe=0;xe<q;xe++)if(Y(S,te+xe)!==Y(f,xe)){be=!1;break}if(be)return te}return-1}a.prototype.includes=function(f,p,T){return this.indexOf(f,p,T)!==-1},a.prototype.indexOf=function(f,p,T){return I(this,f,p,T,!0)},a.prototype.lastIndexOf=function(f,p,T){return I(this,f,p,T,!1)};function H(S,f,p,T){p=Number(p)||0;var P=S.length-p;T?(T=Number(T),T>P&&(T=P)):T=P;var J=f.length;T>J/2&&(T=J/2);for(var O=0;O<T;++O){var q=parseInt(f.substr(O*2,2),16);if(b(q))return O;S[p+O]=q}return O}function F(S,f,p,T){return $(k(f,S.length-p),S,p,T)}function ae(S,f,p,T){return $(M(f),S,p,T)}function de(S,f,p,T){return $(L(f),S,p,T)}function C(S,f,p,T){return $(G(f,S.length-p),S,p,T)}a.prototype.write=function(f,p,T,P){if(p===void 0)P="utf8",T=this.length,p=0;else if(T===void 0&&typeof p=="string")P=p,T=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(T)?(T=T>>>0,P===void 0&&(P="utf8")):(P=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var J=this.length-p;if((T===void 0||T>J)&&(T=J),f.length>0&&(T<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");for(var O=!1;;)switch(P){case"hex":return H(this,f,p,T);case"utf8":case"utf-8":return F(this,f,p,T);case"ascii":case"latin1":case"binary":return ae(this,f,p,T);case"base64":return de(this,f,p,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,f,p,T);default:if(O)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),O=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(S,f,p){return f===0&&p===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(f,p))}function D(S,f,p){p=Math.min(S.length,p);for(var T=[],P=f;P<p;){var J=S[P],O=null,q=J>239?4:J>223?3:J>191?2:1;if(P+q<=p){var Y,te,le,be;switch(q){case 1:J<128&&(O=J);break;case 2:Y=S[P+1],(Y&192)===128&&(be=(J&31)<<6|Y&63,be>127&&(O=be));break;case 3:Y=S[P+1],te=S[P+2],(Y&192)===128&&(te&192)===128&&(be=(J&15)<<12|(Y&63)<<6|te&63,be>2047&&(be<55296||be>57343)&&(O=be));break;case 4:Y=S[P+1],te=S[P+2],le=S[P+3],(Y&192)===128&&(te&192)===128&&(le&192)===128&&(be=(J&15)<<18|(Y&63)<<12|(te&63)<<6|le&63,be>65535&&be<1114112&&(O=be))}}O===null?(O=65533,q=1):O>65535&&(O-=65536,T.push(O>>>10&1023|55296),O=56320|O&1023),T.push(O),P+=q}return X(T)}var ee=4096;function X(S){var f=S.length;if(f<=ee)return String.fromCharCode.apply(String,S);for(var p="",T=0;T<f;)p+=String.fromCharCode.apply(String,S.slice(T,T+=ee));return p}function j(S,f,p){var T="";p=Math.min(S.length,p);for(var P=f;P<p;++P)T+=String.fromCharCode(S[P]&127);return T}function Q(S,f,p){var T="";p=Math.min(S.length,p);for(var P=f;P<p;++P)T+=String.fromCharCode(S[P]);return T}function V(S,f,p){var T=S.length;(!f||f<0)&&(f=0),(!p||p<0||p>T)&&(p=T);for(var P="",J=f;J<p;++J)P+=ie[S[J]];return P}function se(S,f,p){for(var T=S.slice(f,p),P="",J=0;J<T.length-1;J+=2)P+=String.fromCharCode(T[J]+T[J+1]*256);return P}a.prototype.slice=function(f,p){var T=this.length;f=~~f,p=p===void 0?T:~~p,f<0?(f+=T,f<0&&(f=0)):f>T&&(f=T),p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),p<f&&(p=f);var P=this.subarray(f,p);return Object.setPrototypeOf(P,a.prototype),P};function W(S,f,p){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+f>p)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,p,T){f=f>>>0,p=p>>>0,T||W(f,p,this.length);for(var P=this[f],J=1,O=0;++O<p&&(J*=256);)P+=this[f+O]*J;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,p,T){f=f>>>0,p=p>>>0,T||W(f,p,this.length);for(var P=this[f+--p],J=1;p>0&&(J*=256);)P+=this[f+--p]*J;return P},a.prototype.readUint8=a.prototype.readUInt8=function(f,p){return f=f>>>0,p||W(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,p){return f=f>>>0,p||W(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,p){return f=f>>>0,p||W(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,p){return f=f>>>0,p||W(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,p){return f=f>>>0,p||W(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readIntLE=function(f,p,T){f=f>>>0,p=p>>>0,T||W(f,p,this.length);for(var P=this[f],J=1,O=0;++O<p&&(J*=256);)P+=this[f+O]*J;return J*=128,P>=J&&(P-=Math.pow(2,8*p)),P},a.prototype.readIntBE=function(f,p,T){f=f>>>0,p=p>>>0,T||W(f,p,this.length);for(var P=p,J=1,O=this[f+--P];P>0&&(J*=256);)O+=this[f+--P]*J;return J*=128,O>=J&&(O-=Math.pow(2,8*p)),O},a.prototype.readInt8=function(f,p){return f=f>>>0,p||W(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,p){f=f>>>0,p||W(f,2,this.length);var T=this[f]|this[f+1]<<8;return T&32768?T|4294901760:T},a.prototype.readInt16BE=function(f,p){f=f>>>0,p||W(f,2,this.length);var T=this[f+1]|this[f]<<8;return T&32768?T|4294901760:T},a.prototype.readInt32LE=function(f,p){return f=f>>>0,p||W(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,p){return f=f>>>0,p||W(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readFloatLE=function(f,p){return f=f>>>0,p||W(f,4,this.length),n.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,p){return f=f>>>0,p||W(f,4,this.length),n.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,p){return f=f>>>0,p||W(f,8,this.length),n